mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
- Exhumed: Correctly transform player velocities when running on single 30Hz timer.
Thanks, Graf :) # Conflicts: # source/exhumed/src/exhumed.cpp
This commit is contained in:
parent
0c300c181f
commit
e3fe1b2b60
1 changed files with 8 additions and 4 deletions
|
@ -488,10 +488,14 @@ void GameTicker()
|
|||
nPlayerDAng = fix16_sadd(nPlayerDAng, localInput.q16avel);
|
||||
inita &= kAngleMask;
|
||||
|
||||
lPlayerXVel += localInput.fvel * Cos(inita) + localInput.svel * Sin(inita);
|
||||
lPlayerYVel += localInput.fvel * Sin(inita) - localInput.svel * Cos(inita);
|
||||
lPlayerXVel -= (lPlayerXVel >> 5) + (lPlayerXVel >> 6);
|
||||
lPlayerYVel -= (lPlayerYVel >> 5) + (lPlayerYVel >> 6);
|
||||
int i;
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
lPlayerXVel += localInput.fvel * Cos(inita) + localInput.svel * Sin(inita);
|
||||
lPlayerYVel += localInput.fvel * Sin(inita) - localInput.svel * Cos(inita);
|
||||
lPlayerXVel -= (lPlayerXVel >> 5) + (lPlayerXVel >> 6);
|
||||
lPlayerYVel -= (lPlayerYVel >> 5) + (lPlayerYVel >> 6);
|
||||
}
|
||||
|
||||
sPlayerInput[nLocalPlayer].xVel = lPlayerXVel;
|
||||
sPlayerInput[nLocalPlayer].yVel = lPlayerYVel;
|
||||
|
|
Loading…
Reference in a new issue