Added try/catch when trying to set ship capacitor energy fails.

This commit is contained in:
Cekis
2017-02-03 01:06:57 +00:00
parent 80619055e1
commit ae09f64fd7
@@ -1486,7 +1486,12 @@ public class space_combat extends script.base_script
{
fltCurrentEnergy = fltCurrentEnergy - fltEnergy;
}
setShipCapacitorEnergyCurrent(objShip, fltCurrentEnergy);
try {
setShipCapacitorEnergyCurrent(objShip, fltCurrentEnergy);
}
catch(Exception e){
return false;
}
return true;
}
public static boolean drainEnergyFromShield(obj_id objShip, int intSide, float fltEnergy, boolean boolOverride) throws InterruptedException