mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- Change wrapper internals for current pitch to the actor's sprite DRotator and make sure all the games load a level.
This commit is contained in:
parent
850c988dfa
commit
7f5b97a0b7
6 changed files with 5 additions and 10 deletions
|
@ -120,7 +120,7 @@ public:
|
|||
|
||||
void backupang()
|
||||
{
|
||||
PrevAngles.Yaw = spr.Angles.Yaw;
|
||||
PrevAngles = spr.Angles;
|
||||
}
|
||||
|
||||
void backuploc()
|
||||
|
|
|
@ -9,8 +9,7 @@
|
|||
struct PlayerAngles
|
||||
{
|
||||
// Temporary wrappers.
|
||||
DAngle thisHoriz;
|
||||
DAngle& ZzHORIZON() { return thisHoriz; }
|
||||
DAngle& ZzHORIZON() { return pActor->spr.Angles.Pitch; }
|
||||
DAngle prevHoriz;
|
||||
DAngle& ZzOLDHORIZON() { return prevHoriz; }
|
||||
DAngle thisAngle;
|
||||
|
|
|
@ -125,7 +125,6 @@ void resetplayerstats(int snum)
|
|||
p->footprintpal = 0;
|
||||
p->footprintshade = 0;
|
||||
p->jumping_toggle = 0;
|
||||
p->Angles.ZzOLDHORIZON() = p->Angles.ZzHORIZON() = DAngle::fromDeg(-17.354);
|
||||
p->Angles.ZzOHORIZOFF = p->Angles.ZzHORIZOFF = nullAngle;
|
||||
p->bobcounter = 0;
|
||||
p->on_ground = 0;
|
||||
|
@ -515,8 +514,9 @@ void resetpspritevars(int g, const DVector3& startpos)
|
|||
auto newActor = CreateActor(ps[0].cursector, startpos.plusZ(gs.playerheight),
|
||||
TILE_APLAYER, 0, DVector2(0, 0), ps[0].Angles.ZzANGLE(), 0., 0., nullptr, 10);
|
||||
|
||||
newActor->spr.Angles.Pitch = DAngle::fromDeg(-17.354);
|
||||
newActor->viewzoffset = -gs.playerheight;
|
||||
newActor->backupz();
|
||||
newActor->backuploc();
|
||||
|
||||
if (ud.recstat != 2) for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
|
|
|
@ -82,7 +82,7 @@ void GameInterface::GetInput(ControlInfo* const hidInput, double const scaleAdju
|
|||
sPlayerInput[nLocalPlayer].vel.Zero();
|
||||
}
|
||||
|
||||
if (!SyncInput())
|
||||
if (!SyncInput() && gamestate == GS_LEVEL)
|
||||
{
|
||||
if (!nFreeze)
|
||||
{
|
||||
|
|
|
@ -317,7 +317,6 @@ void RestartPlayer(int nPlayer)
|
|||
}
|
||||
|
||||
plr->Angles.backupYaw();
|
||||
plr->Angles.backupPitch();
|
||||
|
||||
plr->pPlayerFloorSprite = floorsprt;
|
||||
|
||||
|
|
|
@ -7042,13 +7042,10 @@ void InitAllPlayers(void)
|
|||
extern bool NewGame;
|
||||
//int fz,cz;
|
||||
|
||||
pfirst->Angles.ZzHORIZON() = nullAngle;
|
||||
|
||||
// Initialize all [MAX_SW_PLAYERS] arrays here!
|
||||
for (pp = Player; pp < &Player[MAX_SW_PLAYERS]; pp++)
|
||||
{
|
||||
pp->Angles.ZzANGLE() = pp->Angles.ZzOLDANGLE() = pfirst->Angles.ZzANGLE();
|
||||
pp->Angles.ZzHORIZON() = pp->Angles.ZzOLDHORIZON() = pfirst->Angles.ZzHORIZON();
|
||||
pp->cursector = pfirst->cursector;
|
||||
// set like this so that player can trigger something on start of the level
|
||||
pp->lastcursector = pfirst->cursector+1;
|
||||
|
|
Loading…
Reference in a new issue