raze/wadsrc/static/zscript/games/duke/actors/redneckweapons/boatcannon.zs
Christoph Oelckers ef412c20cc - scriptified shootrpg.
Due to its ugly special cases this function is most likely not modding-safe.
2023-04-16 16:53:52 +02:00

51 lines
924 B
Text

//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
class RedneckBoatGrenade : RedneckDynamiteArrow // RRRA only
{
default
{
pic "BOATGRENADE";
-DOUBLEDMGTHRUST;
-ALWAYSROTATE2;
DukeProjectile.SpawnSound "MORTAR";
}
override void Initialize()
{
self.extra = 10;
self.vel.Z = -10;
self.vel.X *= 2;
super.Initialize();
}
override bool premoveeffect()
{
if (self.extra)
{
self.vel.Z = -(self.extra * 250/256.); // 250 looks like a typo...
self.extra--;
}
else
self.makeitfall();
return Super.premoveeffect();
}
override void posthiteffect(CollisionData coll)
{
self.rpgexplode(coll.type, oldpos, false, 160, "RPG_EXPLODE");
self.Destroy();
}
override class<DukeActor> GetRadiusDamageType(int targhealth)
{
return 'DukeRadiusExplosion';
}
}