Merge pull request #1113 from jkbenaim/fix-spawncube-crash
Doom: don't divide by zero, but call I_Error instead.
This commit is contained in:
commit
b4f996361a
1 changed files with 4 additions and 0 deletions
|
|
@ -1909,6 +1909,10 @@ void A_BrainSpit (mobj_t* mo)
|
|||
|
||||
// shoot a cube at current target
|
||||
targ = braintargets[braintargeton];
|
||||
if (numbraintargets == 0)
|
||||
{
|
||||
I_Error("A_BrainSpit: numbraintargets was 0 (vanilla crashes here)");
|
||||
}
|
||||
braintargeton = (braintargeton+1)%numbraintargets;
|
||||
|
||||
// spawn brain missile
|
||||
|
|
|
|||
Loading…
Reference in a new issue