Fix default spawn handling

This commit is contained in:
Phillip Stephens 2017-11-18 01:19:56 -08:00
parent a2c79eb996
commit d78a76febe
2 changed files with 3 additions and 3 deletions

View File

@ -2202,10 +2202,10 @@ void CStateManager::InitializeState(CAssetId mlvlId, TAreaId aid, CAssetId mreaI
if (sp && sp->x30_24_active && sp->FirstSpawn()) if (sp && sp->x30_24_active && sp->FirstSpawn())
{ {
const zeus::CTransform& xf = sp->GetTransform(); const zeus::CTransform& xf = sp->GetTransform();
zeus::CVector3f lookVec{xf.basis[0][1], xf.basis[1][1], xf.basis[2][1]}; zeus::CVector3f lookVec = xf.frontVector();
if (lookVec.canBeNormalized()) if (lookVec.canBeNormalized())
{ {
auto lookXf = zeus::lookAt(xf.origin, lookVec); auto lookXf = zeus::lookAt(xf.origin, xf.origin + lookVec);
x84c_player->Teleport(lookXf, *this, true); x84c_player->Teleport(lookXf, *this, true);
} }

@ -1 +1 @@
Subproject commit 3e04e86ae9735d69de5ed5889471e8e45669e3ea Subproject commit 883a7498e1124c12fe65040f76d4079591d7ad60