fix(shooting gallery): moving platform targets run on their mover, as live

sg_cannon.lua puts a moving platform target (the subs and the kraken) on its path with SetCurrentPath{ pathName, startPoint = 0 }; its SetPathingSpeed is read by nothing on a moving platform, so these run their paths at the waypoints' speeds (10, 15 and 35 in the zone), as the client's mover does. Live constructed them with the path and the mover waiting at waypoint 0 (9) and serialized the mover at each waypoint (9, then 2). They had a movement AI and a made up PlatformResync instead, and the kraken a speed chosen to look right, which goes back to the script's.

PlatformResync's constructor that overrode its arguments for a few LOTs (the FV tree platform 9483 among them) has no user left and is gone; a resync request is answered by movers only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-11-10 13:36:25 -06:00
parent 275243cf86
commit 11d7455cad
4 changed files with 40 additions and 57 deletions

View File

@@ -89,14 +89,21 @@ TEST_F(RemainingMessagesTests, TeleportMatchesLegacy) {
}
TEST_F(RemainingMessagesTests, StartPathingAndPlatformResyncMatchLegacy) {
for (const LOT lot : { 999, 12341, 9483, 11306, 6267 }) {
// The legacy sender overrode its arguments for a few LOTs; the message has no such cases, so only others compare
for (const LOT lot : { 999, 6267 }) {
info.lot = lot;
Entity entity(0x1000000000000001LL, info);
ExpectSameAsLegacyBroadcast([&] { LegacyGameMessages::SendStartPathing(&entity); }, [&] { GameMessages::StartPathing msg; msg.target = entity.GetObjectID(); return msg; }());
for (uint32_t mask = 0; mask < 4; mask++) {
for (const auto state : { eMovementPlatformState::Moving, eMovementPlatformState::Stationary, eMovementPlatformState::Stopped }) {
for (const int32_t index : { 0, 1, 5 }) {
GameMessages::PlatformResync msg(entity, Bit(mask, 0), index, index + 1, index + 2, state, Bit(mask, 1));
GameMessages::PlatformResync msg;
msg.target = entity.GetObjectID();
msg.bStopAtDesiredWaypoint = Bit(mask, 0);
msg.iIndex = index;
msg.iDesiredWaypointIndex = index + 1;
msg.iNextIndex = index + 2;
msg.eState = state;
ExpectSameAsLegacy([&](const SystemAddress& address) {
LegacyGameMessages::SendPlatformResync(&entity, address, Bit(mask, 0), index, index + 1, index + 2, state, Bit(mask, 1));
}, msg);