0
0
Fork 0
mirror of https://github.com/ZDoom/Raze.git synced 2025-04-04 06:55:48 +00:00

- reviewed actor flags and applied several fixes.

This commit is contained in:
Christoph Oelckers 2022-12-20 19:27:25 +01:00
parent 8172a9ac0c
commit b908ede470
15 changed files with 49 additions and 63 deletions

View file

@ -107,7 +107,7 @@ static FFlagDef DukeActorFlagDefs[] =
DEFINE_FLAG(SFLAG, BOSS, DDukeActor, flags1),
DEFINE_FLAG(SFLAG, BADGUYSTAYPUT, DDukeActor, flags1),
DEFINE_FLAG(SFLAG, GREENSLIMEFOOD, DDukeActor, flags1),
DEFINE_FLAG(SFLAG, NODAMAGEPUSH, DDukeActor, flags1),
//DEFINE_FLAG(SFLAG, NODAMAGEPUSH, DDukeActor, flags1),
DEFINE_FLAG(SFLAG, NOWATERDIP, DDukeActor, flags1),
DEFINE_FLAG(SFLAG, INTERNAL_BADGUY, DDukeActor, flags1),
DEFINE_FLAG(SFLAG, KILLCOUNT, DDukeActor, flags1),

View file

@ -326,8 +326,8 @@ enum sflags_t
SFLAG_FORCEAUTOAIM = 0x00000008,
SFLAG_BOSS = 0x00000010,
SFLAG_BADGUYSTAYPUT = 0x00000020,
SFLAG_GREENSLIMEFOOD = 0x00800040,
SFLAG_NODAMAGEPUSH = 0x00000080,
SFLAG_GREENSLIMEFOOD = 0x00000040,
//SFLAG_NODAMAGEPUSH = 0x00000080,
SFLAG_NOWATERDIP = 0x00000100,
SFLAG_INTERNAL_BADGUY = 0x00000200, // a separate flag is needed for the internal ones because SFLAG_BADGUY has additional semantics.
SFLAG_KILLCOUNT = 0x00000400,

View file

@ -112,7 +112,7 @@ void initactorflags_d()
DTILE_TRANSPORTERBEAM
});
// Some flags taken from RedNukem's init code. This is a good start as any to reduce the insane dependency on tile numbers for making decisions in the play code. A lot more will be added here later.
setflag(SFLAG_NODAMAGEPUSH, { DTILE_TANK, DTILE_BOSS1, DTILE_BOSS2, DTILE_BOSS3, DTILE_BOSS4, DTILE_RECON, DTILE_ROTATEGUN });
setflag(SFLAG2_NODAMAGEPUSH, { DTILE_TANK, DTILE_BOSS1, DTILE_BOSS2, DTILE_BOSS3, DTILE_BOSS4, DTILE_RECON, DTILE_ROTATEGUN });
setflag(SFLAG_BOSS, { DTILE_BOSS1, DTILE_BOSS2, DTILE_BOSS3, DTILE_BOSS4, DTILE_BOSS4STAYPUT, DTILE_BOSS1STAYPUT });
if (isWorldTour()) setflag(SFLAG_BOSS, { DTILE_BOSS2STAYPUT, DTILE_BOSS3STAYPUT, DTILE_BOSS5, DTILE_BOSS5STAYPUT });
setflag(SFLAG_NOWATERDIP, { DTILE_OCTABRAIN, DTILE_COMMANDER, DTILE_DRONE });
@ -126,10 +126,10 @@ void initactorflags_d()
setflag(SFLAG_HITRADIUS_FLAG2, { DTILE_TRIPBOMB, DTILE_QUEBALL, DTILE_STRIPEBALL, DTILE_DUKELYINGDEAD });
setflag(SFLAG_CHECKSLEEP, { DTILE_RUBBERCAN, DTILE_EXPLODINGBARREL, DTILE_WOODENHORSE, DTILE_HORSEONSIDE, DTILE_CANWITHSOMETHING, DTILE_FIREBARREL, DTILE_NUKEBARREL, DTILE_NUKEBARRELDENTED, DTILE_NUKEBARRELLEAKED, DTILE_TRIPBOMB });
setflag(SFLAG_NOTELEPORT, { DTILE_TRANSPORTERSTAR, DTILE_TRANSPORTERBEAM, DTILE_TRIPBOMB, DTILE_BULLETHOLE, DTILE_WATERSPLASH2, DTILE_BURNING, DTILE_BURNING2, DTILE_FIRE, DTILE_FIRE2, DTILE_TOILETWATER, DTILE_LASERLINE });
setflag(SFLAG_SE24_NOCARRY, { DTILE_TRIPBOMB, DTILE_LASERLINE, DTILE_BOLT1, DTILE_BOLT2, DTILE_BOLT3, DTILE_BOLT4, DTILE_SIDEBOLT1, DTILE_SIDEBOLT2, DTILE_SIDEBOLT3, DTILE_SIDEBOLT4, DTILE_CRANE, DTILE_CRANE1, DTILE_CRANE2, DTILE_BARBROKE });
setflag(SFLAG_SE24_NOCARRY, { DTILE_TRIPBOMB, DTILE_LASERLINE, DTILE_BOLT1, DTILE_BOLT2, DTILE_BOLT3, DTILE_BOLT4, DTILE_SIDEBOLT1, DTILE_SIDEBOLT2, DTILE_SIDEBOLT3, DTILE_SIDEBOLT4, DTILE_CRANE, DTILE_BARBROKE });
setflag(SFLAG_SE24_REMOVE, { DTILE_BLOODPOOL, DTILE_PUKE, DTILE_FOOTPRINTS, DTILE_FOOTPRINTS2, DTILE_FOOTPRINTS3, DTILE_FOOTPRINTS4, DTILE_BULLETHOLE, DTILE_BLOODSPLAT1, DTILE_BLOODSPLAT2, DTILE_BLOODSPLAT3, DTILE_BLOODSPLAT4 });
setflag(SFLAG_BLOCK_TRIPBOMB, { DTILE_TRIPBOMB }); // making this a flag adds the option to let other things block placing trip bombs as well.
setflag(SFLAG_NOFALLER, { DTILE_CRACK1, DTILE_CRACK2, DTILE_CRACK3, DTILE_CRACK4, DTILE_SPEAKER, DTILE_LETTER, DTILE_DUCK, DTILE_TARGET, DTILE_TRIPBOMB, DTILE_VIEWSCREEN, DTILE_VIEWSCREEN2 });
setflag(SFLAG_NOFALLER, { DTILE_SPEAKER, DTILE_CRACK1, DTILE_CRACK2, DTILE_CRACK3, DTILE_CRACK4, DTILE_SPEAKER, DTILE_LETTER, DTILE_DUCK, DTILE_TARGET, DTILE_TRIPBOMB, DTILE_VIEWSCREEN, DTILE_VIEWSCREEN2 });
setflag(SFLAG2_NOROTATEWITHSECTOR, { DTILE_LASERLINE });
setflag(SFLAG2_SHOWWALLSPRITEONMAP, { DTILE_LASERLINE });
setflag(SFLAG2_NOFLOORPAL, {
@ -178,7 +178,7 @@ void initactorflags_d()
if (isWorldTour())
{
setflag(SFLAG_INTERNAL_BADGUY | SFLAG_KILLCOUNT, { DTILE_FIREFLY });
setflag(SFLAG_INTERNAL_BADGUY | SFLAG_KILLCOUNT |SFLAG_NODAMAGEPUSH|SFLAG_BOSS, { DTILE_BOSS5 });
setflag(SFLAG_INTERNAL_BADGUY | SFLAG_KILLCOUNT |SFLAG_BOSS, { DTILE_BOSS5 });
setflag(SFLAG3_FORCERUNCON, { DTILE_LAVAPOOL, DTILE_ONFIRE, DTILE_ONFIRESMOKE, DTILE_BURNEDCORPSE, DTILE_LAVAPOOLBUBBLE, DTILE_WHISPYSMOKE, DTILE_FIREFLYFLYINGEFFECT });
}

View file

@ -99,15 +99,10 @@ void initactorflags_r()
gs.actorinfo[RTILE_VIXEN].flags |= SFLAG_LOOKALLAROUND;
if (isRRRA())
{
setflag(SFLAG_NODAMAGEPUSH, { RTILE_HULK, RTILE_MAMA, RTILE_BILLYPLAY, RTILE_COOTPLAY, RTILE_MAMACLOUD });
setflag(SFLAG_LOOKALLAROUND, { RTILE_COOT, RTILE_COOTSTAYPUT, RTILE_BIKERB, RTILE_BIKERBV2, RTILE_CHEER, RTILE_CHEERB,
RTILE_CHEERSTAYPUT, RTILE_MINIONBOAT, RTILE_HULKBOAT, RTILE_CHEERBOAT, RTILE_RABBIT, RTILE_COOTPLAY, RTILE_BILLYPLAY, RTILE_MAKEOUT, RTILE_MAMA });
setflag(SFLAG_INTERNAL_BADGUY, { RTILE_COOTPLAY, RTILE_BILLYPLAY });
}
else
{
setflag(SFLAG_NODAMAGEPUSH, { RTILE_HULK, RTILE_SBMOVE });
}
setflag(SFLAG_INVENTORY, {
RTILE_FIRSTAID,
@ -165,7 +160,7 @@ void initactorflags_r()
setflag(SFLAG_HITRADIUS_FLAG1, { RTILE_BOX, RTILE_TREE1, RTILE_TREE2, RTILE_TIRE });
setflag(SFLAG_HITRADIUS_FLAG2, { RTILE_QUEBALL, RTILE_STRIPEBALL, RTILE_BOWLINGPIN, RTILE_DUKELYINGDEAD });
setflag(SFLAG_NOTELEPORT, { RTILE_TRANSPORTERSTAR, RTILE_TRANSPORTERBEAM, RTILE_BULLETHOLE, RTILE_WATERSPLASH2, RTILE_BURNING, RTILE_FIRE, RTILE_MUD });
setflag(SFLAG_SE24_NOCARRY, { RTILE_BULLETHOLE, RTILE_BOLT1, RTILE_BOLT2, RTILE_BOLT3, RTILE_BOLT4, RTILE_CRANE, RTILE_CRANE1, RTILE_CRANE2, RTILE_BARBROKE });
setflag(SFLAG_SE24_NOCARRY, { RTILE_BULLETHOLE, RTILE_BOLT1, RTILE_BOLT2, RTILE_BOLT3, RTILE_BOLT4, RTILE_CRANE, RTILE_BARBROKE });
setflag(SFLAG_SE24_REMOVE, { RTILE_BLOODPOOL, RTILE_PUKE, RTILE_FOOTPRINTS, RTILE_FOOTPRINTS2, RTILE_FOOTPRINTS3 });
setflag(SFLAG_NOFALLER, { RTILE_CRACK1, RTILE_CRACK2, RTILE_CRACK3, RTILE_CRACK4 });
setflag(SFLAG2_EXPLOSIVE, {RTILE_RPG, RTILE_RADIUSEXPLOSION, RTILE_SEENINE, RTILE_OOZFILTER });

View file

@ -200,7 +200,7 @@ void checkhitdefault_d(DDukeActor* targ, DDukeActor* proj)
fi.shoot(targ, -1, PClass::FindActor("DukeBloodSplat4"));
}
if (!actorflag(targ, SFLAG2_NODAMAGEPUSH) && !bossguy(targ)) // RR does not have this.
if (!actorflag(targ, SFLAG2_NODAMAGEPUSH)) // RR does not have this.
{
if ((targ->spr.cstat & CSTAT_SPRITE_ALIGNMENT_MASK) == 0)
targ->spr.Angles.Yaw = proj->spr.Angles.Yaw + DAngle180;

View file

@ -313,7 +313,7 @@ spawnclasses
1324 = DukeBloodyPole
1238 = DukeExplodingBarrel
1026 = DukeHorseOnSide
1248 = DukeFireBarrel
1240 = DukeFireBarrel
1227 = DukeNukeBarrel
1390 = DukeFireVase
1228 = DukeNukeBarrelDented
@ -368,7 +368,7 @@ spawnclasses
1225 = DukeBarBroke
418 = DukeBearingPlate
2612 = DukeLaserSite
2734 = DukeSpeaker
4397 = DukeSpeaker
2595 = DukeShotSpark
}

View file

@ -169,6 +169,7 @@ spawnclasses
5376 = RedneckRACoot
5377 = RedneckRACootStayput
7280 = RedneckRabbit
5995 = RedneckBiker
5890 = RedneckBikerB
5891 = RedneckBikerBV2
6225 = RedneckMakeout
@ -185,7 +186,7 @@ spawnclasses
8705 = RedneckMama
4770 = RedneckSBSwipe
6659 = RedneckCheerStayput
8612 = RedneckWacoWinder
8612 = RedneckWacoWindow

View file

@ -133,6 +133,7 @@ class DukePuke : DukeBloodPool
default
{
pic "PUKE";
-BLOODY;
}
override bool Animate(tspritetype t)

View file

@ -5,6 +5,7 @@ class RedneckBowlingPin : DukeActor
RedneckBowlingPin.Behavior 0;
spriteset "BOWLINGPIN", "BOWLINGPIN1", "BOWLINGPIN2";
+HITRADIUS_FLAG2;
+HITRADIUSCHECK;
}
meta int behavior;
@ -125,6 +126,7 @@ class RedneckHenstand : RedneckBowlingPin
spriteset "HENSTAND", "HENSTAND1";
RedneckBowlingPin.Behavior 1;
-HITRADIUS_FLAG2;
-HITRADIUSCHECK;
}
override void Initialize()
@ -155,6 +157,7 @@ class RedneckBowlingBall : RedneckBowlingPin
pic "BOWLINGBALL";
RedneckBowlingPin.Behavior 2;
-HITRADIUS_FLAG2;
-HITRADIUSCHECK;
}
override void Initialize()

View file

@ -303,19 +303,3 @@ class RedneckSeasickEnabler : DukeActor
}
}
class RedneckWacoWinder : DukeActor
{
default
{
pic "WACOWINDER";
+BADGUY;
}
override bool animate(tspritetype t)
{
t.cstat |= CSTAT_SPRITE_INVISIBLE;
self.cstat |= CSTAT_SPRITE_INVISIBLE;
return true;
}
}

View file

@ -3,6 +3,8 @@ class RedneckCoot : DukeActor
default
{
pic "COOT";
+INTERNAL_BADGUY;
+KILLCOUNT;
}
override void PlayFTASound()

View file

@ -1,16 +1,13 @@
class DukeExplodingBarrel : DukeActor
class DukeHorseOnSide : DukeActor
{
default
{
pic "EXPLODINGBARREL";
pic "HORSEONSIDE";
+FORCERUNCON;
+CHECKSLEEP;
+MOVEFTA_MAKESTANDABLE;
+DOUBLEDMGTHRUST;
+BREAKMIRRORS;
}
override void Initialize()
{
if (!self.mapSpawned)
@ -21,22 +18,25 @@ class DukeExplodingBarrel : DukeActor
}
}
class DukeHorseOnSide : DukeExplodingBarrel
class DukeExplodingBarrel : DukeHorseOnSide
{
default
{
pic "HORSEONSIDE";
pic "EXPLODINGBARREL";
+DOUBLEDMGTHRUST;
+BREAKMIRRORS;
}
}
class DukeFireBarrel : DukeExplodingBarrel
class DukeFireBarrel : DukeHorseOnSide
{
default
{
pic "FIREBARREL";
}
}
class DukeNukeBarrel : DukeExplodingBarrel
class DukeNukeBarrel : DukeHorseOnSide
{
default
{
@ -44,28 +44,28 @@ class DukeNukeBarrel : DukeExplodingBarrel
+GREENBLOOD;
}
}
class DukeFireVase : DukeExplodingBarrel
class DukeFireVase : DukeHorseOnSide
{
default
{
pic "FIREVASE";
}
}
class DukeNukeBarrelDented : DukeExplodingBarrel
class DukeNukeBarrelDented : DukeHorseOnSide
{
default
{
pic "NUKEBARRELDENTED";
}
}
class DukeNukeBarrelLeaked : DukeExplodingBarrel
class DukeNukeBarrelLeaked : DukeHorseOnSide
{
default
{
pic "NUKEBARRELLEAKED";
}
}
class DukeWoodenHorse : DukeExplodingBarrel
class DukeWoodenHorse : DukeHorseOnSide
{
default
{
@ -73,7 +73,7 @@ class DukeWoodenHorse : DukeExplodingBarrel
}
}
class DukeRubberCan : DukeExplodingBarrel
class DukeRubberCan : DukeHorseOnSide
{
default
{

View file

@ -1,11 +1,8 @@
class DukeFemale1 : DukeActor
class DukeBloodyPole : DukeActor
{
default
{
pic "FEM1";
+TRIGGERRESPAWN;
+HITRADIUSCHECK;
pic "BLOODYPOLE";
}
override void Initialize()
@ -15,6 +12,16 @@ class DukeFemale1 : DukeActor
self.ChangeStat(STAT_ZOMBIEACTOR);
}
}
class DukeFemale1 : DukeBloodyPole
{
default
{
pic "FEM1";
+TRIGGERRESPAWN;
+HITRADIUSCHECK;
}
}
class DukeFemale2 : DukeFemale1
{
@ -106,15 +113,6 @@ class DukeToughGal : DukeFemale1
}
}
class DukeBloodyPole : DukeFemale1
{
default
{
pic "BLOODYPOLE";
-TRIGGERRESPAWN;
}
}
class DukePodFemale : DukeFemale1
{
default

View file

@ -122,11 +122,12 @@ class RedneckLetsBowl : DukeActor
}
}
class RedneckWacoWinder : DukeActor
class RedneckWacoWindow : DukeActor
{
default
{
pic "WACOWINDER";
+BADGUY;
}
}

View file

@ -45,6 +45,7 @@ class DukeTransporterBeam : DukeActor
{
pic "TRANSPORTERBEAM";
+FORCERUNCON;
+NOTELEPORT;
}
override void Initialize()