- converted all simple destructible sprites.

Ironically the first item I used for testing needed a dedicated class, so here's that, too...
This commit is contained in:
Christoph Oelckers 2022-11-25 20:54:51 +01:00
parent 9e29c3970d
commit 1d52963d4b
21 changed files with 351 additions and 693 deletions

View file

@ -2250,6 +2250,7 @@ static void parseSpawnClasses(FScanner& sc, FScriptPosition& pos)
int base = -1;
int basetex = -1;
int brokentex = -1;
int fullbright = 0;
FName sound = NAME_None;
FName cname;
sc.GetNumber(num, true);
@ -2261,14 +2262,22 @@ static void parseSpawnClasses(FScanner& sc, FScriptPosition& pos)
if (sc.CheckNumber(true)) base = sc.Number;
else
{
// prefixing the texture names here with a '*' will render them fullbright.
sc.MustGetString();
basetex = TileFiles.tileForName(sc.String);
if (basetex < 0) Printf(TEXTCOLOR_RED "Unknown texture %s in definition for spawn ID # %d\n", num);
const char* p = sc.String;
if (*p == '*') { fullbright |= 1; p++; }
basetex = TileFiles.tileForName(p);
if (basetex < 0) Printf(TEXTCOLOR_RED "Unknown texture %s in definition for spawn ID # %d\n", sc.String, num);
if (sc.CheckString(","))
{
sc.MustGetString();
brokentex = TileFiles.tileForName(sc.String);
if (brokentex < 0) Printf(TEXTCOLOR_RED "Unknown texture %s in definition for spawn ID # %d\n", num);
const char* p = sc.String;
if (*p)
{
if (*p == '*') { fullbright |= 2; p++; }
brokentex = TileFiles.tileForName(p);
if (brokentex < 0) Printf(TEXTCOLOR_RED "Unknown texture %s in definition for spawn ID # %d\n", sc.String, num);
}
if (sc.CheckString(","))
{
sc.MustGetString();
@ -2285,7 +2294,7 @@ static void parseSpawnClasses(FScanner& sc, FScriptPosition& pos)
}
// todo: check for proper base class
spawnMap.Insert(num, { cname, nullptr, base, basetex, brokentex, sound });
spawnMap.Insert(num, { cname, nullptr, base, basetex, brokentex, sound, fullbright });
}
sc.SetCMode(false);
}

View file

@ -278,6 +278,7 @@ struct SpawnRec
int param;
int basetex, brokentex;
FName breaksound;
int fullbright;
PClass* Class(int pn)
{

View file

@ -23,4 +23,5 @@ xx(DukeGenericDestructible)
xx(spawnstate)
xx(brokenstate)
xx(breaksound)
xx(breaksound)
xx(fullbright)

View file

@ -1437,41 +1437,7 @@ void movetransports_r(void)
static void rrra_specialstats()
{
Collision coll;
DukeStatIterator it(117);
while (auto act = it.Next())
{
if (act->spr.hitag > 2)
act->spr.hitag = 0;
if ((act->spr.picnum == RRTILE8488 || act->spr.picnum == RRTILE8490) && act->spr.hitag != 2)
{
act->spr.hitag = 2;
act->spr.extra = -100;
}
if (act->spr.hitag == 0)
{
act->spr.extra++;
if (act->spr.extra >= 30)
act->spr.hitag = 1;
}
else if (act->spr.hitag == 1)
{
act->spr.extra--;
if (act->spr.extra <= -30)
act->spr.hitag = 0;
}
else if (act->spr.hitag == 2)
{
act->spr.extra--;
if (act->spr.extra <= -104)
{
spawn(act, act->spr.lotag);
act->Destroy();
}
}
movesprite_ex(act, DVector3(0, 0, act->spr.extra / 128.), CLIPMASK0, coll);
}
it.Reset(118);
DukeStatIterator it(118);
while (auto act = it.Next())
{
if (act->spr.hitag > 1)

View file

@ -734,15 +734,12 @@ void animatesprites_r(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
break;
case WALLLIGHT3:
case WALLLIGHT1:
// none of these are active
case RRTILE3668:
case RRTILE3795:
case RRTILE5035:
case RRTILE7505:
case RRTILE7506:
case RRTILE7533:
case RRTILE8216:
case RRTILE8218:
case RRTILE8220:
if (!isRRRA()) break;
[[fallthrough]];
case RRTILE1878:
@ -755,14 +752,6 @@ void animatesprites_r(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
case RRTILE2075:
case RRTILE2083:
case RRTILE2097:
case RRTILE2156:
case RRTILE2157:
case RRTILE2158:
case RRTILE2159:
case RRTILE2160:
case RRTILE2161:
case RRTILE2175:
case RRTILE2176:
case RRTILE2357:
case RRTILE2564:
case RRTILE2573:

View file

@ -76,11 +76,17 @@ static int ccmd_spawn(CCmdFuncPtr parm)
if (isdigit((uint8_t)parm->parms[0][0])) {
picnum = (unsigned short)atol(parm->parms[0]);
}
else {
else
{
picnum = getlabelvalue(parm->parms[0]);
if (picnum < 0) {
Printf("spawn: Invalid tile label given\n");
return CCMD_OK;
if (picnum < 0)
{
picnum = TileFiles.tileForName(parm->parms[0]);
if (picnum < 0)
{
Printf("spawn: Invalid tile label given\n");
return CCMD_OK;
}
}
}
@ -100,6 +106,7 @@ static int ccmd_spawn(CCmdFuncPtr parm)
if (set & 2) spawned->spr.cstat = ESpriteFlags::FromInt(cstat);
if (set & 4) spawned->spr.Angles.Yaw = ang;
if (set & 8) SetActor(spawned, DVector3( x, y, z ));
if (spawned->spr.scale.isZero()) spawned->spr.scale = isRR() ? DVector2(0.5, 0.5) : DVector2(1., 1.); // nake sure it's visible.
if (spawned->sector() == nullptr)
{

View file

@ -1163,26 +1163,41 @@ y(RRTILE7579, 7579)
y(RRTILE7580, 7580)
y(RRTILE7595, 7595)
y(RRTILE7629, 7629)
y(RRTILE7636, 7636)
y(RRTILE7638, 7638)
y(RRTILE7640, 7640)
y(RRTILE7644, 7644)
y(RRTILE7646, 7646)
y(RRTILE7648, 7648)
y(RRTILE7650, 7650)
y(RRTILE7653, 7653)
y(RRTILE7655, 7655)
y(RRTILE7657, 7657)
y(OLDPHOTO0, 7636)
y(OLDPHOTO0BROKE, 7637)
y(OLDPHOTO1, 7638)
y(OLDPHOTO1BROKE, 7639)
y(FLAMMABLESIGN, 7640)
y(FLAMMABLESIGNBROKE, 7641)
y(OLDPHOTO2, 7644)
y(OLDPHOTO2BROKE, 7645)
y(OLDPHOTO3, 7646)
y(OLDPHOTO3BROKE, 7647)
y(WILLIESGUNS, 7648)
y(WILLIESGUNSBROKE, 7649)
y(FLAMMABLE2SIGN, 7650)
y(FLAMMABLE2SIGNBROKE, 7651)
y(LABSIGN, 7653)
y(LABSIGNBROKE, 7654)
y(LABSIGN2, 7655)
y(LABSIGN2BROKE, 7656)
y(WEAPONCABINET, 7657)
y(WEAPONCABINETBROKE, 7658)
y(RRTILE7659, 7659)
y(RRTILE7691, 7691)
y(RRTILE7694, 7694)
y(SALOONSIGN, 7691)
y(SALOONSIGNBROKE, 7692)
y(BANKELPESO, 7694)
y(BANKELPESOBROKE, 7695)
y(RRTILE7696, 7696)
y(RRTILE7697, 7697)
y(RRTILE7700, 7700)
y(RRTILE7702, 7702)
y(SHERIFFSIGN, 7700)
y(SHERIFFSIGNBROKE, 7701)
y(STORESIGN, 7702)
y(STORESIGNBROKE, 7703)
y(RRTILE7704, 7704)
y(RRTILE7705, 7705)
y(RRTILE7711, 7711)
y(HOTELSIGN, 7711)
y(HOTELSIGNBROKE, 7712)
y(RRTILE7716, 7716)
y(RRTILE7756, 7756)
y(RRTILE7768, 7768)
@ -1191,11 +1206,16 @@ y(RRTILE7820, 7820)
y(RRTILE7859, 7859)
y(RRTILE7870, 7870)
y(RRTILE7873, 7873)
y(RRTILE7875, 7875)
y(RRTILE7876, 7876)
y(RRTILE7879, 7879)
y(RRTILE7881, 7881)
y(RRTILE7883, 7883)
y(NOMOTOSIGN, 7875)
y(STREETSIGN1, 7876)
y(STREETSIGN1BROKE, 7877)
y(NOMOTOSIGNBROKE, 7878)
y(DIABLOHWAY, 7879)
y(DIABLOHWAYBROKE, 7880)
y(DANGERSIGN, 7881)
y(DANGERSIGNBROKE, 7882)
y(RADIATIONSIGN, 7883)
y(RADIATIONSIGNBROKE, 7884)
y(RRTILE7885, 7885)
y(RRTILE7886, 7886)
y(RRTILE7887, 7887)
@ -1271,10 +1291,10 @@ y(RRTILE8462, 8462)
x(IRONWHEELSWITCH, 8464)
x(IRONWHEELSWITCHON, 8465)
y(RRTILE8475, 8475)
y(RRTILE8487, 8487)
y(RRTILE8488, 8488)
y(RRTILE8489, 8489)
y(RRTILE8490, 8490)
y(BALLOONS1, 8487)
y(BALLOONS1BROKE, 8488)
y(BALLOONS2, 8489)
y(BALLOONS2BROKE, 8490)
y(RRTILE8496, 8496)
y(RRTILE8497, 8497)
y(RRTILE8498, 8498)

View file

@ -941,9 +941,6 @@ static TArray<DDukeActor*> spawnactors(SpawnSpriteDef& sprites)
auto sprt = &sprites.sprites[i];
if (sprt->picnum == 7220)
sprt->picnum = 8490;
auto info = spawnMap.CheckKey(sprt->picnum);
auto cls = info ? info->Class(sprt->picnum) : nullptr;;
auto actor = static_cast<DDukeActor*>(InsertActor(cls? cls : RUNTIME_CLASS(DDukeActor), sprt->sectp, sprt->statnum));

View file

@ -1256,28 +1256,6 @@ void checkhitsprite_d(DDukeActor* targ, DDukeActor* proj)
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case GRATE1:
targ->spr.picnum = BGRATE1;
targ->spr.cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
S_PlayActorSound(VENT_BUST, targ);
break;
case CIRCLEPANNEL:
targ->spr.picnum = CIRCLEPANNELBROKE;
targ->spr.cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
S_PlayActorSound(VENT_BUST, targ);
break;
case PANNEL1:
case PANNEL2:
targ->spr.picnum = BPANNEL1;
targ->spr.cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
S_PlayActorSound(VENT_BUST, targ);
break;
case PANNEL3:
targ->spr.picnum = BPANNEL3;
targ->spr.cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
S_PlayActorSound(VENT_BUST, targ);
break;
case PIPE1:
case PIPE2:
case PIPE3:
@ -1336,21 +1314,7 @@ void checkhitsprite_d(DDukeActor* targ, DDukeActor* proj)
targ->Destroy();
break;
}
case CHAIR1:
case CHAIR2:
targ->spr.picnum = BROKENCHAIR;
targ->spr.cstat = 0;
break;
case CHAIR3:
case MOVIECAMERA:
case SCALE:
case VACUUM:
case CAMERALIGHT:
case IVUNIT:
case POT1:
case POT2:
case POT3:
case TRIPODCAMERA:
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
for (j = 0; j < 16; j++) RANDOMSCRAP(targ);
targ->Destroy();

View file

@ -1018,9 +1018,9 @@ void checkhitwall_r(DDukeActor* spr, walltype* wal, const DVector3& pos, int atw
wal->picnum = RRTILE8623;
S_PlayActorSound(495, spr);
return;
case RRTILE7657:
case WEAPONCABINET:
if (!isRRRA()) break;
wal->picnum = RRTILE7659;
wal->picnum = WEAPONCABINETBROKE;
S_PlayActorSound(GLASS_HEAVYBREAK, spr);
return;
case RRTILE8497:
@ -1631,20 +1631,7 @@ void checkhitsprite_r(DDukeActor* targ, DDukeActor* proj)
}
break;
case CHAIR1:
case CHAIR2:
targ->spr.picnum = BROKENCHAIR;
targ->spr.cstat = 0;
break;
case CHAIR3:
case MOVIECAMERA:
case SCALE:
case VACUUM:
case CAMERALIGHT:
case IVUNIT:
case POT1:
case POT2:
case POT3:
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
for (j = 0; j < 16; j++) RANDOMSCRAP(targ);
targ->Destroy();

View file

@ -55,6 +55,7 @@ void setFromSpawnRec(DDukeActor* act, SpawnRec* info)
act->IntVar(NAME_spawnstate) = info->basetex;
act->IntVar(NAME_brokenstate) = info->brokentex;
act->IntVar(NAME_breaksound) = S_FindSound(info->breaksound.GetChars()).index();
act->IntVar(NAME_fullbright) = info->fullbright;
}
}
}

View file

@ -285,16 +285,10 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
break;
case HYDRENT:
case PANNEL1:
case PANNEL2:
case SATELITE:
case FUELPOD:
case SOLARPANNEL:
case ANTENNA:
case GRATE1:
case CHAIR1:
case CHAIR2:
case CHAIR3:
case BOTTLE1:
case BOTTLE2:
case BOTTLE3:
@ -321,19 +315,10 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
case INDY:
case LUKE:
case JURYGUY:
case SCALE:
case VACUUM:
case FANSPRITE:
case HANGLIGHT:
case FETUS:
case FETUSBROKE:
case CAMERALIGHT:
case MOVIECAMERA:
case IVUNIT:
case POT1:
case POT2:
case POT3:
case TRIPODCAMERA:
case SUSHIPLATE1:
case SUSHIPLATE2:
case SUSHIPLATE3:

View file

@ -80,15 +80,6 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
act->spr.cstat = 0;
ChangeActorStat(act, 121);
break;
case RRTILE8487:
case RRTILE8489:
if (!isRRRA()) goto default_case;
act->spr.scale = DVector2(0.5, 0.5);
act->spr.extra = 0;
act->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL;
act->spr.hitag = 0;
ChangeActorStat(act, 117);
break;
case RRTILE7936:
if (!isRRRA()) goto default_case;
act->spr.scale = DVector2(0, 0);
@ -257,9 +248,6 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
case SOLARPANNEL:
case ANTENNA:
case GRATE1:
case CHAIR1:
case CHAIR2:
case CHAIR3:
case BOTTLE1:
case BOTTLE2:
case BOTTLE3:
@ -278,15 +266,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
case BOTTLE17:
case BOTTLE18:
case BOTTLE19:
case SCALE:
case VACUUM:
case FANSPRITE:
case CAMERALIGHT:
case MOVIECAMERA:
case IVUNIT:
case POT1:
case POT2:
case POT3:
case SUSHIPLATE1:
case SUSHIPLATE2:
case SUSHIPLATE3:

View file

@ -1123,8 +1123,8 @@ DEFINE_ACTION_FUNCTION(DDukeGenericDestructible, SetBroken)
PARAM_SELF_STRUCT_PROLOGUE(DDukeActor);
PARAM_INT(bust);
int tilenum = self->IntVar(bust ? NAME_brokenstate : NAME_spawnstate);
if (tilenum > 0) self->spr.picnum = tilenum;
ACTION_RETURN_BOOL(tilenum > 0);
if (tilenum >= 0) self->spr.picnum = tilenum;
ACTION_RETURN_BOOL(tilenum < 0);
}

View file

@ -77,6 +77,23 @@ spawnclasses
1528 = DukePlayerGun
1536 = DukePlayerLeg
595 = DukeGenericSolidUnblockingDestructible, "GRATE1", "BGRATE1", "VENT_BUST"
1113 = DukeGenericUnblockingDestructible, "CIRCLEPANNEL", "CIRCLEPANNELBROKE", "VENT_BUST"
342 = DukeGenericSolidUnblockingDestructible, "PANNEL1", "BPANNEL1", "VENT_BUST"
343 = DukeGenericSolidUnblockingDestructible, "PANNEL2", "BPANNEL3", "VENT_BUST"
4099 = DukeGenericUnblockingDestructible, "PANNEL3", "BPANNEL3", "VENT_BUST"
556 = DukeGenericSolidUnblockingDestructible, "CHAIR1", "BROKENCHAIR"
557 = DukeGenericSolidUnblockingDestructible, "CHAIR2", "BROKENCHAIR"
686 = DukeGenericSolidScrapSpawningDestructible, "MOVIECAMERA", "", "GLASS_HEAVYBREAK"
678 = DukeGenericSolidScrapSpawningDestructible, "SCALE", "", "GLASS_HEAVYBREAK"
685 = DukeGenericSolidScrapSpawningDestructible, "CAMERALIGHT", "", "GLASS_HEAVYBREAK"
689 = DukeGenericSolidScrapSpawningDestructible, "IVUNIT", "", "GLASS_HEAVYBREAK"
694 = DukeGenericSolidScrapSpawningDestructible, "POT1", "", "GLASS_HEAVYBREAK"
695 = DukeGenericSolidScrapSpawningDestructible, "POT2", "", "GLASS_HEAVYBREAK"
697 = DukeGenericSolidScrapSpawningDestructible, "POT3", "", "GLASS_HEAVYBREAK"
4444 = DukeGenericSolidScrapSpawningDestructible, "TRIPODCAMERA", "", "GLASS_HEAVYBREAK"
669 = DukeGenericSolidScrapSpawningDestructible, "*VACUUM", "", "GLASS_HEAVYBREAK"
}
tileflag TFLAG_WALLSWITCH {

View file

@ -0,0 +1,6 @@
spawnclasses
{
2654 = DukeGenericGlassSpawningDestructible, "*RRTILE2654", "", "GLASS_BREAKING"
2656 = DukeGenericGlassSpawningDestructible, "*RRTILE2656", "", "GLASS_BREAKING"
3172 = DukeGenericGlassSpawningDestructible, "*RRTILE3172", "", "GLASS_BREAKING"
}

View file

@ -30,393 +30,108 @@ spawnclasses
7397 = RedneckRabbitJibC
8890 = RedneckMamaJibA
8895 = RedneckMamaJibB
8487 = RedneckBalloons1
8489 = RedneckBalloons2
8487 = DukeGenericDestructible, "RRTILE8487", "RRTILE8488", "BALLOON"
8489 = DukeGenericDestructible, "RRTILE8489", "RRTILE8490", "BALLOON"
/*
case RRTILE8487:
case RRTILE8489:
S_PlayActorSound(471, targ);
targ->spr.picnum++;
break;
case RRTILE7638:
case RRTILE7644:
case RRTILE7646:
case RRTILE7650:
case RRTILE7653:
case RRTILE7655:
case RRTILE7691:
case RRTILE7876:
case RRTILE7881:
case RRTILE7883:
targ->spr.picnum++;
S_PlayActorSound(VENT_BUST, targ);
break;
case RRTILE7879:
targ->spr.picnum++;
S_PlayActorSound(495, targ);
fi.hitradius(targ, 10, 0, 0, 1, 1);
break;
case RRTILE7648:
case RRTILE7694:
case RRTILE7700:
case RRTILE7702:
case RRTILE7711:
targ->spr.picnum++;
S_PlayActorSound(47, targ);
break;
case RRTILE7636:
targ->spr.picnum += 3;
S_PlayActorSound(VENT_BUST, targ);
break;
case RRTILE7875:
targ->spr.picnum += 3;
S_PlayActorSound(VENT_BUST, targ);
break;
case RRTILE7640:
targ->spr.picnum += 2;
S_PlayActorSound(VENT_BUST, targ);
break;
case RRTILE7595:
case RRTILE7704:
targ->spr.picnum = RRTILE7705;
S_PlayActorSound(495, targ);
break;
case RRTILE8579:
targ->spr.picnum = RRTILE5014;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE7441:
targ->spr.picnum = RRTILE5016;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE7534:
targ->spr.picnum = RRTILE5029;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE7545:
targ->spr.picnum = RRTILE5030;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE7547:
targ->spr.picnum = RRTILE5031;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE7574:
targ->spr.picnum = RRTILE5032;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE7575:
targ->spr.picnum = RRTILE5033;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE7578:
targ->spr.picnum = RRTILE5034;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE7478:
targ->spr.picnum = RRTILE5035;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE8525:
targ->spr.picnum = RRTILE5036;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE8537:
targ->spr.picnum = RRTILE5062;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE8215:
targ->spr.picnum = RRTILE5064;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE8216:
targ->spr.picnum = RRTILE5065;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE8217:
targ->spr.picnum = RRTILE5066;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE8218:
targ->spr.picnum = RRTILE5067;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE8220:
targ->spr.picnum = RRTILE5068;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE8221:
targ->spr.picnum = RRTILE5069;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE8312:
targ->spr.picnum = RRTILE5071;
S_PlayActorSound(472, targ);
break;
case RRTILE8395:
targ->spr.picnum = RRTILE5072;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE8423:
targ->spr.picnum = RRTILE5073;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE3462:
targ->spr.picnum = RRTILE5074;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case UWHIP:
targ->spr.picnum = RRTILE5075;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE8608:
targ->spr.picnum = RRTILE5083;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE8609:
targ->spr.picnum = RRTILE5084;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE8567:
case RRTILE8568:
case RRTILE8569:
case RRTILE8570:
case RRTILE8571:
targ->spr.picnum = RRTILE5082;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE8640:
targ->spr.picnum = RRTILE5085;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE8611:
targ->spr.picnum = RRTILE5086;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case TECHLIGHTBUST2:
targ->spr.picnum = TECHLIGHTBUST4;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE8497:
targ->spr.picnum = RRTILE5076;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE8162:
case RRTILE8163:
case RRTILE8164:
case RRTILE8165:
case RRTILE8166:
case RRTILE8167:
case RRTILE8168:
ChangeActorStat(targ, STAT_MISC);
targ->spr.picnum = RRTILE5063;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE8589:
case RRTILE8590:
case RRTILE8591:
case RRTILE8592:
case RRTILE8593:
case RRTILE8594:
case RRTILE8595:
ChangeActorStat(targ, STAT_MISC);
targ->spr.picnum = RRTILE8588;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE3497:
targ->spr.picnum = RRTILE5076;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE3498:
targ->spr.picnum = RRTILE5077;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE3499:
targ->spr.picnum = RRTILE5078;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE8503:
targ->spr.picnum = RRTILE5079;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE7901:
targ->spr.picnum = RRTILE5080;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE7696:
targ->spr.picnum = RRTILE7697;
S_PlayActorSound(DUKE_SHUCKS, targ);
break;
case RRTILE7806:
targ->spr.picnum = RRTILE5043;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE7885:
case RRTILE7890:
targ->spr.picnum = RRTILE5045;
S_PlayActorSound(495, targ);
fi.hitradius(targ, 10, 0, 0, 1, 1);
break;
case RRTILE7886:
targ->spr.picnum = RRTILE5046;
S_PlayActorSound(495, targ);
fi.hitradius(targ, 10, 0, 0, 1, 1);
break;
case RRTILE7887:
targ->spr.picnum = RRTILE5044;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
fi.hitradius(targ, 10, 0, 0, 1, 1);
break;
case RRTILE7900:
targ->spr.picnum = RRTILE5047;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE7906:
targ->spr.picnum = RRTILE5048;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE7912:
case RRTILE7913:
targ->spr.picnum = RRTILE5049;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE8047:
targ->spr.picnum = RRTILE5050;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE8596:
targ->spr.picnum = RRTILE8598;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE8059:
targ->spr.picnum = RRTILE5051;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE8060:
targ->spr.picnum = RRTILE5052;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE8222:
targ->spr.picnum = RRTILE5053;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE8223:
targ->spr.picnum = RRTILE5054;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE8224:
targ->spr.picnum = RRTILE5055;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE8370:
targ->spr.picnum = RRTILE5056;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE8371:
targ->spr.picnum = RRTILE5057;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE8372:
targ->spr.picnum = RRTILE5058;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE8373:
targ->spr.picnum = RRTILE5059;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE8396:
targ->spr.picnum = RRTILE5038;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE8397:
targ->spr.picnum = RRTILE5039;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE8398:
targ->spr.picnum = RRTILE5040;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE8399:
targ->spr.picnum = RRTILE5041;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE8385:
targ->spr.picnum = RRTILE8386;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE8387:
targ->spr.picnum = RRTILE8388;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE8389:
targ->spr.picnum = RRTILE8390;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE8391:
targ->spr.picnum = RRTILE8392;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE7553:
targ->spr.picnum = RRTILE5035;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE8475:
targ->spr.picnum = RRTILE5075;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE8498:
targ->spr.picnum = RRTILE5077;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE8499:
targ->spr.picnum = RRTILE5078;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE2445:
targ->spr.picnum = RRTILE2450;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE2123:
targ->spr.picnum = RRTILE2124;
S_PlayActorSound(GLASS_BREAKING, targ);
lotsofglass(targ, nullptr, 10);
break;
case RRTILE3773:
targ->spr.picnum = RRTILE8651;
S_PlayActorSound(GLASS_BREAKING, targ);
lotsofglass(targ, nullptr, 10);
break;
case RRTILE7533:
targ->spr.picnum = RRTILE5035;
S_PlayActorSound(495, targ);
fi.hitradius(targ, 10, 0, 0, 1, 1);
break;
case RRTILE8394:
targ->spr.picnum = RRTILE5072;
S_PlayActorSound(495, targ);
break;
case RRTILE8461:
case RRTILE8462:
targ->spr.picnum = RRTILE5074;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE3584:
targ->spr.picnum = RRTILE8681;
S_PlayActorSound(495, targ);
fi.hitradius(targ, 250, 0, 0, 1, 1);
break;
case RRTILE8682:
targ->spr.picnum = RRTILE8683;
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
break;
case RRTILE2437:
S_PlayActorSound(439, targ);
break;
}
*/
7636 = DukeGenericDestructible, "OLDPHOTO0", "OLDPHOTO0BROKE", "VENT_BUST"
7638 = DukeGenericDestructible, "OLDPHOTO1", "OLDPHOTO1BROKE", "VENT_BUST"
7640 = DukeGenericDestructible, "FLAMMABLESIGN", "FLAMMABLESIGNBROKE", "VENT_BUST"
7644 = DukeGenericDestructible, "OLDPHOTO2", "OLDPHOTO2BROKE", "VENT_BUST"
7646 = DukeGenericDestructible, "OLDPHOTO3", "OLDPHOTO3BROKE", "VENT_BUST"
7648 = DukeGenericDestructible, "WILLIESGUNS", "WILLIESGUNSBROKE", "WOODBREK"
7650 = DukeGenericDestructible, "FLAMMABLE2SIGN", "FLAMMABLE2SIGNBROKE", "VENT_BUST"
7653 = DukeGenericDestructible, "LABSIGN", "LABSIGNBROKE", "VENT_BUST"
7655 = DukeGenericDestructible, "LABSIGN2", "LABSIGN2BROKE", "VENT_BUST"
7691 = DukeGenericDestructible, "SALOONSIGN", "SALOONSIGNBROKE", "VENT_BUST"
7875 = DukeGenericDestructible, "NOMOTOSIGN", "NOMOTOSIGNBROKE", "VENT_BUST"
7876 = DukeGenericDestructible, "STREETSIGN1", "STREETSIGN1BROKE", "VENT_BUST"
7881 = DukeGenericDestructible, "DANGERSIGN", "DANGERSIGNBROKE", "VENT_BUST"
7883 = DukeGenericDestructible, "RADIATIONSIGN", "RADIATIONSIGNBROKE", "VENT_BUST"
7879 = DukeGenericDamagingDestructible, "DIABLOHWAY", "DIABLOHWAYBROKE", "SIGNHIT"
7694 = DukeGenericDestructible, "BANKELPESO", "BANKELPESOBROKE", "WOODBREK"
7700 = DukeGenericDestructible, "SHERIFFSIGN", "SHERIFFSIGNBROKE", "WOODBREK"
7702 = DukeGenericDestructible, "STORESIGN", "STORESIGNBROKE", "WOODBREK"
7711 = DukeGenericDestructible, "HOTELSIGN", "HOTELSIGNBROKE", "WOODBREK"
7595 = DukeGenericDestructible, "RRTILE7595", "RRTILE7705", "SIGNHIT"
7704 = DukeGenericDestructible, "RRTILE7704", "RRTILE7705", "SIGNHIT"
8579 = DukeGenericDestructible, "RRTILE8579", "RRTILE5014", "GLASS_HEAVYBREAK"
7441 = DukeGenericDestructible, "RRTILE7441", "RRTILE5016", "GLASS_HEAVYBREAK"
7534 = DukeGenericDestructible, "RRTILE7534", "RRTILE5029", "GLASS_HEAVYBREAK"
7545 = DukeGenericDestructible, "RRTILE7545", "RRTILE5030", "GLASS_HEAVYBREAK"
7547 = DukeGenericDestructible, "RRTILE7547", "RRTILE5031", "GLASS_HEAVYBREAK"
7574 = DukeGenericDestructible, "RRTILE7574", "RRTILE5032", "GLASS_HEAVYBREAK"
7575 = DukeGenericDestructible, "RRTILE7575", "RRTILE5033", "GLASS_HEAVYBREAK"
7578 = DukeGenericDestructible, "RRTILE7578", "RRTILE5034", "GLASS_HEAVYBREAK"
7478 = DukeGenericDestructible, "RRTILE7478", "RRTILE5035", "GLASS_HEAVYBREAK"
8525 = DukeGenericDestructible, "RRTILE8525", "RRTILE5036", "GLASS_HEAVYBREAK"
8537 = DukeGenericDestructible, "RRTILE8537", "RRTILE5062", "GLASS_HEAVYBREAK"
8215 = DukeGenericDestructible, "RRTILE8215", "RRTILE5064", "GLASS_HEAVYBREAK"
8216 = DukeGenericDestructible, "*RRTILE8216", "RRTILE5065", "GLASS_HEAVYBREAK" // *prefix means fullbright.
8217 = DukeGenericDestructible, "RRTILE8217", "RRTILE5066", "GLASS_HEAVYBREAK"
8218 = DukeGenericDestructible, "*RRTILE8218", "RRTILE5067", "GLASS_HEAVYBREAK"
8220 = DukeGenericDestructible, "*RRTILE8220", "RRTILE5068", "GLASS_HEAVYBREAK"
8221 = DukeGenericDestructible, "RRTILE8221", "RRTILE5069", "GLASS_HEAVYBREAK"
8395 = DukeGenericDestructible, "RRTILE8395", "RRTILE5072", "GLASS_HEAVYBREAK"
8423 = DukeGenericDestructible, "RRTILE8423", "RRTILE5073", "GLASS_HEAVYBREAK"
8462 = DukeGenericDestructible, "RRTILE8462", "RRTILE5074", "GLASS_HEAVYBREAK"
8475 = DukeGenericDestructible, "RRTILE8475", "RRTILE5075", "GLASS_HEAVYBREAK"
8608 = DukeGenericDestructible, "RRTILE8608", "RRTILE5083", "GLASS_HEAVYBREAK"
8609 = DukeGenericDestructible, "RRTILE8609", "RRTILE5084", "GLASS_HEAVYBREAK"
8312 = DukeGenericDestructible, "RRTILE8312", "RRTILE5071", "POOLBUD"
8567 = DukeGenericDestructible, "RRTILE8567", "RRTILE5082", "GLASS_HEAVYBREAK"
8568 = DukeGenericDestructible, "RRTILE8568", "RRTILE5082", "GLASS_HEAVYBREAK"
8569 = DukeGenericDestructible, "RRTILE8569", "RRTILE5082", "GLASS_HEAVYBREAK"
8570 = DukeGenericDestructible, "RRTILE8570", "RRTILE5082", "GLASS_HEAVYBREAK"
8571 = DukeGenericDestructible, "RRTILE8571", "RRTILE5082", "GLASS_HEAVYBREAK"
8640 = DukeGenericDestructible, "RRTILE8640", "RRTILE5085", "GLASS_HEAVYBREAK"
8611 = DukeGenericDestructible, "RRTILE8611", "RRTILE5086", "GLASS_HEAVYBREAK"
8497 = DukeGenericDestructible, "RRTILE8497", "RRTILE5076", "GLASS_HEAVYBREAK"
8498 = DukeGenericDestructible, "RRTILE8498", "RRTILE5077", "GLASS_HEAVYBREAK"
8499 = DukeGenericDestructible, "RRTILE8499", "RRTILE5078", "GLASS_HEAVYBREAK"
8503 = DukeGenericDestructible, "RRTILE8503", "RRTILE5079", "GLASS_HEAVYBREAK"
7901 = DukeGenericDestructible, "RRTILE7901", "RRTILE5080", "GLASS_HEAVYBREAK"
7696 = DukeGenericDestructible, "RRTILE7696", "RRTILE7697", "WOODBREK"
7806 = DukeGenericDestructible, "RRTILE7806", "RRTILE5043", "GLASS_HEAVYBREAK"
7900 = DukeGenericDestructible, "RRTILE7900", "RRTILE5047", "GLASS_HEAVYBREAK"
7906 = DukeGenericDestructible, "RRTILE7906", "RRTILE5048", "GLASS_HEAVYBREAK"
7912 = DukeGenericDestructible, "RRTILE7912", "RRTILE5049", "GLASS_HEAVYBREAK"
7913 = DukeGenericDestructible, "RRTILE7913", "RRTILE5049", "GLASS_HEAVYBREAK"
8047 = DukeGenericDestructible, "RRTILE8047", "RRTILE5050", "GLASS_HEAVYBREAK"
8596 = DukeGenericDestructible, "RRTILE8596", "RRTILE8598", "GLASS_HEAVYBREAK"
8059 = DukeGenericDestructible, "RRTILE8059", "RRTILE5051", "GLASS_HEAVYBREAK"
8060 = DukeGenericDestructible, "RRTILE8060", "RRTILE5052", "GLASS_HEAVYBREAK"
8222 = DukeGenericDestructible, "RRTILE8222", "RRTILE5053", "GLASS_HEAVYBREAK"
8223 = DukeGenericDestructible, "RRTILE8223", "RRTILE5054", "GLASS_HEAVYBREAK"
8224 = DukeGenericDestructible, "RRTILE8224", "RRTILE5055", "GLASS_HEAVYBREAK"
8370 = DukeGenericDestructible, "RRTILE8370", "RRTILE5056", "GLASS_HEAVYBREAK"
8371 = DukeGenericDestructible, "RRTILE8371", "RRTILE5057", "GLASS_HEAVYBREAK"
8372 = DukeGenericDestructible, "RRTILE8372", "RRTILE5058", "GLASS_HEAVYBREAK"
8373 = DukeGenericDestructible, "RRTILE8373", "RRTILE5059", "GLASS_HEAVYBREAK"
8396 = DukeGenericDestructible, "RRTILE8396", "RRTILE5038", "GLASS_HEAVYBREAK"
8397 = DukeGenericDestructible, "RRTILE8397", "RRTILE5039", "GLASS_HEAVYBREAK"
8398 = DukeGenericDestructible, "RRTILE8398", "RRTILE5040", "GLASS_HEAVYBREAK"
8399 = DukeGenericDestructible, "RRTILE8399", "RRTILE5041", "GLASS_HEAVYBREAK"
8385 = DukeGenericDestructible, "RRTILE8385", "RRTILE8386", "GLASS_HEAVYBREAK"
8387 = DukeGenericDestructible, "RRTILE8387", "RRTILE8388", "GLASS_HEAVYBREAK"
8389 = DukeGenericDestructible, "RRTILE8389", "RRTILE8390", "GLASS_HEAVYBREAK"
8391 = DukeGenericDestructible, "RRTILE8391", "RRTILE8392", "GLASS_HEAVYBREAK"
7553 = DukeGenericDestructible, "RRTILE7553", "RRTILE5035", "GLASS_HEAVYBREAK"
8475 = DukeGenericDestructible, "RRTILE8475", "RRTILE5075", "GLASS_HEAVYBREAK"
8498 = DukeGenericDestructible, "RRTILE8498", "RRTILE5077", "GLASS_HEAVYBREAK"
8499 = DukeGenericDestructible, "RRTILE8499", "RRTILE5078", "GLASS_HEAVYBREAK"
2445 = DukeGenericDestructible, "RRTILE2445", "RRTILE2450", "GLASS_HEAVYBREAK"
7885 = DukeGenericDamagingDestructible, "RRTILE7885", "RRTILE5045", "SIGNHIT"
7890 = DukeGenericDamagingDestructible, "RRTILE7890", "RRTILE5045", "SIGNHIT"
7886 = DukeGenericDamagingDestructible, "RRTILE7886", "RRTILE5046", "SIGNHIT"
7887 = DukeGenericDamagingDestructible, "RRTILE7887", "RRTILE5044", "GLASS_HEAVYBREAK"
2123 = DukeGenericDamagingDestructible, "RRTILE2123", "RRTILE2124", "GLASS_BREAKING"
3773 = DukeGenericDamagingDestructible, "RRTILE3773", "RRTILE8651", "GLASS_BREAKING"
7533 = DukeGenericDamagingDestructible, "*RRTILE7533", "*RRTILE5035", "SIGNHIT"
3584 = DukeGenericDamagingDestructible, "RRTILE3584", "RRTILE8681", "SIGNHIT"
8394 = DukeGenericDestructible, "RRTILE8394", "RRTILE5072", "SIGNHIT"
8461 = DukeGenericDestructible, "RRTILE8461", "RRTILE5074", "GLASS_HEAVYBREAK"
8462 = DukeGenericDestructible, "RRTILE8462", "RRTILE5074", "GLASS_HEAVYBREAK"
8682 = DukeGenericDestructible, "RRTILE8682", "RRTILE8683", "GLASS_HEAVYBREAK"
}
tileflag TFLAG_WALLSWITCH {

View file

@ -89,8 +89,38 @@ spawnclasses
5602 = RedneckCootJibA
5607 = RedneckCootJibB
5616 = RedneckCootJibB
3114 = DukeGenericGlassSpawningDestructible, "RRTILE3114", "RRTILE3117", "GLASS_BREAKING"
2876 = DukeGenericGlassSpawningDestructible, "RRTILE2876", "RRTILE2990", "GLASS_BREAKING"
3152 = DukeGenericGlassSpawningDestructible, "RRTILE3152", "RRTILE3218", "GLASS_BREAKING"
3153 = DukeGenericGlassSpawningDestructible, "RRTILE3153", "RRTILE3219", "GLASS_BREAKING"
2030 = DukeGenericGlassSpawningDestructible, "RRTILE2030", "RRTILE2034", "GLASS_BREAKING"
2915 = DukeGenericGlassSpawningDestructible, "RRTILE2915", "RRTILE2977", "GLASS_BREAKING"
2893 = DukeGenericGlassSpawningDestructible, "RRTILE2893", "RRTILE2978", "GLASS_BREAKING"
3115 = DukeGenericGlassSpawningDestructible, "RRTILE3115", "RRTILE3116", "GLASS_BREAKING"
3171 = DukeGenericGlassSpawningDestructible, "RRTILE3171", "RRTILE3216", "GLASS_BREAKING"
2156 = DukeGenericGlassSpawningDestructible, "*RRTILE2156", "*RRTILE2157", "GLASS_BREAKING"
2158 = DukeGenericGlassSpawningDestructible, "*RRTILE2158", "*RRTILE2159", "GLASS_BREAKING"
2160 = DukeGenericGlassSpawningDestructible, "*RRTILE2160", "*RRTILE2161", "GLASS_BREAKING"
2175 = DukeGenericGlassSpawningDestructible, "*RRTILE2175", "*RRTILE2176", "GLASS_BREAKING"
234 = DukeGenericSolidUnblockingDestructible, "GRATE1", "BGRATE1", "VENT_BUST"
2251 = DukeGenericUnblockingDestructible, "CIRCLEPANNEL", "CIRCLEPANNELBROKE", "VENT_BUST"
343 = DukeGenericSolidUnblockingDestructible, "PANNEL2", "BPANNEL3", "VENT_BUST"
1085 = DukeGenericSolidUnblockingDestructible, "CHAIR1", "BROKENCHAIR"
1086 = DukeGenericSolidUnblockingDestructible, "CHAIR2", "BROKENCHAIR"
1158 = DukeGenericSolidScrapSpawningDestructible, "MOVIECAMERA", "", "GLASS_HEAVYBREAK"
1150 = DukeGenericSolidScrapSpawningDestructible, "SCALE", "", "GLASS_HEAVYBREAK"
1157 = DukeGenericScrapSpawningDestructible, "CAMERALIGHT", "", "GLASS_HEAVYBREAK"
1163 = DukeGenericSolidScrapSpawningDestructible, "IVUNIT", "", "GLASS_HEAVYBREAK"
1164 = DukeGenericSolidScrapSpawningDestructible, "POT1", "", "GLASS_HEAVYBREAK"
1165 = DukeGenericSolidScrapSpawningDestructible, "POT2", "", "GLASS_HEAVYBREAK"
1166 = DukeGenericSolidScrapSpawningDestructible, "POT3", "", "GLASS_HEAVYBREAK"
1141 = DukeGenericSolidScrapSpawningDestructible, "VACUUM", "", "GLASS_HEAVYBREAK"
}
tileflag TFLAG_WALLSWITCH {
HANDPRINTSWITCH
HANDPRINTSWITCHON

View file

@ -80,6 +80,7 @@ version "4.10"
#include "zscript/games/duke/actors/chickenplant.zs"
#include "zscript/games/duke/actors/lumberblade.zs"
#include "zscript/games/duke/actors/rrcactus.zs"
#include "zscript/games/duke/actors/balloons.zs"
#include "zscript/games/blood/bloodgame.zs"
#include "zscript/games/blood/ui/menu.zs"

View file

@ -0,0 +1,69 @@
class RedneckBalloons1 : DukeActor
{
Default
{
ScaleX 0.5;
ScaleY 0.5;
Extra 0;
Hitag 0;
Statnum STAT_ACTOR;
Spriteset "BALLOONS1", "BALLOONS1BROKE";
}
override void Initialize()
{
self.cstat |= CSTAT_SPRITE_BLOCK_ALL;
}
override void Tick()
{
if (self.hitag > 2)
self.hitag = 0;
if (spritesetindex == 1 && self.hitag != 2)
{
self.hitag = 2;
self.extra = -100;
}
if (self.hitag == 0)
{
self.extra++;
if (self.extra >= 30)
self.hitag = 1;
}
else if (self.hitag == 1)
{
self.extra--;
if (self.extra <= -30)
self.hitag = 0;
}
else if (self.hitag == 2)
{
self.extra--;
if (self.extra <= -104)
{
self.spawnsprite(self.lotag);
self.Destroy();
}
}
self.movesprite((0, 0, self.extra / 128.), CLIPMASK0);
}
override void OnHit(DukeActor proj)
{
if (self.spritesetindex == 0)
{
self.SetSpritesetImage(1);
self.playActorSound("BALLOON");
}
}
}
class RedneckBalloons2 : DukeActor
{
Default
{
Spriteset "BALLOONS2", "BALLOONS2BROKE";
}
}

View file

@ -4,7 +4,8 @@ class DukeGenericDestructible : DukeActor
{
TextureID spawnstate, brokenstate;
Sound breaksound;
bool broken;
int fullbright;
int broken;
native bool SetBroken(bool bust); // sets broken texture. Must be done natively as long as we do not have proper texture support.
@ -25,6 +26,12 @@ class DukeGenericDestructible : DukeActor
if (res1 || res2)
self.Destroy();
}
override bool Animate(tspritetype tspr)
{
if (fullbright & (1 << broken)) tspr.shade = -127;
return true;
}
}
class DukeGenericDamagingDestructible : DukeGenericDestructible
@ -45,6 +52,16 @@ class DukeGenericGlassSpawningDestructible : DukeGenericDestructible
}
}
class DukeGenericScrapSpawningDestructible : DukeGenericDestructible
{
override bool DestroyAction()
{
for(int i = 0; i < 16; i++) self.RandomScrap();
self.Destroy();
return false;
}
}
class DukeGenericUnblockingDestructible : DukeGenericDestructible
{
override bool DestroyAction()
@ -54,137 +71,33 @@ class DukeGenericUnblockingDestructible : DukeGenericDestructible
}
}
/*
// todo: RRRA
class DukeGenericSolidScrapSpawningDestructible : DukeGenericDestructible
{
override void Initialize()
{
self.SetBroken(false);
self.cstat |= CSTAT_SPRITE_BLOCK_ALL;
}
override bool DestroyAction()
{
for(int i = 0; i < 16; i++) self.RandomScrap();
self.Destroy();
return false;
}
}
// RR
case RRTILE3114:
targ->spr.picnum = RRTILE3117;
break;
case RRTILE2876:
targ->spr.picnum = RRTILE2990;
break;
case RRTILE3152:
targ->spr.picnum = RRTILE3218;
break;
case RRTILE3153:
targ->spr.picnum = RRTILE3219;
break;
case RRTILE2030:
targ->spr.picnum = RRTILE2034;
S_PlayActorSound(GLASS_BREAKING, targ);
lotsofglass(targ, nullptr, 10);
break;
case RRTILE2893:
case RRTILE2915:
case RRTILE3115:
case RRTILE3171:
switch (targ->spr.picnum)
{
case RRTILE2915:
targ->spr.picnum = RRTILE2977;
break;
case RRTILE2893:
targ->spr.picnum = RRTILE2978;
break;
case RRTILE3115:
targ->spr.picnum = RRTILE3116;
break;
case RRTILE3171:
targ->spr.picnum = RRTILE3216;
break;
}
S_PlayActorSound(GLASS_BREAKING, targ);
lotsofglass(targ, nullptr, 10);
break;
case RRTILE2156:
case RRTILE2158:
case RRTILE2160:
case RRTILE2175:
targ->spr.picnum++;
S_PlayActorSound(GLASS_BREAKING, targ);
lotsofglass(targ, nullptr, 10);
break;
case RRTILE2654:
case RRTILE2656:
case RRTILE3172:
if (!isRRRA()) break;
S_PlayActorSound(GLASS_BREAKING, targ);
lotsofglass(targ, nullptr, 10);
targ->Destroy();
break;
case GRATE1:
targ->spr.picnum = BGRATE1;
targ->spr.cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
S_PlayActorSound(VENT_BUST, targ);
break;
case CIRCLEPANNEL:
targ->spr.picnum = CIRCLEPANNELBROKE;
targ->spr.cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
S_PlayActorSound(VENT_BUST, targ);
break;
+
case GRATE1:
targ->spr.picnum = BGRATE1;
targ->spr.cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
S_PlayActorSound(VENT_BUST, targ);
break;
case CIRCLEPANNEL:
targ->spr.picnum = CIRCLEPANNELBROKE;
targ->spr.cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
S_PlayActorSound(VENT_BUST, targ);
break;
Duke
case GRATE1:
targ->spr.picnum = BGRATE1;
targ->spr.cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
S_PlayActorSound(VENT_BUST, targ);
break;
case CIRCLEPANNEL:
targ->spr.picnum = CIRCLEPANNELBROKE;
targ->spr.cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
S_PlayActorSound(VENT_BUST, targ);
break;
case PANNEL1:
case PANNEL2:
targ->spr.picnum = BPANNEL1;
targ->spr.cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
S_PlayActorSound(VENT_BUST, targ);
break;
case PANNEL3:
targ->spr.picnum = BPANNEL3;
targ->spr.cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
S_PlayActorSound(VENT_BUST, targ);
break;
case CHAIR1:
case CHAIR2:
targ->spr.picnum = BROKENCHAIR;
targ->spr.cstat = 0;
break;
case CHAIR3:
case MOVIECAMERA:
case SCALE:
case VACUUM:
case CAMERALIGHT:
case IVUNIT:
case POT1:
case POT2:
case POT3:
case TRIPODCAMERA:
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
for (j = 0; j < 16; j++) RANDOMSCRAP(targ);
targ->Destroy();
break;
*/
class DukeGenericSolidUnblockingDestructible : DukeGenericDestructible
{
override void Initialize()
{
self.SetBroken(false);
self.cstat |= CSTAT_SPRITE_BLOCK_ALL;
}
override bool DestroyAction()
{
self.cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
return false;
}
}