- Blood: Floatify PLAYER::zWeaponVel.

This commit is contained in:
Mitchell Richters 2022-09-11 23:21:36 +10:00 committed by Christoph Oelckers
parent 0019b5ee02
commit 954b394baa
3 changed files with 6 additions and 6 deletions

View file

@ -1871,13 +1871,13 @@ void playerProcess(PLAYER* pPlayer)
else
pPlayer->zViewVel += MulScaleF(dz << 8, 0x1800, 16) / 65536;
pPlayer->zView += pPlayer->zViewVel;
pPlayer->zWeaponVel = interpolatedvalue(pPlayer->zWeaponVel, actor->int_vel().Z, FixedToFloat(0x5000));
pPlayer->zWeaponVel = interpolatedvalue(pPlayer->zWeaponVel, actor->vel.Z, FixedToFloat(0x5000));
dz = pPlayer->actor->int_pos().Z - pPosture->weaponAboveZ - pPlayer->zWeapon * zworldtoint;
if (dz > 0)
pPlayer->zWeaponVel += MulScale(dz << 8, 0x8000, 16);
pPlayer->zWeaponVel += MulScaleF(dz << 8, 0x8000, 16) / 65536;
else
pPlayer->zWeaponVel += MulScale(dz << 8, 0xc00, 16);
pPlayer->zWeapon += FixedToFloat(pPlayer->zWeaponVel);
pPlayer->zWeaponVel += MulScaleF(dz << 8, 0xc00, 16) / 65536;
pPlayer->zWeapon += pPlayer->zWeaponVel;
pPlayer->bobPhase = ClipLow(pPlayer->bobPhase - 4, 0);
nSpeed >>= FRACBITS;
if (pPlayer->posture == 1)

View file

@ -112,7 +112,7 @@ struct PLAYER
double zViewVel;
double zWeapon;
double ozWeapon;
int zWeaponVel;
double zWeaponVel;
int slope;
bool isUnderwater;
bool hasKey[8];

View file

@ -76,7 +76,7 @@ struct BloodPlayer native
native double zView;
native double zViewVel;
native double zWeapon;
native int zWeaponVel;
native double zWeaponVel;
native int slope;
native bool isUnderwater;
native bool hasKey[8];