Commit Graph

8 Commits

Author SHA1 Message Date
David Markowitz
c6087ce77a
perf: Loot memory savings (#1165)
* 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
2023-10-09 15:33:22 -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
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
aronwk-aaron
19e77a38d8 format codebase 2022-07-28 08:39:57 -05: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
wincent
dc2bd76aba Fixed scripted powerup spawners
When applied this commit fixes scripted powerups
2022-02-05 12:27:24 +01:00
Jett
0531365cb5
Make loot accurate to the loot drop rates during live. (#216)
* loot fix (broken)

* Fixed loot

* Update SlashCommandHandler.cpp

* Remove debug command

* Roll loot command

* Remove debug log

* Added const references
When this commit is applied it adds const references to the loot system avoid some unnecessary copies.

Co-authored-by: wincent <wincent.holm@gmail.com>
Co-authored-by: Avery <averysumner@gmail.com>
2021-12-20 02:25:45 -08:00
Unknown
0545adfac3 Public release of the DLU server code!
Have fun!
2021-12-05 18:54:36 +01:00