* chore: make scripted activity derived from activity
this paves the way for other component being properly derived from the activity component
* use a dirty flag instead
* address feedback
* Components: Make ComponentType inline
Prevents the next commits ODR violation
* Components: Add new components
* Entity: Add headers
inline script component ComponentType
* Components: Flip constructor argument order
Entity comes first always
* Entity: Add generic AddComponent
Allows for much easier adding of components and is error proof by not allowing the user to add more than 1 of a specific component type to an Entity.
* Entity: Migrate all component constructors
Move all to the new variadic templates AddComponent function to reduce clutter and ways the component map is modified.
The new function makes no assumptions. Component is assumed to not exist and is checked for with operator[]. This will construct a null component which will then be newed if the component didnt exist, or it will just get the current component if it does already exist. No new component will be allocated or constructed if the component already exists and the already existing pointer is returned instead.
* Entity: Add placement new
For the case where the component may already exist, use a placement new to construct the component again, it would be constructed again, but would not need to go through the allocator.
* Entity: Add comments on likely new code
* Tests: Fix tests
* Update Entity.cpp
* Update SGCannon.cpp
* Entity: call destructor when re-constructing
* Update Entity.cpp
Update Entity.cpp
---------
Co-authored-by: Aaron Kimbrell <aronwk.aaron@gmail.com>
* 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
Adds a missing edge case on the client where you may have the is_smashable flag set, but dont actually have a destroyable component. In this case you should create only a destroyable component and add it to the component and serialize it last after all other data. We also needed to add the set_faction var reading and setting as this is how Oliver Sudden actually gets their faction since they have no actual information in the database, it is all stored in ldf keys.
Tested that Oliver Sudden no longer logs Unable to unserialize logs when serialized or constructed.
Fixes#1222
addresses an issue where the death behavior of a destructible component was not being respected and enemies with destroyable components that had special death animations were not able to play the animation on death. This pr adds in the hardcoded constant the client uses for the same metric of 12 seconds.
Tested that claiming Nimbus Rock and completing the property guards mission allows him to vacuum away and then network the destruction packet 12 seconds later.
* 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
* Huge loot namespace rework
- Remove all excess memory usage
- do not cache components registry
- cache loot matrices on startup of the destroyable component
- convert loot singleton class to a namespace
- rework loot cdclient tables to operate closer to how someone would actually use them (basically doing the previous LootGenerator::LootGenerator caching but in those tables)
- Memory usage reduced by 10%+ across the board
* cache rebuild matrix
* Database: move reading to own function
Also change name of cache to PascalCase
* Database: Move common function rading
* 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>
* 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
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
* 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
* 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>
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
* 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
* 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
* 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
* 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
* 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
* 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>
* 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
- 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
* Stop adding movingpla comps where they aren't needed
* move stuff around to make it more congruent
* invert if else block logic patter
Since setting up the comp will be longer han just adding the path
will make the readability flow better
* address feedback
* 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