mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-09-11 22:45:06 -04:00
Added try/catch when trying to set ship capacitor energy fails.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user