]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
simplify player/botclip collision cvars
authorRudolf Polzer <divverent@alientrap.org>
Sun, 3 Oct 2010 11:54:01 +0000 (13:54 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Sun, 3 Oct 2010 11:54:01 +0000 (13:54 +0200)
qcsrc/server/cl_client.qc

index 8bfe774241827950685e3b271ec667634e091ae7..c269ce50288ff4c6969aa51f4d795b674aae595a 100644 (file)
@@ -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);