mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
- fixed error in vertical velocity calculation for A_SkullAttack.
This commit is contained in:
parent
2358b65921
commit
06ad2351d3
1 changed files with 4 additions and 4 deletions
|
@ -90,19 +90,19 @@ class BetaSkull : LostSoul
|
||||||
|
|
||||||
extend class Actor
|
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 (target == null) return;
|
||||||
|
|
||||||
if (skullspeed <= 0) skullspeed = SKULLSPEED;
|
if (skullspeed <= 0) skullspeed = DEFSKULLSPEED;
|
||||||
|
|
||||||
bSkullfly = true;
|
bSkullfly = true;
|
||||||
A_PlaySound(AttackSound, CHAN_VOICE);
|
A_PlaySound(AttackSound, CHAN_VOICE);
|
||||||
A_FaceTarget();
|
A_FaceTarget();
|
||||||
VelFromAngle(skullspeed);
|
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()
|
void A_BetaSkullAttack()
|
||||||
|
|
Loading…
Reference in a new issue