mirror of
https://github.com/ZDoom/Raze.git
synced 2024-12-02 09:02:18 +00:00
ef412c20cc
Due to its ugly special cases this function is most likely not modding-safe.
51 lines
924 B
Text
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';
|
|
}
|
|
|
|
}
|
|
|