From: MirceaKitsune Date: Sun, 3 Oct 2010 13:02:19 +0000 (+0300) Subject: simplify player/botclip collision cvars X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=727427a7825313a3801a14451e36281712953af5;p=voretournament%2Fvoretournament.git simplify player/botclip collision cvars --- 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);