From 223481fd230967641a44799cfc6e798b15b4d289 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 19 Dec 2022 10:38:08 +0100 Subject: [PATCH] - do not use properties to set the sprite fields, part 3. mainly RR's chickenplant items. --- .../zscript/games/duke/actors/chickenplant.zs | 47 +++++++++---------- .../zscript/games/duke/actors/projectiles.zs | 5 +- 2 files changed, 23 insertions(+), 29 deletions(-) diff --git a/wadsrc/static/zscript/games/duke/actors/chickenplant.zs b/wadsrc/static/zscript/games/duke/actors/chickenplant.zs index a290ebbc9..7aff3ec58 100644 --- a/wadsrc/static/zscript/games/duke/actors/chickenplant.zs +++ b/wadsrc/static/zscript/games/duke/actors/chickenplant.zs @@ -3,17 +3,15 @@ class RedneckChickenSpawner1 : DukeActor { default { - scaleX 0; - scaleY 0; - clipdist 0; - lotag 0; - statnum STAT_CHICKENPLANT; pic "CHICKENASPAWN"; } override void Initialize() { self.cstat = CSTAT_SPRITE_INVISIBLE; + self.clipdist = 0; + self.lotag = 0; + self.ChangeStat(STAT_CHICKENPLANT); } override void Tick() @@ -187,10 +185,6 @@ class RedneckChickenA : DukeActor { default { - clipdist 2; - scaleX 0.5; - scaleY 0.40625; - statnum STAT_ACTOR; spriteset "CHICKENA", "CHICKENB", "CHICKENC"; } @@ -198,6 +192,9 @@ class RedneckChickenA : DukeActor { self.cstat = CSTAT_SPRITE_BLOCK_ALL; self.vel.X = 2; + self.clipdist = 2; + self.Scale = (0.5, 0.40625); + self.ChangeStat(STAT_ACTOR); } override void Tick() @@ -260,10 +257,6 @@ class RedneckChickenLoaf : DukeActor { default { - statnum STAT_ACTOR; - clipdist 2; - scaleX 0.1875; - scaleY 0.15625; pic "CHICKENLOAF"; } @@ -271,6 +264,9 @@ class RedneckChickenLoaf : DukeActor { self.cstat = CSTAT_SPRITE_BLOCK_ALL; self.vel.X = 2; + self.Scale = (0.1875, 0.15625); + self.clipdist = 2; + self.ChangeStat(STAT_ACTOR); } override void Tick() @@ -308,15 +304,15 @@ class RedneckRoastedChicken : RedneckChickenLoaf { default { - scaleX 0.203125; - scaleY 0.203125; - clipdist 2; pic "ROASTEDCHICKEN"; } override void Initialize() { self.vel.X = 1; + self.Scale = (0.203125, 0.203125); + self.clipdist = 2; + self.ChangeStat(STAT_ACTOR); } } @@ -324,15 +320,15 @@ class RedneckChickenNugget : RedneckChickenLoaf { default { - scaleX 0.125; - scaleY 0.09375; - clipdist 0.5; pic "CHICKENNUGGET"; } override void Initialize() { self.vel.X = 1; + self.Scale = (0.125, 0.09375); + self.clipdist = 0.5; + self.ChangeStat(STAT_ACTOR); } } @@ -340,15 +336,15 @@ class RedneckBonelessChicken : RedneckChickenLoaf { default { - scaleX 0.265625; - scaleY 0.1875; - clipdist 2; pic "BONELESSCHICKEN"; } override void Initialize() { self.vel.X = 2; + self.Scale = (0.265625, 0.1875); + self.clipdist = 2; + self.ChangeStat(STAT_ACTOR); } } @@ -356,16 +352,15 @@ class RedneckChickenHead : DukeActor { default { - statnum STAT_ACTOR; - scaleX 0.203125; - scaleY 0.15625; - clipdist 2; pic "CHICKENHEAD"; } override void Initialize() { self.vel.X = 0; + self.Scale = (0.203125, 0.15625); + self.clipdist = 2; + self.ChangeStat(STAT_ACTOR); } override void Tick() diff --git a/wadsrc/static/zscript/games/duke/actors/projectiles.zs b/wadsrc/static/zscript/games/duke/actors/projectiles.zs index f6fbd259e..60482e7d1 100644 --- a/wadsrc/static/zscript/games/duke/actors/projectiles.zs +++ b/wadsrc/static/zscript/games/duke/actors/projectiles.zs @@ -232,7 +232,6 @@ class DukeFirelaserTrail : DukeActor { default { - statnum STAT_MISC; spriteset "FIRELASER", "FIRELASER2", "FIRELASER3", "FIRELASER4", "FIRELASER5", "FIRELASER6"; } @@ -776,11 +775,11 @@ class RedneckChickenArrow : RedneckDynamiteArrow default { pic "RPG2"; - hitag 0; } override void Initialize() { + self.hitag = 0; SpawnSound = "CHICKENBOW_FIRE"; self.lotsofstuff("RedneckFeather", random(1, 4)); } @@ -847,13 +846,13 @@ class RedneckBoatGrenade : RedneckDynamiteArrow // RRRA only default { pic "BOATGRENADE"; - extra 10; } override void Initialize() { SpawnSound = "MORTAR"; + self.extra = 10; self.vel.Z = -10; self.vel.X *= 2; super.Initialize();