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
This commit is contained in:
alexey.lysiuk 2016-07-16 15:39:57 +03:00
parent b121284fc0
commit 74fc45d7b7
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}