Attempt to fix bug whereby many ships leave the station with the wrong AI. See also http://www.aegidian.org/bb/viewtopic.php?t=4543

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1598 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
Nikos Barkas 2008-04-29 17:49:09 +00:00
parent 5a84f7600b
commit fa3c4ed3c3

View File

@ -1049,6 +1049,9 @@ static NSDictionary* instructions(int station_id, Vector coords, float speed, fl
ShipEntity *se=(ShipEntity *)[launchQueue objectAtIndex:0];
[self launchShip:se];
//OOLog(@"launchqueue.objectDump", @":::::: ai name: %@ ship name: %@ - %@ ::::::", [[se getAI] name], [se displayName], [se groupID] == universalID ? @"defender" : @"civilian" );
#if 0
// This code is most likely causing many ships to leave the station with the wrong AI
// (route1PatrolAi.plist). Disabling it for now - Nikos
if([se groupID] == universalID) //defender - might have lost its state machine while queueing...
{
if ([se hasPrimaryRole:@"pirate"])
@ -1056,6 +1059,7 @@ static NSDictionary* instructions(int station_id, Vector coords, float speed, fl
else
[se setAITo:@"route1PatrolAI.plist"];
}
#endif
[launchQueue removeObjectAtIndex:0];
}
if (([launchQueue count] == 0)&&(no_docking_while_launching))