Commit Graph

388 Commits

Author SHA1 Message Date
Aaron Kimbrell
ca78a166d9
fix #1194 (#1196) 2023-09-19 05:59:02 -05:00
Aaron Kimbrell
d893ecddeb
Renamed RocketLaunchLUP to MultiZoneEntrance (#1185) 2023-08-18 14:14:40 -05:00
David Markowitz
5eca25e42a
refactor: Move CDClient Database away from constructor queries (#1164)
* Move away from constructor queries

Fix up other large tables to have proper backup lookups

Revert "idk im just dumb ig"

This reverts commit 5d5be5df53b8959b42b291613d7db749a65a3585.

idk im just dumb ig

* Fix slow components registry lookup

* add define for cdclient cache all

* Update CDBehaviorParameterTable.cpp
2023-08-10 23:27:40 -05:00
David Markowitz
2cc13c6499
chore: Make serialize actually virtual (#1156)
* Make serialize actually virtual

* fix serialize and make update virutal

* Update VendorComponent.h

* Remove flag var

* Update SoundTriggerComponent.h

---------

Co-authored-by: Aaron Kimbrell <aronwk.aaron@gmail.com>
2023-08-10 14:33:15 -07:00
Aaron Kimbrell
cefdfc696a
fix: Implement proper Sound trigger component serialization (#1160)
* cleanup

* more cleanup and fully implement the sound trigger
and racing sound trigger

* more cleanup, and better defaults

* fixes and tested

* update initializor for guid and when to load sound guids

* make racing sound trigger it's own component

* fix type

* Remove global
move serializes

---------

Co-authored-by: David Markowitz <EmosewaMC@gmail.com>
2023-08-06 15:38:12 -05:00
Aaron Kimbrell
a29253d2f0
feature: Donation Vendor Component (#1168)
* refactor: Vendor inventory loading
Implement proper delta compression
dynamically determine multicostitems and standard cost items
Quatantine max's custom code

* WIP

* progress missions

* address feedback

* fix newline

* Cleanup

* oops

* fix default for nexus tower jawbox
cleanup some logs

* remove log

* remove include that got added back
2023-08-03 21:44:03 -05:00
David Markowitz
d8a5fd49a4
chore: Small movementAiComponent cleanup (#1145)
* rename and cleanup file

* more

* fix broken function

* Further naming fixes

t

Revert "Further naming fixes"

This reverts commit 057189982ba56788d48f9265d815e6c562ba6328.

* next step

* undo all testing changes

* minor tweaks
2023-08-03 21:38:04 -05:00
David Markowitz
208ed02158
Fix incorrect kick out of rebuilds (#1120) 2023-08-03 21:37:27 -05:00
Aaron Kimbrell
c2b4aa4026
refactor: Vendor inventory loading (#1163)
* refactor: Vendor inventory loading
Implement proper delta compression
dynamically determine multicostitems and standard cost items
Quatantine max's custom code

* address feedback

* fix newline

* oops

* remove header

* fix default and const for

* he said make it a reference too, not just const
2023-08-03 05:51:52 -05:00
Gie "Max" Vanommeslaeghe
d1316cfc9f
Merge pull request #1107 from EmosewaMC/first-draft-leaderboard-re-write
feat: Leaderboards
2023-07-24 00:29:17 +02:00
TAHuntling
54454973a1
Distance for pet digs increased slightly to help with navmesh issues (#1151) 2023-07-22 02:49:23 -07:00
David Markowitz
887e2a25f0 Fix race score bugs
num wins serialized properly
scores are saved and num wins and times played are incremented properly
2023-07-21 23:18:51 -07:00
David Markowitz
34392932b3 Merge branch 'main' into pr/1107 2023-07-21 19:40:30 -07:00
David Markowitz
0c0f7216a1 Merge branch 'main' into pr/1107 2023-07-21 19:38:59 -07:00
TAHuntling
342da56678
Added Player Rewards for Solo Racing (#1150)
* Added Player Rewards for Solo Racing

* Fixed Dual PlayersRating multiplication

* Checking for solo player fixed

* Another change to fix issues
2023-07-21 19:37:31 -05:00
David Markowitz
3e3148e910
Move dZoneManager to game namespace (#1143)
* convert zone manager to game namespace

* Destroy logger last
2023-07-17 17:55:33 -05:00
David Markowitz
080a833144
Convert BrickDatabase to namespace (#1142)
* Convert BrickDatabase to namespace

This did not need to be a class.

* Fix linker errors

* convert to anonymous namespace

so the cache is unmodifiable outside the brickcache

* Move to lower scope level and remove log
2023-07-17 17:55:25 -05:00
David Markowitz
455f9470a5
Move EntityManager to Game namespace (#1140)
* Move EntityManager to Game namespace

* move initialization to later

Need to wait for dZoneManager to be initialized.

* Fix bugs

- Cannot delete from a RandomAccessIterator while in a range based for loop.

Touchup zone manager initialize

replace magic numbers with better named constants
replace magic zonecontrol id with a more readable hex alternative
condense stack variables
move initializers closer to their use
initialize entity manager with zone control

change initialize timings

If zone is not zero we expect to initialize the entity manager during zone manager initialization

Add constexpr for zone control LOT

* Add proper error handling

* revert vanity changes

* Update WorldServer.cpp

* Update dZoneManager.cpp
2023-07-15 13:56:33 -07:00
Aaron Kimbrell
9375c36c7b
fix: remove hardcoded rotations now that vehicles orient correctly (#1132) 2023-07-03 11:58:49 -05:00
David Markowitz
45256a0338 Merge remote-tracking branch 'upstream/main' into first-draft-leaderboard-re-write 2023-06-21 21:48:22 -07:00
David Markowitz
d340874284 more bug fixing
- fix weekly leaderboards
- fix ag classic vs dlu scoring
- fix sorting for survival ns
- fix sorting for racing
2023-06-21 19:46:01 -07:00
David Markowitz
132d31d3ab
Fix vehicle serialization during races (#1122)
* Fix vehicle serialization during races

- Add missing frame stats reading
- correct the inversion of rotation
- correct serialization order
- use proper dirty flags

Tested that racers are no longer sideways on certain vertical slopes and stay in sync throughout the whole race.

* Update ClientPackets.cpp

* Update ClientPackets.cpp

* Update VehiclePhysicsComponent.h
2023-06-20 09:19:21 -05:00
David Markowitz
2d31b7e4bb
Fix incorrect serialization of SendTeleport (#1121)
* Fix incorrect serialization of SendTeleport

- Fixes all incorrect teleports in the game
- remove hacks in mast teleport
- ...
- ......

Update GameMessages.cpp

* Remove stupid argument

there got it all out

* remove extra true
2023-06-18 00:00:36 -07:00
David Markowitz
f46bc33dd4
Fix prereq bug (#1118) 2023-06-17 19:20:05 -05:00
David Markowitz
2a0f63c0a1
Fix all smashables not playing animations (#1112)
Fixes an issue where most smashables did not explode into bricks upon death.  This included anything that was spawned or didnt have the flag is_smashable set.
Tested that in races, all objects smash into bricks
Tested that the player properly explodes in their car if they crash
Tested that Shooting Gallery plays the special smash animation when a ship is smashed
Tested that all spawned objects play smash animations

* Fix warning, Fix modular assembly not smashing

* Rename variable to correct name
2023-06-14 15:44:22 -07:00
David Markowitz
259f0c8371 Working in game again
hooray
2023-06-05 04:10:59 -07:00
David Markowitz
59d7121978 Merge remote-tracking branch 'upstream/main' into first-draft-leaderboard-re-write 2023-06-05 02:04:14 -07:00
David Markowitz
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
EmosewaMC
a43e03255c It compiles at least now 2023-05-30 04:38:19 -07:00
EmosewaMC
a595347211 Merge remote-tracking branch 'upstream/main' into first-draft-leaderboard-re-write 2023-05-30 04:11:53 -07:00
EmosewaMC
0107d05d55 draft 2023-05-30 04:11:37 -07:00
David Markowitz
8a065ad074 Merge remote-tracking branch 'upstream/main' into more-cdclient-cleanup 2023-05-13 16:16:58 -07:00
David Markowitz
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
Aaron Kimbrell
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
Gie "Max" Vanommeslaeghe
61ae619886
Merge pull request #1032 from EmosewaMC/FixWingreaper
Fix Wingreaper birds not moving
2023-05-13 14:04:37 +02:00
Aaron Kimbrell
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
Aaron Kimbrell
bf0ae6f181
fix: add check for arg nums on handlepushobject (#1081) 2023-05-10 07:44:21 -05:00
Aaron Kimbrell
b1cd2776fa
fix: make exiting the race work (#1082) 2023-05-10 04:05:56 -05:00
David Markowitz
7a067e7b48 Working in game!
- Add score saving for races
- Fix some bugs
- Still work to do.
2023-05-09 01:42:11 -07:00
Aaron Kimbrell
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
Aaron Kimbrell
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
Aaron Kimbrell
e297aacc68
Breakout message identifiers (#1065)
and make them scope enums
2023-05-03 16:38:32 -05:00
Aaron Kimbrell
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
Aaron Kimbrell
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
Aaron Kimbrell
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
Aaron Kimbrell
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
David Markowitz
4734996c7c
Resolve most compiler warnings (#1053) 2023-04-12 11:48:20 -05:00
Aaron Kimbrell
ce51438bc8
Implement some scripts for alpha FV (#1049)
* Implement maelstrom fog for alpha FV
add OnOffCollisionPhantom call to cppscripts
Add physics shape for gas blocking volume

* Add Ninja Sensie Script for alpha FV
and migration

* Fix private var casing

* And ninja wild scripts
they keep making me add more things

* address feedback

---------

Co-authored-by: Gie "Max" Vanommeslaeghe <gievanom@hotmail.com>
2023-04-12 11:46:31 -05:00
David Markowitz
308d56968a Use epsilon comparison 2023-04-11 22:25:02 -07:00
David Markowitz
541250176c
Resolve many issues with invisible enemies and End Behavior nodes not firing (#1044)
* Finall fix invisible enemies

* Add garbage collection

* Add comment

* Add constexpr for lagFrames
2023-04-05 08:57:47 -05:00
David Markowitz
47445ada54 Fix Wingreaper birds not moving
Fix an issue where the Wingreaper birds no longer moved.  The client seems to do the following:
Default speed set to 10.0f
Check the PhysicsComponent table for the column speed and if it exists set speed to that value and if the value was null set it to the default again.
2023-03-27 01:13:34 -07:00
David Markowitz
426bc963fe Add Animation Table logic 2023-03-26 05:18:45 -07:00
David Markowitz
1e4e1b914c Merge remote-tracking branch 'upstream/main' into more-cdclient-cleanup 2023-03-26 03:00:21 -07:00
David Markowitz
b432a3f5da Remove inlines
Clean up macros

more tomorrow

Cleanup and optimize CDActivities table

Remove unused include

Further work on CDActivityRewards

Update MasterServer.cpp

Further animations work

Activities still needs work for a better PK.

fix type

All of these replacements worked

Create internal interface for animations

Allows for user to just call GetAnimationTIme or PlayAnimation rather than passing in arbitrary true false statements
2023-03-26 02:59:46 -07:00
Aaron Kimbrell
c415d0520a
Implement some more trigger event calls and command handlers (#989)
* Implement some trigger event calls
and command handlers

* add zone summary dimissed GM

* break and remove log

* some cleanup in Gather Targets
and blocking out

* fix default value of unlock for play cinematic

* Log on errors
add enum for physics effect type
simplify nipoint3 logic
check arg count
add enum for End behavior

* tryparse for nipoint3

* totally didn't forget to include it

* bleh c++ is blah

* ???

* address feedback

* Fix for #1028
2023-03-25 05:26:39 -05:00
Aaron Kimbrell
72ca0f13ff
breakout gmlevel into a scoped enum (#996)
* breakout gmlevel enum and make it a class
tested that things still work
slash command,
chat restrictions,
packets and serializations

* fix GM level for some slash commands

* fix new use of this enum
2023-03-24 18:16:45 -05:00
David Markowitz
7671cc6865
CDClient cleanup and optimization (#1023)
* CDClient cleanup and optimization

- Use static function to get table name
- Remove unused GetName function
- Replace above function with a static GetTableName function
- Remove verbose comments
- Remove verbose initializers
- Remove need to specify table name when getting a table by name
- Remove unused typedef for mac and linux

* Re-add unused table

Convert tables to singletons

- Convert all CDClient tables to singletons
- Move Singleton.h to dCommon
- Reduce header clutter in CDClientManager
2023-03-17 07:36:21 -07:00
David Markowitz
c3723371cf
Patch divide by zero when advancing waypoints (#1020) 2023-03-14 04:12:26 -07:00
David Markowitz
49047a267b
Fix racing imagination loss on death (#1006)
* Fix imagination on death

* Fix defaults

* Fix visuals
2023-03-05 14:34:59 -06:00
Aaron Kimbrell
e524b86e12
breakout the component types into a scoped enum (#1002)
* breakout the component types into a scoped enum

tested that things are the same as they were before

* fix missed rename

* fix brick-by-brick name to be crafting
because that's what it is
2023-03-04 01:16:37 -06:00
David Markowitz
a0c0a87956
Fix Trigger Missions (#1010) 2023-03-03 22:58:29 -08:00
David Markowitz
3e482602d4
Fix non-parallel timers in CombatAIComponent (#1008)
* Fix non-parelell timers
2023-03-03 18:45:01 -08:00
Aaron Kimbrell
3cd0d1ec3d
Make wrapper for casting skills (#987)
* Make wrapper for casting skills
this is to reduce magic numbers in the code base

Only updated one use of this to demo that this works.
Will be do more in a sepearate PR.

Also, inadvertantly fix damage stacking and self-damage in the teslapack

* add skill<->behavior caching

* explicit by reference

* address emo's feedback
2023-02-10 02:30:17 -06:00
Aaron Kimbrell
91c0c1fcfb
Split out LUTriggers into it's own component (#986)
* Split out LUTriggers into it's own component

* some cleanup

* fix debug log

* use emplace and tryParse

* slight refactor to make the work on startup
rather than at runtime
Also TODO's for getting targets via all the possible methods

* address feedback
2023-02-10 02:29:53 -06:00
David Markowitz
d17f51183e
Allow landing animation in Return to the Venture Explorer (#977) 2023-01-26 21:41:40 -05:00
Aaron Kimbre
faf42d2f8c cleanup enums to make them more consistent 2023-01-22 17:38:47 -06:00
David Markowitz
cff94b6c22
Fix hash collisions in achievements (#962) 2023-01-21 09:37:09 -06:00
Aaron Kimbrell
872270704c
Hardmode cleanups (#954)
* load values once
so that it doesn't check every time
don't return, just skip
don't realod char

* address feedback

* don't drop the only item you can't get again

* address most feedback

* move settings for HC mode

* fix comment

* claenup whitespace
2023-01-12 13:16:24 -06:00
wincent
7aacfc1bf0 Fixed crashes related to hardcore mode 2023-01-11 21:51:14 +01:00
Gie "Max" Vanommeslaeghe
e7bc4ef773 add hardcore mode 2023-01-11 20:08:54 +01:00
Aaron Kimbrell
5374c555f5
Implement bubble seriliaztion in controllable physics (#942)
* bubble

* "Correct" serialization and enum

* Enum update

* figured out what things do

* accurate types and cleanup

* add sanity check
add getter
add slash command for testing

* fix default

* cleanup slash command

* handle game message probably
remove funny slash command
add all bubble GM's

Co-authored-by: Jett <55758076+Jettford@users.noreply.github.com>
2023-01-07 00:14:51 -06:00
Aaron Kimbrell
80f8dd8003
Imminuty updates (#925)
* WIP Immunities

* Immunity getters

* remove redundent variable
replace it use with it's equivalent

* remove unused lookups, fix typos

* fix tests

* added imunity test

* address feedback

* more immunity tests

* explicit this
2023-01-06 23:59:19 -06:00
David Markowitz
fc75d6048f
dGame Precompiled header improvements (#876)
* moving branch

* Add deleteinven slash command

* Change name of BRICKS_IN_BBB

* Use string_view instead of strcmp

* Clean up include tree

* Remove unneeded headers from PCH files

Removes unneeded headers from pre-compiled headers.  This increases compile time, however reduces development time for most files.

* Update Entity.h

* Update EntityManager.h

* Update GameMessages.cpp

* There it compiles now

Co-authored-by: Aaron Kimbrell <aronwk.aaron@gmail.com>
2023-01-06 23:17:05 -06:00
David Markowitz
8bcb4bd36d
Fix smashables not counting towards whole team (#944) 2023-01-06 23:06:24 -06:00
Gie "Max" Vanommeslaeghe
7fcc8a6e84
Merge pull request #935 from EmosewaMC/WorldConfig
Eliminate WorldConfig Based Magic Numbers
2023-01-07 03:41:40 +01:00
David Markowitz
1789ec7f20
delta compression fixes (#937) 2023-01-03 11:22:04 -06:00
David Markowitz
dc7d0ce142
Fix Stuns of duration zero (#938) 2023-01-03 11:21:57 -06:00
David Markowitz
203a150a56 Update DestroyableComponent.cpp 2023-01-01 16:36:10 -08:00
EmosewaMC
19be0a61b2 Eliminate WorldConfig Magic Numbers
Add comments for fields

Use the name directly
2023-01-01 05:20:03 -08:00
David Markowitz
737eaba54d
Serialize target with GameMessageStartSkill (#933) 2022-12-31 03:56:30 -08:00
Aaron Kimbrell
6ec921025d
Use new logic for applying speed changes in ApplyBuff (#919) 2022-12-24 00:49:31 -08:00
David Markowitz
bbd5a49ea2
Update DarkInspirationBehavior.cpp (#897) 2022-12-23 18:05:30 -08:00
Aaron Kimbrell
9ebb06ba24
Qb team credit (#912)
* give credit to whole team for qb's

* fix compiling
2022-12-22 07:24:59 -06:00
David Markowitz
015cbc06ea
Fix racing spawn positions (#913) 2022-12-22 05:16:18 -08:00
David Markowitz
bd7f532a28
Implement the Imaginite Backpack and Shard armor scripts (#886)
* Imaginite Pack now works

* Remove unused params

* Address issues

* Add TeslaPack script

Co-authored-by: aronwk-aaron <aronwk.aaron@gmail.com>
2022-12-21 14:33:41 -08:00
David Markowitz
f2fa81b5c3
Fix lobbies (#901) 2022-12-20 15:20:44 -06:00
Aaron Kimbrell
157a05239e
Add speedbase readling and writing to the level prograssion component and impli proper character versions for fixes (#856)
* Add speed base readling and writing
to the level prograssion component
Add retroactive fix to the  world transfer
TODO: see about versioning charxml fixes to make them not run every time

* version all current changes

* cleanup speed behavior
add calculate for future use in scripts
make < 1 speed multiplier possible
tested wormholer and it plays anims correctly

* cap the lower end of the speed multiplier
until the ending the behavior on hit properly works

* address feedback
add emun for character version
make set ignore multipliers consistent in speed behavior
switch case for char version upgrades

* remove the ability to stack speed boosts

* update value on level ups
2022-12-19 13:45:50 -06:00
David Markowitz
84c5d74450
Add Delete Inventory Slash Command (#865)
* moving branch

* Add deleteinven slash command

* Change name of BRICKS_IN_BBB

* Use string_view instead of strcmp

* Remove GameConfig

* Revert "Remove GameConfig"

This reverts commit cef5cdeea2.
2022-12-18 09:46:04 -06:00
Jett
1da2db9db6 Resolve some string related issues for Windows Debug 2022-12-17 16:03:18 +00:00
Aaron Kimbrell
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
Aaron Kimbrell
32f8bda538
Allow the player to be interrupted (#881) 2022-12-16 15:23:38 -06:00
David Markowitz
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
David Markowitz
e8ba3357e8
Add support to reload the config (#868) 2022-12-04 16:25:58 -06:00
David Markowitz
de3e53de6c
Fix Model Vault (#870)
Allow pets, rockets and racecars to be stored in vault
2022-12-04 16:25:25 -06:00
David Markowitz
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
David Markowitz
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
David Markowitz
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
Aaron Kimbrell
36eecd693d
Brick stack sizes are now unlimited
Make brick stacks unlimited as they were in live.  If you have more than uint32_max bricks, the extra bricks are trashed.
2022-11-26 02:30:53 -08:00
Aaron Kimbrell
22e5d02400
Use Property path name and desc when claiming (#827) 2022-11-12 08:44:13 -06:00
David Markowitz
1464762bcd
Implement GTest and change windows output path
Implement GTest as a testing infrastructure.
Make windows output binaries to the build folder instead of the release type folder (potentially issue further down the line)
Add a simple unit test for DestroyableComponent
2022-11-07 00:12:35 -08:00
Aaron Kimbrell
9c58ea5c41
add 1261 to the disable landing animation switch case (#819) 2022-11-05 19:09:39 -05:00
David Markowitz
1d5c71eb9b
Fix Pet Taming causing seg fault (#818)
* Fix Pet Taming

* Fix Pet Taming

* fix pet taming path loading
just make it go to build file since the asset managet handles intermediate steps
there is never res in the path in the live db, so no need to check

* special case BrickModels to uppercase if unpacked
remove redundent variable

Co-authored-by: Aaron Kimbrell <aronwk.aaron@gmail.com>
2022-11-05 19:09:26 -05:00
David Markowitz
d4af7d76a2
Add property behaviors migration (#790)
* Add behaviors migration

Add migration for behaviors.  Tested that the tables get altered correctly, names are set correctly.

Tested that I can place models, both regular and Brick-by-Brick ones and that they get deleted properly.  Tested that picking up models and re-placing them down properly updates them in the tables.

* Only update when empty
2022-10-31 17:31:49 -05:00
Aaron Kimbrell
26f2eb409f
Mounts v2 (#726)
* Mounts -v2

* fix stun state and make comments a bit nicer

* remove extra serilization

* update the char position a bit more correctly

* make vehicles face thr player's direction

* address feedback

* fix compiling for real this time

* removed uneeded check
2022-09-02 13:49:19 -05:00
David Markowitz
50b3946548
Fix death planes (#735)
* Correct death plane size

The death plane file size is not in units but is actually in 4x2 tiles.

* Make it a bit bigger for now

* Enjoy your crust

"These things add flavor they said"

Move the position of the death barrier down 13.521004 units so we effectively only extend its hitbox in the -Y direction as opposed to the +Y direction, resolving an issue in Battle of Nimbus Station where the death plane was too tall
2022-08-16 22:28:50 -05:00
Aaron Kimbrell
976bd3c41b
Selective saving for map and location (#732)
* Don't save the map and char location info if
we are in an instanced 
* LUP worlds will be handled in a future PR
* simplify check
2022-08-16 20:53:28 -05:00
David Markowitz
3b7f1dad54
Fix death planes (#733)
* Correct death plane size

The death plane file size is not in units but is actually in 4x2 tiles.

* Make it a bit bigger for now
2022-08-16 18:53:01 -07:00
David Markowitz
008f953003
Add physics volume for property orb (#718) 2022-08-08 09:34:56 -05:00
David Markowitz
dc960cb99c
Fix landing animation (#720) 2022-08-08 09:34:33 -05:00
Aaron Kimbre
72477e01e2 convert to unix line endings 2022-08-05 22:01:59 -05:00
Daniel Seiler
a429489846
use UTF8ToUTF16 more (#695) 2022-08-02 08:56:20 -05:00
Jett
9ee219ea42
Move Navmesh code away from dPhysics (#701) 2022-08-02 06:30:19 +01:00
David Markowitz
d64fa1680d
Fix missions re-ordering on reload (#686)
* Fix missions re-ordering on reload

Check for success rather than failure

* Add a comment

* Get base value from database

* Update Mission.h
2022-07-30 20:56:21 -07:00
eddytronpie
f80a26a944
Fix integer issue with BricksCollected (#679)
This fixes an issue where BricksCollected goes to an insane number after selling more bricks than you collected in the area
2022-07-29 20:41:14 -07:00
David Markowitz
26ddeaa429
Fix NPC Proxy items (#684)
* Fix racing lap times

* Address NPC proxies

NPCs are supposed to equip the sub items of items they equip and were not doing so.  This PR adds this functionality and fixes and issue where Neido on Crux Prime was not wearing their sword.

Tested that Neido has their sword and that other NPCs that wear proxies also get their proxies equipped.  Had no issues with any other world crashing.
2022-07-29 19:00:36 -05:00
Aaron Kimbre
1b01abd7d9 Merge branch 'main' into editorconfig 2022-07-28 09:27:06 -05:00
aronwk-aaron
19e77a38d8 format codebase 2022-07-28 08:39:57 -05:00
David Markowitz
adb6a2c609
Fix racing lap times (#683) 2022-07-27 20:54:42 -07:00
Aaron Kimbrell
e97ae92624
Make logger automatically put a newline (#675)
at the end of the line
remove all the newlines in log calls
2022-07-24 21:26:51 -05:00
Aaron Kimbrell
a7fb6eb3f3
make LoadFromXml usage consistent across comps (#673) 2022-07-24 21:03:22 -05:00
Aaron Kimbrell
9ed4a4f47f
Remove uneeded include (#674) 2022-07-24 16:17:01 -05:00
Aaron Kimbrell
b57cacc676
Player forced movement component (#672)
* Split out Level progression component
from Character Component
This is to get to the Player forced movement Comp in a sane way

* move XML to component insted of abusing charComp

* use overrides
should probably make everything that calls that call it correctly

* fix linking issue

* Add proper Player Force movement component
Not used, yet
2022-07-24 13:25:10 -05:00
Aaron Kimbrell
f2d1c5d26d
Split out Level progression component (#671)
* Split out Level progression component
from Character Component
This is to get to the Player forced movement Comp in a sane way

* move XML to component insted of abusing charComp

* use overrides
should probably make everything that calls that call it correctly

* fix linking issue
2022-07-24 13:04:02 -05:00
David Markowitz
6a38b67ed5
General AMF cleanup (#663)
* General AMF cleanup

Proper memory management as well as style cleanup

* General optimizations

Fix AMFArray so values are properly deleted when you leave the scope it was created in.
Add bounds check for deletion so you don't double delete.
Remove all AMFdeletions that are contained in an array since the array now manages its own memory and deletes it when it is no longer needed.

* Better tests and fix de-serialize

Fix de-serialize to be correct and implement a test to check this

* Update AMFDeserializeTests.cpp

* Update AMFFormat.cpp
2022-07-21 22:26:09 -07:00
David Markowitz
40a9aefb5b
Aggro radius (#665) 2022-07-20 20:26:52 -07:00
EmosewaMC
082a2a418f Use radii from settings
Override the DB aggro and tether radii from the settings if they are present.
2022-07-19 23:25:50 -07:00
David Markowitz
ed5ced0bed
Fix Model Component Serialization (#655)
* Fix model component serialization

* Update ModelComponent.h
2022-07-19 16:51:35 -05:00
Jett
8e5da2cf1f
Merge pull request #652 from DarkflameUniverse/blacklist-and-chat-changes
Blacklist and chat changes
2022-07-19 10:40:44 +01:00
Aaron Kimbrell
ef8c2a40f3
Framework for GM's and helpers for mounts (#651)
* Framework for GM's and helpers for mounts

* docs and spacing

* whitespace
2022-07-17 02:35:11 -05:00
Jett
fab8a1e982 Implement new chat features 2022-07-17 07:54:36 +01:00
Aaron Kimbrell
9287e5bc4b
Split itemType enum into it's own header (#647)
* Split itemType enum into it's own header
add mount item type

* fix whitespace
2022-07-16 20:36:09 -05:00
Jett
df0f11c95b
Update CMake configuration for easier maintenance (#642)
* Update CMake configuration for easier maintenance

* Incorrect casing fix

* Move package requirement

* Update CTest linking

* Add logs to the CMake

* Add linking for common libraries

Added linking for common libraries in tests subdirectory.

* Move test subdirectory higher up for some reason

* Whitespace a log removal

Missed new line

* Add dCommon to dChatFilter

* Update library output dir

* Correct libBcrypt

* Further refactor CMake behaviour

* Repair bad comments and update library defines

* Revert to old include directory method

* Implement platform defines

* Add missing include

Mac needs a specific include for defining platform.  Does not compile without this.

Co-authored-by: EmosewaMC <39972741+EmosewaMC@users.noreply.github.com>
2022-07-17 00:24:16 +01:00
David Markowitz
24dbd3944d
Friends List Overhaul (#630) v103
* Add friends list migration

* Change friends to use charID

Update friends table to use charID and not LWOOBJID variant.

* Fix remove friend

Fix remove friend and make the query more readable at a glance.

* Add and remove friends in the container

Properly add and remove friends in the player container

* add enums

* Add best friends and basic GM support V1

* Add more features

* not online / doesnt exist implementation

Implements the not online and invalid character response codes

* Address players not being removed

Fix an issue where players would not be marked as offline in the friends list due to the message not being sent in all circumstances.

Tested changes on 3 clients, switching characters, logging out from character select, switching characters, world transfer and my friends list looked as it was supposed to.

* Implement proper friends system

Remove debug logs

Track count of best friends

Add best friends list cap of 5

Add config option and best friend update

Add a config option and implement the last missing best friend serialization

Added comments and fixed remove best friend bug

Added some comments and addressed an issue where removing best friends would not remove them from your internal count of friends.

properties and logs fixes

whoops, had an issue

send reply if already BFFs

Send the correct objectID

I really need to rename these

Fix white space

goon

* Replace queries with unique ptrs

* remove user from player container on deletion

Remove the user from the player container when they delete their character.
2022-07-12 20:36:06 -07:00
Aaron Kimbrell
3865a186a7
Possessor and possessable additions (#619)
* possessor-fixup and possessable additions

* comment and docstring fixes

* fix possessable initialization

* split animation flags into it's own header
remove unnecessary checks
2022-07-08 22:25:15 -05:00
David Markowitz
de5d9182eb
Address items not re-equipping upon exiting build mode (#615)
* Implement Precompiled Headers

* fix cmake

* Fix modular builds not returning parts

Modular builds would not search inventory A for their corresponding item and by default would only look in the models bag.  This PR forces the item to be looked for in the inventory its coming from (inventoryA) as a second resort before doing the final search in the default inventory of the item.

Tested modular building a car and a rocket and when replacing parts the part that was already placed was returned to the inventory correctly.

* Push equipped items upon entering build mode

Fixes an issue where leaving build mode anywhere would not re-equip your items.  This also implements the feature to set your stats back to full, as was done in the live game.

Tested exiting build mode on a property with full venture gear and all gear was re-equipped and stats were set to the expected values.
2022-07-06 01:30:13 -07:00
David Markowitz
8cdb388915
Optimize scripts for faster compilation (#597)
* Implement Precompiled Headers

* First volume of optimizations

* Scripts A-B

Gonna be doing this in alphabetical order now.

* C Scripts and remove unneeded includes from base cppscripts header

Remove the MissionComponent and Loot includes from all base scripts and place their needed includes in the respective scripts.

* D scripts

* F scripts

* F scripts 2

Finish up removing extraneous includes from scripts that start with the letter F

* G scripts

Removing extraneous includes from scripts that start with the letter G

* I scripts

Removing extraneous includes from scripts that start with the letter I

* M-Z scripts

Removing extraneous includes from scripts that start with the letter M-Z

* Revert "Implement Precompiled Headers"

This reverts commit d79d8d4991.

* Revert "Revert "Implement Precompiled Headers""

This reverts commit 0597faf308.

* Add back in PCH

Add back in PCH

* Fix CMake

Whitespace

Remove duplicate file glob

Remove newline
2022-07-04 23:00:10 -07:00
David Markowitz
cc25ec0151
Add Venture Vision Behavior (#609)
Add the Venture Vision behavior and associated functionality.  Pet digs still do not show up however.

The Kit bonus for factions have been tested and properly grant and take away the buff when it is casted and uncasted.  Tested as well using multiple Venture Vision behaviors at once and the vision only went away when there were zero equipped at once.

Remove extra includes

Convert to Tabs

Remove extra forward declaration
2022-07-04 21:48:56 -07:00
David Markowitz
8a54e7ccd2
Implement Precompiled Headers (#591)
When applied, this will speed up compile times dramatically.
2022-07-04 15:24:45 -07:00
jumpy-badger
eaa962f265
Add Aarch64 support (#231)
* added mariadb-connector-cpp submodule

* raknet aarch64 support

* fix compile errors

* mariadb connector swap (in progress)

* update CMakeLists, add preprocessor definition to switch between mysql and mariadb connectors

* update types with missing aarch64 check

* corrected adding extra flag to properly compile mariadbconn in CMakeLists

* updated readme with arm builds section

* fix build failure if test folder does not exist

* Remove mysql connector from all builds, add mariadbconnector to windows build

* readd Linux check for backtrace lib to CMakeLists.txt

* Separate system specific mariadbconncpp extra compile flags

* Copy dlls to exes directory once built

* fetch prebuilt binaries on windows so that ClangCL can be used

* Delay load dll so that plugin directory is set correctly

* Fixed typo in glibcxx compile flag

* whitespacing, spaces -> tabs

* Updated README.md, included instructions to update

* Updated README.md

added libssl-dev requirement and removed mysql connector references from macOS builds section

* apple compile fixes for zlib and shared library name

* add windows arm64 checks to raknet

* remove extra . in shared library location

* Setup plugins directory for the connector to search in, pass openssl_root_dir on for apple

* Fix copy paths for single config generators and non windows

* change plugin folder location, another single config generator fix

* GENERATOR_IS_MULTI_CONFIG is a property not a variable

* Fixed a few errors after merge

* Fix plugin directory path, force windows to look at the right folder

* fixed directory name for make_directory command

* Update README.md

Updated MacOS, Windows build instructions.

* set INSTALL_PLUGINDIR so that the right directory is used

* Support for relative rpath for docker build

* added mariadb-connector-cpp submodule

* raknet aarch64 support

* fix compile errors

* mariadb connector swap (in progress)

* update CMakeLists, add preprocessor definition to switch between mysql and mariadb connectors

* update types with missing aarch64 check

* corrected adding extra flag to properly compile mariadbconn in CMakeLists

* updated readme with arm builds section

* fix build failure if test folder does not exist

* Remove mysql connector from all builds, add mariadbconnector to windows build

* readd Linux check for backtrace lib to CMakeLists.txt

* Separate system specific mariadbconncpp extra compile flags

* Copy dlls to exes directory once built

* fetch prebuilt binaries on windows so that ClangCL can be used

* Delay load dll so that plugin directory is set correctly

* Fixed typo in glibcxx compile flag

* whitespacing, spaces -> tabs

* Updated README.md, included instructions to update

* Updated README.md

added libssl-dev requirement and removed mysql connector references from macOS builds section

* apple compile fixes for zlib and shared library name

* add windows arm64 checks to raknet

* Setup plugins directory for the connector to search in, pass openssl_root_dir on for apple

* Fix copy paths for single config generators and non windows

* change plugin folder location, another single config generator fix

* GENERATOR_IS_MULTI_CONFIG is a property not a variable

* Fixed a few errors after merge

* Fix plugin directory path, force windows to look at the right folder

* fixed directory name for make_directory command

* Update README.md

Updated MacOS, Windows build instructions.

* set INSTALL_PLUGINDIR so that the right directory is used

* Support for relative rpath for docker build

* Rebase on main

* Remove extra git submodule

* Update CMakeLists.txt

* Remove CMakeLists.txt file from mariadb

Remove the CMakeLists.txt file from the mariaDBConnector so we dont build the tests.  Also add a config option to the CMakeVariables.txt so you can build the connector with multiple jobs

* Compile on windows

Specify the mariadbcpp.dll file location with a defined absolute path so windows knows it actually exists.

* default to 1 job

Default mariadb jobs running in parallel to 1 instead of 4

* Move mariadbcpp.dll file to the expected directory on windows

* Changed plugin

Updated the plugin location from the project binary directory to the expected location, the mariadb binary directory.

* Addressed windows dll issues by moving files to the expected directory instead of a directory that wouldnt get created

* Update README

Co-authored-by: Aaron Kimbrell <aronwk.aaron@gmail.com>
Co-authored-by: EmosewaMC <39972741+EmosewaMC@users.noreply.github.com>
2022-07-03 21:33:05 -07:00
Aaron Kimbrell
1497d9b35a
breakout possessor from char comp (#606)
* breakout possessor from char comp
Use the correct component for possessor
cleanup scirps that were using possessor improperly
beginnings of mounts

* fix comments
added bounds check
2022-06-29 18:50:24 -05:00
EmosewaMC
2e224cb151 update name
Pets will take imagination by default now
2022-06-18 13:25:34 -07:00
EmosewaMC
2a0616d0e9 Dont take imagination on initial tame 2022-06-18 00:16:00 -07:00
EmosewaMC
0774ab930d inverted config check
Since most people are not regularly updating their config files, this needs to assume the value is disabled rather than enabled.
2022-06-18 00:09:05 -07:00
EmosewaMC
e415d96a9d Added config setting
Added a config setting to allow players to disable pets consuming imagination.  This value defaults to zero as a feature of DLU.
2022-06-18 00:03:27 -07:00
EmosewaMC
35ea3d35ae Add pet imagination draining
Address an issue where pets did not consume imagination when they were spawned.
2022-06-17 23:53:09 -07:00
EmosewaMC
4a39221dd0 Address reviews
Changed the activator position parsing to have TryParse so that we dont throw an exception trying to load the position.  Should the loading of the activator position fail the game will default to the position of the entity.

change delimiter value to hex

Updated the character delimiter used for rebuild_activator settings to use hex

Remove extra parsing of activator position

in Entity.cpp we were parsing the activator position but when doing so where we were, this was after we had ended up spawning the activator since that is now in the constructor of the rebuild component.  The extra parsing has been removed.

Simplify dirty parent/child info

Simplify the if condition for parent child info.  This info only needs to be written should it be changed (dirty) or if the packet being sent is a construction, meaning that a requesting player needs all base data and needs to know what parents/children an entity has at that time.

get rid of extra parenthesis

Left over extra parenthesis were around these conditions on accident
2022-06-16 08:50:01 -07:00
EmosewaMC
09c459a083 Added comment 2022-06-15 23:17:44 -07:00
EmosewaMC
7dfcd22a2e Properly place build activator
The build activator as a result of the previous changes was spawning at the wrong position.  This commit pulls the activators position from the settings (should they exist) and sets them accordingly.
2022-06-15 22:59:30 -07:00
David Markowitz
50fd27b973
Merge branch 'DarkflameUniverse:main' into selling-fix-bricks 2022-06-12 11:49:17 -07:00
EmosewaMC
81431cfcbd Address bricks selling 1 at a time
Bricks have a stack size of zero in the cdclient so we need to make sure to give them a full stack size of 999 as we do for the bricks inventory with the selling inventory.
2022-06-12 11:48:52 -07:00