Suppress build exit camera animations in multiplayer

The build exit animations (e.g. c_ips002ro_RunAnim for helicopter) are
triggered via FUN_10060dc0 in SpawnPlayer, which bypasses the
m_enableCamAnims check. Mark m_playedExitScript = TRUE for all vehicle
build states in EnforceDisableNPCs to prevent them from firing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Christian Semmler 2026-03-28 14:44:33 -07:00
parent 8413647463
commit af80f161d6
No known key found for this signature in database
GPG Key ID: 086DAA1360BEEE5C

View File

@ -10,6 +10,7 @@
#include "legoactor.h" #include "legoactor.h"
#include "legoanimationmanager.h" #include "legoanimationmanager.h"
#include "legocachsound.h" #include "legocachsound.h"
#include "legocarbuild.h"
#include "legocharactermanager.h" #include "legocharactermanager.h"
#include "legoextraactor.h" #include "legoextraactor.h"
#include "legogamestate.h" #include "legogamestate.h"
@ -486,6 +487,18 @@ void NetworkManager::EnforceDisableNPCs()
am->m_enableCamAnims = FALSE; am->m_enableCamAnims = FALSE;
am->m_unk0x400 = FALSE; am->m_unk0x400 = FALSE;
// Suppress build exit camera animations (triggered via FUN_10060dc0,
// which bypasses the m_enableCamAnims check)
static const char* buildStateNames[] =
{"LegoCopterBuildState", "LegoDuneCarBuildState", "LegoJetskiBuildState", "LegoRaceCarBuildState"};
for (const char* name : buildStateNames) {
LegoVehicleBuildState* state = (LegoVehicleBuildState*) GameState()->GetState(name);
if (state != NULL) {
state->m_playedExitScript = TRUE;
}
}
// Purge all extras including ambient NPCs (mama, papa, brickster) // Purge all extras including ambient NPCs (mama, papa, brickster)
// that are spawned by camera path triggers via FUN_10064380. // that are spawned by camera path triggers via FUN_10064380.
// PurgeExtra(TRUE) deliberately skips mama/papa, so we purge manually. // PurgeExtra(TRUE) deliberately skips mama/papa, so we purge manually.