mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 01:01:33 +00:00
Merge branch 'buggle-trouble' into 'next'
P_HomingAttack related fixes See merge request STJr/SRB2!836
This commit is contained in:
commit
23b6679b3a
2 changed files with 5 additions and 2 deletions
|
@ -9283,8 +9283,11 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
|
|||
if (mobj->tracer && mobj->tracer->player && mobj->tracer->health > 0
|
||||
&& P_AproxDistance(P_AproxDistance(mobj->tracer->x - mobj->x, mobj->tracer->y - mobj->y), mobj->tracer->z - mobj->z) <= mobj->radius*16)
|
||||
{
|
||||
var1 = mobj->info->speed;
|
||||
var2 = 1;
|
||||
|
||||
// Home in on the target.
|
||||
P_HomingAttack(mobj, mobj->tracer);
|
||||
A_HomingChase(mobj);
|
||||
|
||||
if (mobj->z < mobj->floorz)
|
||||
mobj->z = mobj->floorz;
|
||||
|
|
|
@ -9327,7 +9327,7 @@ boolean P_HomingAttack(mobj_t *source, mobj_t *enemy) // Home in on your target
|
|||
if (enemy->health <= 0) // dead
|
||||
return false;
|
||||
|
||||
if (!((enemy->flags & (MF_ENEMY|MF_BOSS|MF_MONITOR) && (enemy->flags & MF_SHOOTABLE)) || (enemy->flags & MF_SPRING)) == !(enemy->flags2 & MF2_INVERTAIMABLE)) // allows if it has the flags desired XOR it has the invert aimable flag
|
||||
if (source->player && (!((enemy->flags & (MF_ENEMY|MF_BOSS|MF_MONITOR) && (enemy->flags & MF_SHOOTABLE)) || (enemy->flags & MF_SPRING)) == !(enemy->flags2 & MF2_INVERTAIMABLE))) // allows if it has the flags desired XOR it has the invert aimable flag
|
||||
return false;
|
||||
|
||||
if (enemy->flags2 & MF2_FRET)
|
||||
|
|
Loading…
Reference in a new issue