mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 15:02:39 +00:00
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:
parent
b121284fc0
commit
74fc45d7b7
1 changed files with 1 additions and 1 deletions
|
@ -147,7 +147,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_BrainSpit)
|
||||||
{
|
{
|
||||||
spit->special2 = 0;
|
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);
|
spit->special2 = int((targ->Y() - self->Y()) / spit->Vel.Y);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue