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

@ -1238,9 +1238,16 @@ ACTOR_STATIC void G_MovePlayers(void)
{
if (otherPlayerDist < 1400 && pPlayer->knee_incs == 0)
{
pPlayer->knee_incs = 1;
pPlayer->weapon_pos = -1;
pPlayer->actorsqu = g_player[otherp].ps->i;
// 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->weapon_pos = -1;
pPlayer->actorsqu = g_player[otherp].ps->i;
}
}
}
}