]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
simplify player/botclip collision cvars
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 3 Oct 2010 13:02:19 +0000 (16:02 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 3 Oct 2010 13:02:19 +0000 (16:02 +0300)
data/qcsrc/server/cl_client.qc

index b664ba357af3538b2ab39825734b7dd0d4266fdf..26021e448bb2567767223b6bd83471a1a667a7b8 100644 (file)
@@ -835,20 +835,11 @@ void PutClientInServer (void)
                        self.solid = SOLID_SLIDEBOX;\r
                else\r
                        self.solid = SOLID_CORPSE;\r
+               self.dphitcontentsmask = DPCONTENTS_BODY | DPCONTENTS_SOLID;\r
                if(cvar("g_playerclip_collisions"))\r
-               {\r
-                       if(clienttype(self) == CLIENTTYPE_BOT && cvar("g_botclip_collisions"))\r
-                               self.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_PLAYERCLIP | DPCONTENTS_BOTCLIP;\r
-                       else\r
-                               self.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_PLAYERCLIP;\r
-               }\r
-               else\r
-               {\r
-                       if(clienttype(self) == CLIENTTYPE_BOT && cvar("g_botclip_collisions"))\r
-                               self.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_BOTCLIP;\r
-                       else\r
-                               self.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY;\r
-               }\r
+                       self.dphitcontentsmask |= DPCONTENTS_PLAYERCLIP;\r
+               if(clienttype(self) == CLIENTTYPE_BOT && cvar("g_botclip_collisions"))\r
+                       self.dphitcontentsmask |= DPCONTENTS_BOTCLIP;\r
                self.frags = FRAGS_PLAYER;\r
                if(independent_players)\r
                        MAKE_INDEPENDENT_PLAYER(self);\r