mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-29 23:42:33 +00:00
f103e33300
All Duke script code has been changed to use strings as sound names now, just like GZDoom these will be looked up at compile time. Original Duke sound indices still exist but are now being managed as resource IDs, not sound engine indices anymore.
73 lines
1.5 KiB
Text
73 lines
1.5 KiB
Text
|
|
class DukeFireext : DukeActor
|
|
{
|
|
default
|
|
{
|
|
statnum STAT_STANDABLE;
|
|
pic "FIREEXT";
|
|
}
|
|
|
|
override void Initialize()
|
|
{
|
|
self.cstat = CSTAT_SPRITE_BLOCK_ALL;
|
|
self.extra = gs.impact_damage << 2;
|
|
|
|
if (ud.multimode < 2 && self.pal != 0)
|
|
{
|
|
self.scale = (0, 0);
|
|
self.ChangeStat(STAT_MISC);
|
|
return;
|
|
}
|
|
|
|
self.pal = 0;
|
|
self.ownerActor = self;
|
|
self.vel.X = 0.5;
|
|
self.DoMove(CLIPMASK0);
|
|
}
|
|
|
|
override void Tick()
|
|
{
|
|
int j = self.ifhitbyweapon();
|
|
if (j == -1) return;
|
|
|
|
for (int k = 0; k < 16; k++)
|
|
{
|
|
let a = frandom(0, 360);
|
|
let vel = frandom(0, 4) + 4;
|
|
let zvel = -frandom(0, 16) - self.vel.Z * 0.25;
|
|
let spawned = dlevel.SpawnActor(self.sector, self.pos.plusZ(frandom(-48, 0)), 'DukeScrap', -8, (0.75, 0.75), a, vel, zvel, self);
|
|
if (spawned)
|
|
{
|
|
if (spawned) spawned.spriteextra = DukeScrap.Scrap3 + random(0, 3);
|
|
spawned.pal = 2;
|
|
}
|
|
}
|
|
|
|
self.spawn("DukeExplosion2");
|
|
self.PlayActorSound("PIPEBOMB_EXPLODE");
|
|
self.PlayActorSound("GLASS_HEAVYBREAK");
|
|
|
|
if (self.hitag > 0)
|
|
{
|
|
DukeStatIterator it;
|
|
for(let a1 = it.First(STAT_STANDABLE); a1; a1 = it.Next())
|
|
{
|
|
if (self.hitag == a1.hitag && a1.actorflag2(SFLAG2_BRIGHTEXPLODE))
|
|
if (a1.shade != -32)
|
|
a1.shade = -32;
|
|
}
|
|
|
|
int x = self.extra;
|
|
self.spawn("DukeExplosion2");
|
|
self.hitradius(gs.pipebombblastradius, x >> 2, x - (x >> 1), x - (x >> 2), x);
|
|
self.PlayActorSound("PIPEBOMB_EXPLODE");
|
|
self.detonate("DukeExplosion2");
|
|
}
|
|
else
|
|
{
|
|
self.hitradius(gs.seenineblastradius, 10, 15, 20, 25);
|
|
self.Destroy();
|
|
}
|
|
}
|
|
}
|
|
|