mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-20 10:53:27 +00:00
Have A_DetonChase check for a player too
This commit is contained in:
parent
f9e5681a6b
commit
60564197af
1 changed files with 8 additions and 3 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue