mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 00:41:55 +00:00
- Blood: Make bobPhase
a proper float.
This commit is contained in:
parent
80f4124b17
commit
ffc16635b2
3 changed files with 6 additions and 6 deletions
|
@ -1825,8 +1825,8 @@ void playerProcess(PLAYER* pPlayer)
|
|||
else
|
||||
pPlayer->zWeaponVel += dz * FixedToFloat(0xc00);
|
||||
pPlayer->zWeapon += pPlayer->zWeaponVel;
|
||||
pPlayer->bobPhase = ClipLow(pPlayer->bobPhase - 4, 0);
|
||||
int nSpeed = int(actor->vel.XY().Length());
|
||||
pPlayer->bobPhase = max(pPlayer->bobPhase - 4, 0.);
|
||||
double nSpeed = actor->vel.XY().Length();
|
||||
if (pPlayer->posture == 1)
|
||||
{
|
||||
pPlayer->bobAmp = (pPlayer->bobAmp + 17) & 2047;
|
||||
|
@ -1846,12 +1846,12 @@ void playerProcess(PLAYER* pPlayer)
|
|||
if (running)
|
||||
{
|
||||
if (pPlayer->bobPhase < 60)
|
||||
pPlayer->bobPhase = ClipHigh(pPlayer->bobPhase + nSpeed, 60);
|
||||
pPlayer->bobPhase = min(pPlayer->bobPhase + nSpeed, 60.);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pPlayer->bobPhase < 30)
|
||||
pPlayer->bobPhase = ClipHigh(pPlayer->bobPhase + nSpeed, 30);
|
||||
pPlayer->bobPhase = min(pPlayer->bobPhase + nSpeed, 30.);
|
||||
}
|
||||
}
|
||||
pPlayer->bobHeight = pPosture->bobV * pPlayer->bobPhase * BobVal(pPlayer->bobAmp * 2);
|
||||
|
|
|
@ -92,7 +92,7 @@ struct PLAYER
|
|||
bool isRunning;
|
||||
int posture; // stand, crouch, swim
|
||||
int sceneQav; // by NoOne: used to keep qav id
|
||||
int bobPhase;
|
||||
double bobPhase;
|
||||
int bobAmp;
|
||||
double bobHeight;
|
||||
double bobWidth;
|
||||
|
|
|
@ -62,7 +62,7 @@ struct BloodPlayer native
|
|||
native bool isRunning;
|
||||
native int posture; // stand, crouch, swim
|
||||
native int sceneQav; // by NoOne: used to keep qav id
|
||||
native int bobPhase;
|
||||
native double bobPhase;
|
||||
native int bobAmp;
|
||||
native double bobHeight;
|
||||
native double bobWidth;
|
||||
|
|
Loading…
Reference in a new issue