mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-01 06:00:45 +00:00
Stop endlessly chasing NIGHTSPULL emblems
This commit is contained in:
parent
c1e641be43
commit
645dd7d662
1 changed files with 11 additions and 0 deletions
|
@ -798,6 +798,17 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
boolean prevCollected;
|
||||
const boolean isServer = ((player - players) == serverplayer);
|
||||
|
||||
if ((special->flags2 & MF2_NIGHTSPULL)
|
||||
&& (toucher == special->tracer))
|
||||
{
|
||||
// Since collecting may not remove the object,
|
||||
// we need to manually stop it from chasing.
|
||||
P_SetTarget(&special->tracer, NULL);
|
||||
special->flags2 &= ~MF2_NIGHTSPULL;
|
||||
special->movefactor = 0;
|
||||
special->momx = special->momy = special->momz = 0;
|
||||
}
|
||||
|
||||
if (!P_CanPickupEmblem(player, special->health - 1))
|
||||
{
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue