- experimentel, harder hardMisileAI. Does not explode when target cloaks, but instead travels to the spot were target cloaked.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4872 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
Eric Walch 2012-04-21 19:52:36 +00:00
parent d9dd8ad3f9
commit 4038d0a9ec
2 changed files with 12 additions and 1 deletions

View File

@ -14,10 +14,21 @@
"DESIRED_RANGE_ACHIEVED" = ("setStateTo: DETONATE");
"TARGET_DESTROYED" = ("setStateTo: EXPLODE");
"TARGET_LOST" = ("setStateTo: EXPLODE");
"TARGET_CLOAKED" = ("setStateTo: FLY_AHEAD");
"GONE_BEYOND_RANGE" = ("setStateTo: EXPLODE");
ECM = ("setStateTo: CHECK_EXPLOSION");
UPDATE = ("setDesiredRangeTo: 30000.0", checkDistanceTravelled, "setDesiredRangeTo: 25.0", "pauseAI: 5.0");
};
"FLY_AHEAD" =
{
ENTER = (setDestinationToTarget, "setSpeedFactorTo: 1", "setThrustFactorTo: 0", performFlyToRangeFromDestination);
"DESIRED_RANGE_ACHIEVED" = ("setStateTo: DETONATE");
"GONE_BEYOND_RANGE" = ("setStateTo: EXPLODE");
ECM = ("rollD: 40");
"ROLL_1" = ("setStateTo: DETONATE");
"ROLL_2" = ("setStateTo: EXPLODE");
UPDATE = ("setDesiredRangeTo: 30000.0", checkDistanceTravelled, "setDesiredRangeTo: 175.0", "pauseAI: 0.5");
};
DETONATE =
{
ENTER = ("sendScriptMessage: detonate");

View File

@ -6884,7 +6884,7 @@ static NSString *last_outfitting_key=nil;
//unsigned passenger_space = [[OOEquipmentType equipmentTypeWithIdentifier:@"EQ_PASSENGER_BERTH"] requiredCargoSpace];
//if (passenger_space == 0) passenger_space = PASSENGER_BERTH_SPACE;
if ([eqKey isEqualToString:@"EQ_PASSENGER_BERTH"] && cargoSpace < PASSENGER_BERTH_SPACE)
if ([eqKey isEqualToString:@"EQ_PASSENGER_BERTH"] && [self availableCargoSpace] < PASSENGER_BERTH_SPACE)
{
return NO;
}