only missiles with scanClass CLASS_MISSILE send the "INCOMING_MISSILE" warning
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@330 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
parent
c0778c523f
commit
bc4cf74a94
@ -5676,10 +5676,14 @@ Vector randomPositionInBoundingBox(BoundingBox bb)
|
||||
[missile setStatus: STATUS_IN_FLIGHT]; // necessary to get it going!
|
||||
//
|
||||
[universe addEntity: missile];
|
||||
//
|
||||
[missile release]; //release
|
||||
|
||||
[(ShipEntity *)target setPrimaryAggressor:self];
|
||||
[[(ShipEntity *)target getAI] reactToMessage:@"INCOMING_MISSILE"];
|
||||
if ([missile scanClass] == CLASS_MISSILE)
|
||||
{
|
||||
[(ShipEntity *)target setPrimaryAggressor:self];
|
||||
[[(ShipEntity *)target getAI] reactToMessage:@"INCOMING_MISSILE"];
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user