project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m
branchios-revival
changeset 11147 f9c460720e02
parent 11146 f5e552f97eda
child 11148 064a53861759
--- a/project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m	Sun Sep 06 04:30:30 2015 +0200
+++ b/project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m	Thu Sep 10 01:31:52 2015 +0200
@@ -322,20 +322,32 @@
 
             self.scriptCommand = [NSString stringWithFormat:@"escript Scripts/Multiplayer/%@",self.selectedScript];
             NSString *scheme = [scriptOptions objectAtIndex:0];
-            if ([scheme isEqualToString:@"locked"]) {
+            if ([scheme isEqualToString:@"locked"])
+            {
                 self.selectedScheme = @"Default.plist";
                 [self.topControl setEnabled:NO forSegmentAtIndex:0];
-            } else {
-                self.selectedScheme = [NSString stringWithFormat:@"%@.plist",scheme];
+            }
+            else
+            {
+                if (![scheme isEqualToString:@"*"])
+                {
+                    self.selectedScheme = [NSString stringWithFormat:@"%@.plist",scheme];
+                }
                 [self.topControl setEnabled:YES forSegmentAtIndex:0];
             }
 
             NSString *weapon = [scriptOptions objectAtIndex:1];
-            if ([weapon isEqualToString:@"locked"]) {
+            if ([weapon isEqualToString:@"locked"])
+            {
                 self.selectedWeapon = @"Default.plist";
                 [self.topControl setEnabled:NO forSegmentAtIndex:1];
-            } else {
-                self.selectedWeapon = [NSString stringWithFormat:@"%@.plist",weapon];
+            }
+            else
+            {
+                if (![weapon isEqualToString:@"*"])
+                {
+                    self.selectedWeapon = [NSString stringWithFormat:@"%@.plist",weapon];
+                }
                 [self.topControl setEnabled:YES forSegmentAtIndex:1];
             }
         }