Browse Source

misc airs

shuvit 5 years ago
parent
commit
8e14facab5

BIN
scripts/__pycache__/co_ActionState.cpython-36.pyc View File


BIN
scripts/__pycache__/controller2.cpython-36.pyc View File


BIN
scripts/__pycache__/grindV2.cpython-36.pyc View File


BIN
scripts/__pycache__/scene_init.cpython-36.pyc View File


+ 25
- 2
scripts/co_ActionState.py View File

935
             requestAction = 'fak_air_tail to manual'                                    
935
             requestAction = 'fak_air_tail to manual'                                    
936
             
936
             
937
         if l_actionState == 'fak_air_nose to nmanual' and requestAction in ['reg_land', 'fak_land'] and own['actionTimer'] > 1:
937
         if l_actionState == 'fak_air_nose to nmanual' and requestAction in ['reg_land', 'fak_land'] and own['actionTimer'] > 1:
938
-            requestAction = 'fak_air_nose to nmanual'                                               
938
+            requestAction = 'fak_air_nose to nmanual'            
939
+
940
+        if requestAction in ['fak_land', 'reg_land']:  
941
+            requestAction = own['lland']
942
+        if l_actionState == 'reg_air-roll' and requestAction == 'fak_landL':
943
+            requestAction = 'reg_landL'    
944
+        if l_actionState == 'reg_air-roll' and requestAction == 'fak_landLb':
945
+            requestAction = 'reg_landLb'
946
+        if l_actionState == 'reg_air-roll' and requestAction == 'fak_landR':
947
+            requestAction = 'reg_landR'    
948
+        if l_actionState == 'reg_air-roll' and requestAction == 'fak_landRb':
949
+            requestAction = 'reg_landRb'    
950
+        if l_actionState == 'reg_air-roll' and requestAction == 'fak_land':
951
+            requestAction = 'reg_land'            
952
+        if l_actionState == 'fak_air-roll' and requestAction == 'reg_landL':
953
+            requestAction = 'fak_landL'    
954
+        if l_actionState == 'fak_air-roll' and requestAction == 'reg_landLb':
955
+            requestAction = 'fak_landLb'
956
+        if l_actionState == 'fak_air-roll' and requestAction == 'reg_landR':
957
+            requestAction = 'fak_landR'    
958
+        if l_actionState == 'fak_air-roll' and requestAction == 'reg_landRb':
959
+            requestAction = 'fak_landRb'            
960
+        if l_actionState == 'fak_air-roll' and requestAction == 'reg_land':
961
+            requestAction = 'fak_land'                
939
 #---------------------------------------------------                                                                                  
962
 #---------------------------------------------------                                                                                  
940
                                                                                   
963
                                                                                   
941
                                                                                                                                                         
964
                                                                                                                                                         
5077
     if trans_playing:
5100
     if trans_playing:
5078
         cur_frame = skater.getActionFrame(trans_layer)  
5101
         cur_frame = skater.getActionFrame(trans_layer)  
5079
         cur_frame = round(cur_frame, 2)     
5102
         cur_frame = round(cur_frame, 2)     
5080
-    #print('oG: ', og_request, 'rA:', requestAction, '|aS:', own['actionState'], 'q', queueAction, own['actionTimer'], 'cf', cur_frame)
5103
+    print('oG: ', og_request, 'rA:', requestAction, '|aS:', own['actionState'], 'q', queueAction, own['actionTimer'], 'cf', cur_frame)
5081
     #print('rA:', requestAction, '|aS:', own['actionState'], own['actionTimer'], 'cf', cur_frame)
5104
     #print('rA:', requestAction, '|aS:', own['actionState'], own['actionTimer'], 'cf', cur_frame)
5082
     cur_frame = skater.getActionFrame(trans_layer)
5105
     cur_frame = skater.getActionFrame(trans_layer)
5083
     #print(cur_frame)
5106
     #print(cur_frame)

+ 11
- 8
scripts/controller2.py View File

243
         balance = 0
243
         balance = 0
244
     #print(balance)
244
     #print(balance)
245
     #if ground_since > 0 and ground_since < 5 and jump_timer < 30:
245
     #if ground_since > 0 and ground_since < 5 and jump_timer < 30:
246
-    if ground_since > -1 and ground_since < 2000000:
246
+    if ground_since > -1 and ground_since < 200:
247
         #print(balance, 'balance')
247
         #print(balance, 'balance')
248
-        sens = 2
249
-        sens2 = .6
248
+        sens = 1.8
249
+        sens2 = .2
250
         sens3 = 1.2
250
         sens3 = 1.2
251
         if balance > sens or balance < - sens:
251
         if balance > sens or balance < - sens:
252
             #fall
252
             #fall
4579
         Distance = -2
4579
         Distance = -2
4580
         End = Vector.copy(own.worldPosition + (own.worldOrientation.col[Axis]*Distance))
4580
         End = Vector.copy(own.worldPosition + (own.worldOrientation.col[Axis]*Distance))
4581
         Start = Vector.copy(own.worldPosition)
4581
         Start = Vector.copy(own.worldPosition)
4582
-        localRay_v = own.rayCast(End, Start, 0, 'vert', 1, 0, 0)
4582
+        localRay_v = own.rayCast(End, Start, 0, 'vert', 1, 0, 0, 61439)
4583
         if localRay_v[0] and own['LAST_GRIND'] == False and rBump == 0 and ((own['framenum'] - own['last_transition_frame'] < 10) or (own['framenum'] - own['last_vert_frame'] < 10)):
4583
         if localRay_v[0] and own['LAST_GRIND'] == False and rBump == 0 and ((own['framenum'] - own['last_transition_frame'] < 10) or (own['framenum'] - own['last_vert_frame'] < 10)):
4584
             own['vert'] = 1
4584
             own['vert'] = 1
4585
+            print('vert hit')
4585
             own['last_vert_frame'] = own['framenum']
4586
             own['last_vert_frame'] = own['framenum']
4586
             localHitDist = Vector.copy(Start - localRay_v[1]).length
4587
             localHitDist = Vector.copy(Start - localRay_v[1]).length
4587
             own.linearVelocity.x *= .98
4588
             own.linearVelocity.x *= .98
4588
             own.linearVelocity.z = .1
4589
             own.linearVelocity.z = .1
4589
             #if localHitDist < .8 and (dict['lUD'] < .04 or dict['lUD'] > -.04):
4590
             #if localHitDist < .8 and (dict['lUD'] < .04 or dict['lUD'] > -.04):
4590
-            if localHitDist < .8:    
4591
+            #if localHitDist < .8:    
4592
+            if localHitDist < 1.5:        
4591
                 #own.applyMovement((0,0,((.4 - (localHitDist) * .1))), True)
4593
                 #own.applyMovement((0,0,((.4 - (localHitDist) * .1))), True)
4592
-                own.applyMovement((0, 0, (.4 - localHitDist)), True)
4594
+                own.applyMovement((0, 0, (.3 - localHitDist)), True)
4593
                 #print('moving vert ray')
4595
                 #print('moving vert ray')
4594
                 if localRay_v[2] != [0, 0, -1] and grindHit == 0:
4596
                 if localRay_v[2] != [0, 0, -1] and grindHit == 0:
4595
                 #if localRay_v[2] != [0,0,-1]:
4597
                 #if localRay_v[2] != [0,0,-1]:
4621
             aligned = True
4623
             aligned = True
4622
             print('rayb hit')
4624
             print('rayb hit')
4623
 
4625
 
4624
-    #print(raytof, raytob)
4625
 
4626
 
4626
     if not aligned:
4627
     if not aligned:
4627
-        own.alignAxisToVect([0.0, 0.0, 1.0], 2, .03)
4628
+        own.alignAxisToVect([0.0, 0.0, 1.0], 2, .00003)
4628
 
4629
 
4629
     if own.linearVelocity.x > 12:
4630
     if own.linearVelocity.x > 12:
4630
         own.linearVelocity.x = 12
4631
         own.linearVelocity.x = 12
4664
         elif land_overRideRb == True:
4665
         elif land_overRideRb == True:
4665
             own['requestAction'] = 'fak_landRb'
4666
             own['requestAction'] = 'fak_landRb'
4666
             print('requesting unbalanced land2b')
4667
             print('requesting unbalanced land2b')
4668
+    if own['requestAction'] in ['fak_land', 'reg_land', 'fak_landL', 'reg_landR', 'fak_landRb', 'reg_landLb']:
4669
+        own['lland'] = own['requestAction']

+ 9
- 8
scripts/grindV2.py View File

92
         no_grind = 0
92
         no_grind = 0
93
         own['no_grind_timer'] -= 1
93
         own['no_grind_timer'] -= 1
94
 
94
 
95
-    if grindold == 1:
96
-        no_grind = 0
95
+    
97
 
96
 
98
-    if frames_since_ground > 30 or since_jumped < 120:
99
-        no_grind = 0
100
-    if jump_timer > 50:
101
-        no_grind = 1
97
+    # if frames_since_ground > 30 or since_jumped < 120:
98
+    #     no_grind = 0
99
+    # if jump_timer > 50:
100
+    #     no_grind = 1
102
 
101
 
103
     if (own['fak_nmanual'] == 1 or own['reg_nmanual'] == 1 or own['fak_manual'] == 1 or own['reg_manual'] == 1):
102
     if (own['fak_nmanual'] == 1 or own['reg_nmanual'] == 1 or own['fak_manual'] == 1 or own['reg_manual'] == 1):
104
         manual = 1
103
         manual = 1
111
     if (framenum - own['last_vert_frame'] < 40) and own['vert'] == 0:
110
     if (framenum - own['last_vert_frame'] < 40) and own['vert'] == 0:
112
         no_grind = 1
111
         no_grind = 1
113
         print('no_grind = 1 last vert = ', (framenum - own['last_vert_frame']))
112
         print('no_grind = 1 last vert = ', (framenum - own['last_vert_frame']))
114
-    if dict['rBump'] == 1:
113
+    if dict['rBump'] == 1 or (framenum - own['last_vert_frame'] > 40):
115
         no_grind = 0
114
         no_grind = 0
116
 
115
 
117
     if own['LAST_GRIND']:
116
     if own['LAST_GRIND']:
118
         no_grind = 0
117
         no_grind = 0
119
-    
118
+
119
+    if grindold == 1:
120
+        no_grind = 0
120
 #---------###########___###########-----------
121
 #---------###########___###########-----------
121
 #start new                     #######
122
 #start new                     #######
122
 ##----------##############----------############
123
 ##----------##############----------############

+ 1
- 0
scripts/scene_init.py View File

146
         own['last_vert_frame'] = 0
146
         own['last_vert_frame'] = 0
147
         own['ragdoll_active'] = False
147
         own['ragdoll_active'] = False
148
         own['rd_to_delete'] = None
148
         own['rd_to_delete'] = None
149
+        own['lland'] = ''
149
         
150
         
150
         colors.update_shirt_tex() 
151
         colors.update_shirt_tex() 
151
         colors.update_truck_tex()
152
         colors.update_truck_tex()

Loading…
Cancel
Save