test(movement): movement AI and pathfinding serialize nothing

The client's movement AI and pathfinding control components read no
replica data; NPC movement reaches it through the physics component.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-11-28 05:17:19 -06:00
parent cc7a1b3640
commit f5a4dfab9a

View File

@@ -6,6 +6,8 @@
#include "dZoneManager.h"
#include "Entity.h"
#include "MovementAIComponent.h"
#include "PathfindingComponent.h"
#include "BitStream.h"
#include "SimplePhysicsComponent.h"
#include "Zone.h"
#include "ZoneFile.h"
@@ -341,3 +343,18 @@ TEST_F(MovementAIPathTest, OncePathEndActionsStopIt) {
EXPECT_FALSE(movement->IsWaitingAtWaypoint());
}
// The client's movement AI and pathfinding control components read nothing from the replica: NPC movement goes
// through the physics component
TEST_F(MovementAIPathTest, MovementAIAndPathfindingSerializeNothing) {
Entity entity(320, info);
auto* const movement = Walker(entity);
auto* const pathfinding = entity.AddComponent<PathfindingComponent>(-1);
for (const bool construction : { true, false }) {
RakNet::BitStream movementBits;
movement->Serialize(movementBits, construction);
EXPECT_EQ(movementBits.GetNumberOfBitsUsed(), 0u);
RakNet::BitStream pathfindingBits;
pathfinding->Serialize(pathfindingBits, construction);
EXPECT_EQ(pathfindingBits.GetNumberOfBitsUsed(), 0u);
}
}