]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/bot/havocbot/vore_ai.qc
Fix the worst cases of divisions by zero
[voretournament/voretournament.git] / data / qcsrc / server / bot / havocbot / vore_ai.qc
index c308e27aa2578bd4da62f96a5da4887f7b91dbf8..729bd3c030954ba5d3eef86d2c98ac394767e77a 100644 (file)
@@ -138,7 +138,7 @@ void Vore_AI()
                if(self.status_teamhealing > 1) // if we are teamhealing, there's nothing to do from here on
                        return;
 
-               if(!cvar("g_vore_reversescoring")) // when reverse scoring is on, it's in the interest of the prey to get eaten, so the predator has nothing to fear
+               if(prey.classname == "player" && !cvar("g_vore_reversescoring")) // when reverse scoring is on, it's in the interest of the prey to get eaten, so the predator has nothing to fear
                {
                        if(skill >= 3) // make bots aware of this from skill 3 and up
                                fear *= 1 + self.stomach_load / self.stomach_maxload; // the bigger our stomach, the less we want to put someone else in there