mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-05-10 19:01:50 +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
abdd904ef0
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])
|
if (player->powers[pw_invulnerability] || player->powers[pw_flashing] || player->powers[pw_super])
|
||||||
return;
|
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
|
if (player->powers[pw_shield] || player->bot) //If One-Hit Shield
|
||||||
{
|
{
|
||||||
P_RemoveShield(player);
|
P_RemoveShield(player);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue