Don't stomp on shrunken teammates unless friendly fire is enabled.

Patch from Striker.

git-svn-id: https://svn.eduke32.com/eduke32@6579 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2018-01-15 17:46:25 +00:00
parent 8fa438dc0b
commit fcd9238a67

View file

@ -1237,6 +1237,12 @@ ACTOR_STATIC void G_MovePlayers(void)
if (pSprite->yrepeat > 32 && sprite[g_player[otherp].ps->i].yrepeat < 32) if (pSprite->yrepeat > 32 && sprite[g_player[otherp].ps->i].yrepeat < 32)
{ {
if (otherPlayerDist < 1400 && pPlayer->knee_incs == 0) if (otherPlayerDist < 1400 && pPlayer->knee_incs == 0)
{
// Don't stomp teammates.
if (
((g_gametypeFlags[ud.coop] & GAMETYPE_TDM) && pPlayer->team != g_player[otherp].ps->team) ||
(!(g_gametypeFlags[ud.coop] & GAMETYPE_PLAYERSFRIENDLY) && !(g_gametypeFlags[ud.coop] & GAMETYPE_TDM))
)
{ {
pPlayer->knee_incs = 1; pPlayer->knee_incs = 1;
pPlayer->weapon_pos = -1; pPlayer->weapon_pos = -1;
@ -1245,6 +1251,7 @@ ACTOR_STATIC void G_MovePlayers(void)
} }
} }
} }
}
if (ud.god) if (ud.god)
{ {