- let TranslateSector update the player's angle if not in vanilla mode.

This commit is contained in:
Christoph Oelckers 2022-10-01 17:13:42 +02:00
parent ce9bda47fe
commit 7cb2545f4b

View file

@ -910,6 +910,8 @@ void TranslateSector(sectortype* pSector, double wave1, double wave2, const DVec
viewBackupSpriteLoc(actor); viewBackupSpriteLoc(actor);
actor->spr.pos.XY() = spot + pt_w2 - pivot; actor->spr.pos.XY() = spot + pt_w2 - pivot;
actor->spr.angle += angleofs; actor->spr.angle += angleofs;
if (!VanillaMode() && actor->IsPlayerActor()) gPlayer[actor->spr.type - kDudePlayer1].angle.addadjustment(angleofs);
} }
else if (actor->spr.cstat & CSTAT_SPRITE_MOVE_REVERSE) else if (actor->spr.cstat & CSTAT_SPRITE_MOVE_REVERSE)
{ {
@ -920,6 +922,7 @@ void TranslateSector(sectortype* pSector, double wave1, double wave2, const DVec
viewBackupSpriteLoc(actor); viewBackupSpriteLoc(actor);
actor->spr.pos.XY() = spot - pt_w2 + pivot; actor->spr.pos.XY() = spot - pt_w2 + pivot;
actor->spr.angle += angleofs; actor->spr.angle += angleofs;
if (!VanillaMode() && actor->IsPlayerActor()) gPlayer[actor->spr.type - kDudePlayer1].angle.addadjustment(angleofs);
} }
else if (pXSector->Drag) else if (pXSector->Drag)
{ {
@ -935,6 +938,7 @@ void TranslateSector(sectortype* pSector, double wave1, double wave2, const DVec
} }
actor->spr.angle += angleofs; actor->spr.angle += angleofs;
actor->spr.pos += position; actor->spr.pos += position;
if (!VanillaMode() && actor->IsPlayerActor()) gPlayer[actor->spr.type - kDudePlayer1].angle.addadjustment(angleofs);
} }
} }
} }
@ -959,6 +963,7 @@ void TranslateSector(sectortype* pSector, double wave1, double wave2, const DVec
viewBackupSpriteLoc(ac); viewBackupSpriteLoc(ac);
ac->spr.pos.XY() = spot + pt_w2 - pivot; ac->spr.pos.XY() = spot + pt_w2 - pivot;
ac->spr.angle += angleofs; ac->spr.angle += angleofs;
if (!VanillaMode() && ac->IsPlayerActor()) gPlayer[ac->spr.type - kDudePlayer1].angle.addadjustment(angleofs);
} }
else if (ac->spr.cstat & CSTAT_SPRITE_MOVE_REVERSE) else if (ac->spr.cstat & CSTAT_SPRITE_MOVE_REVERSE)
{ {
@ -966,6 +971,7 @@ void TranslateSector(sectortype* pSector, double wave1, double wave2, const DVec
viewBackupSpriteLoc(ac); viewBackupSpriteLoc(ac);
ac->spr.pos.XY() = spot - pt_w2 + pivot; ac->spr.pos.XY() = spot - pt_w2 + pivot;
ac->spr.angle += angleofs; ac->spr.angle += angleofs;
if (!VanillaMode() && ac->IsPlayerActor()) gPlayer[ac->spr.type - kDudePlayer1].angle.addadjustment(angleofs);
} }
} }
} }