Fixed unmarkSystem crash. Made ship AI send a beingAttacked message to scripts when a missile is fired against ship.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1321 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
parent
2175f6add3
commit
4d4ff0de25
@ -460,11 +460,14 @@ MA 02110-1301, USA.
|
||||
return;
|
||||
|
||||
[self addTarget:missile];
|
||||
|
||||
// Notify own ship script that we are being attacked.
|
||||
ShipEntity *hunter = [missile owner];
|
||||
[self doScriptEvent:@"beingAttacked" withArgument:hunter];
|
||||
|
||||
if (has_ecm)
|
||||
{
|
||||
// use the ECM and battle on
|
||||
ShipEntity *hunter = [missile owner];
|
||||
|
||||
[self setPrimaryAggressor:hunter]; // lets get them now for that!
|
||||
found_target = primaryAggressor;
|
||||
|
@ -257,7 +257,7 @@ static JSBool MissionUnmarkSystem(JSContext *context, JSObject *obj, uintN argc,
|
||||
PlayerEntity *player = OOPlayerForScripting();
|
||||
NSString *params = nil;
|
||||
|
||||
player = [NSString concatenationOfStringsFromJavaScriptValues:argv count:argc separator:@" " inContext:context];
|
||||
params = [NSString concatenationOfStringsFromJavaScriptValues:argv count:argc separator:@" " inContext:context];
|
||||
[player removeMissionDestination:params];
|
||||
|
||||
return YES;
|
||||
|
Loading…
x
Reference in New Issue
Block a user