Have A_DetonChase check for a player too
This commit is contained in:
parent
f9e5681a6b
commit
60564197af
|
@ -5920,13 +5920,18 @@ void A_DetonChase(mobj_t *actor)
|
||||||
|
|
||||||
if (actor->reactiontime == -42)
|
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;
|
actor->reactiontime = -42;
|
||||||
|
|
||||||
exact = actor->movedir>>ANGLETOFINESHIFT;
|
exact = actor->movedir>>ANGLETOFINESHIFT;
|
||||||
xyspeed = FixedMul(FixedMul(actor->tracer->player->normalspeed,3*FRACUNIT/4), FINECOSINE(exact));
|
xyspeed = FixedMul(FixedMul(speed,3*FRACUNIT/4), FINECOSINE(exact));
|
||||||
actor->momz = FixedMul(FixedMul(actor->tracer->player->normalspeed,3*FRACUNIT/4), FINESINE(exact));
|
actor->momz = FixedMul(FixedMul(speed,3*FRACUNIT/4), FINESINE(exact));
|
||||||
|
|
||||||
exact = actor->angle>>ANGLETOFINESHIFT;
|
exact = actor->angle>>ANGLETOFINESHIFT;
|
||||||
actor->momx = FixedMul(xyspeed, FINECOSINE(exact));
|
actor->momx = FixedMul(xyspeed, FINECOSINE(exact));
|
||||||
|
|
Loading…
Reference in New Issue