From 55ce3a236f569db40f18c2abbf2f2f212729590e Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sun, 3 Oct 2010 13:54:01 +0200 Subject: [PATCH] simplify player/botclip collision cvars --- qcsrc/server/cl_client.qc | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 8bfe77424..c269ce502 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -866,20 +866,11 @@ void PutClientInServer (void) self.iscreature = TRUE; self.movetype = MOVETYPE_WALK; self.solid = SOLID_SLIDEBOX; + 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