* feat: add configurable feature and versions
to allow for easily swithing it out to enable features in the client for funsies
tested that this doesn't break anything and added test
* cleanup
* Added cooldown handling
* Made most of the logs hidden outside of debug mode
* removed weird submodule
* kill this phantom submodule
* updated to reflect reviewed feedback
* Added IsCooldownImmune() method to DestroyableComponent
* friggin typo
* Implemented non-pending changes and added cooldown immunity functions to DestroyableComponentTests
* add trailing linebreak
* another typo :(
* flipped cooldown test order (not leaving immune)
* Clean up comment and add DestroyableComponent test
* 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
* Make serialize actually virtual
yep
* Abstract to PhysicsComponent
Move shared functionality of all physics related classes to a base class.
Tested that there were no failed to unserialize errors when in main gameplay in Gnarled Forest or in a race.
Tested that 2 players were able to see each other in the above scenarios just fine as well.
* Update PhantomPhysicsComponent.cpp
* Add SimplePhysicsTest
* Add construction test
* Update SimplePhysicsComponentTests.cpp
* remove flags and fix override
* Update VendorComponent.h
* chore: cleanup LU(W)string writing
and add methods for reading
remove redunent "packet" from packet reading helpers
move write header to bitstreamutils since it's not packet related
add tests for reading/writing LU(W)Strings
* remove un-needed function defintions in header
* make reading and writing more efficient
* p
p
* quotes
* remove unneeded default
---------
Co-authored-by: David Markowitz <39972741+EmosewaMC@users.noreply.github.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
* 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
* 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
* 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
* 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
* 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>
* Resolve warnings and change init order
Initialize dConfig first, before logger so we know whether or not to log to console
Initialize namespace Game variables to nullptr so they are a known value if accessed before initialization.
Removed unused Game variables
Replaced config with a pointer instead of referencing something on the stack.
Assign return values to system calls to silence warnings.
Tested that the server still compiles, runs and allows me to load into the game.
* Only start Master of config files exist
Also default the logging to console to on on the off chance the files exist but are wrong / corrupted.
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.
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
* Change AMFArray getters to use Templates
Move Template definition to header
* Add more tests
Add tests for casting to wrong template type
Add tests for going out of bounds in the array.
* Try continue-on-error
* Update build-and-test.yml
* Try continue-on-error
Update build-and-test.yml
* change version
* Update CMakeMariaDBLists.txt
Update CMakeMariaDBLists.txt
* ASCIIToUTF16: output replacement character instead of failing assert
* Add GeneralUtils::_NextUTF8Char
* Implement GeneralUtils::UTF8ToUTF16
* use string_view everywhere
* use string_view::front instead of begin
* Add PushUTF16CodePoint
* 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
* Add AMFDeserializer
Add an AMFDeserializer
Reverted unrelated changes
Add unit tests for AMFDeserializer
Added unit tests for the AMFDeserializer
Finish tests
Finish the AMF deserializer tests. This commit finishes the positive test case and implements a load test case that is expected to take less than 1.5 seconds to process.
Modularized tests
Made tests a bit modular and split into more methods
Specified binary read from file
Specified that on the IO stream we are reading a binary file otherwise windows will terminate reading the binary file on seeing a 1A byte.
Added more tests
Added tests for unimplemented values and edited a test file to be more modular
Updated test text
Fix spacing
Update AMFDeserializeTests.cpp
* Update CMakeLists.txt
* Update AMFDeserializeTests.cpp
f
Actually follow the AMF spec
Update AMFDeserializeTests.cpp
tabs
Add in commented tests
* Follow spec
formatting
Add Integer Tests
Follow Spec more
Follow spec
* Use unique_ptr
* Update AMFDeserialize.cpp
Semantics
Update AMFDeserialize.cpp
Add new lines to EOF
CMake fix
* Add better std string read
Co-authored-by: Daniel Seiler <xiphoseer@mailbox.org>
* make not static
Co-authored-by: Daniel Seiler <xiphoseer@mailbox.org>
* 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>
* 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>