fix(platform): no resync for a platform without a path

A client asking to resync a simple mover that has no path got a
PlatformResync anyway, and the client's simple mover then reads waypoints
from its null path and crashes (LWOPlatformSimpleMover::Resync 0x00bf9ec0,
Path::GetWaypointAtIndex). The two LOTs special-cased for this before are
examples of the same thing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-10-02 15:02:29 -05:00
parent 02c96b08bd
commit 7bd15298a4
2 changed files with 6 additions and 0 deletions

View File

@@ -321,6 +321,9 @@ public:
// A mover on a path, run by the server (a rotater only spins: no waypoints)
bool IsMover() const;
// Whether the platform follows a path (its attached_path); a simple mover without one has no waypoints
bool HasPath() const { return m_Path != nullptr; }
private:
/**

View File

@@ -131,6 +131,9 @@ namespace GameMessages {
resync.Send(sysAddr);
return;
}
// A platform without a path has no waypoints to resync to; the client's simple mover reads them anyway and
// crashes (LWOPlatformSimpleMover::Resync 0x00bf9ec0 -> Path::GetWaypointAtIndex on a null path)
if (platform && !platform->HasPath()) return;
if (entity.GetLOT() == 6267 || entity.GetLOT() == 16141) return;
PlatformResync(entity).Send(sysAddr);
}