Name state field, getter and setter in Act1State (#1621)

This commit is contained in:
Fabian Neundorf
2025-07-13 21:01:06 +02:00
committed by GitHub
parent 40c1a40d2b
commit 356c64ce0e
17 changed files with 122 additions and 106 deletions

View File

@@ -53,7 +53,7 @@ MxLong InfoCenterEntity::HandleClick(LegoEventNotificationParam& p_param)
isle->SetDestLocation(LegoGameState::Area::e_infomain);
Act1State* act1state = (Act1State*) GameState()->GetState("Act1State");
act1state->SetUnknown18(0);
act1state->SetState(Act1State::e_none);
break;
}
case LegoGameState::Act::e_act2: {
@@ -83,8 +83,8 @@ MxLong GasStationEntity::HandleClick(LegoEventNotificationParam& p_param)
if (CanExit()) {
Act1State* state = (Act1State*) GameState()->GetState("Act1State");
if (state->GetUnknown18() != 8) {
state->SetUnknown18(0);
if (state->GetState() != Act1State::e_towtrack) {
state->SetState(Act1State::e_none);
if (UserActor()->GetActorId() != GameState()->GetActorId()) {
((IslePathActor*) UserActor())->Exit();
@@ -107,8 +107,8 @@ MxLong HospitalEntity::HandleClick(LegoEventNotificationParam& p_param)
if (CanExit()) {
Act1State* act1State = (Act1State*) GameState()->GetState("Act1State");
if (act1State->GetUnknown18() != 10) {
act1State->SetUnknown18(0);
if (act1State->GetState() != Act1State::e_ambulance) {
act1State->SetState(Act1State::e_none);
if (UserActor()->GetActorId() != GameState()->GetActorId()) {
((IslePathActor*) UserActor())->Exit();
@@ -131,8 +131,8 @@ MxLong PoliceEntity::HandleClick(LegoEventNotificationParam& p_param)
if (CanExit()) {
Act1State* state = (Act1State*) GameState()->GetState("Act1State");
if (state->GetUnknown18() != 10) {
state->SetUnknown18(0);
if (state->GetState() != Act1State::e_ambulance) {
state->SetState(Act1State::e_none);
if (UserActor()->GetActorId() != GameState()->GetActorId()) {
((IslePathActor*) UserActor())->Exit();
@@ -154,7 +154,7 @@ MxLong BeachHouseEntity::HandleClick(LegoEventNotificationParam& p_param)
{
if (CanExit()) {
Act1State* state = (Act1State*) GameState()->GetState("Act1State");
state->SetUnknown18(0);
state->SetState(Act1State::e_none);
if (UserActor()->GetActorId() != GameState()->GetActorId()) {
((IslePathActor*) UserActor())->Exit();
@@ -175,7 +175,7 @@ MxLong RaceStandsEntity::HandleClick(LegoEventNotificationParam& p_param)
{
if (CanExit()) {
Act1State* state = (Act1State*) GameState()->GetState("Act1State");
state->SetUnknown18(0);
state->SetState(Act1State::e_none);
if (UserActor()->GetActorId() != GameState()->GetActorId()) {
((IslePathActor*) UserActor())->Exit();