mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 00:41:55 +00:00
- Blood: Floatify PLAYER::zViewVel
.
This commit is contained in:
parent
f35fffdf3d
commit
2d98c532eb
3 changed files with 7 additions and 7 deletions
|
@ -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)
|
||||
|
|
|
@ -109,7 +109,7 @@ struct PLAYER
|
|||
int bloodlust; // ---> useless
|
||||
double zView;
|
||||
double ozView;
|
||||
int zViewVel;
|
||||
double zViewVel;
|
||||
int zWeapon;
|
||||
int ozWeapon;
|
||||
int zWeaponVel;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue