mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-12-18 17:01:20 +00:00
Fix P_CollectRing
This commit is contained in:
parent
8728ed1ec0
commit
a880f0aa6f
1 changed files with 6 additions and 3 deletions
|
@ -333,16 +333,18 @@ void P_DoMatchSuper(player_t *player)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void P_CollectRing(player_t *player, mobj_t *special)
|
static boolean P_CollectRing(player_t *player, mobj_t *special)
|
||||||
{
|
{
|
||||||
if (!(P_CanPickupItem(player, false)) && !(special->flags2 & MF2_NIGHTSPULL))
|
if (!(P_CanPickupItem(player, false)) && !(special->flags2 & MF2_NIGHTSPULL))
|
||||||
return;
|
return false;
|
||||||
|
|
||||||
special->momx = special->momy = special->momz = 0;
|
special->momx = special->momy = special->momz = 0;
|
||||||
P_GivePlayerRings(player, 1);
|
P_GivePlayerRings(player, 1);
|
||||||
|
|
||||||
if ((maptol & TOL_NIGHTS) && special->type != MT_FLINGRING && special->type != MT_FLINGCOIN)
|
if ((maptol & TOL_NIGHTS) && special->type != MT_FLINGRING && special->type != MT_FLINGCOIN)
|
||||||
P_DoNightsScore(player);
|
P_DoNightsScore(player);
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Takes action based on a ::MF_SPECIAL thing touched by a player.
|
/** Takes action based on a ::MF_SPECIAL thing touched by a player.
|
||||||
|
@ -636,7 +638,8 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
case MT_NIGHTSSTAR:
|
case MT_NIGHTSSTAR:
|
||||||
case MT_REDTEAMRING:
|
case MT_REDTEAMRING:
|
||||||
case MT_BLUETEAMRING:
|
case MT_BLUETEAMRING:
|
||||||
P_CollectRing(player, special);
|
if (!P_CollectRing(player, special))
|
||||||
|
return;
|
||||||
break;
|
break;
|
||||||
case MT_BLUESPHERE:
|
case MT_BLUESPHERE:
|
||||||
case MT_FLINGBLUESPHERE:
|
case MT_FLINGBLUESPHERE:
|
||||||
|
|
Loading…
Reference in a new issue