Replace magic values with script actions

This commit is contained in:
Christian Semmler 2024-05-16 15:36:52 -04:00
parent 3c89cbe4e1
commit 4419007355
No known key found for this signature in database
GPG key ID: 086DAA1360BEEE5C

View file

@ -144,7 +144,7 @@ MxU32 Helicopter::VTable0xcc()
} }
VTable0xe0(); VTable0xe0();
InvokeAction(Extra::ActionType::e_start, m_script, 0x15, NULL); InvokeAction(Extra::ActionType::e_start, m_script, IsleScript::c_HelicopterDashboard, NULL);
GetCurrentAction().SetObjectId(-1); GetCurrentAction().SetObjectId(-1);
ControlManager()->Register(this); ControlManager()->Register(this);
return 1; return 1;
@ -191,7 +191,7 @@ MxU32 Helicopter::VTable0xd4(LegoControlManagerEvent& p_param)
state->SetUnknown18(4); state->SetUnknown18(4);
m_state->SetUnknown8(1); m_state->SetUnknown8(1);
m_world->RemovePathActor(this); m_world->RemovePathActor(this);
InvokeAction(Extra::ActionType::e_start, script, 0x20, NULL); InvokeAction(Extra::ActionType::e_start, script, IsleScript::c_HelicopterTakeOff_Anim, NULL);
SetState(0); SetState(0);
} }
ret = 1; ret = 1;
@ -204,7 +204,7 @@ MxU32 Helicopter::VTable0xd4(LegoControlManagerEvent& p_param)
if (m_state->GetUnkown8() == 2) { if (m_state->GetUnkown8() == 2) {
m_state->SetUnknown8(3); m_state->SetUnknown8(3);
m_world->RemovePathActor(this); m_world->RemovePathActor(this);
InvokeAction(Extra::ActionType::e_start, script, 0x21, NULL); InvokeAction(Extra::ActionType::e_start, script, IsleScript::c_HelicopterLand_Anim, NULL);
SetState(4); SetState(4);
} }
ret = 1; ret = 1;