From fcd9238a67eb4c244e1444ee3e3f91f744b124c4 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Mon, 15 Jan 2018 17:46:25 +0000 Subject: [PATCH] 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 --- source/duke3d/src/actors.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/source/duke3d/src/actors.cpp b/source/duke3d/src/actors.cpp index b3f254fcc..7e6002428 100644 --- a/source/duke3d/src/actors.cpp +++ b/source/duke3d/src/actors.cpp @@ -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; + } } } }