]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Implement botclip collisions
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 3 Oct 2010 11:08:34 +0000 (14:08 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 3 Oct 2010 11:08:34 +0000 (14:08 +0300)
data/defaultVoretournament.cfg
data/qcsrc/server/cl_client.qc

index 8794ca814b19818de2c4152360383f7c517f2fa2..0b85716fecd779ed067337686bae77d7305f6403 100644 (file)
@@ -440,6 +440,7 @@ set g_player_brightness 0   "set to 2 for brighter players"
 seta g_balance_cloaked_alpha 0.25\r
 \r
 set g_playerclip_collisions 1 "0 = disable collision testing against playerclips, might be useful on some defrag maps"\r
+set g_botclip_collisions 1 "0 = disable collision testing against botclips, might be useful on some defrag maps"\r
 \r
 // a cruel way to fix some "falling forever" situations (eg. facing horizontal warpzones)\r
 set g_deathspeed 6000 "players going faster than this will die"\r
index 9035c5861635c0c8cd9dbb05351a4049184eaaa9..b664ba357af3538b2ab39825734b7dd0d4266fdf 100644 (file)
@@ -836,9 +836,19 @@ void PutClientInServer (void)
                else\r
                        self.solid = SOLID_CORPSE;\r
                if(cvar("g_playerclip_collisions"))\r
-                       self.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_PLAYERCLIP;\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
-                       self.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY;\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.frags = FRAGS_PLAYER;\r
                if(independent_players)\r
                        MAKE_INDEPENDENT_PLAYER(self);\r