mirror of
https://github.com/ZDoom/Raze.git
synced 2024-12-02 09:02:18 +00:00
513de38723
Using ownerActor is not robust, for some actors this will have unwanted side effects.
52 lines
968 B
Text
52 lines
968 B
Text
//---------------------------------------------------------------------------
|
|
//
|
|
//
|
|
//
|
|
//---------------------------------------------------------------------------
|
|
|
|
class RedneckBoatGrenade : RedneckDynamiteArrow // RRRA only
|
|
{
|
|
default
|
|
{
|
|
pic "BOATGRENADE";
|
|
-DOUBLEDMGTHRUST;
|
|
-ALWAYSROTATE2;
|
|
-DOUBLEHITDAMAGE;
|
|
DukeProjectile.SpawnSound "MORTAR";
|
|
}
|
|
|
|
override void Initialize(DukeActor spawner)
|
|
{
|
|
|
|
self.extra = 10;
|
|
self.vel.Z = -10;
|
|
self.vel.X *= 2;
|
|
super.Initialize(spawner);
|
|
}
|
|
|
|
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';
|
|
}
|
|
|
|
}
|
|
|