mirror of https://github.com/AxioDL/metaforce.git
Fix default spawn handling
This commit is contained in:
parent
a2c79eb996
commit
d78a76febe
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
2
specter
2
specter
|
@ -1 +1 @@
|
||||||
Subproject commit 3e04e86ae9735d69de5ed5889471e8e45669e3ea
|
Subproject commit 883a7498e1124c12fe65040f76d4079591d7ad60
|
Loading…
Reference in New Issue