From: Mircea Kitsune Date: Sun, 3 Oct 2010 11:18:12 +0000 (+0300) Subject: Implement botclip common shader. Bot clips can now be used to block bots from specifi... X-Git-Tag: xonotic-v0.1.0preview~282^2~8 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=154f87cbb2b6ea1eaef8b12ee364f409bf244323;p=xonotic%2Fxonotic-data.pk3dir.git Implement botclip common shader. Bot clips can now be used to block bots from specific areas of a map. The common shader should be restored with this change too. --- diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index 5b69cb0a9..2e535c395 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -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 diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 36606dec7..8bfe77424 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -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);