Browse Source

cam height

shuvit 5 years ago
parent
commit
30e304a202
6 changed files with 55 additions and 9 deletions
  1. 8
    2
      Settings.py
  2. 2
    0
      Startup.py
  3. 1
    1
      co_ActionState.py
  4. 27
    3
      controller2.py
  5. 15
    2
      menuV3.py
  6. 2
    1
      walk.py

+ 8
- 2
Settings.py View File

@@ -90,7 +90,8 @@ def readSettings():
90 90
     dict['cam_max'] = float(data[58])
91 91
     dict['music_player'] = int(data[60]) 
92 92
     dict['fxaa'] = int(data[62]) 
93
-    dict['FXAA_SPAN_MAX'] = float(data[63])         
93
+    dict['FXAA_SPAN_MAX'] = float(data[63])   
94
+    dict['cch_targetHeight'] = float(data[65])         
94 95
     
95 96
     
96 97
     #print('bc = ', dict['bc'])        
@@ -169,7 +170,12 @@ def writeSettings():
169 170
         writing.write(str(dict["music_player"])+"\n")
170 171
         writing.write(str("//fxaa")+"\n")
171 172
         writing.write(str(dict["fxaa"])+"\n") 
172
-        writing.write(str(dict["FXAA_SPAN_MAX"])+"\n")         
173
+        writing.write(str(dict["FXAA_SPAN_MAX"])+"\n")    
174
+        writing.write(str("//camera target height")+"\n")
175
+        writing.write(str(dict["cch_targetHeight"] )+"\n")    
176
+        
177
+        
178
+        #dict['ccH_targetHeight']     
173 179
         
174 180
         #writing.write(str(own["framerate"])+"\n")
175 181
         print("writing settings")

+ 2
- 0
Startup.py View File

@@ -144,5 +144,7 @@ def main():
144 144
     dict['char_loaded'] = 0
145 145
     dict['man_sens_l'] = .03
146 146
     dict['man_sens_r'] = .08
147
+    dict['walk'] = 1
148
+    dict['cur_ccH_targetHeight'] = .3
147 149
 
148 150
 main()

+ 1
- 1
co_ActionState.py View File

@@ -4812,7 +4812,7 @@ def main():
4812 4812
         cur_frame = skater.getActionFrame(trans_layer)  
4813 4813
         cur_frame = round(cur_frame, 2)     
4814 4814
     #print('oG: ', og_request, 'rA:', requestAction, '|aS:', own['actionState'], 'q', queueAction, own['actionTimer'], 'cf', cur_frame)
4815
-    print('rA:', requestAction, '|aS:', own['actionState'], own['actionTimer'], 'cf', cur_frame)
4815
+    #print('rA:', requestAction, '|aS:', own['actionState'], own['actionTimer'], 'cf', cur_frame)
4816 4816
     cur_frame = skater.getActionFrame(trans_layer)
4817 4817
     #print(cur_frame)
4818 4818
     def printplaying():

+ 27
- 3
controller2.py View File

@@ -330,6 +330,7 @@ def main():
330 330
         STANCE = own["stance"]
331 331
         playing_action_frame = skater.getActionFrame(LAND_LAYER)
332 332
         if lf_ground == False and r_ground.triggered == True:
333
+            own['no_grind'] = False
333 334
             own['jump_from_trans'] = 0
334 335
             nearestObject = None
335 336
             minDist = None
@@ -798,7 +799,13 @@ def main():
798 799
             except:
799 800
                 #print('trans jump broke')
800 801
                 pass
801
-            if grindHit == False:
802
+            if grindHit == False:    
803
+                if rot.z < .7:
804
+                    rotamt = rot.z * .5
805
+                    own.applyRotation([0, rotamt,0], True)
806
+                    own['no_grind'] = True
807
+                    own['no_grind_pull'] = 1
808
+                 
802 809
                 own.applyForce(force, local)
803 810
                 force2 = [0.0, 0, 150]
804 811
                 own.applyForce(force2, True)
@@ -3681,7 +3688,7 @@ def main():
3681 3688
         frames_since_grinding = frame - lgf
3682 3689
         ylimit = .84
3683 3690
         #print(ground_since, 'ground_since')
3684
-        if ground_since < 20 and ground_since > 1 and grindHit == 0:
3691
+        if ground_since < 20 and ground_since > 1 and grindHit == 0 and own['jump_timer'] < 40:
3685 3692
             ylimit = ylimit + ((ground_since - 15) * -.005)
3686 3693
             
3687 3694
             yvel = own.linearVelocity.y
@@ -4313,14 +4320,29 @@ def main():
4313 4320
 
4314 4321
     def air_mover():
4315 4322
         if r_ground.triggered == False and jump_timer > 53 and frames_since_grinding > 50:
4323
+            if grindDar2.positive:
4324
+                print('grinddaring')
4316 4325
             if lUD > 0.075:
4317 4326
                 if STANCE == 0:
4318 4327
                     force2 = [120, 0, 10]
4328
+                    #own.applyRotation([0,.5,0], True)
4319 4329
                 if STANCE == 1:
4320 4330
                     force2 = [-120, 0, 10]            
4321 4331
                 
4322 4332
                 own.applyForce(force2, True)
4323 4333
                 own['no_grind_pull'] = 1
4334
+        if r_ground.triggered == False and jump_timer > 53 and frames_since_grinding > 50:
4335
+            if grindDar2.positive:
4336
+                print('grinddaring')
4337
+            if lUD < -0.075:
4338
+#                if STANCE == 0:
4339
+#                    force2 = [-120, 0, 10]
4340
+#                    #own.applyRotation([0,.5,0], True)
4341
+#                if STANCE == 1:
4342
+#                    force2 = [120, 0, 10]            
4343
+#                
4344
+#                own.applyForce(force2, True)
4345
+                own['no_grind_pull'] = 1                
4324 4346
         if r_ground.triggered == False and jump_timer > 10 and lUD > 0.075 and frames_since_grinding > 50:
4325 4347
             if STANCE == 0:
4326 4348
                 force2 = [7, 0, 10]
@@ -4446,4 +4468,6 @@ def main():
4446 4468
     if (grindDar == False and r_ground.triggered and own['grindTouch'] == False) or own['jump_timer'] > 40:
4447 4469
         own['grindType'] = ''
4448 4470
         
4449
-    #print('q1:', q1oncd, 'q2:', q2oncd, 'q3:', q3oncd, 'q4:', q4oncd, 'q5:', q5oncd, 'q6:', q6oncd, 'q7:', q7oncd, 'q8:', q8oncd)     
4471
+    #print('q1:', q1oncd, 'q2:', q2oncd, 'q3:', q3oncd, 'q4:', q4oncd, 'q5:', q5oncd, 'q6:', q6oncd, 'q7:', q7oncd, 'q8:', q8oncd)   
4472
+    
4473
+    dict['walk'] = 0  

+ 15
- 2
menuV3.py View File

@@ -495,6 +495,17 @@ def endpoint(funct, motion, dict, cont):
495 495
             b -= .1    
496 496
         dict['cam_max'] = round(b,2) 
497 497
         
498
+    if funct == 'target height':
499
+        b = dict['cch_targetHeight']
500
+        if motion == 'inc':
501
+            b += .05
502
+        else:
503
+            b -= .05    
504
+        dict['cch_targetHeight'] = round(b,3) 
505
+            
506
+        
507
+#cch_targetHeight        
508
+        
498 509
     if funct == 'recorder on':
499 510
         if motion == 'inc':
500 511
             cam['recorder_on'] = 1
@@ -708,7 +719,7 @@ def get_c_list(dict):
708 719
     if dict['mlevel'] == 2:
709 720
         if dict['lv1_opt'] == 'camera':
710 721
         #if opt == 'settings':
711
-            dict['current_list'] = ['cam height', 'focal length', 'min dist', 'max dist']            
722
+            dict['current_list'] = ['cam height', 'focal length', 'min dist', 'max dist', 'target height']            
712 723
             
713 724
 
714 725
     if dict['mlevel'] == 3:
@@ -854,7 +865,7 @@ def init(own, dict):
854 865
     dict['mlevel'] = 0
855 866
     dict['current_opt'] = ''
856 867
     dict['pause_menu_text'] = ''
857
-    dict['menu_end_points'] = ['exit', 'restart', 'shirt color r', 'shirt color g', 'shirt color b', 'shoe color r', 'shoe color g', 'shoe color b','deck color r', 'deck color g', 'deck color b', 'shirt logo', 'brightness / contrast on', 'brightness value', 'contrast value', 'hdr on', 'avgL', 'hdr strength', 'ao on', 'ao radius', 'ao width', 'ao only', 'dof on', 'sun strength', 'sun rot x', 'sun rot y', 'shadow on', 'ambient strength', 'Demo Scene', 'Empty Lot', 'Park A', 'Training', 'Spine', 'Warehouse', 'Shop', '1920x1080', '1280x720', '1024x768', '800x600', 'fullscreen', 'bloom on', 'cam height', 'focal length', 'min dist', 'max dist', 'enter replay', 'recorder on', 'record length', 'enter replay (press back button)', 'recorder on', 'record length (n/a)', 'physics', 'fxaa on', 'fxaa span max',] + player_list
868
+    dict['menu_end_points'] = ['exit', 'restart', 'shirt color r', 'shirt color g', 'shirt color b', 'shoe color r', 'shoe color g', 'shoe color b','deck color r', 'deck color g', 'deck color b', 'shirt logo', 'brightness / contrast on', 'brightness value', 'contrast value', 'hdr on', 'avgL', 'hdr strength', 'ao on', 'ao radius', 'ao width', 'ao only', 'dof on', 'sun strength', 'sun rot x', 'sun rot y', 'shadow on', 'ambient strength', 'Demo Scene', 'Empty Lot', 'Park A', 'Training', 'Spine', 'Warehouse', 'Shop', '1920x1080', '1280x720', '1024x768', '800x600', 'fullscreen', 'bloom on', 'cam height', 'focal length', 'min dist', 'max dist', 'enter replay', 'recorder on', 'record length', 'enter replay (press back button)', 'recorder on', 'record length (n/a)', 'physics', 'fxaa on', 'fxaa span max', 'target height'] + player_list
858 869
     
859 870
 def output(dict):
860 871
     try:
@@ -965,6 +976,8 @@ def output(dict):
965 976
             outp = outp + '(2.4): ' + str(dict['cam_max'])  
966 977
         if dict['current_opt'] ==  'recorder on':
967 978
             outp = outp + ': ' + str(dict['recorder_on']) 
979
+        if dict['current_opt'] ==  'target height':
980
+            outp = outp + ': ' + str(dict['cch_targetHeight'])             
968 981
 #        if dict['current_opt'] ==  'character':
969 982
 #            outp = outp + ': ' + str(dict['character'])             
970 983
                                 

+ 2
- 1
walk.py View File

@@ -291,7 +291,7 @@ if walking == None and r_ground.positive and own['walk_jump_timer'] == 0:
291 291
         #print('minusvel', velx)
292 292
     else:
293 293
         #pass
294
-        print('minusvel')
294
+        #print('minusvel')
295 295
         if own.linearVelocity.x > .1 or own.linearVelocity.x < -.1:
296 296
             own.linearVelocity.x *= .01
297 297
         else:
@@ -1255,4 +1255,5 @@ own['lastrts'] = rtsBut
1255 1255
 own['lastbkBut'] = bkBut
1256 1256
 own['dropinCol'] = dropinCol
1257 1257
 own['walk'] = 1
1258
+dict['walk'] = 1
1258 1259
     

Loading…
Cancel
Save