From 6ec3623835a70cae06a2a3621b50aacbffaf8f82 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Sun, 3 Oct 2010 14:08:34 +0300 Subject: [PATCH] Implement botclip collisions --- data/defaultVoretournament.cfg | 1 + data/qcsrc/server/cl_client.qc | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/data/defaultVoretournament.cfg b/data/defaultVoretournament.cfg index 8794ca81..0b85716f 100644 --- a/data/defaultVoretournament.cfg +++ b/data/defaultVoretournament.cfg @@ -440,6 +440,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" // a cruel way to fix some "falling forever" situations (eg. facing horizontal warpzones) set g_deathspeed 6000 "players going faster than this will die" diff --git a/data/qcsrc/server/cl_client.qc b/data/qcsrc/server/cl_client.qc index 9035c586..b664ba35 100644 --- a/data/qcsrc/server/cl_client.qc +++ b/data/qcsrc/server/cl_client.qc @@ -836,9 +836,19 @@ void PutClientInServer (void) else self.solid = SOLID_CORPSE; 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); -- 2.39.2