Commit b5b3537d authored by Chengzhao Li's avatar Chengzhao Li
Browse files

- update user name length

parent 445adb3d
......@@ -147,8 +147,8 @@
}
- (NSString*) stringForMCPeerDisplayName:(NSString*)displayName {
if([displayName length] > 12) {
NSString* realDisplayName = [displayName substringFromIndex:12];
if([displayName length] > 2) {
NSString* realDisplayName = [displayName substringFromIndex:2];
return realDisplayName;
}
return @"Unknown Player";
......
......@@ -133,8 +133,8 @@
}
- (NSString*) stringForMCPeerDisplayName:(NSString*)displayName {
if([displayName length] > 12) {
NSString* realDisplayName = [displayName substringFromIndex:12];
if([displayName length] > 2) {
NSString* realDisplayName = [displayName substringFromIndex:2];
return realDisplayName;
}
return @"Unknown Player";
......
......@@ -33,7 +33,7 @@ static MultiplayerController *_sharedMultiplayerController = nil;
-(void)initializeControllerForNewMatch
{
NSString* uid = [NSUUID UUID].UUIDString;
NSString* suid = [uid substringFromIndex:24];
NSString* suid = [uid substringFromIndex:34];
NSString* displayName = [NSString stringWithFormat:@"%@%@",suid, self.localName];
NCMCPeerID *peer = [[NCMCPeerID alloc]initWithDisplayName:displayName];
......@@ -195,8 +195,8 @@ static MultiplayerController *_sharedMultiplayerController = nil;
}
- (NSString*) stringForMCPeerDisplayName:(NSString*)displayName {
if([displayName length] > 12) {
NSString* realDisplayName = [displayName substringFromIndex:12];
if([displayName length] > 2) {
NSString* realDisplayName = [displayName substringFromIndex:2];
return realDisplayName;
}
return @"Unknown Player";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment