mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
Add new spriteflag SFLAG_GREENSLIMEFOOD = 8388608, which controls whether GREENSLIME will eat a given actor.
The flag is automatically set on LIZTROOP, LIZMAN, PIGCOP, and NEWBEAST, in a similar fashion as SFLAG_NOWATERDIP (r4956) and SFLAG_NODAMAGEPUSH (r4371). git-svn-id: https://svn.eduke32.com/eduke32@5492 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
81d286dcc4
commit
aac1900472
3 changed files with 6 additions and 5 deletions
|
@ -4381,12 +4381,8 @@ ACTOR_STATIC void G_MoveActors(void)
|
|||
{
|
||||
for (SPRITES_OF_SECT(sect, j))
|
||||
{
|
||||
switch (DYNAMICTILEMAP(sprite[j].picnum))
|
||||
if (A_CheckSpriteTileFlags(sprite[j].picnum, SFLAG_GREENSLIMEFOOD))
|
||||
{
|
||||
case LIZTROOP__STATIC:
|
||||
case LIZMAN__STATIC:
|
||||
case PIGCOP__STATIC:
|
||||
case NEWBEAST__STATIC:
|
||||
if (ldist(s,&sprite[j]) < 768 && (klabs(s->z-sprite[j].z)<8192)) //Gulp them
|
||||
{
|
||||
t[5] = j;
|
||||
|
|
|
@ -257,6 +257,7 @@ enum sflags_t {
|
|||
SFLAG_NODAMAGEPUSH = 0x00100000,
|
||||
SFLAG_NOWATERDIP = 0x00200000,
|
||||
SFLAG_HURTSPAWNBLOOD = 0x00400000,
|
||||
SFLAG_GREENSLIMEFOOD = 0x00800000,
|
||||
};
|
||||
|
||||
// Custom projectiles "workslike" flags.
|
||||
|
|
|
@ -11039,6 +11039,7 @@ static void A_InitEnemyFlags(void)
|
|||
|
||||
int32_t SolidEnemies[] = { TANK, BOSS1, BOSS2, BOSS3, BOSS4, RECON, ROTATEGUN };
|
||||
int32_t NoWaterDipEnemies[] = { OCTABRAIN, COMMANDER, DRONE };
|
||||
int32_t GreenSlimeFoodEnemies[] = { LIZTROOP, LIZMAN, PIGCOP, NEWBEAST };
|
||||
|
||||
for (int i=GREENSLIME; i<=GREENSLIME+7; i++)
|
||||
SETFLAG(i, SFLAG_HARDCODED_BADGUY);
|
||||
|
@ -11051,6 +11052,9 @@ static void A_InitEnemyFlags(void)
|
|||
|
||||
for (int i=ARRAY_SIZE(NoWaterDipEnemies)-1; i>=0; i--)
|
||||
SETFLAG(NoWaterDipEnemies[i], SFLAG_NOWATERDIP);
|
||||
|
||||
for (int i=ARRAY_SIZE(GreenSlimeFoodEnemies)-1; i>=0; i--)
|
||||
SETFLAG(GreenSlimeFoodEnemies[i], SFLAG_GREENSLIMEFOOD);
|
||||
}
|
||||
#undef SETFLAG
|
||||
|
||||
|
|
Loading…
Reference in a new issue