Added check to make sure pilot was valid when docking with another ship.

This commit is contained in:
Cekis
2018-03-23 16:01:40 -07:00
committed by CekisSWG
parent ebd213c23c
commit c0a19ff0db
+3
View File
@@ -1065,6 +1065,9 @@ public class combat_ship extends script.base_script
public int OnSpaceUnitUnDocked(obj_id self, obj_id target, boolean dockSuccessful) throws InterruptedException
{
obj_id objPilot = getPilotId(self);
if(!isValidId(objPilot) || !exists(objPilot)){
return SCRIPT_CONTINUE;
}
if (!space_utils.isPlayerControlledShip(self))
{
return SCRIPT_CONTINUE;