mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 20:21:26 +00:00
Fixed: Player.ViewBob should be multiplying the bobbing height in P_CalcHeight, not the velocity of the bobbing.
This mimics the act of the user altering their movebob CVar to compensate for non-standard player movement speeds.
This commit is contained in:
parent
e0efdd97b3
commit
21b690a3c7
1 changed files with 3 additions and 4 deletions
|
@ -1845,12 +1845,11 @@ void P_CalcHeight (player_t *player)
|
|||
return;
|
||||
}
|
||||
|
||||
//[SP] Added (x*player->mo->ViewBob) to allow DECORATE changes to view bobbing speed.
|
||||
if (still)
|
||||
{
|
||||
if (player->health > 0)
|
||||
{
|
||||
angle = level.time / (120 * TICRATE / 35.) * 360. * player->mo->ViewBob;
|
||||
angle = level.time / (120 * TICRATE / 35.) * 360.;
|
||||
bob = player->userinfo.GetStillBob() * angle.Sin();
|
||||
}
|
||||
else
|
||||
|
@ -1860,7 +1859,7 @@ void P_CalcHeight (player_t *player)
|
|||
}
|
||||
else
|
||||
{
|
||||
angle = level.time / (20 * TICRATE / 35.) * 360. * player->mo->ViewBob;
|
||||
angle = level.time / (20 * TICRATE / 35.) * 360.;
|
||||
bob = player->bob * angle.Sin() * (player->mo->waterlevel > 1 ? 0.25f : 0.5f);
|
||||
}
|
||||
|
||||
|
@ -1893,7 +1892,7 @@ void P_CalcHeight (player_t *player)
|
|||
{
|
||||
bob = 0;
|
||||
}
|
||||
player->viewz = player->mo->Z() + player->viewheight + bob;
|
||||
player->viewz = player->mo->Z() + player->viewheight + (bob * player->mo->ViewBob); // [SP] Allow DECORATE changes to view bobbing speed.
|
||||
if (player->mo->Floorclip && player->playerstate != PST_DEAD
|
||||
&& player->mo->Z() <= player->mo->floorz)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue