From a64d2ee6b5ac91b11c14b0e77954585c515a4caa Mon Sep 17 00:00:00 2001 From: Jens Ayton Date: Fri, 5 Oct 2012 20:58:31 +0000 Subject: [PATCH] Minor cleanup. git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5396 127b21dd-08f5-0310-b4b7-95ae10353056 --- src/Core/Entities/ShipEntity.m | 7 +++++-- src/Core/Entities/ShipEntityAI.m | 10 +++++----- src/Core/Universe.m | 8 +++++--- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/Core/Entities/ShipEntity.m b/src/Core/Entities/ShipEntity.m index 2b4b0ae4..d140a249 100644 --- a/src/Core/Entities/ShipEntity.m +++ b/src/Core/Entities/ShipEntity.m @@ -12116,7 +12116,7 @@ static BOOL AuthorityPredicate(Entity *entity, void *parameter) } -- (void) sendExpandedMessage:(NSString *) message_text toShip:(ShipEntity*) other_ship +- (void) sendExpandedMessage:(NSString *)message_text toShip:(ShipEntity *)other_ship { if (!other_ship || !crew) return; // nobody to receive or send the signal @@ -12127,7 +12127,10 @@ static BOOL AuthorityPredicate(Entity *entity, void *parameter) double d2 = distance2(position, [other_ship position]); if (d2 > scannerRange * scannerRange) - return; // out of comms range + { + // out of comms range + return; + } NSMutableString *localExpandedMessage = [NSMutableString stringWithString:message_text]; [localExpandedMessage replaceOccurrencesOfString:@"[self:name]" diff --git a/src/Core/Entities/ShipEntityAI.m b/src/Core/Entities/ShipEntityAI.m index 76686db7..8f956ad5 100644 --- a/src/Core/Entities/ShipEntityAI.m +++ b/src/Core/Entities/ShipEntityAI.m @@ -210,11 +210,11 @@ - (void) checkForMotherStation; -- (void) sendTargetCommsMessage:(NSString *) message; +- (void) sendTargetCommsMessage:(NSString *)message; - (void) markTargetForFines; -- (void) markTargetForOffence:(NSString *) valueString; +- (void) markTargetForOffence:(NSString *)valueString; - (void) storeTarget; - (void) recallStoredTarget; @@ -227,7 +227,7 @@ - (void) requestNewTarget; -- (void) rollD:(NSString *) die_number; +- (void) rollD:(NSString *)die_number; - (void) scanForNearestShipWithPrimaryRole:(NSString *)scanRole; - (void) scanForNearestShipHavingRole:(NSString *)scanRole; @@ -1952,7 +1952,7 @@ } -- (void) markTargetForOffence:(NSString*) valueString +- (void) markTargetForOffence:(NSString *)valueString { if ((isStation)||(scanClass == CLASS_POLICE)) { @@ -2121,7 +2121,7 @@ } -- (void) rollD:(NSString*) die_number +- (void) rollD:(NSString *)die_number { int die_sides = [die_number intValue]; if (die_sides > 0) diff --git a/src/Core/Universe.m b/src/Core/Universe.m index 7b8aafb5..1a0fcd8f 100644 --- a/src/Core/Universe.m +++ b/src/Core/Universe.m @@ -2400,11 +2400,11 @@ GLfloat docked_light_specular[4] = { DOCKED_ILLUM_LEVEL, DOCKED_ILLUM_LEVEL, DOC } -- (void) setupIntroFirstGo: (BOOL) justCobra +- (void) setupIntroFirstGo:(BOOL)justCobra { PlayerEntity *player = PLAYER; ShipEntity *ship = nil; - Quaternion q2 = { (GLfloat)0.0f, (GLfloat)0.0f, (GLfloat)1.0f, (GLfloat)0.0f }; // w,x,y,z + Quaternion q2 = { 0.0f, 0.0f, 1.0f, 0.0f }; // w,x,y,z // in status demo draw ships and display text if (!justCobra) @@ -4340,7 +4340,7 @@ static BOOL MaintainLinkedLists(Universe *uni) if (!(p0->isPlayer)) { OOLog(kOOLogInconsistentState, @"***** First entity is not the player in Universe.removeAllEntitiesExceptPlayer - exiting."); - exit(1); + exit(EXIT_FAILURE); } #endif @@ -6702,11 +6702,13 @@ static NSDictionary *sCachedSystemData = nil; } } + - (NSString *) getSystemName:(Random_Seed)s_seed { return [[self generateSystemData:s_seed] oo_stringForKey:KEY_NAME]; } + - (OOGovernmentID) getSystemGovernment:(Random_Seed)s_seed { return [[self generateSystemData:s_seed] oo_unsignedCharForKey:KEY_GOVERNMENT];