diff --git a/source/games/blood/src/player.cpp b/source/games/blood/src/player.cpp index f3f292c3d..cd9b6b9f6 100644 --- a/source/games/blood/src/player.cpp +++ b/source/games/blood/src/player.cpp @@ -840,7 +840,7 @@ void playerStart(int nPlayer, int bNewLevel) pPlayer->relAim.dy = 0; pPlayer->relAim.dz = 0; pPlayer->aimTarget = nullptr; - pPlayer->zViewVel = pPlayer->zWeaponVel; + pPlayer->zViewVel = pPlayer->zWeaponVel * zinttoworld; if (!(gGameOptions.nGameType == 1 && gGameOptions.bKeepKeysOnRespawn && !bNewLevel)) for (int i = 0; i < 8; i++) pPlayer->hasKey[i] = gGameOptions.nGameType >= 2; @@ -1864,13 +1864,13 @@ void playerProcess(PLAYER* pPlayer) } ProcessInput(pPlayer); int nSpeed = approxDist(actor->int_vel().X, actor->int_vel().Y); - pPlayer->zViewVel = interpolatedvalue(pPlayer->zViewVel, actor->int_vel().Z, FixedToFloat(0x7000)); + pPlayer->zViewVel = interpolatedvalue(pPlayer->zViewVel, actor->vel.Z, FixedToFloat(0x7000)); int dz = pPlayer->actor->int_pos().Z - pPosture->eyeAboveZ - pPlayer->zView * zworldtoint; if (dz > 0) - pPlayer->zViewVel += MulScale(dz << 8, 0xa000, 16); + pPlayer->zViewVel += MulScaleF(dz << 8, 0xa000, 16) / 65536; else - pPlayer->zViewVel += MulScale(dz << 8, 0x1800, 16); - pPlayer->zView += FixedToFloat(pPlayer->zViewVel); + pPlayer->zViewVel += MulScaleF(dz << 8, 0x1800, 16) / 65536; + pPlayer->zView += pPlayer->zViewVel; pPlayer->zWeaponVel = interpolatedvalue(pPlayer->zWeaponVel, actor->int_vel().Z, FixedToFloat(0x5000)); dz = pPlayer->actor->int_pos().Z - pPosture->weaponAboveZ - pPlayer->zWeapon; if (dz > 0) diff --git a/source/games/blood/src/player.h b/source/games/blood/src/player.h index ee907921f..e8a54dba0 100644 --- a/source/games/blood/src/player.h +++ b/source/games/blood/src/player.h @@ -109,7 +109,7 @@ struct PLAYER int bloodlust; // ---> useless double zView; double ozView; - int zViewVel; + double zViewVel; int zWeapon; int ozWeapon; int zWeaponVel; diff --git a/wadsrc/static/zscript/games/blood/bloodgame.zs b/wadsrc/static/zscript/games/blood/bloodgame.zs index d240587e8..f7af07148 100644 --- a/wadsrc/static/zscript/games/blood/bloodgame.zs +++ b/wadsrc/static/zscript/games/blood/bloodgame.zs @@ -74,7 +74,7 @@ struct BloodPlayer native //native int nSprite; native int lifeMode; native double zView; - native int zViewVel; + native double zViewVel; native int zWeapon; native int zWeaponVel; native int slope;