mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Comment out the A_GetZLimits() call right before the Bassert() in A_MoveSprite(). This call is a problem because the assertion expects "dasectnum" and spr->sectnum to match, but A_GetZLimits() can itself call A_SetSprite() which results in another call to A_MoveSprite() and can potentially change the sectnum again.
This commit also adds the NOTELEPORT sprite flag, which of course prevents sprites from teleporting. git-svn-id: https://svn.eduke32.com/eduke32@3094 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
67c7d67166
commit
067baf626a
2 changed files with 22 additions and 16 deletions
|
@ -399,7 +399,7 @@ int32_t A_MoveSprite(int32_t spritenum, const vec3_t *change, uint32_t cliptype)
|
|||
else if (dasectnum != spr->sectnum)
|
||||
{
|
||||
changespritesect(spritenum, dasectnum);
|
||||
A_GetZLimits(spritenum);
|
||||
// A_GetZLimits(spritenum);
|
||||
}
|
||||
|
||||
Bassert(dasectnum == spr->sectnum);
|
||||
|
@ -3220,8 +3220,12 @@ static void P_FinishWaterChange(int32_t j, DukePlayer_t *ps, int32_t sectlotag,
|
|||
}
|
||||
}
|
||||
|
||||
static int32_t A_CheckNonTeleporting(int32_t pic)
|
||||
static int32_t A_CheckNonTeleporting(int32_t s)
|
||||
{
|
||||
int32_t pic = sprite[s].picnum;
|
||||
|
||||
if (A_CheckSpriteFlags(s, SPRITE_NOTELEPORT)) return 1;
|
||||
|
||||
return (pic == SHARK || pic == COMMANDER || pic == OCTABRAIN
|
||||
|| (pic >= GREENSLIME && pic <= GREENSLIME+7));
|
||||
}
|
||||
|
@ -3355,7 +3359,7 @@ ACTOR_STATIC void G_MoveTransports(void)
|
|||
// comment out to make RPGs pass through water: (r1450 breaks this)
|
||||
// if (sectlotag != 0) goto JBOLT;
|
||||
case STAT_ACTOR:
|
||||
if (sprite[j].extra > 0 && A_CheckNonTeleporting(sprite[j].picnum))
|
||||
if (sprite[j].extra > 0 && A_CheckNonTeleporting(j))
|
||||
goto JBOLT;
|
||||
case STAT_MISC:
|
||||
case STAT_FALLER:
|
||||
|
|
|
@ -181,6 +181,8 @@ enum sflags_t {
|
|||
SPRITE_NULL = 0x00000400, // null sprite in multiplayer
|
||||
SPRITE_NOCLIP = 0x00000800, // clipmove it with cliptype 0
|
||||
SPRITE_NOFLOORSHADOW = 0x00001000, // for temp. internal use, per-tile flag not checked
|
||||
SPRITE_SMOOTHMOVE = 0x00002000,
|
||||
SPRITE_NOTELEPORT = 0x00004000,
|
||||
};
|
||||
|
||||
// custom projectiles
|
||||
|
|
Loading…
Reference in a new issue