shuvit 1 year ago
parent
commit
9492b1c072
7 changed files with 25 additions and 177 deletions
  1. 2
    2
      assets/foliage.blend
  2. 2
    2
      assets/rails.blend
  3. 2
    2
      assets/user10_working.blend
  4. 2
    2
      assets/user2.blend
  5. 3
    3
      config.ini
  6. 12
    164
      scripts/controller2.py
  7. 2
    2
      shuvit.blend

+ 2
- 2
assets/foliage.blend View File

@@ -1,3 +1,3 @@
1 1
 version https://git-lfs.github.com/spec/v1
2
-oid sha256:9c0b45d0c143a38926abe3845054bc8b1686b3723e20836473cc69ecf6fce171
3
-size 3846252
2
+oid sha256:153bf3a6d853ea2d8d6af129f4641da130f1cf26d12d5b0f617ce4be3ce1815e
3
+size 3846380

+ 2
- 2
assets/rails.blend View File

@@ -1,3 +1,3 @@
1 1
 version https://git-lfs.github.com/spec/v1
2
-oid sha256:806f4e67b88bd33e31dd08e2c7a275a0330ea80a7965bf1ac5c64d8e4c735ed1
3
-size 482684
2
+oid sha256:295799d06166408def50692e019c6ed17981a525d5cc51d38a544222cdd242a8
3
+size 474180

+ 2
- 2
assets/user10_working.blend View File

@@ -1,3 +1,3 @@
1 1
 version https://git-lfs.github.com/spec/v1
2
-oid sha256:279d76c10072619c6259e35800b5c36794d3ff79a2be293dcd28eb9c1731f83e
3
-size 15563332
2
+oid sha256:a3ce21ce415b1a326da389f316a8d366eb53b623d3f5a0f5b0a4e490277fbd7e
3
+size 15590664

+ 2
- 2
assets/user2.blend View File

@@ -1,3 +1,3 @@
1 1
 version https://git-lfs.github.com/spec/v1
2
-oid sha256:72706c55ca565b8d11198bab3c08ba1e42c24e6ba7a57696d8fb15b57549d0f0
3
-size 19062000
2
+oid sha256:09078add584edfde6caca8153f880778a58ead3268abc38a90b50b99a0590e43
3
+size 19108548

+ 3
- 3
config.ini View File

@@ -58,9 +58,9 @@ shirt_color_r = 0.83
58 58
 shirt_color_g = 0.9
59 59
 shirt_color_b = 0.88
60 60
 
61
-shoe_color_r = 0.0
62
-shoe_color_g = 0.35
63
-shoe_color_b = 0.57
61
+shoe_color_r = 0.85
62
+shoe_color_g = 0
63
+shoe_color_b = 0
64 64
 #-----------------
65 65
 
66 66
 #deck settings

+ 12
- 164
scripts/controller2.py View File

@@ -197,14 +197,11 @@ def main():
197 197
             onGround = True    
198 198
     if onGround: 
199 199
         own['wallride_off'] = 0
200
-    #print(linVelocity.y / linVelocity.x, 'linvels')
201
-    #print(r_ground.triggered)
202 200
     try:
203 201
         balance = linVelocity.y / linVelocity.x
204 202
     except:
205 203
         balance = 0
206 204
     #print(balance)
207
-    #if ground_since > 0 and ground_since < 5 and jump_timer < 30:
208 205
     min_speed = .8
209 206
     if ground_since > -1 and ground_since < 60 and (abs(linVelocity.x) > min_speed or abs(linVelocity.y) > min_speed):
210 207
         #print(balance, 'balance')
@@ -213,8 +210,6 @@ def main():
213 210
         sens3 = 1.5
214 211
         if balance > sens or balance < - sens:
215 212
             #fall
216
-            #if ground_since > -1 and ground_since < 10:
217
-            #print(own['l_actionState'], touched)
218 213
             if own['l_actionState'] != None:
219 214
                 if 'land' in own['l_actionState'] and touched == False:
220 215
                     own['fall'] = 1
@@ -299,10 +294,8 @@ def main():
299 294
 
300 295
     def check_fall():
301 296
         playing_frame = 20
302
-        #hitDistance = own.worldPosition.z - r_ground.hitPosition.z
303 297
         if skater.isPlayingAction(fliplay):
304 298
             playing_frame = skater.getActionFrame(fliplay)
305
-        #if onGround and skater.isPlayingAction(fliplay) and own['jump_timer'] < 40 and playing_frame < 14 and playing_frame > 3:
306 299
         if onGround and skater.isPlayingAction(fliplay) and own['jump_timer'] < 45 and playing_frame < 16 and playing_frame > 3:    
307 300
             hitDistance = own.worldPosition[2] - r_ground.hitPosition[2]
308 301
             if hitDistance < dict['fall_height']:
@@ -335,10 +328,7 @@ def main():
335 328
                 dist = dist * 2
336 329
                 if dist > 1:
337 330
                     dist = 1
338
-                #own.actuators["land"].volume = dist
339
-                #sact = own.actuators["land"]                
340
-                #sact.stopSound()
341
-                #cont.activate(own.actuators["land"])
331
+
342 332
                 cam['sndmgr'].queue_sound(['land', own, cam])
343 333
                 own['land_sound'] = 1
344 334
             if grindDar == 1:
@@ -357,13 +347,8 @@ def main():
357 347
             vib_countdown = vib_countdown - 1
358 348
             own["vib_Countdown"] = vib_countdown
359 349
         if vib_countdown == 1:
360
-            #stopAnims()
361 350
             stance()
362 351
 
363
-        #if lf_ground == False and r_ground.triggered == True and own['jump_timer'] < 40 and grindHit == False and touched == False and LAST_GRIND == False:
364
-        #print(touched, LAST_GRIND)
365
-        #if lf_ground == False and r_ground.triggered == True and own['jump_timer'] < 40  and LAST_GRIND == False and jump_timer != 0:
366
-        #if lf_ground == False and r_ground.triggered == True:
367 352
         if ground_since == 3 and own['jump_timer'] < 40:
368 353
             print('---landing-b')
369 354
             if STANCE == 0:
@@ -390,8 +375,6 @@ def main():
390 375
 
391 376
     #check manual_v2
392 377
     if (rUD > dict['man_sens_l'] and rUD < dict['man_sens_r']) or (rUD < -dict['man_sens_l'] and rUD > -dict['man_sens_r']):
393
-    #if (rUD > .04 and rUD < .07):
394
-        #print("zoned")
395 378
         timer = own['manual_v2_timer']
396 379
         timer = timer + 1
397 380
         if timer > 20:
@@ -512,7 +495,6 @@ def main():
512 495
 
513 496
     #####
514 497
     #fak nmanual
515
-    #print (rUD)
516 498
     if rUD < -dict['man_sens_l'] and rUD > -dict['man_sens_r'] and STANCE == 1 and rLR < dict['man_sens_side'] and rLR > -dict['man_sens_side']:
517 499
         timer = own["fak_nmanual_timer"]
518 500
         timer = timer + 1
@@ -558,7 +540,6 @@ def main():
558 540
             own['requestAction'] = 'fak_manual'  
559 541
 
560 542
     def reg_nmanual_on():
561
-
562 543
         if lLR > turnsens:
563 544
             own['requestAction'] = 'reg_nmanual_right'
564 545
         elif lLR < -turnsens:
@@ -568,8 +549,6 @@ def main():
568 549
 
569 550
 
570 551
     def fak_nmanual_on():
571
-
572
-    #def fak_manual_on():
573 552
         if lLR > turnsens:
574 553
             own['requestAction'] = 'fak_nmanual_right'
575 554
         elif lLR < -turnsens:
@@ -788,11 +767,9 @@ def main():
788 767
             # apply force
789 768
             try:
790 769
                 if 'trans' in r_ground.hitObject:
791
-                    #print('jump from trans')
792 770
                     own['jump_from_trans'] = 1
793 771
                     own['trans_jump_obj'] = r_ground.hitObject
794 772
             except:
795
-                #print('trans jump broke')
796 773
                 pass
797 774
             if grindHit == False:
798 775
                 if rot.z < .7:
@@ -807,9 +784,8 @@ def main():
807 784
                     force2 = [0,0,0]
808 785
 
809 786
                 own.applyForce(force, local)
810
-                
811 787
                 own.applyForce(force2, True)
812
-                #print("apply jump force1")
788
+
813 789
             if grindHit == True:
814 790
                 linvelloc = own.getLinearVelocity(True)
815 791
                 own.applyForce(force, True)
@@ -818,7 +794,6 @@ def main():
818 794
                 linvelloc2 = own.getLinearVelocity(True)
819 795
                 force = (linvelloc.x, linvelloc.y, linvelloc2.z)
820 796
                 own.setLinearVelocity(force, True)
821
-                #print("apply jump force2 grindHit")
822 797
 
823 798
             own['jump_stance'] = STANCE
824 799
             if STANCE == True:
@@ -870,7 +845,6 @@ def main():
870 845
         downforce = dict['pump_downforce']
871 846
         lF_air_frame = own['lF_air_frame']
872 847
         frames_since_ground = own['framenum'] - own['lF_air_frame']
873
-        #if linVelocity.x < MAX_VEL and linVelocity.x >= -0 and STANCE == 1 and grindHit == False and frames_since_ground > 30 and own['last_manual_v2'] == 0:
874 848
         if STANCE == 1 and grindHit == False and frames_since_ground > 30 and own['last_manual_v2'] == 0:
875 849
             countdown = COUNTDOWN
876 850
             yvel = linVelocity.x + SPEEDPUMP
@@ -886,7 +860,6 @@ def main():
886 860
             if own['requestAction'] not in ['fak_pump_left', 'fak_pump_right'] and own['l_actionState'] not in ['fak_turnLeft', 'fak_turnRight']:
887 861
                 own['requestAction'] = 'fak_pump'
888 862
         #reg
889
-        #if linVelocity.x > -MAX_VEL and linVelocity.x <= 0 and STANCE == 0 and grindHit == False and frames_since_ground > 30 and own['last_manual_v2'] == 0:
890 863
         if STANCE == 0 and grindHit == False and frames_since_ground > 30 and own['last_manual_v2'] == 0:
891 864
             countdown = COUNTDOWN
892 865
             yvel = linVelocity.x - SPEEDPUMP
@@ -930,8 +903,6 @@ def main():
930 903
         if ground_since > 30:
931 904
             if (onGround) and STANCE == False and (own['manual'] == 0 or own['requestAction'] == 'fak_roll'):
932 905
                 if grindold == 0:
933
-                    #print('opos request', own['requestAction'])
934
-                    
935 906
                     if own['requestAction'] == 'reg_turnRight':
936 907
                         own['requestAction'] = 'reg_pump_right'
937 908
                     elif own['requestAction'] == 'reg_turnLeft':
@@ -941,14 +912,12 @@ def main():
941 912
 
942 913
             elif (onGround) and STANCE == True and (own['manual'] == 0 or own['requestAction'] == 'fak_roll'):
943 914
                 if grindold == 0:
944
-                    #print('opos request', own['requestAction'])
945 915
                     if own['requestAction'] == 'fak_turnRight':
946 916
                         own['requestAction'] = 'fak_pump_right'
947 917
                     elif own['requestAction'] == 'fak_turnLeft':
948 918
                         own['requestAction'] = 'fak_pump_left'                        
949 919
                     else:                    
950 920
                         own['requestAction'] = 'fak_opos'
951
-            #print('result', own['requestAction'])            
952 921
             own["last_Opos"] = True
953 922
 
954 923
     def noposin():
@@ -963,8 +932,6 @@ def main():
963 932
 
964 933
     def aollie():
965 934
         print("ollie")
966
-        #dict['trick_string'] = 'Ollie'
967
-        
968 935
         STANCE = own["stance"]
969 936
         wallride = own["wallride"]
970 937
         dict['trick_string'] = 'Ollie'
@@ -1708,8 +1675,6 @@ def main():
1708 1675
                 elif distance >= 1.75:
1709 1676
                     own.alignAxisToVect([0.0, 0.0, 1.0], 2, .03)
1710 1677
         elif onGround:
1711
-            #if d2 > .4:
1712
-               #own.alignAxisToVect([0.0, 0.0, 1.0], 2, .03)
1713 1678
             pass
1714 1679
     def stopAnims():
1715 1680
         pass
@@ -1733,7 +1698,6 @@ def main():
1733 1698
         local = True
1734 1699
         #print("push")
1735 1700
         linVelocity15 = own.linearVelocity
1736
-        #if linVelocity15.x < MAX_VEL and linVelocity15.x >= -0 and onGround and own['hippy'] == 0 and own['last_hippy'] == 0 and own['last_footplant'] == False:
1737 1701
         if linVelocity15.x >= -0 and onGround and own['hippy'] == 0 and own['last_hippy'] == 0 and own['last_footplant'] == False:    
1738 1702
             if linVelocity15.x < MAX_VEL:
1739 1703
                 countdown = COUNTDOWN
@@ -1743,7 +1707,6 @@ def main():
1743 1707
                 own.setLinearVelocity(force, local)
1744 1708
             own['requestAction'] = 'fak_push_goof'
1745 1709
         #switch
1746
-        #if linVelocity15.x > -MAX_VEL and linVelocity15.x < 0 and onGround and own['hippy'] == 0 and own['last_hippy'] == 0:
1747 1710
         if linVelocity15.x < 0 and onGround and own['hippy'] == 0 and own['last_hippy'] == 0:    
1748 1711
             if linVelocity15.x > -MAX_VEL:
1749 1712
                 countdown = COUNTDOWN
@@ -1757,7 +1720,6 @@ def main():
1757 1720
         linVelocity15 = own.linearVelocity
1758 1721
         local = True
1759 1722
         #print("push goof")
1760
-        #if linVelocity15.x < MAX_VEL and linVelocity15.x >= -0 and onGround and own['hippy'] == 0 and own['last_hippy'] == 0:
1761 1723
         if  linVelocity15.x >= -0 and onGround and own['hippy'] == 0 and own['last_hippy'] == 0:    
1762 1724
             if linVelocity15.x < MAX_VEL:
1763 1725
                 countdown = COUNTDOWN
@@ -1767,7 +1729,6 @@ def main():
1767 1729
                 own.setLinearVelocity(force, local)
1768 1730
             own['requestAction'] = 'fak_push'
1769 1731
         #switch
1770
-        #if linVelocity15.x > -MAX_VEL and linVelocity15.x < 0 and onGround and own['hippy'] == 0 and own['last_hippy'] == 0:
1771 1732
         if  linVelocity15.x < 0 and onGround and own['hippy'] == 0 and own['last_hippy'] == 0:    
1772 1733
             if linVelocity15.x > -MAX_VEL:
1773 1734
                 countdown = COUNTDOWN
@@ -1984,29 +1945,6 @@ def main():
1984 1945
 
1985 1946
         turnVel = .01
1986 1947
     #light
1987
-    #if manual and grindhit = true
1988
-        # if lLR > turnsens and lLR < (turnsens * 1.3) and (grindHit == False or (manual == 1 and grindHit == True)):
1989
-        #     rotation = [0.0, 0.0, (-rotamt)]
1990
-        #     local = False # use world axis
1991
-        #     #own.applyRotation( rotation, local)
1992
-
1993
-        #     if onGround:
1994
-        #         #print("light turn")
1995
-        #         if STANCE == 0:
1996
-        #             own.setLinearVelocity([linVelocity2.x - speed, linVelocity2.y, linVelocity2.z], 1)
1997
-        #         if STANCE == 1:
1998
-        #             own.setLinearVelocity([linVelocity2.x + speed, linVelocity2.y, linVelocity2.z], 1)
1999
-        # if lLR < -turnsens and lLR > (turnsens * -1.3) and (grindHit == False or (manual == 1 and grindHit == True)):
2000
-        #     rotation = [0.0, 0.0, rotamt]
2001
-        #     local = False # use world axis
2002
-        #     #own.applyRotation( rotation, local)
2003
-
2004
-        #     if onGround:
2005
-        #         #print("light turn")
2006
-        #         if STANCE == 0:
2007
-        #             own.setLinearVelocity([linVelocity2.x - speed, linVelocity2.y, linVelocity2.z], 1)
2008
-        #         if STANCE == 1:
2009
-        #             own.setLinearVelocity([linVelocity2.x + speed, linVelocity2.y, linVelocity2.z], 1)
2010 1948
     #medium
2011 1949
         max_amt = 3
2012 1950
         if (lLR > (turnsens * 1) or dict['kb_ra'] == 2) and (grindHit == False or (manual == 1 and grindHit == True)):
@@ -2019,7 +1957,6 @@ def main():
2019 1957
                 rotation = [0.0, 0.0, ((-rotamt * 1.6) * multer)]
2020 1958
             local = True # use world axis
2021 1959
             own.applyRotation( rotation, local)
2022
-            #print('rotation = ', rotation)
2023 1960
             if onGround:
2024 1961
                 #print("med turn")
2025 1962
                 if STANCE == 0:
@@ -2041,7 +1978,6 @@ def main():
2041 1978
     
2042 1979
             local = True # use world axis
2043 1980
             own.applyRotation( rotation, local)
2044
-            #print('rotation = ', rotation)
2045 1981
             if onGround:
2046 1982
                 #print("med turn")
2047 1983
                 if STANCE == 0:
@@ -2227,7 +2163,6 @@ def main():
2227 2163
             edge = 0
2228 2164
             try:
2229 2165
                 if 'edge' in grindTouch.hitObject:
2230
-                    #print('Edge')
2231 2166
                     edge = 1
2232 2167
             except:
2233 2168
                 pass
@@ -2240,7 +2175,7 @@ def main():
2240 2175
                 tempstance = jumpstance
2241 2176
             else:
2242 2177
                 tempstance = STANCE
2243
-            #print(own['grindpos'], own['grindType'], 'pos n type111')
2178
+
2244 2179
             grindpos = own['grindpos']
2245 2180
             if grindpos == "reg_5050" and own['grindType'] == "empty":
2246 2181
                 own['grindType'] = grindpos
@@ -2250,18 +2185,6 @@ def main():
2250 2185
                 else:
2251 2186
                     own['grindType'] = "fak_bsboard"
2252 2187
 
2253
-
2254
-            # if own['grindType'] == '' and grindpos == 'reg_board':
2255
-            #     if STANCE == 0:
2256
-            #         own['grindType'] = "reg_bsboard"
2257
-            #     else:
2258
-            #         own['grindType'] = "fak_bsboard"
2259
-
2260
-            # if own['grindType'] == '' and grindpos == 'reg_board':
2261
-            #     own['grindType'] = 'reg_bsboard'
2262
-
2263
-            #print(own['grindpos'], own['grindType'], 'pos n type')
2264
-
2265 2188
             if STANCE == True:
2266 2189
                 if own['grindType'] == "reg_bsboard":
2267 2190
                     own['grind_stance'] = 0
@@ -3389,11 +3312,8 @@ def main():
3389 3312
         if frame - lif > 3 and own['invert_on'] == 0:
3390 3313
             own['invert_type'] = None
3391 3314
 
3392
-        #print(own['requestAction'])
3393
-
3394 3315
     invert()
3395 3316
     footplant()
3396
-    #print(own['invert_on'], 'invert_on')
3397 3317
     def reset_pos():
3398 3318
         #reset
3399 3319
         if ddPad == 1:
@@ -3417,7 +3337,6 @@ def main():
3417 3337
                 own.setLinearVelocity([-.1,0,0], 1)
3418 3338
 
3419 3339
         if udPad == 1:
3420
-
3421 3340
             own['spawn_pos'] = [own.worldPosition[0], own.worldPosition[1], own.worldPosition[2]]
3422 3341
             own['spawn_rot'] = [[own.worldOrientation[0][0], own.worldOrientation[0][1],own.worldOrientation[0][2]], [own.worldOrientation[1][0], own.worldOrientation[1][1], own.worldOrientation[1][2]], own.worldOrientation[2][2]]
3423 3342
             own['spawn_cam_pos'] = [cam.worldPosition[0], cam.worldPosition[1], cam.worldPosition[2]]
@@ -3427,10 +3346,8 @@ def main():
3427 3346
 
3428 3347
     #start button
3429 3348
     if stBut == True:
3430
-        #own.actuators["sroll"].volume = .0001
3431
-        #cont.deactivate(own.actuators["sroll"])
3432
-        #own.actuators["sroll"].stopSound()
3433 3349
         cam['sndmgr'].stop_sound(['roll'])
3350
+
3434 3351
     if (stBut == False and dict['last_stBut'] == True) or dict['kb_en'] == 1:
3435 3352
         if own['pause_on'] == True:
3436 3353
             own['pause_on'] = False
@@ -3444,7 +3361,6 @@ def main():
3444 3361
         ylimit = dict['ylimit']
3445 3362
         if ground_since < 20 and ground_since > 1 and grindHit == 0 and own['jump_timer'] < 40:
3446 3363
             ylimit = ylimit + ((ground_since - 15) * -.005)
3447
-
3448 3364
             yvel = own.linearVelocity.y
3449 3365
             yvel = yvel *.03
3450 3366
             if STANCE == 0:
@@ -3452,7 +3368,6 @@ def main():
3452 3368
             try:
3453 3369
                 if own.linearVelocity.y > .01 or own.linearVelocity.y < -.01:
3454 3370
                     own.applyRotation([0, 0, yvel], True)
3455
-
3456 3371
                 if ylimit > .99999:
3457 3372
                     ylimit = .9999
3458 3373
             except:
@@ -3466,7 +3381,6 @@ def main():
3466 3381
                 try:
3467 3382
                     if own.linearVelocity.y > .01 or own.linearVelocity.y < -.01:
3468 3383
                         own.applyRotation([0, 0, yvel], True)
3469
-
3470 3384
                 except:
3471 3385
                     pass
3472 3386
 
@@ -3796,7 +3710,6 @@ def main():
3796 3710
                 STANCE = 0
3797 3711
             if own['grindpos'] == 'reg_5050':
3798 3712
                 if sl.q3 >= countdown or sl.q2 >= countdown or dict['kb_ra'] == 2:
3799
-                #if lq3on == 1 or lq2on or dict['kb_ra'] == 2:
3800 3713
                     if own['gt_cd2'] == 0:
3801 3714
                         own['gt_cd2'] = 60
3802 3715
 
@@ -3808,7 +3721,6 @@ def main():
3808 3721
                             own['grind_out_type'] = 'reg right'
3809 3722
                     own["grindoutturn"] = gotcd
3810 3723
                 if sl.q7 >= countdown or sl.q8 >= countdown or dict['kb_la'] == 2:
3811
-                #if lq7on == 1 or lq8on or dict['kb_la'] == 2:
3812 3724
                     if own['gt_cd2'] == 0:
3813 3725
                         own['gt_cd2'] = 60
3814 3726
                     if STANCE == True:
@@ -3845,9 +3757,6 @@ def main():
3845 3757
                 outvel = own.getLinearVelocity(1)
3846 3758
                 outact.dLoc = [0, 0, 0]
3847 3759
                 outact.dRot = [0, 0, 0]
3848
-
3849
-
3850
-                #if lq5on == 1 or dict['kb_da'] == 2:
3851 3760
                 if sl.q5 >= countdown or dict['kb_da'] == 2:
3852 3761
                     if own['gt_cd2'] == 0:
3853 3762
                         own['gt_cd2'] = 60
@@ -3858,8 +3767,6 @@ def main():
3858 3767
                             cont.activate(own.actuators["grindoutRight"])
3859 3768
                         if own['grind_out_type'] == None:
3860 3769
                             own['grind_out_type'] = 'bs fak back'
3861
-                        #own.applyRotation((0, .15, 0), True)
3862
-                        print('board out')
3863 3770
                     if STANCE == False:
3864 3771
 
3865 3772
                         if own['footplant_on'] == True:
@@ -3867,31 +3774,29 @@ def main():
3867 3774
                             cont.activate(own.actuators["grindoutRight"])
3868 3775
                         if own['grind_out_type'] == None:
3869 3776
                             own['grind_out_type'] = 'bs reg back'
3870
-                        #own.applyRotation((0, -.15, 0), True)
3871
-                        print('board out')
3777
+
3872 3778
                     own["grindoutturn"] = gotcd
3873 3779
                     own['invert_on'] = 0
3874 3780
                 if sl.q1 >= countdown or dict['kb_ua'] == 2:
3875
-                #if lq1on == 1 or dict['kb_ua'] == 2:
3876 3781
                     if own['gt_cd2'] == 0:
3877 3782
                         own['gt_cd2'] = 60
3878 3783
                     if STANCE == True:
3879 3784
                         if own['footplant_on'] == True:
3880 3785
                             own.setLinearVelocity([(outvel.x + bsoutvel), outvel.y, outvel.z], 1)
3881
-                            #cont.activate(own.actuators["grindoutRight"])
3786
+            
3882 3787
                         if own['grind_out_type'] == None:
3883 3788
                             own['grind_out_type'] = 'bs fak forward'
3884
-                        #own.applyRotation((0, .15, 0), True)
3789
+            
3885 3790
                     if STANCE == False:
3886 3791
                         if own['footplant_on'] == True:
3887 3792
                             own.setLinearVelocity([(outvel.x + -bsoutvel), outvel.y, outvel.z], 1)
3888
-                            #cont.activate(own.actuators["grindoutRight"])
3793
+            
3889 3794
                         if own['grind_out_type'] == None:
3890 3795
                             own['grind_out_type'] = 'bs reg forward'
3891
-                        #own.applyRotation((0, -.15, 0), True)
3796
+            
3892 3797
                     own["grindoutturn"] = gotcd
3893 3798
                     own['invert_on'] = 0
3894
-            #if lq1on or lq2on or lq3on or lq4on or lq5on or lq6on or lq7on or lq8on:
3799
+            
3895 3800
             if sl.q1 >= countdown or sl.q2 >= countdown or sl.q3 >= countdown or sl.q4 >= countdown or sl.q5 >= countdown or sl.q6 >= countdown or sl.q7 >= countdown:
3896 3801
                 gt_cd = own['gt_cd']
3897 3802
                 if gt_cd == 0:
@@ -3980,7 +3885,6 @@ def main():
3980 3885
     if own["grindoutturn"] > 0:
3981 3886
         own["grindoutturn"] = own["grindoutturn"] - 1
3982 3887
 
3983
-
3984 3888
     def air_height():
3985 3889
         height = own["air_height"]
3986 3890
         if lf_ground == True and not onGround:
@@ -4041,8 +3945,6 @@ def main():
4041 3945
 
4042 3946
     def wallride_sound():
4043 3947
         sact = own.actuators["wallSound"]
4044
-        #print('wr as', own['aState'])
4045
-        #if own["wallride"] != None and (own['actionState'] == 'reg_wall_r' or own['actionState'] == 'reg_wall_l' or own['actionState'] == 'fak_wall_r' or own['actionState'] == 'fak_wall_l'):
4046 3948
         if  own['aState'] in ['reg_wall_r', 'reg_wall_l', 'fak_wall_r', 'fak_wall_l'] and not skater.isPlayingAction(3):
4047 3949
             sact.volume = .2
4048 3950
             cont.activate(own.actuators["wallSound"])
@@ -4167,8 +4069,6 @@ def main():
4167 4069
                 if ('rd_cl' in str(const) or 'rd_cr' in str(const)):
4168 4070
                     const.enforce = stre  
4169 4071
 
4170
-
4171
-
4172 4072
     def land_mod():
4173 4073
         if own['requestAction'] == 'reg_land':
4174 4074
             own['EaRequest'] = 'land'
@@ -4295,12 +4195,11 @@ def main():
4295 4195
     Distance = -10
4296 4196
     End = own.worldPosition + (own.worldOrientation.col[Axis]*Distance)
4297 4197
     Start = own.worldPosition
4298
-    #localRay = own.rayCast(End, Start, 0,'ground', 0, 0, 0)
4299 4198
     localRay = groundRay
4300 4199
     own['vert'] = 0
4301 4200
     own['transition'] = False
4302 4201
     aligned = False
4303
-    #if localRay[0] or grindRay[0]:
4202
+
4304 4203
     if localRay[0]:
4305 4204
         if 'transition' in localRay[0]:
4306 4205
             own['transition'] = True
@@ -4321,8 +4220,7 @@ def main():
4321 4220
            
4322 4221
         if localHitDist > .31 and localHitDist < 2:
4323 4222
             own.alignAxisToVect(localRay[2], 2, .05)
4324
-    #else:
4325
-        #print('no localRay')
4223
+
4326 4224
         else:
4327 4225
             if own['jump_timer'] == 0:
4328 4226
                 y1 = Start
@@ -4344,13 +4242,11 @@ def main():
4344 4242
                     localHitDist = (Start - localRay[1]).length
4345 4243
                     if localHitDist < .3:
4346 4244
                         own.applyMovement((0, 0, (.3 - localHitDist)), True)
4347
-                        #print('moving new rayb')
4348 4245
                         if localRay[2] != [0, 0, -1] and grindHit == 0:
4349 4246
                             own.alignAxisToVect(localRay[2], 2, .25)
4350 4247
                             aligned = True
4351 4248
 
4352 4249
     else:
4353
-        #print('vh')
4354 4250
         Axis = 2
4355 4251
         Distance = -2
4356 4252
         End = Vector.copy(own.worldPosition + (own.worldOrientation.col[Axis]*Distance))
@@ -4364,9 +4260,6 @@ def main():
4364 4260
             print('vert hit')
4365 4261
             ud_sens = .04      
4366 4262
             if 'spine' in localRay_v[0] and lUD < -.04:
4367
-                print('spine hit!!!!!', lUD)
4368
-                
4369
-                #print('roting')
4370 4263
                 if STANCE == True:
4371 4264
                     own.applyRotation([0,.15,0], True)
4372 4265
                 else:    
@@ -4379,62 +4272,22 @@ def main():
4379 4272
                 own.linearVelocity.x *= .98
4380 4273
                 own.linearVelocity.z = .1
4381 4274
 
4382
-
4383
-
4384
-                #if localHitDist < .8 and (dict['lUD'] < .04 or dict['lUD'] > -.04):
4385
-                #if localHitDist < .8:    
4386
-
4387
-
4388
-
4389
-
4390
-
4391
-
4392
-
4393
-                # if localHitDist < 1.5:        
4394
-                #     #own.applyMovement((0,0,((.4 - (localHitDist) * .1))), True)
4395
-                #     #own.applyMovement((0, 0, (.3 - localHitDist)), True)
4396
-                #     #if localHitDist < 1.0:
4397
-                #     own.applyForce((0, 0, (.4 - localHitDist) *1000), True)
4398
-
4399
-                #     print('moving vert ray')
4400
-                #     if localRay_v[2] != [0, 0, -1] and grindHit == 0:
4401
-                #     #if localRay_v[2] != [0,0,-1]:
4402
-                #         #own.alignAxisToVect(localRay_v[2], 2, .4)
4403
-                #         own.alignAxisToVect(localRay_v[2], 2, .05)
4404
-                #         aligned = True
4405
-
4406
-
4407
-
4408
-                #f localHitDist < .295:
4409 4275
                 if localHitDist < .4:    
4410 4276
                     if own['jump_timer'] < 30:
4411 4277
                         own.localLinearVelocity.z = 0
4412 4278
                     own.applyMovement((0, 0, (.295 - (localHitDist))), True)
4413
-                    #own.applyMovement((0, 0, (.35 - (localHitDist))), True)
4414 4279
                     if localRay_v[2] != [0, 0, -1]:    
4415 4280
                         own.alignAxisToVect(localRay_v[2], 2, .5)
4416 4281
                         aligned = True
4417
-
4418
-            #elif lUD >= -ud_sens:
4419
-                
4420
-
4421
-
4422
-
4423 4282
             else:
4424 4283
                 own.alignAxisToVect([0,0,1], 2, .1)
4425 4284
                 print('doing nothing')            
4426
-        #print(own['lGobj'], 'lGobj')                         
4427
-
4428
-
4429
-
4430 4285
 
4431 4286
     localHitDist = 1000
4432 4287
     raytof = scene.objects['rayTo_f']
4433 4288
     raytob = scene.objects['rayTo_b']
4434 4289
 
4435
-
4436 4290
     if localRay[0]:
4437
-        #print('gh')
4438 4291
         localHitDist = (own.worldPosition - localRay[1]).length
4439 4292
     if localHitDist > .3 and frames_since_grinding < 30 and frames_since_grinding > 0 and own['grindTouch'] == False:
4440 4293
         rayf = own.rayCast(raytof.worldPosition, own.worldPosition, 0, 'transition', 1, 0, 0)
@@ -4449,7 +4302,6 @@ def main():
4449 4302
             aligned = True
4450 4303
             print('rayb hit')
4451 4304
 
4452
-
4453 4305
     if not aligned or (lBump == 1):
4454 4306
         own.alignAxisToVect([0.0, 0.0, 1.0], 2, .00003)
4455 4307
 
@@ -4458,12 +4310,8 @@ def main():
4458 4310
     if (grindDar == False and onGround and own['grindTouch'] == False) or own['jump_timer'] > 40:
4459 4311
         own['grindType'] = ''
4460 4312
 
4461
-    
4462 4313
     if cont.sensors['npc'].triggered:
4463 4314
         cam['walker_manager'].pub.dispatch('path found', ['hit', own, cont.sensors['npc'].hitObject])
4464
-        
4465
-        #print('npc hit')
4466
-
4467 4315
 
4468 4316
     if own['actionState'] in ['frontside_grab_out', 'backside_grab_out', 'frontside_nose_grab_out', 'frontside_tail_grab_out', 'backside_nose_grab_out', 'backside_tail_grab_out', 'reg_walk_air_out', 'reg_air-walk_air', 'reg_judo_out', 'reg_frigid_out', 'reg_fsonefoot_out', 'reg_onefoot_out', 'reg_airwalk_out'] and own['requestAction'] in ['fak_land', 'reg_land']:
4469 4317
         own['requestAction'] = 'reg_land'

+ 2
- 2
shuvit.blend View File

@@ -1,3 +1,3 @@
1 1
 version https://git-lfs.github.com/spec/v1
2
-oid sha256:e72556574622eb6505f8efaca9e42a1f2f722a16f51198ba1c9fdcbaa1a7764c
3
-size 117183140
2
+oid sha256:81e6f6a85fa2051df8668efacb6b1e7c72e7374d2dfb678bb77146b23b12cf90
3
+size 117308004

Loading…
Cancel
Save