mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 14:52:01 +00:00
Accuracy fixes
This commit is contained in:
parent
36e932a6cb
commit
6eaff57831
2 changed files with 8 additions and 7 deletions
|
@ -326,9 +326,6 @@ int A_CheckNoSE7Water(uspritetype const * const pSprite, int sectNum, int sectLo
|
|||
// other-side sector number.
|
||||
static int32_t A_CheckNeedZUpdate(int32_t spriteNum, int32_t zChange, int32_t *pZcoord)
|
||||
{
|
||||
if (zChange == 0)
|
||||
return 0;
|
||||
|
||||
uspritetype const *const pSprite = (uspritetype *)&sprite[spriteNum];
|
||||
int const newZ = pSprite->z + (zChange >> 1);
|
||||
|
||||
|
@ -457,7 +454,7 @@ int32_t A_MoveSprite(int32_t spriteNum, vec3_t const * const change, uint32_t cl
|
|||
|
||||
Bassert(newSectnum == pSprite->sectnum);
|
||||
|
||||
int const doZUpdate = change->z ? A_CheckNeedZUpdate(spriteNum, change->z, &newZ) : 0;
|
||||
int const doZUpdate = A_CheckNeedZUpdate(spriteNum, change->z, &newZ);
|
||||
|
||||
// Update sprite's z positions and (for TROR) maybe the sector number.
|
||||
if (doZUpdate)
|
||||
|
@ -485,7 +482,7 @@ int32_t A_MoveSprite(int32_t spriteNum, vec3_t const * const change, uint32_t cl
|
|||
}
|
||||
#endif
|
||||
}
|
||||
else if (change->z != 0 && returnValue == 0)
|
||||
else if (returnValue == 0)
|
||||
returnValue = 16384+newSectnum;
|
||||
|
||||
return returnValue;
|
||||
|
@ -5197,7 +5194,7 @@ ACTOR_STATIC void G_MoveActors(void)
|
|||
{
|
||||
A_GetZLimits(spriteNum);
|
||||
|
||||
int const yrepeat = max((actor[spriteNum].floorz - actor[spriteNum].ceilingz) >> 9, 255);
|
||||
int const yrepeat = min((actor[spriteNum].floorz - actor[spriteNum].ceilingz) >> 9, 255);
|
||||
int const xrepeat = clamp(25 - (yrepeat >> 1), 8, 48);
|
||||
|
||||
pSprite->yrepeat = yrepeat;
|
||||
|
@ -5536,6 +5533,7 @@ ACTOR_STATIC void G_MoveActors(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (pSprite->xvel < 32) pSprite->xvel += 4;
|
||||
pSprite->xvel = 64 - (sintable[(pData[1]+512)&2047]>>9);
|
||||
|
||||
pSprite->ang += G_GetAngleDelta(pSprite->ang,
|
||||
|
|
|
@ -358,7 +358,10 @@ void A_Fall(int const spriteNum)
|
|||
{
|
||||
if (sector[pSprite->sectnum].lotag == ST_2_UNDERWATER && pSprite->zvel > 3122)
|
||||
pSprite->zvel = 3144;
|
||||
pSprite->z += pSprite->zvel = min(6144, pSprite->zvel+spriteGravity);
|
||||
if (pSprite->zvel < 6144)
|
||||
pSprite->zvel += spriteGravity;
|
||||
else pSprite->zvel = 6144;
|
||||
pSprite->z += pSprite->zvel;
|
||||
}
|
||||
|
||||
#ifdef YAX_ENABLE
|
||||
|
|
Loading…
Reference in a new issue