mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-01 06:00:45 +00:00
Merge branch 'char-damage-fix' into 'next'
Fix Amy and Fang being able to attack other players in MP Special Stages See merge request STJr/SRB2!558
This commit is contained in:
commit
aa9cc6e6f2
1 changed files with 18 additions and 0 deletions
|
@ -3426,6 +3426,24 @@ 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;
|
||||
|
||||
if (!cv_friendlyfire.value)
|
||||
{
|
||||
if (inflictor->type == MT_LHRT && !(player->powers[pw_shield] & SH_NOSTACK))
|
||||
{
|
||||
if (player->revitem != MT_LHRT && player->spinitem != MT_LHRT && player->thokitem != MT_LHRT) // Healers do not get to heal other healers.
|
||||
{
|
||||
P_SwitchShield(player, SH_PINK);
|
||||
S_StartSound(player->mo, mobjinfo[MT_PITY_ICON].seesound);
|
||||
}
|
||||
}
|
||||
|
||||
if (source->player->ctfteam == player->ctfteam)
|
||||
return;
|
||||
}
|
||||
|
||||
if (inflictor->type == MT_LHRT)
|
||||
return;
|
||||
|
||||
if (player->powers[pw_shield] || player->bot) //If One-Hit Shield
|
||||
{
|
||||
P_RemoveShield(player);
|
||||
|
|
Loading…
Reference in a new issue