diff --git a/source/games/duke/src/funct.h b/source/games/duke/src/funct.h index 1537f4887..5b82b52be 100644 --- a/source/games/duke/src/funct.h +++ b/source/games/duke/src/funct.h @@ -176,7 +176,6 @@ void addspritetodelete(int spnum=0); void checkavailinven(player_struct* p); bool initspriteforspawn(DDukeActor* spn); bool commonEnemySetup(DDukeActor* self, DDukeActor* owner); -int spawnbloodpoolpart1(DDukeActor* acti); void initshell(DDukeActor* actj, DDukeActor* acti, bool isshell); void spawneffector(DDukeActor* actor, TArray* actors); int startrts(int lumpNum, int localPlayer); diff --git a/source/games/duke/src/spawn.cpp b/source/games/duke/src/spawn.cpp index a8743e1c4..3685d8305 100644 --- a/source/games/duke/src/spawn.cpp +++ b/source/games/duke/src/spawn.cpp @@ -340,31 +340,6 @@ bool commonEnemySetup(DDukeActor* self, DDukeActor* owner) } -//--------------------------------------------------------------------------- -// -// -// -//--------------------------------------------------------------------------- - -int spawnbloodpoolpart1(DDukeActor* act) -{ - bool away = isAwayFromWall(act, 6.75); - - if (!away) - { - act->spr.scale = DVector2(0, 0); - ChangeActorStat(act, STAT_MISC); - return true; - } - - if (act->sector()->lotag == 1) - { - ChangeActorStat(act, STAT_MISC); - return true; - } - return false; -} - //--------------------------------------------------------------------------- // // diff --git a/source/games/duke/src/spawn_d.cpp b/source/games/duke/src/spawn_d.cpp index 0cac2446d..a70565910 100644 --- a/source/games/duke/src/spawn_d.cpp +++ b/source/games/duke/src/spawn_d.cpp @@ -123,15 +123,6 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray* ChangeActorStat(act, STAT_ZOMBIEACTOR); } return act; - case DTILE_LAVAPOOLBUBBLE: - if (actj->spr.scale.X < 0.46875) - return act; - act->SetOwner(actj); - ChangeActorStat(act, STAT_MISC); - act->spr.pos.X += krandf(32) - 16; - act->spr.pos.Y += krandf(32) - 16; - act->spr.scale = DVector2(0.25, 0.25); - return act; case DTILE_WHISPYSMOKE: ChangeActorStat(act, STAT_MISC); act->spr.pos.X += krandf(16) - 8; @@ -163,16 +154,6 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray* act->spr.pal = 6; ChangeActorStat(act, STAT_MISC); break; - case DTILE_LAVAPOOL: - if (!isWorldTour()) // Twentieth Anniversary World Tour - return act; - - if (spawnbloodpoolpart1(act)) break; - - act->spr.cstat |= CSTAT_SPRITE_ALIGNMENT_FLOOR; - act->spr.pos.Z = getflorzofslopeptr(act->sector(), act->spr.pos) - 0.78125; - [[fallthrough]]; - case DTILE_FECES: if (actj) act->spr.scale = DVector2(REPEAT_SCALE, REPEAT_SCALE); diff --git a/source/games/duke/src/vmexports.cpp b/source/games/duke/src/vmexports.cpp index 0f63ac520..20d457567 100644 --- a/source/games/duke/src/vmexports.cpp +++ b/source/games/duke/src/vmexports.cpp @@ -14,8 +14,6 @@ int PicForName(int intname) if (classnameToTile.CountUsed() == 0) { static std::pair classes[] = { - {"DukeLavaPool", "LAVAPOOL"}, - {"RedneckCircleStuck", "CIRCLESTUCK"}, {"DukePigCop", "PIGCOP"}, {"DukeSmallSmoke", "SMALLSMOKE"}, {"RedneckBowlingBallSprite", "BOWLINGBALLSPRITE"}, diff --git a/wadsrc/static/filter/duke.worldtour/rmapinfo.spawnclasses b/wadsrc/static/filter/duke.worldtour/rmapinfo.spawnclasses index 59e1af67d..ff00fc4e8 100644 --- a/wadsrc/static/filter/duke.worldtour/rmapinfo.spawnclasses +++ b/wadsrc/static/filter/duke.worldtour/rmapinfo.spawnclasses @@ -7,4 +7,6 @@ spawnclasses 5294 = DeveloperCommentary 1891 = DukeFlamethrowerFlame 5296 = DukeFireflyFlyingEffect + 5304 = DukeLavaPool + 5207 = DukeLavaPoolBubble } diff --git a/wadsrc/static/filter/redneck/rmapinfo.spawnclasses b/wadsrc/static/filter/redneck/rmapinfo.spawnclasses index 82cdf9224..f74484e03 100644 --- a/wadsrc/static/filter/redneck/rmapinfo.spawnclasses +++ b/wadsrc/static/filter/redneck/rmapinfo.spawnclasses @@ -282,6 +282,7 @@ spawnclasses 52 = RedneckPorkRinds 5595 = RedneckGoogooCluster 240 = DukeWaterBubble + 3388 = RedneckCircleStuck } diff --git a/wadsrc/static/zscript.txt b/wadsrc/static/zscript.txt index 337df9f0a..9949245e0 100644 --- a/wadsrc/static/zscript.txt +++ b/wadsrc/static/zscript.txt @@ -114,6 +114,7 @@ version "4.10" #include "zscript/games/duke/actors/flamethrowerflame.zs" #include "zscript/games/duke/actors/firefly.zs" +#include "zscript/games/duke/actors/lavapool.zs" #include "zscript/games/duke/actors/powderkeg.zs" #include "zscript/games/duke/actors/redneckmisc.zs" diff --git a/wadsrc/static/zscript/games/duke/actors/lavapool.zs b/wadsrc/static/zscript/games/duke/actors/lavapool.zs new file mode 100644 index 000000000..6b8404370 --- /dev/null +++ b/wadsrc/static/zscript/games/duke/actors/lavapool.zs @@ -0,0 +1,56 @@ +class DukeLavaPool : DukeActor +{ + default + { + pic "LAVAPOOL"; + } + + override void Initialize() + { + bool away = self.isAwayFromWall(6.75); + + if (!away) + { + self.ChangeStat(STAT_MISC); + self.scale = (0, 0); + return; + } + + if (self.sector.lotag == 1) + { + return; + } + + + self.cstat |= CSTAT_SPRITE_ALIGNMENT_FLOOR; + double c, f; + [c, f] = self.sector.getslopes(self.pos.XY); + self.pos.Z = f - 0.78125; + if (self != self.ownerActor) + self.scale = (REPEAT_SCALE, REPEAT_SCALE); + self.ChangeStat(STAT_MISC); + } +} + +class DukeLavaPoolBubble : DukeActor +{ + default + { + pic "LAVAPOOLBUBBLE"; + } + + override void Initialize() + { + let owner = self.ownerActor; + self.ChangeStat(STAT_MISC); + if (owner.scale.X < 0.46875) + { + self.scale = (0, 0); + return; + } + self.pos.X += frandom(-16, 16); + self.pos.Y += frandom(-16, 16); + self.scale = (0.25, 0.25); + } +} + diff --git a/wadsrc/static/zscript/games/duke/actors/projectiles.zs b/wadsrc/static/zscript/games/duke/actors/projectiles.zs index 5e17ff1d8..7b45c1b2e 100644 --- a/wadsrc/static/zscript/games/duke/actors/projectiles.zs +++ b/wadsrc/static/zscript/games/duke/actors/projectiles.zs @@ -1048,3 +1048,12 @@ class RedneckSawBlade : DukeProjectile return true; } } + + +class RedneckCircleStuck : DukeActor +{ + default + { + pic "CIRCLESTUCK"; + } +} \ No newline at end of file