]> git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Fix a bug causing the bot AI to get stuck at high skill levels after voring.
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 7 Jul 2011 23:14:24 +0000 (02:14 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 7 Jul 2011 23:14:24 +0000 (02:14 +0300)
data/qcsrc/server/bot/havocbot/havocbot.qc
data/qcsrc/server/bot/havocbot/vore_ai.qc

index 95c4e95dac28d0bdf125e0b4ee9bca7ad8b618db..570fe7eb1de34fde977f52a4a8aca82f9dc4443c 100644 (file)
@@ -16,8 +16,6 @@ void havocbot_ai()
 
        // execute the vore AI for bots
        Vore_AI();
-       if(self.stat_eaten)
-               return; // an eaten bot has nothing to do outside of the vore AI
 
        if (bot_strategytoken == self)
        if (!bot_strategytoken_taken)
@@ -83,6 +81,8 @@ void havocbot_ai()
 
        if(self.deadflag != DEAD_NO)
                return;
+       if(self.stat_eaten)
+               return; // a prey bot has nothing to do from here on
 
        havocbot_chooseenemy();
        if (self.bot_chooseweapontime < time )
index 1d4b08a80162489daa6bcbece5fe0503ccdd88a5..306107551d3c301dd64ab4ac0f0478392c0cffae 100644 (file)
@@ -87,7 +87,7 @@ void Vore_AI()
 
        if(!cvar("g_vore")) // the vore system is disabled
                return;
-       if(cvar("bot_nofire") || !skill || (g_rpg && cvar("g_rpg_botattack") < 1))
+       if(self.deadflag != DEAD_NO || cvar("bot_nofire") || !skill || (g_rpg && cvar("g_rpg_botattack") < 1))
                return;
 
        float randomtry;