mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-17 01:05:28 +00:00
fix(moving platform): a rotater without a path stays stopped at its waypoint
Only a rotater on a path runs (LWOMovingPlatformComponent::SetupPlatform 0x00ccea50), and the client reads a platform that is not at a waypoint from its path's waypoints (LWOPlatform::Deserialize 0x00c870e0), which a rotater without a path does not have. It was sent travelling (2) whenever startPathingOnLoad was not false. No object in the client's maps is a rotater. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -158,6 +158,10 @@ TEST_F(MovingPlatformComponentTest, RotaterIsWrittenAsTypeSix) {
|
||||
ASSERT_EQ(platform->GetMoverSubComponentType(), eMoverSubComponentType::rotater);
|
||||
ASSERT_NE(platform->GetMoverSubComponent(), nullptr);
|
||||
platform->SetSerialized(true);
|
||||
// Without a path it does not run: it stays stopped at its waypoint, also when started
|
||||
EXPECT_EQ(platform->GetMoverSubComponent()->mState, 12u);
|
||||
platform->StartPathing();
|
||||
EXPECT_EQ(platform->GetMoverSubComponent()->mState, 12u);
|
||||
|
||||
RakNet::BitStream stream;
|
||||
platform->Serialize(stream, true);
|
||||
|
||||
Reference in New Issue
Block a user