mirror of https://github.com/AxioDL/metaforce.git
Fix actor physics move
This commit is contained in:
parent
0c49c8ea9e
commit
10d36ac1d6
|
@ -1913,7 +1913,7 @@ void CStateManager::Update(float dt)
|
||||||
if (!dying)
|
if (!dying)
|
||||||
{
|
{
|
||||||
MovePlatforms(dt);
|
MovePlatforms(dt);
|
||||||
MoveDoors(dt);
|
MoveActors(dt);
|
||||||
}
|
}
|
||||||
ProcessPlayerInput();
|
ProcessPlayerInput();
|
||||||
if (x904_gameState != EGameState::SoftPaused)
|
if (x904_gameState != EGameState::SoftPaused)
|
||||||
|
@ -2064,7 +2064,7 @@ void CStateManager::MovePlatforms(float dt)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CStateManager::MoveDoors(float dt)
|
void CStateManager::MoveActors(float dt)
|
||||||
{
|
{
|
||||||
for (CEntity* ent : GetPhysicsActorObjectList())
|
for (CEntity* ent : GetPhysicsActorObjectList())
|
||||||
{
|
{
|
||||||
|
@ -2073,6 +2073,7 @@ void CStateManager::MoveDoors(float dt)
|
||||||
CPhysicsActor& physActor = static_cast<CPhysicsActor&>(*ent);
|
CPhysicsActor& physActor = static_cast<CPhysicsActor&>(*ent);
|
||||||
if (physActor.GetMass() == 0.f)
|
if (physActor.GetMass() == 0.f)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (TCastToPtr<CAi> ai = physActor)
|
if (TCastToPtr<CAi> ai = physActor)
|
||||||
{
|
{
|
||||||
bool doThink = !xf94_29_cinematicPause;
|
bool doThink = !xf94_29_cinematicPause;
|
||||||
|
@ -2088,13 +2089,17 @@ void CStateManager::MoveDoors(float dt)
|
||||||
doThink = false;
|
doThink = false;
|
||||||
}
|
}
|
||||||
if (!doThink)
|
if (!doThink)
|
||||||
|
{
|
||||||
SendScriptMsgAlways(ai->GetUniqueId(), kInvalidUniqueId,
|
SendScriptMsgAlways(ai->GetUniqueId(), kInvalidUniqueId,
|
||||||
EScriptObjectMessage::SuspendedMove);
|
EScriptObjectMessage::SuspendedMove);
|
||||||
else if (x84c_player.get() != ent)
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (x84c_player.get() != ent)
|
||||||
if (!GetPlatformAndDoorObjectList().IsPlatform(*ent))
|
if (!GetPlatformAndDoorObjectList().IsPlatform(*ent))
|
||||||
CGameCollision::Move(*this, physActor, dt, nullptr);
|
CGameCollision::Move(*this, physActor, dt, nullptr);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CStateManager::CrossTouchActors()
|
void CStateManager::CrossTouchActors()
|
||||||
|
|
|
@ -345,7 +345,7 @@ public:
|
||||||
void UpdateHintState(float dt);
|
void UpdateHintState(float dt);
|
||||||
void PreThinkObjects(float dt);
|
void PreThinkObjects(float dt);
|
||||||
void MovePlatforms(float dt);
|
void MovePlatforms(float dt);
|
||||||
void MoveDoors(float dt);
|
void MoveActors(float dt);
|
||||||
void CrossTouchActors();
|
void CrossTouchActors();
|
||||||
void Think(float dt);
|
void Think(float dt);
|
||||||
void PostUpdatePlayer(float dt);
|
void PostUpdatePlayer(float dt);
|
||||||
|
|
2
hecl
2
hecl
|
@ -1 +1 @@
|
||||||
Subproject commit d2c2ef61dbcb78fe6995e61de7e97cf3e156e40a
|
Subproject commit fced7add60d925bf16dfa8c2391b4a77a1e45f8e
|
Loading…
Reference in New Issue