Minor cleanup.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5396 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
Jens Ayton 2012-10-05 20:58:31 +00:00
parent 334fd0a5ac
commit a64d2ee6b5
3 changed files with 15 additions and 10 deletions

View File

@ -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) if (!other_ship || !crew)
return; // nobody to receive or send the signal 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]); double d2 = distance2(position, [other_ship position]);
if (d2 > scannerRange * scannerRange) if (d2 > scannerRange * scannerRange)
return; // out of comms range {
// out of comms range
return;
}
NSMutableString *localExpandedMessage = [NSMutableString stringWithString:message_text]; NSMutableString *localExpandedMessage = [NSMutableString stringWithString:message_text];
[localExpandedMessage replaceOccurrencesOfString:@"[self:name]" [localExpandedMessage replaceOccurrencesOfString:@"[self:name]"

View File

@ -210,11 +210,11 @@
- (void) checkForMotherStation; - (void) checkForMotherStation;
- (void) sendTargetCommsMessage:(NSString *) message; - (void) sendTargetCommsMessage:(NSString *)message;
- (void) markTargetForFines; - (void) markTargetForFines;
- (void) markTargetForOffence:(NSString *) valueString; - (void) markTargetForOffence:(NSString *)valueString;
- (void) storeTarget; - (void) storeTarget;
- (void) recallStoredTarget; - (void) recallStoredTarget;
@ -227,7 +227,7 @@
- (void) requestNewTarget; - (void) requestNewTarget;
- (void) rollD:(NSString *) die_number; - (void) rollD:(NSString *)die_number;
- (void) scanForNearestShipWithPrimaryRole:(NSString *)scanRole; - (void) scanForNearestShipWithPrimaryRole:(NSString *)scanRole;
- (void) scanForNearestShipHavingRole:(NSString *)scanRole; - (void) scanForNearestShipHavingRole:(NSString *)scanRole;
@ -1952,7 +1952,7 @@
} }
- (void) markTargetForOffence:(NSString*) valueString - (void) markTargetForOffence:(NSString *)valueString
{ {
if ((isStation)||(scanClass == CLASS_POLICE)) 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]; int die_sides = [die_number intValue];
if (die_sides > 0) if (die_sides > 0)

View File

@ -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; PlayerEntity *player = PLAYER;
ShipEntity *ship = nil; 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 // in status demo draw ships and display text
if (!justCobra) if (!justCobra)
@ -4340,7 +4340,7 @@ static BOOL MaintainLinkedLists(Universe *uni)
if (!(p0->isPlayer)) if (!(p0->isPlayer))
{ {
OOLog(kOOLogInconsistentState, @"***** First entity is not the player in Universe.removeAllEntitiesExceptPlayer - exiting."); OOLog(kOOLogInconsistentState, @"***** First entity is not the player in Universe.removeAllEntitiesExceptPlayer - exiting.");
exit(1); exit(EXIT_FAILURE);
} }
#endif #endif
@ -6702,11 +6702,13 @@ static NSDictionary *sCachedSystemData = nil;
} }
} }
- (NSString *) getSystemName:(Random_Seed)s_seed - (NSString *) getSystemName:(Random_Seed)s_seed
{ {
return [[self generateSystemData:s_seed] oo_stringForKey:KEY_NAME]; return [[self generateSystemData:s_seed] oo_stringForKey:KEY_NAME];
} }
- (OOGovernmentID) getSystemGovernment:(Random_Seed)s_seed - (OOGovernmentID) getSystemGovernment:(Random_Seed)s_seed
{ {
return [[self generateSystemData:s_seed] oo_unsignedCharForKey:KEY_GOVERNMENT]; return [[self generateSystemData:s_seed] oo_unsignedCharForKey:KEY_GOVERNMENT];