From 74fc45d7b7f20f40e78ada6f3016366714edcab4 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 16 Jul 2016 15:39:57 +0300 Subject: [PATCH] Fixed instant boss brain spawning There was a possibility of division by zero which led to nonsensical spawn time http://forum.zdoom.org/viewtopic.php?t=52760 --- src/g_doom/a_bossbrain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/g_doom/a_bossbrain.cpp b/src/g_doom/a_bossbrain.cpp index 51ee77ff80..5d10e01382 100644 --- a/src/g_doom/a_bossbrain.cpp +++ b/src/g_doom/a_bossbrain.cpp @@ -147,7 +147,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_BrainSpit) { spit->special2 = 0; } - else if (fabs(spit->Vel.X) > fabs(spit->Vel.Y)) + else if (fabs(spit->Vel.Y) > fabs(spit->Vel.X)) { spit->special2 = int((targ->Y() - self->Y()) / spit->Vel.Y); }