Fix serialisation crash when patrolling.
6778fc4ea6
introduced waiting at the patrol points, but it was possible that at such a point an enemy was noticed, thus quiting the "look around" state, deleting `this.stopSurveying`, which was later `++`-ed. That lead to an `NaN` property which got serialised. `NaN` serialisation crashes as of0e7fafebe1
. Differential revision: https://code.wildfiregames.com/D4177 Reported in: https://wildfiregames.com/forum/topic/41264-alpha-25-pre-releaserelease-candidate-build-testing/page/4/?tab=comments#comment-435709 Reviewed by: @wraitii This was SVN commit r25804.
This commit is contained in:
parent
17c54d5a69
commit
8c7d77a610
@ -1116,8 +1116,8 @@ UnitAI.prototype.UnitFsmSpec = {
|
||||
this.FinishOrder();
|
||||
return;
|
||||
}
|
||||
this.FindWalkAndFightTargets();
|
||||
++this.stopSurveying;
|
||||
if (!this.FindWalkAndFightTargets())
|
||||
++this.stopSurveying;
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -1819,8 +1819,8 @@ UnitAI.prototype.UnitFsmSpec = {
|
||||
this.FinishOrder();
|
||||
return;
|
||||
}
|
||||
this.FindWalkAndFightTargets();
|
||||
++this.stopSurveying;
|
||||
if (!this.FindWalkAndFightTargets())
|
||||
++this.stopSurveying;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user