Commit Graph

1135 Commits

Author SHA1 Message Date
12d7ab9034 Remove null check in GetPosition (#1109)
Get ready for null pointer errors
2023-06-06 22:48:41 -07:00
b589755655 Fix out of bounds access in dpGrid (#1106)
Fixes an issue where we would try to access an array out of the physics bounds
2023-06-03 16:28:27 -07:00
8ae1e1bc6b Fix: remove ability to buy items from a vendor if they don't sell said item (#1105) 2023-06-03 00:40:46 -07:00
9fabff16e4 Update AMFDeserialize (#1096)
Per ISO C++ standard 9.7.1 5.3,
"Otherwise the type of the enumerator is the same as that of the preceding enumerator unless the
incremented value is not representable in that type, in which case the type is an unspecified integral
type sufficient to contain the incremented value. If no such type exists, the program is ill-formed."
it is not undefined behavior to set a scoped enum to a value outside of its constant range because all values of the underlying type can represent the scoped enum
2023-06-02 06:44:49 -05:00
e47169fec5 Fix: Some platforms not using the same RNG for every roll (#1103)
* Test changes

* Update ObjectIDManager.h

* Revert "Update ObjectIDManager.h"

This reverts commit 3e4d169718.

* Revert "Test changes"

This reverts commit 8e16573f93.

* Use random engine
2023-05-26 23:22:31 -05:00
238751f14e Remove extra cout (#1101) 2023-05-25 15:29:46 -05:00
59387e5fe3 fix: update type in am blue x script (#1095)
Fixes #1094
2023-05-17 13:17:34 -05:00
f9b52ad01c Merge pull request #1025 from EmosewaMC/more-cdclient-cleanup
Implement animation table
2023-05-14 15:08:18 +02:00
1f3df08730 Update GameMessages.cpp 2023-05-13 16:22:13 -07:00
9708ea28dc refactor: removed hardcoded ag laser logic (#1079)
* Removed hardcoded laser logic

* Address feedback
2023-05-13 18:21:17 -05:00
8a065ad074 Merge remote-tracking branch 'upstream/main' into more-cdclient-cleanup 2023-05-13 16:16:58 -07:00
2117a18d62 Enable artifact uploading and replace upload parameters (#1091) 2023-05-13 17:23:09 -05:00
4fe335cc66 Refactor: Amf3 implementation (#998)
* Update AMFDeserializeTests.cpp

Redo Amf3 functionality

Overhaul the whole thing due to it being outdated and clunky to use

Sometimes you want to keep the value

Update AMFDeserializeTests.cpp

* Fix enum and constructors

Correct enum to a class and simplify names.
Add a proper default constructor

* Update MasterServer.cpp

* Fix bugs and add more tests

* Refactor: AMF with templates in mind

- Remove hard coded bodge
- Use templates and generics to allow for much looser typing and strengthened implementation
- Move code into header only implementation for portability

Refactor: Convert AMF implementation to templates

- Rip out previous implementation
- Remove all extraneous terminology
- Add proper overloads for all types of inserts
- Fix up tests and codebase

* Fix compiler errors

* Check for null first

* Add specialization for const char*

* Update tests for new template specialization

* Switch BitStream to use references

* Rename files

* Check enum bounds on deserialize

I did this on a phone
2023-05-13 17:22:00 -05:00
9d105a287d fix: not everything attached to a path is a moving platform (#1090) 2023-05-13 13:47:28 -07:00
1af70161eb fix: orient player correctly when using pirate mast in FV (#1087)
* fix: frient player correctly when using pirate mast in FV

* only get mast name once
2023-05-13 09:31:13 -05:00
739eae5244 feature: Implement FallSpeedBehavior (#1084)
* Hacky FallSpeedBehavior

* Fixup

* Make it more robust like speedboost
add check for default
Fix error in GetActiveSpeedboosts

* simplify and address feedback
2023-05-13 09:30:59 -05:00
07803a7ca2 Merge pull request #1085 from DarkflameUniverse/issue-436
fix: not exiting shooting gallery when clicking activity close button
2023-05-13 14:11:16 +02:00
61ae619886 Merge pull request #1032 from EmosewaMC/FixWingreaper
Fix Wingreaper birds not moving
2023-05-13 14:04:37 +02:00
8a8006bee5 Merge pull request #1088 from EmosewaMC/movingPlatformsFix
Fix deserialization errors for MovingPlatforms
2023-05-13 14:03:24 +02:00
c5afd7d4a3 Fix deserialization errors for MovingPlatforms
- Fixes deserialization errors for MovingPlatforms that did not have an attached_path, but had a MovingPlatform component >= id 0.
2023-05-13 04:04:15 -07:00
a809f36548 Address feedback 2023-05-11 09:23:48 -05:00
0e01948414 Define comp 103 as Gate Rush Control comp (#1078)
Fix typo in 115
2023-05-11 06:54:41 -05:00
6e6a05fc1d fix: prevent negative imagination (#1083)
* fix: prevent negative imagination
And fail switch if we don't have enough imagination

* Make better
2023-05-11 06:37:02 -05:00
5af5b0f1c1 fix: not exiting shooting gallery when clicking activity close button
Fixes #436
Fixes crash when replaying as well
2023-05-10 19:26:04 -05:00
bf0ae6f181 fix: add check for arg nums on handlepushobject (#1081) 2023-05-10 07:44:21 -05:00
b1cd2776fa fix: make exiting the race work (#1082) 2023-05-10 04:05:56 -05:00
4ff5afd9f7 Fix race exit dialogue always exiting (#1077)
Fixes #1048
Tested that closing the dialog via esc, the x in the top right, or the big red x doesn't exit the race
Tested that the green check button does exit the race
2023-05-09 00:40:00 -05:00
ce931c2cfe Fix erroneous GM message ID (#1076) 2023-05-09 00:39:43 -05:00
7aad6e4bc2 Make header skips more obvious (#1074)
* Make header skips more obvious

seeing inStream.Read(LWOOBJID) is much less clear than a macro which very clearly skips the header.

* Formatting pass
2023-05-08 06:31:10 -05:00
64a947e338 Merge pull request #1069 from EmosewaMC/NullChecks
Add more null checks and split out code
2023-05-08 12:10:58 +02:00
8ceabadcde Removed some hardcoded logic for racing (#1075)
Including return world and what activity ID to use for rewards
2023-05-08 04:38:08 -05:00
7e61638595 Reinforce PacketUtils writing (#1073)
Ensure the correct size is written to the bitstream.  It is always supposed to write 64 bits.
2023-05-06 23:45:07 -07:00
33c12f3bc5 Fix bounds check (#1071)
Fix Chat Crash

Update CMakeVariables.txt

Add checks for all servers
2023-05-06 13:32:53 -05:00
7949907517 Fix bounds check (#1070) 2023-05-06 13:32:46 -05:00
cffb1449d8 Add better logs to saving (#1068)
* Fix overread in projectile behavior

* Fix stuns

* Correctly read in bitStream

* Fix projectile behavior

* Address movement type issues

* Update shutdown time to be accurate

* Fix small issues

* Fix missing template

* Add note for compile jobs

* Add bounds check for speed division

* Add better logs
2023-05-06 13:32:38 -05:00
5479cf4428 Fix typing of some player flag variables (#1067)
Mainly on properties

Tested that the spider queen mission can now be progressed
2023-05-06 13:32:26 -05:00
df3265c82e Add more null checks and split out code
Makes crash logs more apparent for what stage they crashed in for the engine updating.
2023-05-05 23:31:30 -07:00
e297aacc68 Breakout message identifiers (#1065)
and make them scope enums
2023-05-03 16:38:32 -05:00
c17b5fa586 prevent ressurecting with more than max stats (#1064)
for health and imagination
2023-05-03 01:31:50 -05:00
6aa90ad5b2 Breakout rest of the enums from dCommonVars and clean it up (#1061)
* Breakout rest of the enums from dcommonvars
so we don't have to deal with merge conflicts
ePlayerFlags is not a scoped enum, yet, due to it's complexity

* address feedback

* make player flag types consistent

* fix typo
2023-05-02 17:39:21 -05:00
e8590a5853 Add tests for LDF parsing and serialization. Cleanup LDF (#1062)
* Add tests and cleanup LDF header

Also implements a speedup by using overloaded operators to put numbers directly to a stream as opposed to doing to_string first.

Stage 2 of re-write

Reduce scoping
Add further optimizations
Fix more edge cases
Split out tests to many smaller ones

Use EXPECT_NO_THROW

Add edge cases to test

Added these first with the before to confirm they failed, and now will be adding the remaining fixes needed to make the tests pass.

Add edge case testing for LDF strings

Add further tests

Use characters instead of char*

Update AMFDeserializeTests.cpp

Add null tests

* Add Test Fixture for dCommon

* Add speed test

* Convert to using string_view

* Add explanation on early return

* Remove "testing" code
2023-05-02 17:19:20 -05:00
2f919d101f Fix bad lot comparison in AG Jet Effect Server (#1063) 2023-05-02 03:27:16 -07:00
4976701f37 breakout object bits into scoped enum (#997)
* breakout object bits into enum class
tested that things still work as expected
use the inplace set bits where appropiate

* add inline
2023-04-25 13:17:40 -05:00
de1ddd3125 Merge pull request #1019 from EmosewaMC/inventoryTypeCorrections
Correct incorrect inventory types
2023-04-23 12:49:43 +02:00
58951dced0 Remove all need for a local ugc server (#1054) 2023-04-22 12:32:32 -07:00
2e284eb2ce Implement Timer handlers in triggers and ontimerdone trigger event (#1031)
* Works, but AOE is broken

* Address Feedback

* fix typo
2023-04-18 12:48:03 -05:00
da6ca82ae2 add missing overrides (#1060) 2023-04-18 01:40:33 -05:00
f60ea40acc Add random end of race behavior (#1056)
* randominze between 0 and 7 inclusive
for the different animation types

* Make the end behavior deterministic unpon loading
So that all players see the same animations for each other
2023-04-18 01:40:20 -05:00
fbfa778d3d Patch ghosting exclusions (#1059) 2023-04-17 14:19:26 -05:00
4734996c7c Resolve most compiler warnings (#1053) 2023-04-12 11:48:20 -05:00