From b48dad46f3f55e6d057a7a182f67dc777c099576 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 19 Dec 2022 10:43:19 +0100 Subject: [PATCH] - do not use properties to set the sprite fields, part 4. Bowling stuff also needed fixing. --- .../zscript/games/duke/actors/bowling.zs | 39 ++++++++++--------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/wadsrc/static/zscript/games/duke/actors/bowling.zs b/wadsrc/static/zscript/games/duke/actors/bowling.zs index ea0b5be6b..929ff9e4d 100644 --- a/wadsrc/static/zscript/games/duke/actors/bowling.zs +++ b/wadsrc/static/zscript/games/duke/actors/bowling.zs @@ -2,10 +2,6 @@ class RedneckBowlingPin : DukeActor { default { - statnum STAT_ZOMBIEACTOR; - clipdist 12; - scaleX 0.359375; - scaleY 0.359375; detail 0; spriteset "BOWLINGPIN", "BOWLINGPIN1"; } @@ -13,6 +9,9 @@ class RedneckBowlingPin : DukeActor override void Initialize() { self.cstat |= CSTAT_SPRITE_BLOCK_ALL; + self.clipdist = 12; + self.scale = (0.359375, 0.359375); + self.ChangeStat(STAT_ZOMBIEACTOR); } protected void DoTick(int type) @@ -115,11 +114,17 @@ class RedneckHenstand : RedneckBowlingPin { default { - scaleY 0.234375; spriteset "HENSTAND", "HENSTAND1"; detail 1; } + override void Initialize() + { + Super.Initialize(); + self.scale.Y = 234375; + } + + override void Tick() { self.lotag--; @@ -138,14 +143,17 @@ class RedneckBowlingBall : RedneckBowlingPin { default { - clipdist 17; - scaleX 0.171875; - scaleY 0.140625; - statnum STAT_ACTOR; pic "BOWLINGBALL"; detail 2; } + override void Initialize() + { + self.clipdist = 16; + self.scale = (0.171875, 0.140625); + self.ChangeStat(STAT_ACTOR); + } + override void Tick() { if (self.vel.X != 0) @@ -226,18 +234,13 @@ class RedneckBowlingBall : RedneckBowlingPin class RedneckBowlingController : DukeActor { - default - { - statnum STAT_BOWLING; - scaleX 0; - scaleY 0; - clipdist 0; - extra 0; - } - override void Initialize() { self.cstat = CSTAT_SPRITE_INVISIBLE; + self.clipdist = 0; + self.extra = 0; + + self.ChangeStat(STAT_BOWLING); } }