mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-17 01:05:28 +00:00
feat(entity): the object's interaction distance, preconditions and world state, as the client
LWOGameObject loads these itself: interactionDistance from its Objects row (16 without one) and the level's interaction_distance over it, CheckPrecondition and objectWorldState from the level config, before its components load theirs. The quickbuild, the pet and the race instancer read them from the object; the race instancer now uses the Objects row's distance like the client does, instead of a fixed 16. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -133,6 +133,7 @@ TEST_F(PlayerStatisticTest, SmashingCountsEnemiesAndSmashables) {
|
||||
// Smash finds the killer through the entity manager, which looks the new entity up in the CDClient
|
||||
CDClientDatabase::Connect(":memory:");
|
||||
CDClientDatabase::ExecuteDML("CREATE TABLE ComponentsRegistry (id INTEGER, component_type INTEGER, component_id INTEGER);");
|
||||
CDClientDatabase::ExecuteDML("CREATE TABLE Objects (id INTEGER, name TEXT, type TEXT, interactionDistance REAL);");
|
||||
ASSERT_NE(Game::entityManager->CreateEntity(info, nullptr, nullptr, true, 0x3FFFFFFFFFFELL), nullptr); // the zone control object loot asks
|
||||
auto* killer = Game::entityManager->CreateEntity(info, nullptr, nullptr, false, PLAYER + 1);
|
||||
ASSERT_NE(killer, nullptr);
|
||||
|
||||
Reference in New Issue
Block a user