diff --git a/source/games/duke/src/namelist_r.h b/source/games/duke/src/namelist_r.h index e65591b67..19b754447 100644 --- a/source/games/duke/src/namelist_r.h +++ b/source/games/duke/src/namelist_r.h @@ -687,13 +687,15 @@ y(RRTILE2123, 2123) y(RRTILE2124, 2124) y(RRTILE2125, 2125) y(RRTILE2126, 2126) -y(RRTILE2137, 2137) +y(FLAMINGO, 2137) +y(FLAMINGOB, 2138) y(RRTILE2132, 2132) y(RRTILE2136, 2136) y(RRTILE2139, 2139) y(RRTILE2150, 2150) -y(RRTILE2151, 2151) -y(RRTILE2152, 2152) +y(MARBLESTATUE1, 2151) +y(MARBLESTATUE2, 2152) +y(MARBLESTATUE3, 2153) y(RRTILE2156, 2156) y(RRTILE2157, 2157) y(RRTILE2158, 2158) @@ -1390,8 +1392,8 @@ y(RRTILE8651, 8651) y(RRTILE8660, 8660) x(ENDGAME, 8677) x(ENDGAME2, 8678) -y(RRTILE8679, 8679) -y(RRTILE8680, 8680) +y(SNAKERIVERSIGN, 8679) +y(SNAKERIVERSIGNB, 8680) y(RRTILE8681, 8681) y(RRTILE8682, 8682) y(RRTILE8683, 8683) diff --git a/source/games/duke/src/sectors_r.cpp b/source/games/duke/src/sectors_r.cpp index fb0039bb5..b99f8f22c 100644 --- a/source/games/duke/src/sectors_r.cpp +++ b/source/games/duke/src/sectors_r.cpp @@ -1395,51 +1395,10 @@ void checkhitsprite_r(DDukeActor* targ, DDukeActor* proj) { case IRONWHEELSWITCH: break; - case RRTILE8679: - targ->spr.picnum = RRTILE8680; - S_PlayActorSound(DUKE_SHUCKS, targ); - fi.hitradius(targ, 10, 0, 0, 1, 1); - if (targ->spr.lotag != 0) - { - DukeSpriteIterator it; - while (auto act = it.Next()) - { - if (act->spr.picnum == RRTILE8679 && act->spr.pal == 4) - { - if (act->spr.lotag == targ->spr.lotag) - act->spr.picnum = RRTILE8680; - } - } - } - break; } switch (targ->spr.picnum) { - case RRTILE2137: - case RRTILE2151: - case RRTILE2152: - S_PlayActorSound(GLASS_BREAKING, targ); - lotsofglass(targ, nullptr, 10); - targ->spr.picnum++; - for (int k = 0; k < 6; k++) - { - auto a = randomAngle(); - auto vel = krandf(4) + 4; - auto zvel = -krandf(16) - targ->vel.Z * 0.25; - - auto spawned = CreateActor(targ->sector(), targ->spr.pos.plusZ(-8), PClass::FindActor("DukeScrap"), -8, DVector2(0.75, 0.75), a, vel, zvel, targ, 5); - if (spawned) spawned->spriteextra = Scrap6 + (krand() & 15); - } - break; - case RRTILE2654: - case RRTILE2656: - case RRTILE3172: - if (!isRRRA()) break; - S_PlayActorSound(GLASS_BREAKING, targ); - lotsofglass(targ, nullptr, 10); - targ->Destroy(); - break; case TOILET: targ->spr.picnum = TOILETBROKE; if(krand() & 1) targ->spr.cstat |= CSTAT_SPRITE_XFLIP; diff --git a/wadsrc/static/filter/redneck.ridesagain/engine/engine.def b/wadsrc/static/filter/redneck.ridesagain/engine/engine.def index 0659ec95c..cb87f7e93 100644 --- a/wadsrc/static/filter/redneck.ridesagain/engine/engine.def +++ b/wadsrc/static/filter/redneck.ridesagain/engine/engine.def @@ -48,6 +48,7 @@ spawnclasses 8450 = RedneckAirplane 8099 = RedneckPiano 8094 = RedneckPianoKeys + 8679 = RedneckSnakeRiverSign 7636 = DukeGenericDestructible, "OLDPHOTO0", "OLDPHOTO0BROKE", "VENT_BUST" 7638 = DukeGenericDestructible, "OLDPHOTO1", "OLDPHOTO1BROKE", "VENT_BUST" diff --git a/wadsrc/static/filter/redneck/engine/engine.def b/wadsrc/static/filter/redneck/engine/engine.def index 72cb4c3de..d67992e95 100644 --- a/wadsrc/static/filter/redneck/engine/engine.def +++ b/wadsrc/static/filter/redneck/engine/engine.def @@ -154,6 +154,9 @@ spawnclasses 4897 = RedneckHenstand 296 = RedneckTeleport 297 = RedneckTeleportDest + 2137 = RedneckFlamingo + 2151 = RedneckMarbleStatue + 2152 = RedneckMarbleStatue2 3114 = DukeGenericDestructible, "RRTILE3114", "RRTILE3117", "GLASS_BREAKING", spawnglass 2876 = DukeGenericDestructible, "RRTILE2876", "RRTILE2990", "GLASS_BREAKING", spawnglass @@ -207,6 +210,10 @@ spawnclasses 1176 = DukeGenericDestructible, "SUSHIPLATE3", "", "GLASS_HEAVYBREAK", 8, blocking, spawnglass2 1178 = DukeGenericDestructible, "SUSHIPLATE4", "", "GLASS_HEAVYBREAK", 8, blocking, spawnglass2 1180 = DukeGenericDestructible, "SUSHIPLATE5", "", "GLASS_HEAVYBREAK", 8, blocking, spawnglass2 + + 2654 = DukeGenericDestructible, "RRTILE2654", "", "GLASS_BREAKING", spawnglass + 2656 = DukeGenericDestructible, "RRTILE2656", "", "GLASS_BREAKING", spawnglass + 3172 = DukeGenericDestructible, "RRTILE3172", "", "GLASS_BREAKING", spawnglass } diff --git a/wadsrc/static/zscript/games/duke/actors/destructibles.zs b/wadsrc/static/zscript/games/duke/actors/destructibles.zs index 39cdfdf07..91d626b33 100644 --- a/wadsrc/static/zscript/games/duke/actors/destructibles.zs +++ b/wadsrc/static/zscript/games/duke/actors/destructibles.zs @@ -466,3 +466,78 @@ class DukeChair3 : DukeActor self.Destroy(); } } + + +class RedneckFlamingo : DukeActor +{ + default + { + spriteset "FLAMINGO", "FLAMINGOB"; + } + + override void OnHit(DukeActor proj) + { + if (self.spritesetindex < self.getSpriteSetSize() - 1) + { + self.setSpriteSetImage(self.spritesetindex + 1); + self.PlayActorSound("GLASS_BREAKING"); + self.lotsofglass(10); + for (int k = 0; k < 6; k++) + { + let a = frandom(0, 360); + let vel = frandom(4, 8); + let zvel = -frandom(0, 16) - self.vel.Z * 0.25; + + let spawned = dlevel.SpawnActor(self.sector, self.pos.plusZ(-8), "DukeScrap", -8, (0.75, 0.75), a, vel, zvel, self, STAT_MISC); + if (spawned) spawned.spriteextra = DukeScrap.Scrap6 + random(0, 15); + } + } + } +} + +class RedneckMarbleStatue : RedneckFlamingo +{ + default + { + spriteset "MARBLESTATUE1", "MARBLESTATUE2", "MARBLESTATUE3"; + } +} + +class RedneckMarbleStatue2 : RedneckMarbleStatue +{ + default + { + spritesetindex 1; + } +} + +class RedneckSnakeRiverSign : DukeActor +{ + default + { + spriteset "FLAMINGO", "FLAMINGOB"; + } + + override void OnHit(DukeActor proj) + { + if (self.spritesetindex == 0) + { + self.setSpriteSetImage(1); + + self.PlayActorSound("WOODBREK"); + self.hitradius(10, 0, 0, 1, 1); + if (self.lotag != 0) + { + DukeSpriteIterator it; + for (let act = it.First(); act; act = it.Next()) + { + if (act is 'RedneckSnakeRiverSign' && act.pal == 4) + { + if (act.lotag == self.lotag) + act.setSpriteSetImage(1); + } + } + } + } + } +}