Commit Graph

66 Commits

Author SHA1 Message Date
jadebenn
b261e63233
chore: Change entity and component logic to use bitstream references (#1468)
* chore: Change entity and component logic to use bitstream references

* merge
2024-02-27 01:25:44 -06:00
jadebenn
94a467b361
chore: Change LDFFormat to use BitStream references (#1467) 2024-02-26 08:15:29 -06:00
David Markowitz
dc29f5962d
Move CDClientManager to be a namespace (#1431)
Tested that worlds still load data as expected.  Had no use being a singleton anyways.
2024-02-08 23:40:43 -06:00
David Markowitz
f0b6ad89d9
chore: Player class removal (#1445)
* SystemAddress and destructor

* move respawn logic to character comp

Tested that respawn pos and rot can be set as per previously by crossing a respawn point and smashing to see if I would respawn at the new place.

* Move loot cheat checking

* Remove GetParentUser overload

Tested completing missions
control behaviors
collecting life crate
completing a bunch of missions using macros
loading into worlds
brick-by-brick
placing models
digging the x spot in gnarled forest
can still ban and mute players
cheat detection is still doing its thing
flags are still set (checked with flag 45)
claim codes still work (created new char, checked the lego club mail was there)

* Move player constructor logic

Its now at the bottom of Entity constructor.  Time to remove Player

* Remove Player class

Removes the Player class.  Tested that I can still login and see another player in Venture Explorer and logging out a few times still works as well as smashing enemies

* store ptr

* Update SlashCommandHandler.cpp
2024-02-04 06:29:05 -08:00
jadebenn
a0d51e21ca
refactor: allow usage of NiPoint3 and NiQuaternion in constexpr context (#1414)
* allow usage of NiPoint3 and NiQuaternion in constexpr context

* removed .cpp files entirely

* moving circular dependency circumvention stuff to an .inl file

* real world usage!!!!!

* reverting weird branch cross-pollination

* removing more weird branch cross-pollination

* remove comment

* added inverse header guard to inl file

* Update NiPoint3.inl

* trying different constructor syntax

* reorganize into .inl files for readability

* uncomment include

* moved non-constexpr definitions to cpp file

* moved static definitions back to inl files

* testing fix

* moved constants into seperate namespace

* Undo change in build-and-test.yml

* nodiscard
2024-01-29 01:53:12 -06:00
David Markowitz
929d029f12
chore: Simplify and move Player functionality to relevant component (#1408)
* Moving and organizing Player code

- Move code to CharacterComponent
- Remove extraneous interfaces
- Simplify some code greatly
- Change some types to return and take in const ref (only structs larger than 8 bytes benefit from this change.)
- Update code to use CharacterComponent for sending to zone instead of Player*.

* Moving and organizing Player code

- Move code to CharacterComponent
- Remove extraneous interfaces
- Simplify some code greatly
- Change some types to return and take in const ref (only structs larger than 8 bytes benefit from this change.)
- Update code to use CharacterComponent for sending to zone instead of Player*.
- Remove static storage container (static containers can be destroyed before exit/terminate handler executes)

* remove player cast

* Remove extra includes
2024-01-12 11:39:51 -06:00
David Markowitz
870b56fe02
chore: cleanup objectIdManager overloading and classes (#1391)
* objectIdManager fixes

* Remove debug log
2024-01-05 06:31:22 -06:00
Aaron Kimbrell
3d85f6639e
chore: rename VehiclePhysics to HavokVehiclePhysics (#1331)
since that is it's true name
and there's another VehiclePhysics component that is simply named that
2023-12-04 09:20:41 -06:00
Aaron Kimbrell
8cd5bf7b8d
feat: implement consume item behavior (#1098)
* feature: implement consume item behavior

* Cleanup

* tested with skill 456 and fixed some things

* remove logs
2023-11-14 19:38:52 -06:00
David Markowitz
5942182486
feat: Abstract Logger and simplify code (#1207)
* Logger: Rename logger to Logger from dLogger

* Logger: Add compile time filename

Fix include issues
Add writers
Add macros
Add macro to force compilation

* Logger: Replace calls with macros

Allows for filename and line number to be logged

* Logger: Add comments

and remove extra define

Logger: Replace with unique_ptr

also flush console at exit. regular file writer should be flushed on file close.

Logger: Remove constexpr on variable

* Logger: Simplify code

* Update Logger.cpp
2023-10-21 16:31:55 -07:00
Aaron Kimbrell
d8ac148cee
refactor: re-write AOE, add FilterTargets, Update TacArc Reading (#1035)
* Re-write AOE behavior for new filter targets
Update Tacarc to use new filter targets
Added dev commands for skill and attack debugging

* Get all entities by detroyable
rather than controllable physics
Since destroyables are what can be hit

* Re-work filter targets to be 100% live accurate
reduce memory usage by only using one vector and removing invalid entries
get entities in the proximity rather than all entities with des comps in the instance, as was done in live

* remove debuging longs and remove oopsie

* address feedback

* make log more useful

* make filter more flat

* Add some more checks to filter targets
add pvp checks to isenemy

* fix typing

* Add filter target to TacArc and update filter target

* fix double declaration

* Some debugging logs

* Update TacArc reading

* make log clearer

* logs

* Update TacArcBehavior.cpp

* banana

* fix max targets

* remove extreanous parenthesesuuesdsds

* make behavior slot use a real type

---------

Co-authored-by: David Markowitz <EmosewaMC@gmail.com>
2023-10-09 15:18:51 -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
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
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
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
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
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
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
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
Aaron Kimbre
faf42d2f8c cleanup enums to make them more consistent 2023-01-22 17:38:47 -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
bbd5a49ea2
Update DarkInspirationBehavior.cpp (#897) 2022-12-23 18:05:30 -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
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
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
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
aronwk-aaron
19e77a38d8 format codebase 2022-07-28 08:39:57 -05: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
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
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
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
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
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
EmosewaMC
fbf0b59ff1 Fix item getter for moving items
This fixes an issue where the item would get overwritten and would effectively fetch a "random" item in the inventory to move instead of the requested one.
2022-06-12 10:56:01 -07:00
Aaron Kimbrell
e3422ac0c5
Merge branch 'main' into main 2022-05-24 19:00:52 -05:00
Aaron Kimbre
ec207838d4 Proper Rocket Holding
Sanity checks on Prop and LUP launchpads to not open if no valid rocket
Add serialization for sending item configs
so that rockets show for other players
2022-05-08 19:57:36 -05:00
EmosewaMC
dc770299d1 removed debug logs 2022-04-23 22:22:21 -07:00
EmosewaMC
7a051afd97 loot source for item drops
Added support for Items to have a loot source attached to them when dropped or rolled.  This fixes the issue where achievements would give the item before it appeared in the achievement window.
2022-04-23 20:35:34 -07:00
EmosewaMC
ceab229a63 Specified enum
the LOOT_SOURCE enum is now attached to all loot sources.
2022-04-23 20:32:31 -07:00
EmosewaMC
a4d934913c added lootsource send in GM
WIP commit
2022-04-23 05:13:06 -07:00
EmosewaMC
0eece14b68 Vendor buyback inventory
Fixed vendor buyback inventory so it properly scrolls when the player adds enough items to it.
2022-04-23 04:16:10 -07:00