From: Rudolf Polzer Date: Sun, 3 Oct 2010 11:54:01 +0000 (+0200) Subject: simplify player/botclip collision cvars X-Git-Tag: xonotic-v0.1.0preview~282^2~5 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=55ce3a236f569db40f18c2abbf2f2f212729590e;p=xonotic%2Fxonotic-data.pk3dir.git simplify player/botclip collision cvars --- 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);