mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +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
|
else
|
||||||
pPlayer->zWeaponVel += dz * FixedToFloat(0xc00);
|
pPlayer->zWeaponVel += dz * FixedToFloat(0xc00);
|
||||||
pPlayer->zWeapon += pPlayer->zWeaponVel;
|
pPlayer->zWeapon += pPlayer->zWeaponVel;
|
||||||
pPlayer->bobPhase = ClipLow(pPlayer->bobPhase - 4, 0);
|
pPlayer->bobPhase = max(pPlayer->bobPhase - 4, 0.);
|
||||||
int nSpeed = int(actor->vel.XY().Length());
|
double nSpeed = actor->vel.XY().Length();
|
||||||
if (pPlayer->posture == 1)
|
if (pPlayer->posture == 1)
|
||||||
{
|
{
|
||||||
pPlayer->bobAmp = (pPlayer->bobAmp + 17) & 2047;
|
pPlayer->bobAmp = (pPlayer->bobAmp + 17) & 2047;
|
||||||
|
@ -1846,12 +1846,12 @@ void playerProcess(PLAYER* pPlayer)
|
||||||
if (running)
|
if (running)
|
||||||
{
|
{
|
||||||
if (pPlayer->bobPhase < 60)
|
if (pPlayer->bobPhase < 60)
|
||||||
pPlayer->bobPhase = ClipHigh(pPlayer->bobPhase + nSpeed, 60);
|
pPlayer->bobPhase = min(pPlayer->bobPhase + nSpeed, 60.);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (pPlayer->bobPhase < 30)
|
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);
|
pPlayer->bobHeight = pPosture->bobV * pPlayer->bobPhase * BobVal(pPlayer->bobAmp * 2);
|
||||||
|
|
|
@ -92,7 +92,7 @@ struct PLAYER
|
||||||
bool isRunning;
|
bool isRunning;
|
||||||
int posture; // stand, crouch, swim
|
int posture; // stand, crouch, swim
|
||||||
int sceneQav; // by NoOne: used to keep qav id
|
int sceneQav; // by NoOne: used to keep qav id
|
||||||
int bobPhase;
|
double bobPhase;
|
||||||
int bobAmp;
|
int bobAmp;
|
||||||
double bobHeight;
|
double bobHeight;
|
||||||
double bobWidth;
|
double bobWidth;
|
||||||
|
|
|
@ -62,7 +62,7 @@ struct BloodPlayer native
|
||||||
native bool isRunning;
|
native bool isRunning;
|
||||||
native int posture; // stand, crouch, swim
|
native int posture; // stand, crouch, swim
|
||||||
native int sceneQav; // by NoOne: used to keep qav id
|
native int sceneQav; // by NoOne: used to keep qav id
|
||||||
native int bobPhase;
|
native double bobPhase;
|
||||||
native int bobAmp;
|
native int bobAmp;
|
||||||
native double bobHeight;
|
native double bobHeight;
|
||||||
native double bobWidth;
|
native double bobWidth;
|
||||||
|
|
Loading…
Reference in a new issue