- fixed error in vertical velocity calculation for A_SkullAttack.

This commit is contained in:
Christoph Oelckers 2017-01-21 19:54:53 +01:00
parent 2358b65921
commit 06ad2351d3

View file

@ -90,19 +90,19 @@ class BetaSkull : LostSoul
extend class Actor
{
const SKULLSPEED = 20;
const DEFSKULLSPEED = 20;
void A_SkullAttack(double skullspeed = SKULLSPEED)
void A_SkullAttack(double skullspeed = DEFSKULLSPEED)
{
if (target == null) return;
if (skullspeed <= 0) skullspeed = SKULLSPEED;
if (skullspeed <= 0) skullspeed = DEFSKULLSPEED;
bSkullfly = true;
A_PlaySound(AttackSound, CHAN_VOICE);
A_FaceTarget();
VelFromAngle(skullspeed);
Vel.Z = (target.pos.Z + target.Height/2 - pos.Z) / DistanceBySpeed(target, speed);
Vel.Z = (target.pos.Z + target.Height/2 - pos.Z) / DistanceBySpeed(target, skullspeed);
}
void A_BetaSkullAttack()