Vore AI: Teach bots some manners - Don't eat players who are chatting
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Fri, 3 Sep 2010 21:46:22 +0000 (00:46 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Fri, 3 Sep 2010 21:46:22 +0000 (00:46 +0300)
data/qcsrc/server/bot/havocbot/vore_ai.qc

index c0b7f547d94f8cd8c0bc088567427743ede4f99b..0e51b841c08da0c7e046aa34803fa70f6754630c 100644 (file)
@@ -15,7 +15,7 @@ entity Swallow_distance_check_bot(entity e)
 float Swallow_condition_check_bot(entity prey)
 {
        // checks the necessary conditions for a bot to swallow another player
-       if(prey != self && prey.classname == "player" && prey.eater.classname != "player" && prey.deadflag == DEAD_NO) // we can't swallow someone who's already in someone else's stomach
+       if(prey != self && prey.classname == "player" && prey.eater.classname != "player" && prey.deadflag == DEAD_NO && !prey.BUTTON_CHAT) // we can't swallow someone who's already in someone else's stomach
        if(self.eater.classname != "player" && self.stomach_load < cvar("g_balance_vore_swallow_limit")) // we can't swallow players while inside someone's stomach ourselves
        if not(cvar("g_vore_biggergut") && prey.stomach_load > self.stomach_load)
        if(self.health > cvar("g_balance_vore_kick_damage_max")) // explained below