Commit Graph

1106 Commits

Author SHA1 Message Date
b972acbacc Fix stream reads (#894)
No changes expected
2022-12-18 06:49:13 -08:00
f41dfaebdf Merge pull request #887 from EmosewaMC/ServerShutdown
Improve server shutdown process
2022-12-18 15:41:58 +01:00
12ab094082 Merge pull request #892 from DarkflameUniverse/windows-debug-fixes
Resolve some string related issues for Windows Debug
2022-12-18 15:25:17 +01:00
e1bcde628f Implement lower cap datagram size (#890) 2022-12-17 20:54:41 -08:00
1da2db9db6 Resolve some string related issues for Windows Debug 2022-12-17 16:03:18 +00:00
5d0de99390 Merge remote-tracking branch 'upstream/main' into ServerShutdown 2022-12-16 19:09:01 -08:00
2b56dfbc89 Merge remote-tracking branch 'upstream/main' into MoreImprovements 2022-12-16 19:08:51 -08:00
631365b7f7 Add change idle flags behavior and GM (#871)
* update naming for animation flag enum value 0

* Add change idle flags behaviors and GM

* default to 0 when none is given
2022-12-16 15:24:13 -06:00
32f8bda538 Allow the player to be interrupted (#881) 2022-12-16 15:23:38 -06:00
cd78a3dec7 Fix cannon super charge speed (#883)
* Fix cannon

* Update SGCannon.cpp
2022-12-16 15:23:09 -06:00
a2ca273370 Cleanup behavior bitstream reads (#888)
* Add failArmor server side

Address out of bounds reading in behavior

Address the basicAttackBehavior reading out of bounds memory and reading bits that didnt exist, which occasionally caused crashes and also caused the behavior to do undefined behavior due to the bad reads.

Tested that attacking a wall anywhere with a projectile now does not crash the game.  Tested with logs that the behavior correctly returned when there were no allocated bits or returned when other states were met.

Add back logs and add fail handle

Remove comment block

Revert "Add back logs and add fail handle"

This reverts commit db19be0906fc8bf35bf89037e2bfba39f5ef9c0c.

Split out checks

* Cleanup Behavior streams
2022-12-16 15:23:02 -06:00
04ccd7ebe4 Merge remote-tracking branch 'upstream/main' into ServerShutdown 2022-12-16 04:07:08 -08:00
b33a3df012 Scale timers 2022-12-16 04:02:54 -08:00
0d460c0eb3 Update WorldServer timings 2022-12-16 03:46:38 -08:00
3f1b4339f5 Improve chat and Auth
Also change most uses of int to specified lengths.
2022-12-16 02:24:02 -08:00
e78dc0b874 Merge branch 'MoreImprovements' of https://github.com/EmosewaMC/DarkflameServer into MoreImprovements 2022-12-16 01:28:52 -08:00
b1d4153f00 Merge remote-tracking branch 'upstream/main' into MoreImprovements 2022-12-16 01:28:34 -08:00
1ed3af63b9 Log some recvfrom errors on linux (#885) 2022-12-15 22:32:36 -08:00
213c3c37b0 Fix crash in BasicAttackBehavior (#862)
* Add failArmor server side

Address out of bounds reading in behavior

Address the basicAttackBehavior reading out of bounds memory and reading bits that didnt exist, which occasionally caused crashes and also caused the behavior to do undefined behavior due to the bad reads.

Tested that attacking a wall anywhere with a projectile now does not crash the game.  Tested with logs that the behavior correctly returned when there were no allocated bits or returned when other states were met.

Add back logs and add fail handle

Remove comment block

Revert "Add back logs and add fail handle"

This reverts commit db19be0906fc8bf35bf89037e2bfba39f5ef9c0c.

Split out checks

* Remove case 2

* Update SkillComponent.cpp
2022-12-15 22:10:58 -08:00
3c581fffbb Remove magic numbers
Replace magic numbers with constexpr calculated times.

Tested that trying to create a new instance while shutting down doesn't allow a new instance to be created.
2022-12-15 20:39:29 -08:00
4775dbf27f Condense frame rates 2022-12-15 19:55:07 -08:00
e1cc25759e Merge remote-tracking branch 'upstream/main' into ServerShutdown 2022-12-15 18:43:28 -08:00
b7341c8106 Resolve warnings, change config init order and remove unused Game variables for all servers (#877)
* Resolve warnings and change init order

Initialize dConfig first, before logger so we know whether or not to log to console
Initialize namespace Game variables to nullptr so they are a known value if accessed before initialization.
Removed unused Game variables
Replaced config with a pointer instead of referencing something on the stack.
Assign return values to system calls to silence warnings.

Tested that the server still compiles, runs and allows me to load into the game.

* Only start Master of config files exist

Also default the logging to console to on on the off chance the files exist but are wrong / corrupted.
2022-12-15 08:13:49 -06:00
1afe717563 Properly exit
Properly exit based on the path taken to shutdown master.

Tested that shutting down through sigint or sigterm returns -1
Tested that a segfault exits the program properly
Need to test that players who are trying to connect while master is shutting down are not able to spawn more child worlds.
2022-12-15 05:46:03 -08:00
435761f64b Improve shutdown 2022-12-15 04:14:00 -08:00
9659000569 Merge branch 'master-logs' into ServerShutdown 2022-12-15 03:11:10 -08:00
5292f36417 Packages updates (#864)
Update packages to not open if you dont have enough room.  Update packages to no longer allow them selves to be open unless you meet the pre-reqs.
2022-12-11 00:27:01 -08:00
da910309a0 Remove unneeded commands (#880)
* Remove unneeded commands

* Thank you aron
2022-12-08 15:32:47 -06:00
430c6da4a7 Merge pull request #879 from EmosewaMC/main
Fdb NULL fixes
2022-12-08 13:51:55 +01:00
d5613b8034 hot fix 2022-12-08 04:44:56 -08:00
8886bf6547 Address Force movement behaviors triggering twice (#878) 2022-12-07 23:13:25 -08:00
a14e16237b Only start Master of config files exist
Also default the logging to console to on on the off chance the files exist but are wrong / corrupted.
2022-12-06 19:30:43 -08:00
fde62a4777 Fixed typo (#875) 2022-12-06 08:36:42 -06:00
46f085eb4b Resolve warnings and change init order
Initialize dConfig first, before logger so we know whether or not to log to console
Initialize namespace Game variables to nullptr so they are a known value if accessed before initialization.
Removed unused Game variables
Replaced config with a pointer instead of referencing something on the stack.
Assign return values to system calls to silence warnings.

Tested that the server still compiles, runs and allows me to load into the game.
2022-12-06 04:39:09 -08:00
18a0ae599b Add bandwidth limit of 10kb/s(#863) 2022-12-05 16:08:47 -08:00
0a616f891f Change File Finder (#873) 2022-12-05 09:04:59 -06:00
2ba3103a0c Implement FDB to SQLite (#872) 2022-12-05 00:57:58 -08:00
e8ba3357e8 Add support to reload the config (#868) 2022-12-04 16:25:58 -06:00
de3e53de6c Fix Model Vault (#870)
Allow pets, rockets and racecars to be stored in vault
2022-12-04 16:25:25 -06:00
ab5adea24c Move CDServer migration history table (#867) 2022-12-03 13:17:13 +01:00
e1af528d9b Add SlashCommand for spawngroup (#858) 2022-12-02 03:47:27 -08:00
d8945e9067 Add migration to make play_key_id nullable (#857)
since there is an option not to use play_keys
2022-12-02 03:46:54 -08:00
2b9c014b86 Quiet activity manager timer logs (#861) 2022-12-02 00:44:20 -08:00
63460ea00d Fix bricks not creating new stacks (#860)
Unintentionally, bricks were not creating new stacks if you tried to get another stack.  This prevents some missions from being completed.  This issue is now fixed
2022-11-30 01:04:46 -08:00
09dfb6df3a Address news feed showing up on every world transfer (#855)
Addresses the news feed showing up on every world transfer
2022-11-27 22:19:15 -08:00
56da3f8543 Remove Locale (#808)
* Remove Locale (finally)
2022-11-27 16:56:55 -08:00
3222e78815 Implement undo action for pre-built models (#830)
Brick building as of right now does not implement the undo action properly.  This commit addresses the issue with undoing button being non-functional server side and implements the GM needed for addressing further issues.

Implement GameMessage UnUseModel which is called when a model in BrickBuilding is UnUsed.  Important for UGC content down the line.  Final code has been tested as follows:
1. Placed a model in brick build
2. saved placed a brick
3. repeat 2 and 3 twice more for 6 total models
4. Place a new model in brick mode and then edit all 7 models into one brick model instance
5. Pressing undo returns the converted model to the inventory and properly discards the other 6 without crashing.  Intended live behavior is to store this in the inventory instead however behind the scenes work is needed to implement UGC models properly.

Implement enum

Implement the BlueprintSaveResponseType enum so there are less magic numbers sent via packets.
Correct int sizes from unsigned int to uint32_t

Add deserialize test

Add a test for de-serializing a GM that is sent to the client.  Assertions verify the data is in the correct order and has no extra information.
2022-11-27 16:48:46 -08:00
3939f19b08 Add Remove Buff Behavior and patch infinite use Imagination Backpack(#845)
Testing does not reveal any issues with existing buff removals sending this GM as well and may fix more bugs that were unknown, or cause more.
2022-11-27 16:40:14 -08:00
1556f580d6 Improve Diagnostics logging (#841)
Improve diagnostics to write the file name and signal to the log file should there be a crash.
2022-11-27 13:47:14 -08:00
d382eb3bc2 Fix Boogie Down (#854)
- Give entities that have a script component ID of zero a script component still
- Progress scripted entity missions within the for loop as we do for script calls

Tested that Boogie Down is (finally) completable.
Tested that Mission 737 is still completable
Checked that missions progressed inside OnEmoteReceived scripts to not double trigger progression
2022-11-27 04:03:30 -08:00