Have A_DetonChase check for a player too

This commit is contained in:
GoldenTails 2020-12-19 21:12:09 -06:00
parent f9e5681a6b
commit 60564197af
1 changed files with 8 additions and 3 deletions

View File

@ -5920,13 +5920,18 @@ void A_DetonChase(mobj_t *actor)
if (actor->reactiontime == -42)
{
fixed_t xyspeed;
fixed_t xyspeed, speed;
if (actor->target->player)
speed = actor->target->player->normalspeed;
else
speed = actor->target->info->speed;
actor->reactiontime = -42;
exact = actor->movedir>>ANGLETOFINESHIFT;
xyspeed = FixedMul(FixedMul(actor->tracer->player->normalspeed,3*FRACUNIT/4), FINECOSINE(exact));
actor->momz = FixedMul(FixedMul(actor->tracer->player->normalspeed,3*FRACUNIT/4), FINESINE(exact));
xyspeed = FixedMul(FixedMul(speed,3*FRACUNIT/4), FINECOSINE(exact));
actor->momz = FixedMul(FixedMul(speed,3*FRACUNIT/4), FINESINE(exact));
exact = actor->angle>>ANGLETOFINESHIFT;
actor->momx = FixedMul(xyspeed, FINECOSINE(exact));