From d73ba07603a93c90ad7d4e2cedde976fbe1236b2 Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Sun, 24 Mar 2024 17:19:40 -0400 Subject: [PATCH] fix --- LEGO1/lego/legoomni/src/actors/ambulance.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/LEGO1/lego/legoomni/src/actors/ambulance.cpp b/LEGO1/lego/legoomni/src/actors/ambulance.cpp index 6e4caee0..9c0f87e5 100644 --- a/LEGO1/lego/legoomni/src/actors/ambulance.cpp +++ b/LEGO1/lego/legoomni/src/actors/ambulance.cpp @@ -33,7 +33,7 @@ void Ambulance::Destroy(MxBool p_fromDestructor) { } -// FUNCTION: LEGO1 0x10036160 +// FUNCTION: LEGO1 0x10036150 Ambulance::~Ambulance() { ControlManager()->Unregister(this); @@ -44,15 +44,17 @@ Ambulance::~Ambulance() MxResult Ambulance::Create(MxDSAction& p_dsAction) { MxResult result = IslePathActor::Create(p_dsAction); + if (result == SUCCESS) { m_world = CurrentWorld(); + if (m_world) { m_world->Add(this); } m_state = (AmbulanceMissionState*) GameState()->GetState("AmbulanceMissionState"); if (!m_state) { - m_state = new AmbulanceMissionState; + m_state = new AmbulanceMissionState(); m_state->SetUnknown0x08(0); GameState()->RegisterState(m_state); }