From 727427a7825313a3801a14451e36281712953af5 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Sun, 3 Oct 2010 16:02:19 +0300 Subject: [PATCH] simplify player/botclip collision cvars --- data/qcsrc/server/cl_client.qc | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/data/qcsrc/server/cl_client.qc b/data/qcsrc/server/cl_client.qc index b664ba35..26021e44 100644 --- a/data/qcsrc/server/cl_client.qc +++ b/data/qcsrc/server/cl_client.qc @@ -835,20 +835,11 @@ void PutClientInServer (void) self.solid = SOLID_SLIDEBOX; else self.solid = SOLID_CORPSE; + self.dphitcontentsmask = DPCONTENTS_BODY | DPCONTENTS_SOLID; if(cvar("g_playerclip_collisions")) - { - if(clienttype(self) == CLIENTTYPE_BOT && cvar("g_botclip_collisions")) - self.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_PLAYERCLIP | DPCONTENTS_BOTCLIP; - else - self.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_PLAYERCLIP; - } - else - { - if(clienttype(self) == CLIENTTYPE_BOT && cvar("g_botclip_collisions")) - self.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_BOTCLIP; - else - self.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY; - } + self.dphitcontentsmask |= DPCONTENTS_PLAYERCLIP; + if(clienttype(self) == CLIENTTYPE_BOT && cvar("g_botclip_collisions")) + self.dphitcontentsmask |= DPCONTENTS_BOTCLIP; self.frags = FRAGS_PLAYER; if(independent_players) MAKE_INDEPENDENT_PLAYER(self); -- 2.39.2