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

This commit is contained in:
Cekis
2018-03-23 16:02:17 -07:00
committed by CekisSWG
parent ffcc69f7fa
commit 43b0f3c872
@@ -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