mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-12-04 01:41:56 +00:00
- Fix weapon bobbing interpolation
There was a visual issue where the weapon bobbing would only start interpolating after the player's movement velocity exceeds a certain value. (Thanks to @Doom2fan for the solution)
This commit is contained in:
parent
4c401f8185
commit
e82c840622
1 changed files with 9 additions and 2 deletions
|
@ -49,6 +49,7 @@ class PlayerPawn : Actor
|
||||||
double ViewBob; // [SP] ViewBob Multiplier
|
double ViewBob; // [SP] ViewBob Multiplier
|
||||||
double FullHeight;
|
double FullHeight;
|
||||||
double curBob;
|
double curBob;
|
||||||
|
float prevBob;
|
||||||
|
|
||||||
meta Name HealingRadiusType;
|
meta Name HealingRadiusType;
|
||||||
meta Name InvulMode;
|
meta Name InvulMode;
|
||||||
|
@ -1586,6 +1587,7 @@ class PlayerPawn : Actor
|
||||||
virtual void PlayerThink()
|
virtual void PlayerThink()
|
||||||
{
|
{
|
||||||
let player = self.player;
|
let player = self.player;
|
||||||
|
prevBob = player.bob;
|
||||||
UserCmd cmd = player.cmd;
|
UserCmd cmd = player.cmd;
|
||||||
|
|
||||||
CheckFOV();
|
CheckFOV();
|
||||||
|
@ -2365,9 +2367,14 @@ class PlayerPawn : Actor
|
||||||
|
|
||||||
if (curbob != 0)
|
if (curbob != 0)
|
||||||
{
|
{
|
||||||
|
double bobVal = player.bob;
|
||||||
|
if (i == 0)
|
||||||
|
{
|
||||||
|
bobVal = prevBob;
|
||||||
|
}
|
||||||
//[SP] Added in decorate player.viewbob checks
|
//[SP] Added in decorate player.viewbob checks
|
||||||
double bobx = (player.bob * BobIntensity * Rangex * ViewBob);
|
double bobx = (bobVal * BobIntensity * Rangex * ViewBob);
|
||||||
double boby = (player.bob * BobIntensity * Rangey * ViewBob);
|
double boby = (bobVal * BobIntensity * Rangey * ViewBob);
|
||||||
switch (bobstyle)
|
switch (bobstyle)
|
||||||
{
|
{
|
||||||
case Bob_Normal:
|
case Bob_Normal:
|
||||||
|
|
Loading…
Reference in a new issue