equal
deleted
inserted
replaced
323 else |
323 else |
324 gameArgs[8] = "0"; |
324 gameArgs[8] = "0"; |
325 [machine release]; |
325 [machine release]; |
326 */ |
326 */ |
327 |
327 |
328 gameArgs[0] = [[systemSettings objectForKey:@"username"] UTF8String]; //UserNick |
328 // prevents using an empty nickname |
|
329 NSString *username; |
|
330 NSString *originalUsername = [systemSettings objectForKey:@"username"]; |
|
331 if ([originalUsername isEqualToString:@""]) { |
|
332 username = [[NSString alloc] initWithFormat:@"MobileUser-%@",ipcString]; |
|
333 } else { |
|
334 username = [[NSString alloc] initWithString:originalUsername]; |
|
335 } |
|
336 |
|
337 gameArgs[0] = [username UTF8String]; //UserNick |
329 gameArgs[1] = [ipcString UTF8String]; //ipcPort |
338 gameArgs[1] = [ipcString UTF8String]; //ipcPort |
330 gameArgs[2] = [[systemSettings objectForKey:@"sounds"] UTF8String]; //isSoundEnabled |
339 gameArgs[2] = [[systemSettings objectForKey:@"sounds"] UTF8String]; //isSoundEnabled |
331 gameArgs[3] = [[systemSettings objectForKey:@"music"] UTF8String]; //isMusicEnabled |
340 gameArgs[3] = [[systemSettings objectForKey:@"music"] UTF8String]; //isMusicEnabled |
332 gameArgs[4] = [localeString UTF8String]; //cLocaleFName |
341 gameArgs[4] = [localeString UTF8String]; //cLocaleFName |
333 gameArgs[5] = [[systemSettings objectForKey:@"alternate"] UTF8String]; //cAltDamage |
342 gameArgs[5] = [[systemSettings objectForKey:@"alternate"] UTF8String]; //cAltDamage |
336 |
345 |
337 [wSize release]; |
346 [wSize release]; |
338 [hSize release]; |
347 [hSize release]; |
339 [localeString release]; |
348 [localeString release]; |
340 [ipcString release]; |
349 [ipcString release]; |
|
350 [username release]; |
341 return gameArgs; |
351 return gameArgs; |
342 } |
352 } |
343 |
353 |
344 |
354 |
345 @end |
355 @end |