]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/bot/havocbot/vore_ai.qc
Base it on skill
[voretournament/voretournament.git] / data / qcsrc / server / bot / havocbot / vore_ai.qc
index e4138c50e9bdac7fb22bc04b89da31e4d882a579..11ef8380c6952eb74300e4c62c903035756e1d30 100644 (file)
@@ -32,10 +32,11 @@ void Vore_AI_Teamheal(entity prey)
 
        // if a teamheal is ongoing, decide whether or not to abandon it when seeing a foe that we can attack instead
        // this only causes the bot to regurgitate their team mate when seeing an enemy, with the hope that this enemy will still be there once we can swallow again
+       // the higher the skill, the greater the chance a bot will abandon a team heal for an enemy
        if(self.status_teamhealing > 1)
        if(Swallow_condition_check_bot(prey))
        if(prey.team != self.team)
-       if(random() < cvar("bot_ai_vore_decide_teamhealabandon"))
+       if(random() * 10 < cvar("bot_ai_vore_decide_teamhealabandon") * skill) // there are 10 bot skill steps
                self.BUTTON_REGURGITATE = TRUE; // release the team mate
 
        entity head;