mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-12 06:50:59 +00:00
- SW: Revert last commit and apply changes directly in pp->setHeightAndZ()
so all bases are covered.
This commit is contained in:
parent
b83d321c4b
commit
a643a74083
3 changed files with 4 additions and 7 deletions
|
@ -1888,7 +1888,7 @@ struct PLAYER
|
||||||
|
|
||||||
void setHeightAndZ(const double newz, const double newheight)
|
void setHeightAndZ(const double newz, const double newheight)
|
||||||
{
|
{
|
||||||
actor->spr.pos.Z = newz;
|
actor->spr.pos.Z = newz - newheight - actor->viewzoffset;
|
||||||
height = newheight;
|
height = newheight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3142,8 +3142,7 @@ void DoPlayerFall(PLAYER* pp)
|
||||||
// i any kind of crawl key get rid of recoil
|
// i any kind of crawl key get rid of recoil
|
||||||
if (DoPlayerTestCrawl(pp) || (pp->input.actions & SB_CROUCH))
|
if (DoPlayerTestCrawl(pp) || (pp->input.actions & SB_CROUCH))
|
||||||
{
|
{
|
||||||
pp->actor->spr.pos.Z = pp->loz - PLAYER_CRAWL_HEIGHTF - pp->actor->viewzoffset;
|
pp->setHeightAndZ(pp->loz, PLAYER_CRAWL_HEIGHTF);
|
||||||
pp->height = PLAYER_CRAWL_HEIGHTF;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -3606,8 +3605,7 @@ void DoPlayerCrawl(PLAYER* pp)
|
||||||
|
|
||||||
if (pp->insector() && (pp->cursector->extra & SECTFX_DYNAMIC_AREA))
|
if (pp->insector() && (pp->cursector->extra & SECTFX_DYNAMIC_AREA))
|
||||||
{
|
{
|
||||||
pp->actor->spr.pos.Z = pp->loz - PLAYER_CRAWL_HEIGHTF - pp->actor->viewzoffset;
|
pp->setHeightAndZ(pp->loz, PLAYER_CRAWL_HEIGHTF);
|
||||||
pp->height = PLAYER_CRAWL_HEIGHTF;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DoPlayerBob(pp);
|
DoPlayerBob(pp);
|
||||||
|
|
|
@ -1743,8 +1743,7 @@ PlayerPart:
|
||||||
{
|
{
|
||||||
// move up some for really fast moving plats
|
// move up some for really fast moving plats
|
||||||
DoPlayerZrange(pp);
|
DoPlayerZrange(pp);
|
||||||
pp->actor->spr.pos.Z = pp->loz - PLAYER_CRAWL_HEIGHTF - pp->actor->viewzoffset;
|
pp->setHeightAndZ(pp->loz, PLAYER_CRAWL_HEIGHTF);
|
||||||
pp->height = PLAYER_CRAWL_HEIGHTF;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue