Catch occasional problem with docking AI frustration

Requires station to be destroyed at inconvenient time.
This commit is contained in:
cim 2014-07-06 17:28:36 +01:00
parent 4f4edaa859
commit cf4da8cf65

View File

@ -5939,8 +5939,11 @@ PriorityAIController.prototype.responseComponent_docking_shipAchievedDesiredRang
PriorityAIController.prototype.responseComponent_docking_shipAIFrustrated = function()
{
var station = this.getParameter("oolite_dockingStation",null);
station.abortDockingForShip(this.ship);
var station = this.getParameter("oolite_dockingStation");
if (station)
{
station.abortDockingForShip(this.ship);
}
this.communicate("oolite_abortDocking",{},3);
this.setParameter("oolite_dockingStation",null);
this.reconsiderNow();