- Fixed bug in the oxp-Verifyer not recognizing 'escorts' in shipdata.

- energy now won't get negative on long update intervals with active cloak. e.g. on exiting a wormhole.
 (should probably fully switched of during jumping)
- ported player inactive cloak behavior to npc cloak.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4653 127b21dd-08f5-0310-b4b7-95ae10353056
master
Eric Walch 2011-11-17 17:27:04 +00:00
parent f94f13904f
commit 35ac9b3239
2 changed files with 6 additions and 11 deletions

View File

@ -93,6 +93,7 @@
escort-role = "$shipRole";
escort_ship = "$shipKey";
escort-ship = "$shipKey";
escorts = "positiveInteger";
missile_launch_position = "vector";
missile_load_time = "positiveFloat";
missile_role = "$shipRole";

View File

@ -1871,18 +1871,9 @@ ShipEntity* doOctreesCollide(ShipEntity* prime, ShipEntity* other)
{
energy -= delta_t * CLOAKING_DEVICE_ENERGY_RATE;
if (energy < CLOAKING_DEVICE_MIN_ENERGY)
{
[self deactivateCloakingDevice];
}
else
{
if (energy < maxEnergy)
{
energy += delta_t * CLOAKING_DEVICE_ENERGY_RATE;
if (energy > maxEnergy)
{
energy = maxEnergy;
[shipAI message:@"ENERGY_FULL"];
}
if (energy < 0) energy = 0;
}
}
}
@ -1894,7 +1885,10 @@ ShipEntity* doOctreesCollide(ShipEntity* prime, ShipEntity* other)
{
energy -= delta_t * MILITARY_JAMMER_ENERGY_RATE;
if (energy < MILITARY_JAMMER_MIN_ENERGY)
{
military_jammer_active = NO;
if (energy < 0) energy = 0;
}
}
else
{