mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-20 16:31:03 +00:00
Merge branch 'stuckonyou' into 'next'
Allow targeting invulnerable bosses & don't break targeting when they take damage See merge request STJr/SRB2!1917
This commit is contained in:
commit
369d39a859
2 changed files with 2 additions and 11 deletions
|
@ -1401,7 +1401,6 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
||||||
if (
|
if (
|
||||||
P_MobjWasRemoved(ticcmd_ztargetfocus[forplayer]) ||
|
P_MobjWasRemoved(ticcmd_ztargetfocus[forplayer]) ||
|
||||||
!ticcmd_ztargetfocus[forplayer]->health ||
|
!ticcmd_ztargetfocus[forplayer]->health ||
|
||||||
(ticcmd_ztargetfocus[forplayer]->flags2 & MF2_FRET) ||
|
|
||||||
(ticcmd_ztargetfocus[forplayer]->type == MT_EGGMOBILE3 && !ticcmd_ztargetfocus[forplayer]->movecount) // Sea Egg is moving around underground and shouldn't be tracked
|
(ticcmd_ztargetfocus[forplayer]->type == MT_EGGMOBILE3 && !ticcmd_ztargetfocus[forplayer]->movecount) // Sea Egg is moving around underground and shouldn't be tracked
|
||||||
)
|
)
|
||||||
P_SetTarget(&ticcmd_ztargetfocus[forplayer], NULL);
|
P_SetTarget(&ticcmd_ztargetfocus[forplayer], NULL);
|
||||||
|
|
12
src/p_user.c
12
src/p_user.c
|
@ -9086,10 +9086,6 @@ mobj_t *P_LookForFocusTarget(player_t *player, mobj_t *exclude, SINT8 direction,
|
||||||
|
|
||||||
switch (mo->type)
|
switch (mo->type)
|
||||||
{
|
{
|
||||||
case MT_TNTBARREL:
|
|
||||||
if (lockonflags & LOCK_INTERESTS)
|
|
||||||
break;
|
|
||||||
/*FALLTHRU*/
|
|
||||||
case MT_PLAYER: // Don't chase other players!
|
case MT_PLAYER: // Don't chase other players!
|
||||||
case MT_DETON:
|
case MT_DETON:
|
||||||
continue; // Don't be STUPID, Sonic!
|
continue; // Don't be STUPID, Sonic!
|
||||||
|
@ -9110,17 +9106,13 @@ mobj_t *P_LookForFocusTarget(player_t *player, mobj_t *exclude, SINT8 direction,
|
||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
default:
|
default:
|
||||||
|
|
||||||
if ((lockonflags & LOCK_BOSS) && ((mo->flags & (MF_BOSS|MF_SHOOTABLE)) == (MF_BOSS|MF_SHOOTABLE))) // allows if it has the flags desired XOR it has the invert aimable flag
|
if ((lockonflags & LOCK_BOSS) && (mo->flags & MF_BOSS)) // always allow targeting bosses
|
||||||
{
|
|
||||||
if (mo->flags2 & MF2_FRET)
|
|
||||||
continue;
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
if ((lockonflags & LOCK_ENEMY) && (!((mo->flags & (MF_ENEMY|MF_SHOOTABLE)) == (MF_ENEMY|MF_SHOOTABLE)) != !(mo->flags2 & MF2_INVERTAIMABLE))) // allows if it has the flags desired XOR it has the invert aimable flag
|
if ((lockonflags & LOCK_ENEMY) && (!((mo->flags & (MF_ENEMY|MF_SHOOTABLE)) == (MF_ENEMY|MF_SHOOTABLE)) != !(mo->flags2 & MF2_INVERTAIMABLE))) // allows if it has the flags desired XOR it has the invert aimable flag
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if ((lockonflags & LOCK_INTERESTS) && (mo->flags & (MF_PUSHABLE|MF_MONITOR))) // allows if it has the flags desired XOR it has the invert aimable flag
|
if ((lockonflags & LOCK_INTERESTS) && (mo->flags & (MF_PUSHABLE|MF_MONITOR))) // allows if it has the flags desired
|
||||||
break;
|
break;
|
||||||
|
|
||||||
continue; // not a valid object
|
continue; // not a valid object
|
||||||
|
|
Loading…
Reference in a new issue