Revise r6239

git-svn-id: https://svn.eduke32.com/eduke32@6242 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2017-06-23 04:32:23 +00:00
parent 0efb2e146e
commit 0dd837919e
2 changed files with 7 additions and 7 deletions

View file

@ -309,12 +309,12 @@ next_sprite:
// <fromunderp>: below->above change? // <fromunderp>: below->above change?
static int32_t Proj_MaybeDoTransport(int32_t spriteNum, const uspritetype * const pSEffector, int32_t fromunderp, int32_t daz) static int32_t Proj_MaybeDoTransport(int32_t spriteNum, const uspritetype * const pSEffector, int32_t fromunderp, int32_t daz)
{ {
if ((totalclock & (UINT8_MAX-1)) <= actor[spriteNum].lasttransport) if ((totalclock & UINT8_MAX) == actor[spriteNum].lasttransport)
return 0; return 0;
spritetype *const pSprite = &sprite[spriteNum]; spritetype *const pSprite = &sprite[spriteNum];
const uspritetype *const otherse = (uspritetype *)&sprite[pSEffector->owner]; const uspritetype *const otherse = (uspritetype *)&sprite[pSEffector->owner];
actor[spriteNum].lasttransport = (totalclock + (TICSPERFRAME << 2)) & (UINT8_MAX-1); actor[spriteNum].lasttransport = (totalclock & UINT8_MAX);
pSprite->x += (otherse->x - pSEffector->x); pSprite->x += (otherse->x - pSEffector->x);
pSprite->y += (otherse->y - pSEffector->y); pSprite->y += (otherse->y - pSEffector->y);
@ -3483,7 +3483,7 @@ ACTOR_STATIC void G_MoveTransports(void)
case STAT_FALLER: case STAT_FALLER:
case STAT_DUMMYPLAYER: case STAT_DUMMYPLAYER:
{ {
if ((totalclock & (UINT8_MAX-1)) > actor[sectSprite].lasttransport) if ((totalclock & UINT8_MAX) != actor[sectSprite].lasttransport)
{ {
int const zvel = sprite[sectSprite].zvel; int const zvel = sprite[sectSprite].zvel;
int const absZvel = klabs(zvel); int const absZvel = klabs(zvel);
@ -3558,7 +3558,7 @@ ACTOR_STATIC void G_MoveTransports(void)
A_SetSprite(newSprite, CLIPMASK0); A_SetSprite(newSprite, CLIPMASK0);
} }
actor[sectSprite].lasttransport = (totalclock + (TICSPERFRAME << 2)) & (UINT8_MAX-1); actor[sectSprite].lasttransport = (totalclock & UINT8_MAX);
sprite[sectSprite].x += sprite[OW(spriteNum)].x - SX(spriteNum); sprite[sectSprite].x += sprite[OW(spriteNum)].x - SX(spriteNum);
sprite[sectSprite].y += sprite[OW(spriteNum)].y - SY(spriteNum); sprite[sectSprite].y += sprite[OW(spriteNum)].y - SY(spriteNum);
@ -5664,7 +5664,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
j = pSprite->owner; j = pSprite->owner;
if (sprite[j].lotag == UINT8_MAX) if (sprite[j].lotag == UINT16_MAX)
DELETE_SPRITE_AND_CONTINUE(spriteNum); DELETE_SPRITE_AND_CONTINUE(spriteNum);
q = pSector->extra>>3; q = pSector->extra>>3;

View file

@ -1191,10 +1191,10 @@ int P_ActivateSwitch(int playerNum, int wallOrSprite, int switchType)
if (switchType == SWITCH_SPRITE) // A wall sprite if (switchType == SWITCH_SPRITE) // A wall sprite
{ {
if (actor[wallOrSprite].lasttransport == (totalclock & (UINT8_MAX-1))) if (actor[wallOrSprite].lasttransport == (totalclock & UINT8_MAX))
return 0; return 0;
actor[wallOrSprite].lasttransport = (totalclock & (UINT8_MAX-1)); actor[wallOrSprite].lasttransport = (totalclock & UINT8_MAX);
if (sprite[wallOrSprite].lotag == 0) if (sprite[wallOrSprite].lotag == 0)
return 0; return 0;