Commit Graph

630 Commits

Author SHA1 Message Date
d964a83d6d Respawn points work now.
Note that some of them weren't present in clientnpc and will need to be
manually added later.
2020-08-25 03:34:53 +02:00
2f1358c124 Potential solution for the tutorial problem.
Will need to be tested on the public server.
2020-08-25 01:57:53 +02:00
c1b6ae8466 No need to unpack zero-length packet structs.
Also fixed formatting and added subheading to README.md.
2020-08-25 01:08:02 +02:00
14bc368073 Dynamically allocate the Player struct in PlayerView.
This way we're not always passing it around by value.
Note that the Player structs in CNSharedData are still
pass-by-reference. Will probably change this later.
2020-08-25 00:59:55 +02:00
6d3868349d removed debug output in keepAliveTimer 2020-08-24 16:12:49 -05:00
16bca39dae added simple timer system to CNShardServer 2020-08-24 16:11:40 -05:00
Onii-chan
afbf309c7e
Add player revive, vehicle mount/dismount and more (#33) 2020-08-24 16:04:56 -05:00
28ad1a0c25 fix windows support for sockets 2020-08-24 13:23:28 -05:00
JadeShrineMaiden
ff5f3966e3
Sanity checks + Starting level changes (#31)
* Sanity checks + Starting level changes

- Item movement handler checks to make sure items aren't moved from equipment slot to equipment slot.
- Item give command checks to make sure an out of bounds item is not spawned (Below iType 0 or above iType 8)
- Players now begin at level 36, consequently the item give command does not level you up now.

* Sanity Check

- Prevents out of bounds item movement by comparing it to AINVEN_COUNT.
2020-08-24 03:07:51 -05:00
55add82843
Merge pull request #32 from dongresource/work
-Wall, #pragma once, nanoSummonHandler() cleanup, verbosity levels
2020-08-23 16:57:58 -05:00
e99feb03d5 Add verbosity levels. 2020-08-23 23:09:31 +02:00
8105d0aa88 properly handle socket errors in recieving packets 2020-08-23 15:09:51 -05:00
756074cc62 Remove redundant initialization in nanoSummonHandler(). 2020-08-23 19:46:51 +02:00
51a8cc8bdf Silence -Wall warnings. 2020-08-23 19:19:12 +02:00
651ccba932 Replace ifdef guards with #pragma once
tl;dr this has potentially significant compilation speed benefits.
2020-08-23 19:14:54 +02:00
561a809f33 load warps into memory in NPCManager::init 2020-08-23 11:26:25 -05:00
0d27412d81 added getNearbyPlayers 2020-08-23 10:42:37 -05:00
Zenpock
1d792a21dd
Npc Warp implementation (#29)
* Update CNShardServer.hpp

* Update ChatManager.cpp

* Update ChatManager.hpp

* Update NPCManager.cpp

* Update NPCManager.hpp

* Add files via upload

* Update NPCManager.cpp

* Update NPCManager.cpp

* Update ChatManager.cpp

* Update ChatManager.cpp

* Update NPCManager.cpp

* Update NPCManager.cpp

Co-authored-by: CPunch <sethtstubbs@gmail.com>
2020-08-23 10:32:25 -05:00
d6b96389be added sanity checks to nanos 2020-08-22 22:15:27 -05:00
dongresource
6129c0b4e2
Players can now see eachother's nanos. (#28) 2020-08-22 19:52:54 -05:00
88953541ef added INITSTRUCT to zero-out data 2020-08-22 19:26:18 -05:00
94b0dc724e major refactoring 2020-08-22 18:31:09 -05:00
0ff1f74cd3 fixed inet_ntoa warnings 2020-08-22 14:02:58 -05:00
35b424c531 fixed warnings for VC++ 2020-08-22 13:38:27 -05:00
Zenpock
4f10ee0505
MenuChat Added (#25)
* Update CNShardServer.hpp

* Update ChatManager.cpp

* Update ChatManager.hpp

Co-authored-by: CPunch <sethtstubbs@gmail.com>
2020-08-22 13:11:47 -05:00
cd9fb6ec25 added sanity check to exitGame() 2020-08-22 13:08:37 -05:00
Onii-chan
56bf0db20d
Added more nano features (commands, equip & unequip, powers) (#26)
* Revert "fixed window build"

This reverts commit b94f602537.

* Revert "Revert "fixed window build""

This reverts commit dac4457ed2.

* Add nano power feature

* Update CNShardServer.hpp

* Update CNShardServer.hpp

* Test: Add nano power feature

Nano powers are set to the first power in its selection by default.

* Update NanoManager.cpp

* Test: More nano features

* Update NanoManager.hpp

* Update PlayerManager.hpp

* Update PlayerManager.cpp

* Updated indentations

* Update PlayerManager.cpp

* Add DEBUGLOG()

Co-authored-by: CPunch <sethtstubbs@gmail.com>
2020-08-22 13:02:08 -05:00
35c622d8a2 Add support for verbose logging. 2020-08-22 19:39:13 +02:00
43f2def80b Report unhandled packets in string form. 2020-08-22 19:19:46 +02:00
0ac600e223 Extracted all packet ids to a single, definitive enum.
It also contains other constant values that might be relevant at some
point.
2020-08-22 17:25:42 +02:00
FinnHornhoover
5f65a84b02
Fix unhandled exception in NPCManager (#24)
* fixed PROTOCOL_VERSION not being defined

* handle exceptions in NPCManager init
2020-08-22 01:46:52 -05:00
f71e1349c1 temp fix for U16toU8 edgecase 2020-08-21 22:11:04 -05:00
cff382a8ce sets a limit for sendData() 2020-08-21 21:32:22 -05:00
bbd6c5b532 moved header libraries 2020-08-21 21:03:12 -05:00
JadeShrineMaiden
ab6df26f92
Disabled GM mode (#22)
Temporarily disabled, players can now use item commands without GM mode.
2020-08-21 19:38:10 -05:00
c5efbceca3 added sanity checks for sendPacket() 2020-08-21 19:33:42 -05:00
f289c72f6f populated NPCManager 2020-08-21 17:14:11 -05:00
JadeShrineMaiden
caaffcbe3d
Item Deletion and extra fixes (#17)
* Deleting Items

* fixes

* fixes 2

* Basic GM login

* Update ItemManager.cpp

Co-authored-by: Raymonf <raymonf@outlook.com>
2020-08-21 15:09:52 -05:00
3fe1a02200 include 0104 if PROTO_VERSION is undefined 2020-08-21 14:29:09 -05:00
cd19c54824 itemManager now uses a reference to the PlayerView 2020-08-21 14:28:14 -05:00
Raymonf
88d08ffca7
Fix MSVC compilation by not using non-standard struct initialization (#20)
Co-authored-by: Raymonf <Raymonf@users.noreply.github.com>
2020-08-21 14:17:06 -04:00
dongresource
df18f3ccd1
PROTOCOL_VERSION, test items, MOTD fix (#18)
* Cleaned up protocol selection.

* cmake now works even if protocol option is omitted
* make now supports protocol selection
* removed PACKET_VERSION/CNPROTO_VERSION* redundancy
* ubuntu appveyor script has yet to be written
* cleaned up some trailing spaces

* Add some test items.

Ironically, this change is untested.

* [bugfix] Transmit MOTD when entering the game, not when loading screen fades.

This fixes unnecessary retransmission when /warping.
2020-08-21 12:38:45 -05:00
1669ee3660 Merge branch 'master' of https://github.com/OpenFusionProject/OpenFusion 2020-08-21 00:31:09 -05:00
5d0b30b4cb added AINVEN_COUT for 0728 2020-08-21 00:31:00 -05:00
Raymonf
0041da795a
Build multiple packet versions on AppVeyor for Windows (#14)
* Move to PowerShell script for Windows build

* Allow CMake to override struct version

* PACKET_VERSION option

* Rename CNPROTO_CUSTOM to CNPROTO_OVERRIDE

Co-authored-by: Raymonf <Raymonf@users.noreply.github.com>
2020-08-21 01:18:19 -04:00
eee1b52722 fixed ItemManager 2020-08-20 22:25:39 -05:00
JadeShrineMaiden
aa2adcd9e2
Items Implementation (#11)
* Item Manager (Initial Implementation)

* Item Manager (Second Phase)

* Item Manager (Phase Three)

* Not Working Code

* Inventory Implementation (Complete?)

* Items Implementation

-Fixed Indentations
-Final touches to make it all work

* Update Makefile

* Added small comments

-- needs to be fixed
2020-08-20 21:10:14 -05:00
dongresource
e044b4251a
Cleanup indentation. (#10) 2020-08-20 19:37:34 -05:00
7b085e9c8b added sanity checks 2020-08-20 18:50:30 -05:00
1425074ccb edited config.ini default back, better plr pos 2020-08-20 16:59:32 -05:00
Raymonf
c66ac111ab Silence codecvt deprecation warning on VC++ 2020-08-20 17:47:38 -04:00
6857f50c30 added basic NPCManager 2020-08-20 16:43:48 -05:00
b43628a19d faster player distance check 2020-08-20 13:19:03 -05:00
fbc3c79aa2
Merge pull request #6 from CakeLancelot/add-more-movement-packets
Add zipline, slide, cannon, and jump pad packets
2020-08-20 11:38:13 -05:00
93d973bf21 small CNStructs.hpp refactor 2020-08-20 11:37:47 -05:00
7cf239e3af added 0728 structs + small CNStruct.hpp refactor 2020-08-20 11:36:29 -05:00
CakeLancelot
14d556976d Add zipline, slide, cannon, and jump pad packets
Cannon still looks wonky from other player's PoV, something's up with the rotation - will investigate later.
2020-08-20 11:26:26 -05:00
c0abab39ae better structs header 2020-08-20 10:45:50 -05:00
dff6e8c23b better structs header 2020-08-20 10:44:49 -05:00
d6e1f57c23 merged master 2020-08-20 10:43:37 -05:00
Onii-chan
795107a274 Added nano summon feature 2020-08-20 11:51:02 +02:00
42597c2a7a bitch, we good! 2020-08-19 22:32:33 -05:00
Raymonf
bb1ce5c28d fix: MOTD not showing up without config.ini
Since we do an early return without a config.ini file, the MOTDSTRING will still be the default std::string value (""), causing the game to output "Gamemaster: ". To fix this, we'll just hardcode the preferred default value for now.
2020-08-19 22:39:23 -04:00
Raymonf
e75049fc98 MSVC support: alternative implementation of getTime() 2020-08-19 22:26:46 -04:00
Raymonf
1ec4634f69 long -> int64_t; push and pop the original packing for structures
fixes the issue with the tutorial thing
2020-08-19 22:25:19 -04:00
4d9072a752 added radio's logo, started NPCManager 2020-08-19 17:21:35 -05:00
a0d59419f1 changed non-blocking failure to a socket shutdown 2020-08-19 15:54:44 -05:00
94cb89dd6b fixed warnings for windows mingw 2020-08-19 15:42:44 -05:00
ba81db97ef organized structs 2020-08-19 15:07:11 -05:00
ec84d6ca58 scraped all 0104 structs 2020-08-19 15:00:39 -05:00
b8f7d2efc6 added comments to chatHandler() 2020-08-19 13:25:54 -05:00
e7b58c4b32 fixed formatting 2020-08-19 13:22:51 -05:00
8328ebf4f3 Chat Feature
Chat with other players, no swearing!!!
2020-08-19 18:47:25 +01:00
a17b72b0b3 Revert "Chat Feature"
This reverts commit 95e454232a.
2020-08-19 18:43:24 +01:00
95e454232a Chat Feature
It just works
2020-08-19 18:37:15 +01:00
f2059c9ce1 merged motd and exit patch by dongresource 2020-08-19 12:22:54 -05:00
24d30a05bf added heartbeat support 2020-08-18 20:34:39 -05:00
b2325eb308 login server moved to main thread 2020-08-18 19:52:02 -05:00
47b76b422c added sanity checks 2020-08-18 19:11:31 -05:00
9d366e3720 inital commit 2020-08-18 15:42:30 -05:00