Added warning when trying to switch to a non-existant AI. Fixed ship inspectors.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2406 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
parent
9c01b00084
commit
26f3650ef6
@ -79,6 +79,7 @@
|
|||||||
ai.invalidFormat.action = inherit;
|
ai.invalidFormat.action = inherit;
|
||||||
ai.unpermittedMethod = $aiError;
|
ai.unpermittedMethod = $aiError;
|
||||||
ai.load = no;
|
ai.load = no;
|
||||||
|
ai.load.failed.unknownAI = $aiError;
|
||||||
ai.invalid.notAStation = $aiError; // Warning when station AI message is used on non-station.
|
ai.invalid.notAStation = $aiError; // Warning when station AI message is used on non-station.
|
||||||
|
|
||||||
|
|
||||||
|
@ -286,25 +286,26 @@ static AI *sCurrentlyRunningAI = nil;
|
|||||||
[stateMachine release]; // release old state machine
|
[stateMachine release]; // release old state machine
|
||||||
stateMachine = [newSM retain];
|
stateMachine = [newSM retain];
|
||||||
nextThinkTime = 0.0; // think at next tick
|
nextThinkTime = 0.0; // think at next tick
|
||||||
|
|
||||||
|
[currentState release];
|
||||||
|
currentState = @"GLOBAL";
|
||||||
|
/* CRASH in objc_msgSend, apparently on [self reactToMessage:@"ENTER"] (1.69, OS X/x86).
|
||||||
|
Analysis: self corrupted. We're being called by __NSFireDelayedPerform, which doesn't go
|
||||||
|
through -[NSObject performSelector:withObject:], suggesting it's using IMP caching. An
|
||||||
|
invalid self is therefore possible.
|
||||||
|
Attempted fix: new delayed dispatch with trampoline, see -[AI setStateMachine:afterDelay:].
|
||||||
|
-- Ahruman, 20070706
|
||||||
|
*/
|
||||||
|
[self reactToMessage:@"ENTER"];
|
||||||
|
|
||||||
|
// refresh name
|
||||||
|
[self refreshOwnerDesc];
|
||||||
|
|
||||||
|
// refresh stateMachineName
|
||||||
|
[stateMachineName release];
|
||||||
|
stateMachineName = [smName copy];
|
||||||
}
|
}
|
||||||
|
|
||||||
[currentState release];
|
|
||||||
currentState = @"GLOBAL";
|
|
||||||
/* CRASH in objc_msgSend, apparently on [self reactToMessage:@"ENTER"] (1.69, OS X/x86).
|
|
||||||
Analysis: self corrupted. We're being called by __NSFireDelayedPerform, which doesn't go
|
|
||||||
through -[NSObject performSelector:withObject:], suggesting it's using IMP caching. An
|
|
||||||
invalid self is therefore possible.
|
|
||||||
Attempted fix: new delayed dispatch with trampoline, see -[AI setStateMachine:afterDelay:].
|
|
||||||
-- Ahruman, 20070706
|
|
||||||
*/
|
|
||||||
[self reactToMessage:@"ENTER"];
|
|
||||||
|
|
||||||
// refresh name
|
|
||||||
[self refreshOwnerDesc];
|
|
||||||
|
|
||||||
// refresh stateMachineName
|
|
||||||
[stateMachineName release];
|
|
||||||
stateMachineName = [smName copy];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -729,6 +730,7 @@ static AI *sCurrentlyRunningAI = nil;
|
|||||||
if (newSM == nil)
|
if (newSM == nil)
|
||||||
{
|
{
|
||||||
[cacheMgr setObject:@"nil" forKey:smName inCache:@"AIs"];
|
[cacheMgr setObject:@"nil" forKey:smName inCache:@"AIs"];
|
||||||
|
OOLog(@"ai.load.failed.unknownAI", @"Can't switch AI from %@:%@ to %@ - could not load file.", [self name], [self state], smName);
|
||||||
NS_VALUERETURN(nil, NSDictionary *);
|
NS_VALUERETURN(nil, NSDictionary *);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3600,7 +3600,7 @@ static GLfloat mascem_color2[4] = { 0.4, 0.1, 0.4, 1.0}; // purple
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if NDEBUG
|
#ifndef NDEBUG
|
||||||
- (OOShipGroup *) rawEscortGroup
|
- (OOShipGroup *) rawEscortGroup
|
||||||
{
|
{
|
||||||
return _escortGroup;
|
return _escortGroup;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user