equal
deleted
inserted
replaced
144 |
144 |
145 // team 1 grave info |
145 // team 1 grave info |
146 [self sendToEngine:@"egrave star"]; |
146 [self sendToEngine:@"egrave star"]; |
147 |
147 |
148 // team 1 fort info |
148 // team 1 fort info |
149 [self sendToEngine:@"efort Earth"]; |
149 [self sendToEngine:@"efort Earth"]; |
150 |
150 |
151 // team 1 voicepack info |
151 // team 1 voicepack info |
152 [self sendToEngine:@"evoicepack Classic"]; |
152 [self sendToEngine:@"evoicepack Classic"]; |
153 |
153 |
154 // team 1 binds (skipped) |
154 // team 1 binds (skipped) |
234 // missing case for exiting right away |
234 // missing case for exiting right away |
235 } |
235 } |
236 } |
236 } |
237 NSLog(@"Client Exited"); |
237 NSLog(@"Client Exited"); |
238 // wait a little to let the client close cleanly |
238 // wait a little to let the client close cleanly |
239 sleep(5); |
239 sleep(2); |
240 // Close the client socket |
240 // Close the client socket |
241 SDLNet_TCP_Close(csd); |
241 SDLNet_TCP_Close(csd); |
242 } |
242 } |
243 |
243 |
244 } |
244 } |
255 -(void) loadSettingsFromFile:(NSString *)fileName forKey:(NSString *)objName { |
255 -(void) loadSettingsFromFile:(NSString *)fileName forKey:(NSString *)objName { |
256 NSString *filePath = [[SDLUIKitDelegate sharedAppDelegate] dataFilePath:fileName]; |
256 NSString *filePath = [[SDLUIKitDelegate sharedAppDelegate] dataFilePath:fileName]; |
257 |
257 |
258 if ([[NSFileManager defaultManager] fileExistsAtPath:filePath]) { |
258 if ([[NSFileManager defaultManager] fileExistsAtPath:filePath]) { |
259 NSDictionary *dict = [[NSDictionary alloc] initWithContentsOfFile:filePath]; |
259 NSDictionary *dict = [[NSDictionary alloc] initWithContentsOfFile:filePath]; |
260 [self setValue:dict forKey:objName]; |
260 systemSettings = dict; |
|
261 //[self setValue:dict forKey:objName]; |
261 [dict release]; |
262 [dict release]; |
262 } else { |
263 } else { |
263 //TODO create it |
264 //TODO create it |
264 [NSException raise:@"File NOT found" format:@"The file %@ was not found at %@", fileName, filePath]; |
265 [NSException raise:@"File NOT found" format:@"The file %@ was not found at %@", fileName, filePath]; |
265 } |
266 } |
266 |
267 |
267 } |
268 } |
268 |
269 |
269 -(void) unloadSettings { |
270 -(void) unloadSettings { |
270 [systemSettings release]; |
271 systemSettings = nil; |
271 } |
272 } |
272 |
273 |
273 |
274 |
274 @end |
275 @end |