- do not use properties to set the sprite fields, part 2.

This covers the remaining simple cases.
This commit is contained in:
Christoph Oelckers 2022-12-19 10:29:01 +01:00
parent 3a00480efd
commit 8b664c840d
7 changed files with 62 additions and 59 deletions

View file

@ -3,14 +3,14 @@ class DukeCactusBroke : DukeActor
{
default
{
clipdist 8;
statnum STAT_ACTOR;
pic "CACTUSBROKE";
}
override void Initialize()
{
self.cstat |= CSTAT_SPRITE_BLOCK_ALL;
self.clipdist = 8;
self.ChangeStat(STAT_ACTOR);
}
}
@ -18,8 +18,6 @@ class DukeCactus : DukeCactusBroke
{
default
{
clipdist 8;
statnum STAT_ACTOR;
spriteset "CACTUS", "CACTUSBROKE";
}
@ -60,4 +58,3 @@ class DukeCactus : DukeCactusBroke
}
}
}

View file

@ -1,14 +1,10 @@
class DukeActivator : DukeActor
{
default
{
statnum STAT_ACTIVATOR;
}
override void Initialize()
{
self.cstat = CSTAT_SPRITE_INVISIBLE;
self.ChangeStat(STAT_ACTIVATOR);
}
/* this first needs work on the sector effectors.
@ -63,29 +59,21 @@ class DukeActivator : DukeActor
class DukeLocator : DukeActor
{
default
{
statnum STAT_LOCATOR;
}
override void Initialize()
{
self.cstat = CSTAT_SPRITE_INVISIBLE;
self.ChangeStat(STAT_LOCATOR);
}
}
class DukeActivatorLocked : DukeActor
{
default
{
statnum STAT_ACTIVATOR;
}
override void Initialize()
{
self.cstat = CSTAT_SPRITE_INVISIBLE;
if (!Raze.IsRR()) self.sector.lotag |= 16384;
else self.sector.lotag ^= 16384;
self.ChangeStat(STAT_ACTIVATOR);
}
/* must wait until Activator.onActivate can be done.

View file

@ -25,14 +25,14 @@ class DukeHangLight : DukeGenericPole2
{
default
{
statnum STAT_ACTOR;
clipdist 8;
pic "HANGLIGHT";
}
override void Initialize()
{
self.clipdist = 8;
self.cstat |= CSTAT_SPRITE_BLOCK_ALL;
self.ChangeStat(STAT_ACTOR);
}
}
@ -68,12 +68,12 @@ class DukeBottle10 : DukeActor
Default
{
pic "BOTTLE10";
clipdist 8;
}
override void Initialize()
{
self.cstat |= CSTAT_SPRITE_BLOCK_ALL;
self.clipdist = 8;
}
override void OnHit(DukeActor proj)
{
@ -91,12 +91,12 @@ class DukeVase : DukeActor
Default
{
pic "VASE";
clipdist 8;
}
override void Initialize()
{
self.cstat |= CSTAT_SPRITE_BLOCK_ALL;
self.clipdist = 8;
}
override void OnHit(DukeActor proj)
{
@ -114,13 +114,13 @@ class DukeFanSprite : DukeActor
Default
{
spriteset "FANSPRITE", "FANSPRITEBROKE";
clipdist 8;
statnum STAT_DEFAULT;
}
override void Initialize()
{
self.cstat |= CSTAT_SPRITE_BLOCK_ALL;
self.clipdist = 8;
self.ChangeStat(STAT_DEFAULT);
}
override void OnHit(DukeActor proj)
{
@ -142,13 +142,13 @@ class DukeSatellite : DukeActor
Default
{
pic "SATELITE";
clipdist 8;
statnum STAT_DEFAULT;
}
override void Initialize()
{
self.cstat |= CSTAT_SPRITE_BLOCK_ALL;
self.clipdist = 8;
self.ChangeStat(STAT_DEFAULT);
}
override void OnHit(DukeActor proj)
{
@ -199,13 +199,13 @@ class DukeFetus : DukeActor
Default
{
spriteset "FETUS", "FETUSBROKE";
clipdist 8;
statnum STAT_DEFAULT;
}
override void Initialize()
{
self.cstat |= CSTAT_SPRITE_BLOCK_ALL;
self.clipdist = 8;
self.ChangeStat(STAT_DEFAULT);
}
override void OnHit(DukeActor proj)
{
@ -278,13 +278,13 @@ class DukeHydrant : DukeActor
Default
{
spriteset "HYDRENT", "BROKEFIREHYDRENT";
clipdist 8;
statnum STAT_DEFAULT;
}
override void Initialize()
{
self.cstat |= CSTAT_SPRITE_BLOCK_ALL;
self.clipdist = 8;
self.ChangeStat(STAT_DEFAULT);
}
override void OnHit(DukeActor proj)
{
@ -302,13 +302,13 @@ class DukePipe1 : DukeActor
Default
{
spriteset "PIPE1", "PIPE1B";
clipdist 8;
statnum STAT_DEFAULT;
}
override void Initialize()
{
self.cstat |= CSTAT_SPRITE_BLOCK_ALL;
self.clipdist = 8;
self.ChangeStat(STAT_DEFAULT);
}
override void OnHit(DukeActor proj)
{
@ -411,12 +411,12 @@ class DukeMonk : DukeSpaceMarine
default
{
pic "MONK";
clipdist 8;
}
override void Initialize()
{
self.cstat |= CSTAT_SPRITE_BLOCK_ALL;
self.clipdist = 8;
ChangeStat(STAT_DEFAULT);
}

View file

@ -4,8 +4,12 @@ class DukePlug : DukeActor
default
{
pic "PLUG";
statnum STAT_STANDABLE;
lotag 9999;
}
override void Initialize()
{
self.lotag = 9999;
self.ChangeStat(STAT_STANDABLE);
}
override bool OnUse(DukePlayer p)
@ -22,12 +26,12 @@ class DukeFemMag : DukeActor
default
{
pic "FEMMAG1";
statnum STAT_DEFAULT;
}
override void Initialize()
{
self.cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
self.ChangeStat(STAT_DEFAULT);
}
}
@ -54,13 +58,13 @@ class DukeMaskWall : DukeActor
default
{
pic "MASKWALL1";
statnum STAT_DEFAULT;
}
override void Initialize()
{
let j = self.cstat & (CSTAT_SPRITE_ALIGNMENT_MASK | CSTAT_SPRITE_XFLIP | CSTAT_SPRITE_YFLIP);
self.cstat = j | CSTAT_SPRITE_BLOCK;
self.ChangeStat(STAT_DEFAULT);
}
}
@ -68,7 +72,6 @@ class DukeFootprints : DukeActor
{
default
{
statnum STAT_MISC;
spriteset "FOOTPRINTS", "FOOTPRINTS2", "FOOTPRINTS3", "FOOTPRINTS4";
}
@ -90,6 +93,7 @@ class DukeFootprints : DukeActor
if (sect.lotag != ST_1_ABOVE_WATER && sect.lotag != ST_2_UNDERWATER)
self.scale = (0.5, 0.5);
self.setSpriteSetImage(random(0, 3));
self.ChangeStat(STAT_MISC);
}
override bool animate(tspritetype t)
@ -104,16 +108,15 @@ class DukeBulletHole : DukeActor
{
default
{
statnum STAT_MISC;
pic "BULLETHOLE";
scaleX 0.046875;
scaleY 0.046875;
}
override void Initialize()
{
self.cstat = CSTAT_SPRITE_ALIGNMENT_WALL | randomFlip();
self.insertspriteq();
self.Scale = (0.046875, 0.046875);
self.ChangeStat(STAT_MISC);
}
override bool animate(tspritetype t)
@ -146,13 +149,13 @@ class DukeCameraPole : DukeGenericPole
default
{
pic "CAMERAPOLE";
extra 1;
}
override void Initialize()
{
if (gs.camerashitable) self.cstat = CSTAT_SPRITE_BLOCK_ALL;
else self.cstat = 0;
self.extra = 1;
super.Initialize();
}
}
@ -161,13 +164,13 @@ class DukeNeon : DukeActor
{
default
{
statnum STAT_MISC;
pic "NEON1";
}
override void Initialize()
{
self.cstat |= CSTAT_SPRITE_BLOCK_ALL;
self.ChangeStat(STAT_MISC);
}
override void Tick()

View file

@ -554,8 +554,11 @@ class RedneckRabbitJibA : DukeJibs1
default
{
pic "RABBITJIBA";
ScaleX 0.28125;
ScaleY 0.28125;
}
override void Initialize()
{
self.Scale = (0.28125, 0.28125);
}
}
@ -564,8 +567,11 @@ class RedneckRabbitJibB : DukeJibs1
default
{
pic "RABBITJIBB";
ScaleX 0.5625;
ScaleY 0.5625;
}
override void Initialize()
{
self.Scale = (0.5625, 0.5625);
}
}
@ -574,8 +580,11 @@ class RedneckRabbitJibC : DukeJibs1
default
{
pic "RABBITJIBC";
ScaleX 0.84375;
ScaleY 0.84375;
}
override void Initialize()
{
self.Scale = (0.84375, 0.84375);
}
}

View file

@ -18,8 +18,12 @@ class RedneckMusicNotes : DukeActor
default
{
pic "MUSICNOTES";
lotag -1;
clipdist 0;
}
override void Initialize()
{
self.lotag = -1;
self.clipdist = 0;
}
override bool OnUse(DukePlayer user)
@ -35,8 +39,12 @@ class RedneckJoe9000 : DukeActor
default
{
pic "JOE9000";
lotag 1;
clipdist 0;
}
override void Initialize()
{
self.lotag = 1;
self.clipdist = 0;
}
override bool OnUse(DukePlayer user)

View file

@ -4,14 +4,14 @@ class DukeStall : DukeActor
default
{
spriteset "STALL", "STALLBROKE";
lotag 1;
clipdist 2;
}
override void Initialize()
{
self.cstat |= CSTAT_SPRITE_BLOCK_ALL;
self.OwnerActor = self;
self.lotag = 1;
self.clipdist = 2;
}
override bool OnUse(DukePlayer p)
@ -63,8 +63,6 @@ class DukeToilet : DukeStall
default
{
spriteset "TOILET", "TOILETBROKE";
lotag 1;
clipdist 2;
}
override void StandingOn(DukePlayer p)