Fix actor physics move

This commit is contained in:
Jack Andersen 2018-05-14 16:56:05 -10:00
parent 0c49c8ea9e
commit 10d36ac1d6
3 changed files with 12 additions and 7 deletions

View File

@ -1913,7 +1913,7 @@ void CStateManager::Update(float dt)
if (!dying)
{
MovePlatforms(dt);
MoveDoors(dt);
MoveActors(dt);
}
ProcessPlayerInput();
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())
{
@ -2073,6 +2073,7 @@ void CStateManager::MoveDoors(float dt)
CPhysicsActor& physActor = static_cast<CPhysicsActor&>(*ent);
if (physActor.GetMass() == 0.f)
continue;
if (TCastToPtr<CAi> ai = physActor)
{
bool doThink = !xf94_29_cinematicPause;
@ -2088,14 +2089,18 @@ void CStateManager::MoveDoors(float dt)
doThink = false;
}
if (!doThink)
{
SendScriptMsgAlways(ai->GetUniqueId(), kInvalidUniqueId,
EScriptObjectMessage::SuspendedMove);
else if (x84c_player.get() != ent)
continue;
}
}
if (x84c_player.get() != ent)
if (!GetPlatformAndDoorObjectList().IsPlatform(*ent))
CGameCollision::Move(*this, physActor, dt, nullptr);
}
}
}
void CStateManager::CrossTouchActors()
{

View File

@ -345,7 +345,7 @@ public:
void UpdateHintState(float dt);
void PreThinkObjects(float dt);
void MovePlatforms(float dt);
void MoveDoors(float dt);
void MoveActors(float dt);
void CrossTouchActors();
void Think(float dt);
void PostUpdatePlayer(float dt);

2
hecl

@ -1 +1 @@
Subproject commit d2c2ef61dbcb78fe6995e61de7e97cf3e156e40a
Subproject commit fced7add60d925bf16dfa8c2391b4a77a1e45f8e