Fix Amy and Fang being able to attack other players in MP Special Stages

This commit is contained in:
Steel Titanium 2019-12-20 23:22:45 -05:00
parent 4029167a57
commit ace202daf0

View file

@ -3426,6 +3426,17 @@ void P_SpecialStageDamage(player_t *player, mobj_t *inflictor, mobj_t *source)
if (player->powers[pw_invulnerability] || player->powers[pw_flashing] || player->powers[pw_super])
return;
// Don't allow players to hurt one another,
// unless cv_friendlyfire is on.
if (!cv_friendlyfire.value)
{
if (inflictor->type == MT_LHRT)
return;
if (source->player->ctfteam == player->ctfteam)
return;
}
if (player->powers[pw_shield] || player->bot) //If One-Hit Shield
{
P_RemoveShield(player);