X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fbot%2Fhavocbot%2Frole_ctf.qc;h=0946f4342582fe7d974db23fbca2fef2579b7fbd;hb=5a80c7ca1221f22c8890c3c144d6a665f807ed83;hp=178ee0da6e8cfe236be697a433ba96a6c4a4cb55;hpb=b41f7ee415c9cc35d6304ca237986a9e445ffd4c;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/bot/havocbot/role_ctf.qc b/qcsrc/server/bot/havocbot/role_ctf.qc index 178ee0da6..0946f4342 100644 --- a/qcsrc/server/bot/havocbot/role_ctf.qc +++ b/qcsrc/server/bot/havocbot/role_ctf.qc @@ -23,7 +23,7 @@ void(float ratingscale, vector org, float sradius) havocbot_goalrating_enemyplay .float havocbot_cantfindflag; .float havocbot_role_timeout; .entity ctf_worldflagnext; -.entity basewaypoint; +.entity bot_basewaypoint; entity ctf_worldflaglist; vector havocbot_ctf_middlepoint; @@ -102,7 +102,7 @@ void havocbot_goalrating_ctf_ourbase(float ratingscale) if not(head) return; - navigation_routerating(head.basewaypoint, ratingscale, 10000); + navigation_routerating(head.bot_basewaypoint, ratingscale, 10000); } void havocbot_goalrating_ctf_enemyflag(float ratingscale) @@ -134,7 +134,7 @@ void havocbot_goalrating_ctf_enemybase(float ratingscale) if not(head) return; - navigation_routerating(head.basewaypoint, ratingscale, 10000); + navigation_routerating(head.bot_basewaypoint, ratingscale, 10000); } void havocbot_goalrating_ctf_ourstolenflag(float ratingscale) @@ -143,7 +143,7 @@ void havocbot_goalrating_ctf_ourstolenflag(float ratingscale) mf = havocbot_ctf_find_flag(self); - if(mf.cnt == FLAG_BASE) + if(mf.ctf_status == FLAG_BASE) return; if(mf.tag_entity) @@ -157,7 +157,7 @@ void havocbot_goalrating_ctf_droppedflags(float ratingscale, vector org, float r while (head) { // flag is out in the field - if(head.cnt != FLAG_BASE) + if(head.ctf_status != FLAG_BASE) if(head.tag_entity==world) // dropped { if(radius) @@ -295,7 +295,7 @@ void havocbot_role_ctf_escort() // If enemy flag is back on the base switch to previous role ef = havocbot_ctf_find_enemy_flag(self); - if(ef.cnt==FLAG_BASE) + if(ef.ctf_status==FLAG_BASE) { self.havocbot_role = self.havocbot_previous_role; self.havocbot_role_timeout = 0; @@ -304,7 +304,7 @@ void havocbot_role_ctf_escort() // If the flag carrier reached the base switch to defense mf = havocbot_ctf_find_flag(self); - if(mf.cnt!=FLAG_BASE) + if(mf.ctf_status!=FLAG_BASE) if(vlen(ef.origin - mf.dropped_origin) < 300) { havocbot_role_ctf_setrole(self, HAVOCBOT_CTF_ROLE_DEFENSE); @@ -359,7 +359,7 @@ void havocbot_role_ctf_offense() ef = havocbot_ctf_find_enemy_flag(self); // Own flag stolen - if(mf.cnt!=FLAG_BASE) + if(mf.ctf_status!=FLAG_BASE) { if(mf.tag_entity) pos = mf.tag_entity.origin; @@ -375,7 +375,7 @@ void havocbot_role_ctf_offense() } // Escort flag carrier - if(ef.cnt!=FLAG_BASE) + if(ef.ctf_status!=FLAG_BASE) { if(ef.tag_entity) pos = ef.tag_entity.origin; @@ -437,7 +437,7 @@ void havocbot_role_ctf_retriever() // If flag is back on the base switch to previous role mf = havocbot_ctf_find_flag(self); - if(mf.cnt==FLAG_BASE) + if(mf.ctf_status==FLAG_BASE) { havocbot_ctf_reset_role(self); return; @@ -484,7 +484,7 @@ void havocbot_role_ctf_middle() } mf = havocbot_ctf_find_flag(self); - if(mf.cnt!=FLAG_BASE) + if(mf.ctf_status!=FLAG_BASE) { havocbot_role_ctf_setrole(self, HAVOCBOT_CTF_ROLE_RETRIEVER); return; @@ -536,7 +536,7 @@ void havocbot_role_ctf_defense() // If own flag was captured mf = havocbot_ctf_find_flag(self); - if(mf.cnt!=FLAG_BASE) + if(mf.ctf_status!=FLAG_BASE) { havocbot_role_ctf_setrole(self, HAVOCBOT_CTF_ROLE_RETRIEVER); return; @@ -635,14 +635,14 @@ void havocbot_ctf_reset_role(entity bot) ef = havocbot_ctf_find_enemy_flag(bot); // Retrieve stolen flag - if(mf.cnt!=FLAG_BASE) + if(mf.ctf_status!=FLAG_BASE) { havocbot_role_ctf_setrole(bot, HAVOCBOT_CTF_ROLE_RETRIEVER); return; } // If enemy flag is taken go to the middle to intercept pursuers - if(ef.cnt!=FLAG_BASE) + if(ef.ctf_status!=FLAG_BASE) { havocbot_role_ctf_setrole(bot, HAVOCBOT_CTF_ROLE_MIDDLE); return;