mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-30 13:21:04 +00:00
- Blood: fixed cl_autorun affecting bobbing intensity even when no movement takes place.
Blood uses the state of the 'run' bit as the sole information that the player is running, which leads to very different behavior with cl_autorun on or off. Apparently Raze's semantics here do not agree with how it was handled originally and the residual bobbing when coming to a stop was more than a little bit distracting.
This commit is contained in:
parent
396e3cd524
commit
bc1adc9c51
1 changed files with 4 additions and 3 deletions
|
@ -1707,9 +1707,10 @@ void playerProcess(PLAYER *pPlayer)
|
||||||
{
|
{
|
||||||
if (pXSprite->height < 256)
|
if (pXSprite->height < 256)
|
||||||
{
|
{
|
||||||
pPlayer->bobAmp = (pPlayer->bobAmp+pPosture->pace[pPlayer->isRunning]*4) & 2047;
|
bool running = pPlayer->isRunning && pPlayer->restTime <= 10;
|
||||||
pPlayer->swayAmp = (pPlayer->swayAmp+(pPosture->pace[pPlayer->isRunning]*4)/2) & 2047;
|
pPlayer->bobAmp = (pPlayer->bobAmp+pPosture->pace[running]*4) & 2047;
|
||||||
if (pPlayer->isRunning)
|
pPlayer->swayAmp = (pPlayer->swayAmp+(pPosture->pace[running]*4)/2) & 2047;
|
||||||
|
if (running)
|
||||||
{
|
{
|
||||||
if (pPlayer->bobPhase < 60)
|
if (pPlayer->bobPhase < 60)
|
||||||
pPlayer->bobPhase = ClipHigh(pPlayer->bobPhase+nSpeed, 60);
|
pPlayer->bobPhase = ClipHigh(pPlayer->bobPhase+nSpeed, 60);
|
||||||
|
|
Loading…
Reference in a new issue