Rework hardcoded BADGUY sprite flag initialization (i.e. amend r3257).

Use a new flag to mark hard-coded enemies, not SPRITE_BADGUY.
This fixes an issue where in E1L4, a pigcop would appear in the area
you have to crawl under shrunk. Thanks to LLCoolDave1 for pinpointing
the range of relevant revisions.

git-svn-id: https://svn.eduke32.com/eduke32@3426 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2013-01-23 19:36:44 +00:00
parent d73368daee
commit dec5445880
3 changed files with 5 additions and 1 deletions

View file

@ -8151,6 +8151,9 @@ void A_PlayAlertSound(int32_t i)
int32_t A_CheckEnemyTile(int32_t pn)
{
if (g_tile[pn].flags & SPRITE_HARDCODED_BADGUY)
return 1;
return A_CheckSpriteTileFlags(pn, SPRITE_BADGUY);
}

View file

@ -212,6 +212,7 @@ enum sflags_t {
// rotation-fixed wrt a pivot point to prevent position diverging due to
// roundoff error accumulation:
SPRITE_ROTFIXED = 0x00020000,
SPRITE_HARDCODED_BADGUY = 0x00040000,
};
// custom projectiles

View file

@ -9673,7 +9673,7 @@ static void G_LoadExtraPalettes(void)
kclose(fp);
}
#define SETBGFLAG(Tilenum) g_tile[Tilenum].flags |= SPRITE_BADGUY
#define SETBGFLAG(Tilenum) g_tile[Tilenum].flags |= SPRITE_HARDCODED_BADGUY
// Has to be after setting the dynamic names (e.g. SHARK).
static void A_InitEnemyFlags(void)