Refactor actor states, define enum (#1220)

* Refactor actor states, define enum

* Revert

* Rename `UpdateState` to `Animate`
This commit is contained in:
Christian Semmler
2024-12-13 12:30:50 -07:00
committed by GitHub
parent ce3f71ea0f
commit 6da2faa48c
44 changed files with 161 additions and 153 deletions

View File

@@ -1028,7 +1028,7 @@ MxResult LegoAnimationManager::FUN_100605e0(
LegoPathActor* actor = UserActor();
if (actor != NULL) {
actor->SetActorFlags(LegoPathActor::c_disable);
actor->SetActorState(LegoPathActor::c_disabled);
actor->SetWorldSpeed(0.0f);
}
}
@@ -1592,7 +1592,7 @@ MxU16 LegoAnimationManager::FUN_10062110(
{
LegoPathActor* actor = (LegoPathActor*) p_roi->GetEntity();
if (actor != NULL && actor->GetBoundary() == p_boundary && actor->GetActorFlags() == 0) {
if (actor != NULL && actor->GetBoundary() == p_boundary && actor->GetActorState() == LegoPathActor::c_initial) {
if (GetViewManager()->IsBoundingBoxInFrustum(p_roi->GetWorldBoundingBox())) {
Mx3DPointFloat direction(p_roi->GetWorldDirection());
@@ -2786,7 +2786,7 @@ void LegoAnimationManager::FUN_100648f0(LegoTranInfo* p_tranInfo, MxLong p_unk0x
LegoPathActor* actor = UserActor();
if (actor != NULL) {
actor->SetActorFlags(LegoPathActor::c_disable);
actor->SetActorState(LegoPathActor::c_disabled);
actor->SetWorldSpeed(0.0f);
}

View File

@@ -460,7 +460,7 @@ MxBool LegoAnimMMPresenter::FUN_1004b6d0(MxLong p_time)
}
}
actor->SetActorFlags(0);
actor->SetActorState(LegoPathActor::c_initial);
}
return TRUE;