mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-14 08:30:35 +00:00
- Duke: Reduce boilerplate from previous commit.
This commit is contained in:
parent
9a17d33579
commit
c4041affb1
3 changed files with 12 additions and 12 deletions
|
@ -353,4 +353,14 @@ inline void processinputvel(int snum)
|
|||
p->sync.svel = (float)velvect.Y;
|
||||
}
|
||||
|
||||
inline void setPlayerActorViewZOffset(DDukeActor* const pact)
|
||||
{
|
||||
if (!PlayClock)
|
||||
{
|
||||
pact->spr.pos.Z += gs.playerheight;
|
||||
pact->opos.Z += gs.playerheight;
|
||||
pact->oviewzoffset = pact->viewzoffset = -gs.playerheight;
|
||||
}
|
||||
}
|
||||
|
||||
END_DUKE_NS
|
||||
|
|
|
@ -2620,12 +2620,7 @@ void processinput_d(int snum)
|
|||
shrunk = (pact->spr.scale.Y < 0.5);
|
||||
getzrange(p->GetActor()->getPosWithOffsetZ(), psectp, &ceilingz, chz, &floorz, clz, 10.1875, CLIPMASK0);
|
||||
|
||||
if (!PlayClock)
|
||||
{
|
||||
pact->spr.pos.Z += gs.playerheight;
|
||||
pact->opos.Z += gs.playerheight;
|
||||
pact->oviewzoffset = pact->viewzoffset = -gs.playerheight;
|
||||
}
|
||||
setPlayerActorViewZOffset(pact);
|
||||
|
||||
p->truefz = getflorzofslopeptr(psectp, p->GetActor()->getPosWithOffsetZ());
|
||||
p->truecz = getceilzofslopeptr(psectp, p->GetActor()->getPosWithOffsetZ());
|
||||
|
|
|
@ -3244,12 +3244,7 @@ void processinput_r(int snum)
|
|||
getzrange(p->GetActor()->getPosWithOffsetZ(), psectp, &ceilingz, chz, &floorz, clz, 0.25, CLIPMASK0);
|
||||
}
|
||||
|
||||
if (!PlayClock)
|
||||
{
|
||||
pact->spr.pos.Z += gs.playerheight;
|
||||
pact->opos.Z += gs.playerheight;
|
||||
pact->oviewzoffset = pact->viewzoffset = -gs.playerheight;
|
||||
}
|
||||
setPlayerActorViewZOffset(pact);
|
||||
|
||||
p->truefz = getflorzofslopeptr(psectp, p->GetActor()->getPosWithOffsetZ());
|
||||
p->truecz = getceilzofslopeptr(psectp, p->GetActor()->getPosWithOffsetZ());
|
||||
|
|
Loading…
Reference in a new issue