Browse Source

turns and fall fix

shuvit 5 years ago
parent
commit
003fcc41be

+ 1
- 1
Recordings/shuvit replay.dat
File diff suppressed because it is too large
View File


+ 2
- 2
assets/sc.blend View File

@@ -1,3 +1,3 @@
1 1
 version https://git-lfs.github.com/spec/v1
2
-oid sha256:991b78d9292032bb795a33fe3a753a09b3469acb608e80fe1e9e0f9eb83a17f9
3
-size 8618540
2
+oid sha256:b435dd53ddd57602bd250de6ea3d4539a372c5ba88df92cf4c33d340e2c8067a
3
+size 8596056

+ 23
- 23
config.ini View File

@@ -20,7 +20,7 @@ music_player = 1
20 20
 
21 21
 #level
22 22
 ######
23
-level = user1
23
+level = sc
24 24
 #------------
25 25
 
26 26
 #replay recorder
@@ -48,40 +48,40 @@ walk_focal_length = 14
48 48
 #character settings
49 49
 ###################
50 50
 
51
-character = becky
51
+character = ralph
52 52
 
53
-shirt_logo = 3
53
+shirt_logo = 4
54 54
 
55
-shirt_color_r = 0.61
56
-shirt_color_g = 0.61
57
-shirt_color_b = 0.61
55
+shirt_color_r = 0.54
56
+shirt_color_g = 0.4
57
+shirt_color_b = 0.05
58 58
 
59
-shoe_color_r = 0.16
59
+shoe_color_r = 0.02
60 60
 shoe_color_g = 0.02
61 61
 shoe_color_b = 0.02
62 62
 #-----------------
63 63
 
64 64
 #deck settings
65 65
 ##############
66
-deck_index = 2
66
+deck_index = 7
67 67
 deck_color_r = 1
68 68
 deck_color_g = 1.0
69 69
 deck_color_b = 1
70
-trucks_r = 0.95
71
-trucks_g = 1.0
72
-trucks_b = 1
70
+trucks_r = 0.46
71
+trucks_g = 0.03
72
+trucks_b = 0.03
73 73
 
74
-wheel1_r = 0.4
75
-wheel1_g = 0.08
74
+wheel1_r = 1
75
+wheel1_g = 0.71
76 76
 wheel1_b = 0.08
77
-wheel2_r = 0.08
78
-wheel2_g = 0.34
77
+wheel2_r = 1
78
+wheel2_g = 0.71
79 79
 wheel2_b = 0.08
80
-wheel3_r = 0.08
81
-wheel3_g = 0.08
82
-wheel3_b = 0.54
83
-wheel4_r = 0.4
84
-wheel4_g = 0.37
80
+wheel3_r = 1
81
+wheel3_g = 0.71
82
+wheel3_b = 0.08
83
+wheel4_r = 1
84
+wheel4_g = 0.71
85 85
 wheel4_b = 0.08
86 86
 #-------------------
87 87
 
@@ -90,7 +90,7 @@ wheel4_b = 0.08
90 90
 
91 91
 #brightness / contrast
92 92
 bc = 1
93
-BC_BRIGHTNESS = 1.0
93
+BC_BRIGHTNESS = 1.05
94 94
 BC_CONTRAST = 1.0
95 95
 
96 96
 #HDR
@@ -117,8 +117,8 @@ FXAA_SPAN_MAX = 8.0
117 117
 
118 118
 #sun settings
119 119
 #############
120
-sun_strength = 0.15
121
-ambient_strength = 1.25
120
+sun_strength = 1.05
121
+ambient_strength = 0.35
122 122
 sun_rot_x = -0.05
123 123
 sun_rot_y = -0.05
124 124
 shadow_on = 0

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


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


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


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


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


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


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


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


BIN
scripts/__pycache__/colors.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__/inputs.cpython-36.pyc View File


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


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


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


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


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


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


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


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


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


+ 21
- 8
scripts/controller2.py View File

@@ -1832,7 +1832,9 @@ def main():
1832 1832
         if lUD > turnsens or lUD < -turnsens:
1833 1833
             own["turnud"] = 1
1834 1834
         else:
1835
-            own["turnud"] = 0        
1835
+            own["turnud"] = 0
1836
+
1837
+        turnVel = .01                
1836 1838
     #light  
1837 1839
     #if manual and grindhit = true  
1838 1840
         if lLR > turnsens and lLR < (turnsens * 1.3) and (grindHit == False or (manual == 1 and grindHit == True)):       
@@ -1871,9 +1873,9 @@ def main():
1871 1873
             if r_ground.triggered == True:
1872 1874
                 #print("med turn")
1873 1875
                 if STANCE == 0:   
1874
-                    own.setLinearVelocity([linVelocity2.x - speed, linVelocity2.y, linVelocity2.z], 1)
1876
+                    own.setLinearVelocity([linVelocity2.x - speed, linVelocity2.y - turnVel, linVelocity2.z], 1)
1875 1877
                 if STANCE == 1:   
1876
-                    own.setLinearVelocity([linVelocity2.x + speed, linVelocity2.y, linVelocity2.z], 1)  
1878
+                    own.setLinearVelocity([linVelocity2.x + speed, linVelocity2.y - turnVel, linVelocity2.z], 1)  
1877 1879
         if (lLR < (-turnsens * 1.3) or dict['kb_la'] == 2) and (grindHit == False or (manual == 1 and grindHit == True)):
1878 1880
             #turn right
1879 1881
             if rot.z < .4:
@@ -3598,7 +3600,7 @@ def main():
3598 3600
             if STANCE == 0:
3599 3601
                 yvel *= -1
3600 3602
             try:    
3601
-                dist = r_ground.hitObject.worldPosition - own.worldPosition
3603
+                #dist = r_ground.hitObject.worldPosition - own.worldPosition
3602 3604
                 #print('ground dist', dist)
3603 3605
                 if own.linearVelocity.y > .01 or own.linearVelocity.y < -.01:
3604 3606
                     own.applyRotation([0,0,yvel], True)
@@ -3609,10 +3611,21 @@ def main():
3609 3611
                 pass       
3610 3612
         else:    
3611 3613
             if r_ground.triggered and touched == False and grindHit == 0 and frames_since_grinding > 20:    
3612
-                linVelocity4 = own.getLinearVelocity(True)
3613
-                newy = linVelocity4.y * ylimit   
3614
-                force = [linVelocity4.x, newy, linVelocity4.z]
3615
-                own.setLinearVelocity(force, True) 
3614
+            #     linVelocity4 = own.getLinearVelocity(True)
3615
+            #     newy = linVelocity4.y * ylimit   
3616
+            #     force = [linVelocity4.x, newy, linVelocity4.z]
3617
+            #     own.setLinearVelocity(force, True) 
3618
+                yvel = own.linearVelocity.y
3619
+                yvel = yvel *.03
3620
+                if STANCE == 0:
3621
+                    yvel *= -1
3622
+                try:    
3623
+                    if own.linearVelocity.y > .01 or own.linearVelocity.y < -.01:
3624
+                        own.applyRotation([0,0,yvel], True)
3625
+                    
3626
+                except:
3627
+                    pass 
3628
+
3616 3629
         #print(ylimit, 'ylimit')       
3617 3630
 
3618 3631
     def getoffboard():

+ 1
- 1
scripts/grindV2.py View File

@@ -548,7 +548,7 @@ def main():
548 548
                         stre = .45
549 549
                         own.alignAxisToVect(hitNormal, 2, stre) 
550 550
                         #print("align")                   
551
-                    own.worldPosition = [nearpos.x, nearpos.y, nearpos.z + .2975]
551
+                    #own.worldPosition = [nearpos.x, nearpos.y, nearpos.z + .2975]
552 552
                     #print('moving world')
553 553
             #print("grinding")
554 554
             grind_height_dif = (own.worldPosition[2] - nearestObject.worldPosition[2]) - .287

+ 26
- 4
scripts/walk.py View File

@@ -667,6 +667,8 @@ def main(cont):
667 667
             own["spawn_stance"] = stance   
668 668
     def falldeck():
669 669
         throw_deck_empty = scene.objects["throw_deck_empty"]
670
+        throw_deck_empty.worldPosition.y += .5
671
+        throw_deck_empty.worldPosition.x += .5
670 672
         deckact = deck.actuators["Visibility"]
671 673
         trucksact = trucks.actuators["Visibility"]
672 674
         wheel1act = wheel1.actuators["Visibility"]
@@ -788,11 +790,12 @@ def main(cont):
788 790
             falldeck()        
789 791
             if STANCE == 1:
790 792
                 own['requestAction'] = 'fak_air-walk_air'            
791
-                own.setLinearVelocity([3,2,0], True)
793
+                #own.setLinearVelocity([3,2,0], True)
792 794
             else:
793 795
                 own['requestAction'] = 'reg_air-walk_air'
794
-                own.setLinearVelocity([-3,-2,0], True)    
796
+                #own.setLinearVelocity([-3,-2,0], True)    
795 797
             own['fall'] = False
798
+            own.worldPosition.z += .3
796 799
 
797 800
     def sit():
798 801
         #turn off sit
@@ -1105,7 +1108,8 @@ def main(cont):
1105 1108
             own['lF_ground_frame'] = own['framenum']
1106 1109
             if 'grind' in r_ground.hitObject:
1107 1110
                 if own['framenum'] - own['last_fall_frame'] < 90:
1108
-                    own.applyForce([0,100,0], True)
1111
+                    #own.applyForce([0,100,0], True)
1112
+                    pass
1109 1113
                     #print('moving away from rail')
1110 1114
                     
1111 1115
             yvel = own.linearVelocity.y
@@ -1216,7 +1220,25 @@ def main(cont):
1216 1220
     if own['requestAction'] == 'reg_walkFast_nb' and own.linearVelocity.x > (wts * -1):
1217 1221
         own['requestAction'] = 'reg_walk_nb' 
1218 1222
     if own['requestAction'] == 'fak_walkFast_nb' and own.linearVelocity.x < wts:
1219
-        own['requestAction'] = 'fak_walk_nb'                         
1223
+        own['requestAction'] = 'fak_walk_nb'   
1224
+
1225
+
1226
+    if r_ground.triggered:
1227
+        #force2 = [0.0, 0, dict['antibounce']]
1228
+        #own.applyForce(force2, True)
1229
+
1230
+        gdist = ((own.worldPosition.z - r_ground.hitPosition[2]))  
1231
+        #print(gdist)
1232
+        if gdist < .3 and gdist > .1:
1233
+            #move = 2.875 - gdist
1234
+            move = (.3 - gdist)*.5
1235
+            #move = (own.worldPosition.z + gdist)
1236
+            if move > 0:
1237
+                own.worldPosition.z = own.worldPosition.z + move
1238
+            else:
1239
+                own.worldPosition.z = own.worldPosition.z - move    
1240
+            own.linearVelocity.z = 0        
1241
+
1220 1242
     onboard() 
1221 1243
     jump()
1222 1244
     dropin()

+ 2
- 2
shuvit.blend View File

@@ -1,3 +1,3 @@
1 1
 version https://git-lfs.github.com/spec/v1
2
-oid sha256:2a6cee59049ae4f760ee3d6ca3d0270335b6ed7422cf02346bbf3729cf009e5d
3
-size 180312212
2
+oid sha256:ff5b5e06025aeb3b56c49383416fe76749cc34457c74537362de4614673b62fe
3
+size 180304480

Loading…
Cancel
Save