mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-17 23:21:22 +00:00
Merge branch 'bashfix' into 'master'
Fixed crash when BASH's target disappears during chasing Closes #341 See merge request STJr/SRB2Internal!525
This commit is contained in:
commit
69c41c5013
1 changed files with 14 additions and 6 deletions
|
@ -2476,12 +2476,8 @@ void A_VultureBlast(mobj_t *actor)
|
|||
void A_VultureFly(mobj_t *actor)
|
||||
{
|
||||
fixed_t speedmax = 18*FRACUNIT;
|
||||
angle_t angledif = R_PointToAngle2(actor->x, actor->y, actor->target->x, actor->target->y) - actor->angle;
|
||||
fixed_t dx = actor->target->x - actor->x;
|
||||
fixed_t dy = actor->target->y - actor->y;
|
||||
fixed_t dz = actor->target->z - actor->z;
|
||||
fixed_t dxy = FixedHypot(dx, dy);
|
||||
fixed_t dm;
|
||||
angle_t angledif;
|
||||
fixed_t dx, dy, dz, dxy, dm;
|
||||
mobj_t *dust;
|
||||
fixed_t momm;
|
||||
|
||||
|
@ -2490,6 +2486,18 @@ void A_VultureFly(mobj_t *actor)
|
|||
return;
|
||||
#endif
|
||||
|
||||
if (!actor->target || P_MobjWasRemoved(actor->target))
|
||||
{
|
||||
P_SetMobjState(actor, actor->info->spawnstate);
|
||||
return;
|
||||
}
|
||||
|
||||
angledif = R_PointToAngle2(actor->x, actor->y, actor->target->x, actor->target->y) - actor->angle;
|
||||
dx = actor->target->x - actor->x;
|
||||
dy = actor->target->y - actor->y;
|
||||
dz = actor->target->z - actor->z;
|
||||
dxy = FixedHypot(dx, dy);
|
||||
|
||||
if (leveltime % 4 == 0)
|
||||
S_StartSound(actor, actor->info->activesound);
|
||||
|
||||
|
|
Loading…
Reference in a new issue