mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-16 09:21:36 +00:00
Add SFLAG_NOWATERDIP, unconditionally preventing actors from dipping into ST1 water.
By default, the following enemies have this flag set: OCTABRAIN, COMMANDER, DRONE. DONT_BUILD. git-svn-id: https://svn.eduke32.com/eduke32@4956 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
f022631fa8
commit
57079dfee1
5 changed files with 12 additions and 10 deletions
|
@ -269,6 +269,7 @@ enum sflags_t {
|
||||||
SFLAG_HARDCODED_BADGUY = 0x00040000,
|
SFLAG_HARDCODED_BADGUY = 0x00040000,
|
||||||
SFLAG_DIDNOSE7WATER = 0x00080000, // used temporarily
|
SFLAG_DIDNOSE7WATER = 0x00080000, // used temporarily
|
||||||
SFLAG_NODAMAGEPUSH = 0x00100000,
|
SFLAG_NODAMAGEPUSH = 0x00100000,
|
||||||
|
SFLAG_NOWATERDIP = 0x00200000,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Custom projectiles "workslike" flags.
|
// Custom projectiles "workslike" flags.
|
||||||
|
|
|
@ -10784,16 +10784,20 @@ static void A_InitEnemyFlags(void)
|
||||||
LIZMAN, LIZMANSPITTING, LIZMANJUMP, ORGANTIC,
|
LIZMAN, LIZMANSPITTING, LIZMANJUMP, ORGANTIC,
|
||||||
BOSS1, BOSS2, BOSS3, BOSS4, RAT, ROTATEGUN };
|
BOSS1, BOSS2, BOSS3, BOSS4, RAT, ROTATEGUN };
|
||||||
|
|
||||||
int32_t i, SolidEnemies[] = { TANK, BOSS1, BOSS2, BOSS3, BOSS4, RECON, ROTATEGUN };
|
int32_t SolidEnemies[] = { TANK, BOSS1, BOSS2, BOSS3, BOSS4, RECON, ROTATEGUN };
|
||||||
|
int32_t NoWaterDipEnemies[] = { OCTABRAIN, COMMANDER, DRONE };
|
||||||
|
|
||||||
for (i=GREENSLIME; i<=GREENSLIME+7; i++)
|
for (int i=GREENSLIME; i<=GREENSLIME+7; i++)
|
||||||
SETFLAG(i, SFLAG_HARDCODED_BADGUY);
|
SETFLAG(i, SFLAG_HARDCODED_BADGUY);
|
||||||
|
|
||||||
for (i=ARRAY_SIZE(DukeEnemies)-1; i>=0; i--)
|
for (int i=ARRAY_SIZE(DukeEnemies)-1; i>=0; i--)
|
||||||
SETFLAG(DukeEnemies[i], SFLAG_HARDCODED_BADGUY);
|
SETFLAG(DukeEnemies[i], SFLAG_HARDCODED_BADGUY);
|
||||||
|
|
||||||
for (i=ARRAY_SIZE(SolidEnemies)-1; i>=0; i--)
|
for (int i=ARRAY_SIZE(SolidEnemies)-1; i>=0; i--)
|
||||||
SETFLAG(SolidEnemies[i], SFLAG_NODAMAGEPUSH);
|
SETFLAG(SolidEnemies[i], SFLAG_NODAMAGEPUSH);
|
||||||
|
|
||||||
|
for (int i=ARRAY_SIZE(NoWaterDipEnemies)-1; i>=0; i--)
|
||||||
|
SETFLAG(NoWaterDipEnemies[i], SFLAG_NOWATERDIP);
|
||||||
}
|
}
|
||||||
#undef SETFLAG
|
#undef SETFLAG
|
||||||
|
|
||||||
|
|
|
@ -6010,6 +6010,7 @@ static void C_AddDefaultDefinitions(void)
|
||||||
C_AddDefinition("SFLAG_SMOOTHMOVE", SFLAG_SMOOTHMOVE, LABEL_DEFINE);
|
C_AddDefinition("SFLAG_SMOOTHMOVE", SFLAG_SMOOTHMOVE, LABEL_DEFINE);
|
||||||
C_AddDefinition("SFLAG_NOTELEPORT", SFLAG_NOTELEPORT, LABEL_DEFINE);
|
C_AddDefinition("SFLAG_NOTELEPORT", SFLAG_NOTELEPORT, LABEL_DEFINE);
|
||||||
C_AddDefinition("SFLAG_NODAMAGEPUSH", SFLAG_NODAMAGEPUSH, LABEL_DEFINE);
|
C_AddDefinition("SFLAG_NODAMAGEPUSH", SFLAG_NODAMAGEPUSH, LABEL_DEFINE);
|
||||||
|
C_AddDefinition("SFLAG_NOWATERDIP", SFLAG_NOWATERDIP, LABEL_DEFINE);
|
||||||
|
|
||||||
C_AddDefinition("STR_MAPNAME",STR_MAPNAME,LABEL_DEFINE);
|
C_AddDefinition("STR_MAPNAME",STR_MAPNAME,LABEL_DEFINE);
|
||||||
C_AddDefinition("STR_MAPFILENAME",STR_MAPFILENAME,LABEL_DEFINE);
|
C_AddDefinition("STR_MAPFILENAME",STR_MAPFILENAME,LABEL_DEFINE);
|
||||||
|
|
|
@ -944,13 +944,8 @@ static int32_t A_GetWaterZOffset(int spritenum)
|
||||||
|
|
||||||
if (sector[sp->sectnum].lotag == ST_1_ABOVE_WATER)
|
if (sector[sp->sectnum].lotag == ST_1_ABOVE_WATER)
|
||||||
{
|
{
|
||||||
switch (DYNAMICTILEMAP(sp->picnum))
|
if (A_CheckSpriteFlags(spritenum, SFLAG_NOWATERDIP))
|
||||||
{
|
|
||||||
case OCTABRAIN__STATIC:
|
|
||||||
case COMMANDER__STATIC:
|
|
||||||
case DRONE__STATIC:
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
|
|
||||||
// fix for flying/jumping monsters getting stuck in water
|
// fix for flying/jumping monsters getting stuck in water
|
||||||
if ((AC_MOVFLAGS(sp, ac) & jumptoplayer_only) ||
|
if ((AC_MOVFLAGS(sp, ac) & jumptoplayer_only) ||
|
||||||
|
|
|
@ -202,6 +202,7 @@ SFLAG = {
|
||||||
SFLAG_HARDCODED_BADGUY = -0x00040000,
|
SFLAG_HARDCODED_BADGUY = -0x00040000,
|
||||||
SFLAG_DIDNOSE7WATER = -0x00080000,
|
SFLAG_DIDNOSE7WATER = -0x00080000,
|
||||||
SFLAG_NODAMAGEPUSH = 0x00100000,
|
SFLAG_NODAMAGEPUSH = 0x00100000,
|
||||||
|
SFLAG_NOWATERDIP = 0x00200000,
|
||||||
-- RESERVED for actor.FLAGS.chain_*/replace_*:
|
-- RESERVED for actor.FLAGS.chain_*/replace_*:
|
||||||
-- 0x08000000, 0x10000000, 0x20000000, 0x40000000
|
-- 0x08000000, 0x10000000, 0x20000000, 0x40000000
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue