fix(moving platform): a simple mover without a quick build sets off when it is loaded

A simple mover is a LWOPlatform like a mover: made stopped at its
waypoint (12) and, unless startPathingOnLoad is false, waiting there (9)
for the shortest wait before it leaves for its other end
(ResumeTravelling 0x00c86b90, SetWaitingTime 0x00bdc860, RunPlatform
0x00c86e10). Live showed it on the NJ counterweights, which wait for
their quick build first; one without a quick build was left waiting for
a script here.

The client only reads startPathingOnLoad (LWOMovingPlatformComponent::
LoadConfigData 0x00d0f690) and never starts a platform by itself, so the
rule is the server's, taken from what live did with movers (12 with the
setting false, else 9 and off) and from the scripts: L_NJ_SPINNER_SERVER
stops its platform when it starts up, simple movers included, and the
simple movers that wait for an event without that script all have
startPathingOnLoad 0 in the maps.

The wait now runs in the component for both, in place of the timer a
built counterweight got, and a simple mover with startPathingOnLoad
false is constructed stopped (12).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-11-10 16:49:24 -06:00
parent 4e8e0e64ef
commit 22c3168587
3 changed files with 84 additions and 14 deletions

View File

@@ -171,12 +171,12 @@ public:
/**
* A simple mover (5), as the client's LWOPlatformSimpleMover: between a start point and that point moved by
* platformMove (in the start rotation), taking platformMoveTime seconds, as GenerateSimpleMoverPath builds its two
* waypoint path. At an end it has stopped there (28), as any platform on a path run once.
* waypoint path. At an end it has stopped there (28), as any platform on a path run once. Like a mover it is made
* stopped at its waypoint (12) and, unless startPathingOnLoad is false, waits there (9, as live constructed the NJ
* counterweights) the shortest wait before it sets off for its other end, a quick build's once it is built.
*/
class SimpleMoverSubComponent final : public PlatformSubComponent {
public:
// Live constructed the NJ counterweights waiting at their waypoint (9)
SimpleMoverSubComponent() { mState = ePlatformStateFlag::Waiting | ePlatformStateFlag::ReachedDesiredWaypoint; }
eMoverSubComponentType GetType() const override { return eMoverSubComponentType::simpleMover; }
// LWOPlatformSimpleMover::Deserialize: a dirty bit, then whether there is a starting point with its position and
@@ -369,6 +369,8 @@ private:
void SetupMoverPath();
// Puts the object where the mover is, without a serialization of its physics
void MoveObject();
// A simple mover's wait at its waypoint before it sets off by itself
void RunSimpleMover(float deltaTime);
// A rotator's settings from the level config, and where it is on its path
void SetupRotator();
// Turns a travelling rotator's object by its angular velocity