Rename CScriptDock enum values to match behavior

This commit is contained in:
Phillip Stephens 2021-05-31 13:12:08 -07:00
parent 02fa17025a
commit 41a2a4ae6d
Signed by: Antidote
GPG Key ID: F8BEE4C83DACA60D
2 changed files with 8 additions and 8 deletions

View File

@ -50,9 +50,9 @@ void CScriptDock::Think(float dt, CStateManager& mgr) {
} }
if (mgr.GetNextAreaId() != x260_area) { if (mgr.GetNextAreaId() != x260_area) {
x264_dockState = EDockState::Three; x264_dockState = EDockState::InNextRoom;
} else if (x264_dockState == EDockState::Three) { } else if (x264_dockState == EDockState::InNextRoom) {
x264_dockState = EDockState::Idle; x264_dockState = EDockState::InSourceRoom;
} else if (x264_dockState == EDockState::PlayerTouched) { } else if (x264_dockState == EDockState::PlayerTouched) {
x264_dockState = EDockState::EnterNextArea; x264_dockState = EDockState::EnterNextArea;
} else if (x264_dockState == EDockState::EnterNextArea) { } else if (x264_dockState == EDockState::EnterNextArea) {
@ -75,7 +75,7 @@ void CScriptDock::Think(float dt, CStateManager& mgr) {
} }
} }
x264_dockState = EDockState::Idle; x264_dockState = EDockState::InSourceRoom;
} }
} }
@ -153,7 +153,7 @@ void CScriptDock::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStat
} }
std::optional<zeus::CAABox> CScriptDock::GetTouchBounds() const { std::optional<zeus::CAABox> CScriptDock::GetTouchBounds() const {
if (x264_dockState == EDockState::Three) { if (x264_dockState == EDockState::InNextRoom) {
return std::nullopt; return std::nullopt;
} }
@ -161,7 +161,7 @@ std::optional<zeus::CAABox> CScriptDock::GetTouchBounds() const {
} }
void CScriptDock::Touch(CActor& act, CStateManager&) { void CScriptDock::Touch(CActor& act, CStateManager&) {
if (x264_dockState == EDockState::Three) { if (x264_dockState == EDockState::InNextRoom) {
return; return;
} }

View File

@ -8,13 +8,13 @@
namespace metaforce { namespace metaforce {
class CScriptDock : public CPhysicsActor { class CScriptDock : public CPhysicsActor {
enum class EDockState { Idle, PlayerTouched, EnterNextArea, Three }; enum class EDockState { InSourceRoom, PlayerTouched, EnterNextArea, InNextRoom };
friend class CScriptDoor; friend class CScriptDoor;
s32 x258_dockReferenceCount; s32 x258_dockReferenceCount;
s32 x25c_dock; s32 x25c_dock;
TAreaId x260_area; TAreaId x260_area;
EDockState x264_dockState = EDockState::Three; EDockState x264_dockState = EDockState::InNextRoom;
bool x268_24_dockReferenced : 1 = false; bool x268_24_dockReferenced : 1 = false;
bool x268_25_loadConnected : 1; bool x268_25_loadConnected : 1;
bool x268_26_areaPostConstructed : 1 = false; bool x268_26_areaPostConstructed : 1 = false;