Make bots jump while being swallowed, to make it even harder to eat them. They should...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 9 Jul 2011 15:12:18 +0000 (18:12 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 9 Jul 2011 15:12:18 +0000 (18:12 +0300)
data/qcsrc/server/bot/havocbot/vore_ai.qc

index 8f413af..b8e7d30 100644 (file)
@@ -183,6 +183,12 @@ void Vore_AI()
 // Prey bot behavior:
 // --------------------------------
 
+       // while being swallowed, smart bots know to keep jumping to make it harder to be caught
+       // TODO: Don't do this if the predator is a team mate
+       if(self.swallow_progress_prey)
+       if(self.swallow_progress_prey * 10 >= 10 - skill) // 10 skill steps
+               self.BUTTON_JUMP = TRUE;
+
        if(self.stat_eaten && time > self.decide_prey)
        {
                // all we can do in the stomach is kick and do some damage / try to escape, or leave if the circumstances allow it and we should