]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Implement botclip common shader. Bot clips can now be used to block bots from specifi...
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 3 Oct 2010 11:18:12 +0000 (14:18 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 3 Oct 2010 11:18:12 +0000 (14:18 +0300)
defaultXonotic.cfg
qcsrc/server/cl_client.qc

index 5b69cb0a90e271e16f11c6e15758ff7752bd8acb..2e535c3955e0fce1447afe3d4cb7db238ebaf014 100644 (file)
@@ -521,6 +521,7 @@ set g_player_brightness 0   "set to 2 for brighter players"
 seta g_balance_cloaked_alpha 0.25
 
 set g_playerclip_collisions 1 "0 = disable collision testing against playerclips, might be useful on some defrag maps"
+set g_botclip_collisions 1 "0 = disable collision testing against botclips, might be useful on some defrag maps"
 
 set welcome_message_time 8
 
index 36606dec70f687a841506e553ffbba6da539816b..8bfe774241827950685e3b271ec667634e091ae7 100644 (file)
@@ -867,9 +867,19 @@ void PutClientInServer (void)
                self.movetype = MOVETYPE_WALK;
                self.solid = SOLID_SLIDEBOX;
                if(cvar("g_playerclip_collisions"))
-                       self.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_PLAYERCLIP;
+               {
+                       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
-                       self.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY;
+               {
+                       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.frags = FRAGS_PLAYER;
                if(independent_players)
                        MAKE_INDEPENDENT_PLAYER(self);