mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-05-01 18:13:57 +00:00
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:
parent
8413647463
commit
af80f161d6
@ -10,6 +10,7 @@
|
||||
#include "legoactor.h"
|
||||
#include "legoanimationmanager.h"
|
||||
#include "legocachsound.h"
|
||||
#include "legocarbuild.h"
|
||||
#include "legocharactermanager.h"
|
||||
#include "legoextraactor.h"
|
||||
#include "legogamestate.h"
|
||||
@ -486,6 +487,18 @@ void NetworkManager::EnforceDisableNPCs()
|
||||
am->m_enableCamAnims = 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)
|
||||
// that are spawned by camera path triggers via FUN_10064380.
|
||||
// PurgeExtra(TRUE) deliberately skips mama/papa, so we purge manually.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user