Browse Source

bs_rot fix, stall in fix

shuvit 6 years ago
parent
commit
cc8ecd32cb
2 changed files with 23 additions and 14 deletions
  1. 14
    5
      co_ActionState.py
  2. 9
    9
      grindV2.py

+ 14
- 5
co_ActionState.py View File

@@ -62,19 +62,19 @@ def main():
62 62
 #================
63 63
     #stance change detection
64 64
     if requestAction == 'reg_roll' and (l_actionState == 'fak_roll' or l_actionState == 'fak_land'):
65
-        print("fak-reg_roll")
65
+        #print("fak-reg_roll")
66 66
         requestAction = 'fak-reg_roll'
67 67
         own['requestAction'] = 'fak-reg_roll' 
68 68
     if requestAction == 'fak_roll' and (l_actionState == 'reg_roll' or l_actionState == 'reg_land'):
69
-        print("reg-fak_roll")
69
+        #print("reg-fak_roll")
70 70
         requestAction = 'reg-fak_roll'
71 71
         own['requestAction'] = 'reg-fak_roll'
72 72
     if requestAction == 'reg_5050' and (l_actionState == 'fak_5050' or l_actionState == 'fak_air'):
73
-        print("fak-reg_5050")
73
+        #print("fak-reg_5050")
74 74
         requestAction = 'fak-reg_5050'
75 75
         own['requestAction'] = 'fak-reg_5050'
76 76
     if requestAction == 'fak_5050' and (l_actionState == 'reg_5050' or l_actionState == 'reg_air'):
77
-        print("reg-fak_5050")
77
+        #print("reg-fak_5050")
78 78
         requestAction = 'reg-fak_5050'
79 79
         own['requestAction'] = 'reg-fak_5050'                                
80 80
 
@@ -97,7 +97,16 @@ def main():
97 97
         requestAction = own['l_requestAction']
98 98
         
99 99
         
100
-        
100
+    #grind override
101
+    if requestAction in pump_out_overList and requestAction != l_requestAction and l_actionState not in jump_overrideList:
102
+            skater.stopAction(loop_layer)
103
+            trucks.stopAction(loop_layer)
104
+            deck.stopAction(loop_layer)
105
+            skater.stopAction(trans_layer)
106
+            trucks.stopAction(trans_layer)
107
+            deck.stopAction(trans_layer)
108
+            actionTimer = 0
109
+            own['actionTimer'] = 0    
101 110
     #revert override
102 111
     if requestAction == 'revert1' or requestAction == 'revert2' or requestAction == 'revert3' or requestAction == 'revert4':
103 112
         #print("@@@revert override")

+ 9
- 9
grindV2.py View File

@@ -230,7 +230,7 @@ def main():
230 230
             player.setLinearVelocity([0, convely, zvel], 1)   
231 231
             grindpos = "reg_board"     
232 232
             grindyvect = "pos"
233
-            #(print("bs1, don't switch")       
233
+            print("bs1, don't switch")       
234 234
             #print("boardslide")
235 235
                            
236 236
         if rot >= 90 and rot < 135:  
@@ -245,7 +245,7 @@ def main():
245 245
             #player.applyForce([0, 0, 0], True)
246 246
             player.setLinearVelocity([0, convely, zvel], 1)
247 247
             grindpos = "reg_board"  
248
-            #(print("-bs2, don't switch?")          
248
+            print("-bs2, don't switch?")          
249 249
             #print("boardslide") 
250 250
                      
251 251
         if rot >= 135 and rot < 180:
@@ -274,12 +274,12 @@ def main():
274 274
             player.setLinearVelocity([0, convely, zvel], 1)
275 275
             grindpos = "reg_board"
276 276
             grindyvect = "pos"
277
-            #(print("bs3")             
277
+            print("bs3")             
278 278
             #print("boardslide")
279 279
            
280 280
         if rot >= 270 and rot < 315:
281 281
             #print(STANCE, "4")
282
-            player.alignAxisToVect([-grinder_vect.y, grinder_vect.x, grinder_vect.z], 0, align_strength) 
282
+            player.alignAxisToVect([grinder_vect.y, -grinder_vect.x, grinder_vect.z], 0, align_strength) 
283 283
             grindvect = "pos"
284 284
             #player.applyRotation(negbsrot, 1)
285 285
             #print("4")  
@@ -288,7 +288,7 @@ def main():
288 288
             player.setLinearVelocity([0, convely, zvel], 1)
289 289
             grindpos = "reg_board"   
290 290
             grindyvect = "neg"
291
-            #(print("-bs4")              
291
+            print("-bs4")              
292 292
             #print("boardslide")
293 293
             
294 294
         if rot >= 315:
@@ -317,7 +317,7 @@ def main():
317 317
             #player.applyForce([0, 0, 0], True)
318 318
             player.setLinearVelocity([0, convely, zvel], 1)
319 319
             grindpos = "reg_board"   
320
-            #(print("-bs5")           
320
+            print("-bs5")           
321 321
             #print("boardslide")
322 322
             
323 323
             grindyvect = "neg"
@@ -333,7 +333,7 @@ def main():
333 333
             player.setLinearVelocity([0, convely, zvel], 1)
334 334
             grindpos = "reg_board"  
335 335
             grindyvect = "pos"
336
-            #(print("bs6")           
336
+            print("bs6")           
337 337
             #print("boardslide") 
338 338
                                            
339 339
         if rot < -135 and rot >= -180:
@@ -361,7 +361,7 @@ def main():
361 361
             player.setLinearVelocity([0, convely, zvel], 1)
362 362
             grindpos = "reg_board"   
363 363
             grindyvect = "neg"
364
-            #(print("-bs7")          
364
+            print("-bs7")          
365 365
             #print("boardslide")            
366 366
         if rot < -270 and rot >= -315:
367 367
             #print(STANCE, "8")
@@ -374,7 +374,7 @@ def main():
374 374
             player.setLinearVelocity([0, convely, zvel], 1)
375 375
             grindpos = "reg_board"    
376 376
             grindyvect = "pos"
377
-            #(print("bs8")        
377
+            print("bs8")        
378 378
             #print("boardslide")                                
379 379
         if rot < -315:
380 380
             player.alignAxisToVect(grinder_vect, 0, align_strength) 

Loading…
Cancel
Save