OSDN Git Service

建設のバグでクラッシュするのを改善
authorKillery <Killery@kiritani-no-mac-mini.local>
Fri, 1 Jan 2016 03:53:20 +0000 (12:53 +0900)
committer桐谷 諭史 <Killery@kiritani-no-Mac-mini.local>
Fri, 1 Jan 2016 03:53:20 +0000 (12:53 +0900)
Awars III/Awars III-Info.plist
Awars III/FieldView.m
Awars III/en.lproj/MainMenu.xib

index 1fb1f71..73c22fa 100644 (file)
@@ -15,7 +15,7 @@
        <key>CFBundlePackageType</key>
        <string>APPL</string>
        <key>CFBundleShortVersionString</key>
-       <string>0.585</string>
+       <string>0.586</string>
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleVersion</key>
index 8263f4a..54cd429 100755 (executable)
     
     if(buildCaptureFlag && unitMoveEndFlag){
         
-        BTop = B;
+        B = BTop;
         while (B) {
             if(B->x == Uselected->x && B->y == Uselected->y){
                 if(Uselected->team == 0) B->team = 0;
             U = U->next;
         }U = UTop;
         
-        BTop = B;
+        B = BTop;
         while(B){
             if(B->team < 0) B->img = B->C.img;
             if(B->team == 0)
     
     if(buildNum[possionX][possionY] >= 0 && unitNum[possionX][possionY] < 0 && !moveFlag){
         //NSLog(@"くりとりすとおちんちん");
-        BTop = B;
+        B = BTop;
         while (B) {
             if(B->x == possionX && B->y == possionY){
                 researchTeam = -1;
         wtPx = possionX;
         wtPy = possionY;
         wtMovedFlag = true;
-        BTop = B;
+        B = BTop;
         while (B) {
             if(B->x == possionX && B->y == possionY && B->C.capture){
                 buildCaptureFlag = true;
                     
                     
                     
-                    BTop = B;
+                    B = BTop;
                     while (B) {
                         if(B->x == wtPx && B->y == wtPy && B->C.capture){
                             buildCaptureFlag = true;
                 cpuMODE = MODE_CPU_ATTACK;
             }
             NSLog(@"test[%d,%d][%d,%d]", unitBreak->x, unitBreak->y, possionX, possionY);
+            possionX = unitBreak->x;
+            possionY = unitBreak->y;
             break;
         case MODE_CPU_ATTACK:
             if(!CPUAttackFlag){
                     }
                     unitBreak->C.S = unitBreak->C.S->next;
                 }unitBreak->C.S = ST;
-                
+                NSLog(@"BTop %@", BTop->C.name);
                 B->C.invisible = false;
                 cpuBuildDoneFlag = false;
                 cpuMODE = MODE_CPU_EMPLOY;
                                                 [self addBuildStatusfix];
                                                 ST6type = i;
                                                 unitBreak->C.S = ST;
+                                                if(g_target_x == unitBreak->y && g_target_y == unitBreak->x){
+                                                    unitNoMoveStanbyFlag = true;
+                                                }
                                                 return;
                                             }
                                         }
                                  [self addBuildStatusfix];
                                 ST6type = i;
                                 unitBreak->C.S = S6T;
+                                if(g_target_x == unitBreak->y && g_target_y == unitBreak->x){
+                                    unitNoMoveStanbyFlag = true;
+                                }
                                 return;
                             }
                         }
                                  [self addBuildStatusfix];
                                 ST6type = i;
                                 unitBreak->C.S = S6T;
+                                if(g_target_x == unitBreak->y && g_target_y == unitBreak->x){
+                                    unitNoMoveStanbyFlag = true;
+                                }
                                 return;
                             }
                         }
                                  [self addBuildStatusfix];
                                 ST6type = i;
                                 unitBreak->C.S = S6T;
+                                if(g_target_x == unitBreak->y && g_target_y == unitBreak->x){
+                                    unitNoMoveStanbyFlag = true;
+                                }
                                 return;
                             }
                         }
 -(void)addBuildStatusfix{
     
     int omgCnt = 0;
-    BTop = B;
+    B = BTop;
     while (B->next) {omgCnt++;
         B = B->next;
     }
         wtPx = g_target_y;
         wtPy = g_target_x;
         wtMovedFlag = true;
-        BTop = B;
+        B = BTop;
         while (B) {
             if(B->x == wtPx && B->y == wtPy && B->C.capture){
                 buildCaptureFlag = true;
                 
                 //[self DrawImage:BC[buildNum[bx][by]].img x:(bx-1)*32 y:(by-1)*32 cx:bx cy:by f:1.0];
                 
-                BTop = B;
+                B = BTop;
                 while (B) {
                     if(B->x == bx && B->y == by) break;
                     B = B->next;
index 6b5f1b6..4e4b4ac 100755 (executable)
                     <textField verticalHuggingPriority="750" id="558">
                         <rect key="frame" x="17" y="443" width="126" height="17"/>
                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-                        <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Version alpha 0.585" id="559">
+                        <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Version alpha 0.586" id="559">
                             <font key="font" metaFont="system"/>
                             <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
                             <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>