mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-17 01:51:17 +00:00
42 lines
659 B
Text
42 lines
659 B
Text
|
// Fast projectiles --------------------------------------------------------
|
||
|
|
||
|
class FastProjectile : Actor native
|
||
|
{
|
||
|
Default
|
||
|
{
|
||
|
Projectile;
|
||
|
MissileHeight 0;
|
||
|
}
|
||
|
|
||
|
|
||
|
virtual void Effect()
|
||
|
{
|
||
|
class<Actor> trail = MissileName;
|
||
|
if (trail != null)
|
||
|
{
|
||
|
double hitz = pos.z - 8;
|
||
|
|
||
|
if (hitz < floorz)
|
||
|
{
|
||
|
hitz = floorz;
|
||
|
}
|
||
|
// Do not clip this offset to the floor.
|
||
|
hitz += MissileHeight;
|
||
|
|
||
|
Actor act = Spawn (trail, (pos.xy, hitz), ALLOW_REPLACE);
|
||
|
if (act != null)
|
||
|
{
|
||
|
if (bGetOwner && target != null)
|
||
|
act.target = target;
|
||
|
else
|
||
|
act.target = self;
|
||
|
|
||
|
act.angle = angle;
|
||
|
act.pitch = pitch;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|