- Added: PlayerPawn property "Player.ViewBob" which acts as a MoveBob/StillBob multiplier.
This commit is contained in:
parent
513f8312b3
commit
e0efdd97b3
5 changed files with 32 additions and 5 deletions
|
|
@ -651,7 +651,8 @@ void APlayerPawn::Serialize(FSerializer &arc)
|
|||
("fallingscreammaxn", FallingScreamMaxSpeed, def->FallingScreamMaxSpeed)
|
||||
("userange", UseRange, def->UseRange)
|
||||
("aircapacity", AirCapacity, def->AirCapacity)
|
||||
("viewheight", ViewHeight, def->ViewHeight);
|
||||
("viewheight", ViewHeight, def->ViewHeight)
|
||||
("viewbob", ViewBob, def->ViewBob);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
|
@ -1844,11 +1845,12 @@ 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.;
|
||||
angle = level.time / (120 * TICRATE / 35.) * 360. * player->mo->ViewBob;
|
||||
bob = player->userinfo.GetStillBob() * angle.Sin();
|
||||
}
|
||||
else
|
||||
|
|
@ -1858,7 +1860,7 @@ void P_CalcHeight (player_t *player)
|
|||
}
|
||||
else
|
||||
{
|
||||
angle = level.time / (20 * TICRATE / 35.) * 360.;
|
||||
angle = level.time / (20 * TICRATE / 35.) * 360. * player->mo->ViewBob;
|
||||
bob = player->bob * angle.Sin() * (player->mo->waterlevel > 1 ? 0.25f : 0.5f);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue