Refactor/improve matches in Act1State (#1143)

* Refactor/improve matches in Act1State

* Fix naming
This commit is contained in:
Christian Semmler
2024-11-10 14:47:12 -07:00
committed by GitHub
parent 5d3d66965d
commit cd261b9518
8 changed files with 200 additions and 193 deletions

View File

@@ -337,7 +337,7 @@ void RegistrationBook::FUN_100778c0()
if (GameState()->GetCurrentAct() == LegoGameState::e_act1) {
Act1State* act1state = (Act1State*) GameState()->GetState("Act1State");
if (strcmp(act1state->m_helicopterPlane.GetName()->GetData(), "") != 0) {
if (act1state->m_helicopterPlane.IsPresent()) {
InvokeAction(Extra::e_start, m_atomId, CopterScript::c_Helicopter_Actor, NULL);
NotificationManager()->Send(
this,
@@ -347,7 +347,7 @@ void RegistrationBook::FUN_100778c0()
m_unk0x2b8++;
}
if (strcmp(act1state->m_jetskiPlane.GetName()->GetData(), "") != 0) {
if (act1state->m_jetskiPlane.IsPresent()) {
InvokeAction(Extra::e_start, m_atomId, JetskiScript::c_Jetski_Actor, NULL);
NotificationManager()->Send(
this,
@@ -357,7 +357,7 @@ void RegistrationBook::FUN_100778c0()
m_unk0x2b8++;
}
if (strcmp(act1state->m_dunebuggyPlane.GetName()->GetData(), "") != 0) {
if (act1state->m_dunebuggyPlane.IsPresent()) {
InvokeAction(Extra::e_start, m_atomId, DunecarScript::c_DuneBugy_Actor, NULL);
NotificationManager()->Send(
this,
@@ -367,7 +367,7 @@ void RegistrationBook::FUN_100778c0()
m_unk0x2b8++;
}
if (strcmp(act1state->m_racecarPlane.GetName()->GetData(), "") != 0) {
if (act1state->m_racecarPlane.IsPresent()) {
InvokeAction(Extra::e_start, m_atomId, RacecarScript::c_RaceCar_Actor, NULL);
NotificationManager()->Send(
this,