Parcourir la source

manual lands fix

shuvit il y a 6 ans
Parent
révision
5aa75ebd4f
5 fichiers modifiés avec 60 ajouts et 33 suppressions
  1. 5
    4
      Settings.py
  2. 8
    8
      co_ActionState.py
  3. 11
    4
      controller2.py
  4. 34
    11
      menuV3.py
  5. 2
    6
      walk.py

+ 5
- 4
Settings.py Voir le fichier

@@ -83,8 +83,8 @@ def readSettings():
83 83
     dict['bloom_on'] = int(data[53]) 
84 84
     dict['cam_height'] = float(data[55]) 
85 85
     dict['focal_length'] = int(data[56])        
86
-    
87
-    
86
+    dict['cam_min'] = float(data[57])
87
+    dict['cam_max'] = float(data[58])
88 88
     
89 89
     
90 90
     #print('bc = ', dict['bc'])        
@@ -156,8 +156,9 @@ def writeSettings():
156 156
         writing.write(str(dict["bloom_on"])+"\n")  
157 157
         writing.write(str("//cam")+"\n")
158 158
         writing.write(str(dict["cam_height"])+"\n") 
159
-        writing.write(str(dict["focal_length"])+"\n")                 
160
-        
159
+        writing.write(str(dict["focal_length"])+"\n") 
160
+        writing.write(str(dict["cam_min"])+"\n")                 
161
+        writing.write(str(dict["cam_max"])+"\n") 
161 162
         
162 163
         
163 164
         #writing.write(str(own["framerate"])+"\n")

+ 8
- 8
co_ActionState.py Voir le fichier

@@ -438,22 +438,22 @@ def main():
438 438
 
439 439
 
440 440
         #print(requestAction)
441
-        if l_actionState == 'reg_air_tail to manual' and requestAction == 'fak_nmanual':
441
+        if l_actionState == 'reg_air_tail to manual' and requestAction in ['fak_nmanual', 'fak_manual']:
442 442
             requestAction = 'reg-fak_nmanual'
443
-        if l_actionState == 'fak_air_tail to manual' and requestAction == 'reg_nmanual':
443
+        if l_actionState == 'fak_air_tail to manual' and requestAction in ['reg_nmanual', 'reg_manual']:
444 444
             requestAction = 'fak-reg_nmanual' 
445
-        if l_actionState == 'fak_air_tail to nmanual' and requestAction == 'reg_nmanual':
445
+        if l_actionState == 'fak_air_tail to nmanual' and requestAction in ['reg_nmanual', 'reg_manual']:
446 446
             requestAction = 'fak-reg_manual'   
447 447
             
448
-        if l_actionState == 'reg_air_nose to nmanual' and requestAction == 'fak_manual':
448
+        if l_actionState == 'reg_air_nose to nmanual' and requestAction in ['fak_manual', 'fak_nmanual']:
449 449
             requestAction = 'reg-fak_manual'
450
-        if l_actionState == 'fak_air_nose to nmanual' and requestAction == 'reg_manual':
450
+        if l_actionState == 'fak_air_nose to nmanual' and requestAction in ['reg_manual', 'reg_nmanual']:
451 451
             requestAction = 'fak-reg_manual' 
452 452
             
453 453
             
454
-#        if l_actionState == 'fak_air_nose to nmanual' and requestAction == 'reg_nmanual':
454
+#        if l_actionState == 'fak_air_nose to nmanual' and requestAction in ['reg_nmanual', 'reg_manual']:
455 455
 #            requestAction = 'fak-reg_manual'  
456
-#            #print('this???')
456
+            #print('this???')
457 457
 #        if l_actionState == 'fak-reg_manual' and requestAction == 'reg_nmanual':
458 458
 #            requestAction = 'reg_manual'                
459 459
             
@@ -3830,7 +3830,7 @@ def main():
3830 3830
         cur_frame = skater.getActionFrame(trans_layer)  
3831 3831
         cur_frame = round(cur_frame, 2)     
3832 3832
     #print("oG: ", og_request, "rA:", requestAction, "|aS:", own['actionState'], "q", queueAction, own['actionTimer'], 'cf', cur_frame)
3833
-    #print("rA:", requestAction, "|aS:", own['actionState'], own['actionTimer'], 'cf', cur_frame)
3833
+    print("rA:", requestAction, "|aS:", own['actionState'], own['actionTimer'], 'cf', cur_frame)
3834 3834
     cur_frame = skater.getActionFrame(trans_layer)
3835 3835
     #print(cur_frame)
3836 3836
     def printplaying():

+ 11
- 4
controller2.py Voir le fichier

@@ -442,17 +442,24 @@ def main():
442 442
                     #print('---requesting fak nose manual')
443 443
                     own['manual_v2_type'] = 'fak manual' 
444 444
                     
445
-        if STANCE == 0 and own['manual_v2_type'] == 'fak manual':
445
+        if STANCE == 0 and (own['manual_v2_type'] == 'fak manual' or own['actionState'] == 'fak-reg_nmanual'):
446 446
             #print('change manual stance')
447 447
             own['manual_v2_type'] = 'reg nose manual' 
448
-        if STANCE == 1 and own['manual_v2_type'] == 'reg manual':
448
+            
449
+            
450
+            
451
+            
452
+        if STANCE == 1 and (own['manual_v2_type'] == 'reg manual' or own['actionState'] == 'reg-fak_nmanual'):
449 453
             #print('change manual stance')                        
450 454
             own['manual_v2_type'] = 'fak nose manual'
451 455
 
452
-        if STANCE == 0 and own['manual_v2_type'] == 'fak nose manual':
456
+
457
+
458
+
459
+        if STANCE == 0 and (own['manual_v2_type'] == 'fak nose manual' or own['actionState'] == 'fak-reg_manual'):
453 460
             #print('change manual stance')
454 461
             own['manual_v2_type'] = 'reg manual' 
455
-        if STANCE == 1 and own['manual_v2_type'] == 'reg nose manual':
462
+        if STANCE == 1 and (own['manual_v2_type'] == 'reg nose manual' or own['actionState'] == 'reg-fak_manual'):
456 463
             #print('change manual stance')                        
457 464
             own['manual_v2_type'] = 'fak manual'  
458 465
             

+ 34
- 11
menuV3.py Voir le fichier

@@ -21,7 +21,9 @@ def endpoint(funct, motion, dict, cont):
21 21
     shoeL = scene.objects['Char4:Shoes02.L']
22 22
     deck = scene.objects["deck"]
23 23
     throw_deck = scene.objectsInactive["throw_deck"] 
24
-    cam = scene.objects['Camera.003']       
24
+    cam = scene.objects['Camera.003']
25
+    cam2 = scene.objects['freecam']
26
+    cam3 = scene.objects['followcam']       
25 27
     c_move = .025 #color move amount  
26 28
     if funct == 'exit':
27 29
         #print("exit function", motion)
@@ -457,7 +459,20 @@ def endpoint(funct, motion, dict, cont):
457 459
             b -= 2    
458 460
         dict['focal_length'] = b                   
459 461
         
460
-        
462
+    if funct == 'min dist':
463
+        b = dict['cam_min']
464
+        if motion == 'inc':
465
+            b += .1
466
+        else:
467
+            b -= .1    
468
+        dict['cam_min'] = round(b,2) 
469
+    if funct == 'max dist':
470
+        b = dict['cam_max']
471
+        if motion == 'inc':
472
+            b += .1
473
+        else:
474
+            b -= .1    
475
+        dict['cam_max'] = round(b,2)                 
461 476
         
462 477
         
463 478
     #levels
@@ -601,7 +616,7 @@ def endpoint(funct, motion, dict, cont):
601 616
 def get_c_list(dict):
602 617
     #main menu
603 618
     if dict['mlevel'] == 0:
604
-        dict['current_list'] = ['settings', 'level', 'replay', 'restart', 'exit']
619
+        dict['current_list'] = ['settings', 'level', 'replay', 'exit']
605 620
         
606 621
     #opt = dict['current_list'][dict['current_index']]
607 622
     
@@ -660,9 +675,14 @@ def get_inputs(dict, cont):
660 675
     obj['sound'] = aud.Factory(bge.logic.expandPath('//sounds/select.wav'))
661 676
     obj['sound_a'] = aud.Factory(bge.logic.expandPath('//sounds/a.wav'))
662 677
     obj['sound_b'] = aud.Factory(bge.logic.expandPath('//sounds/b.wav')) 
663
-    
678
+
679
+    obj['sound'] = obj['sound'].pitch(.8)
680
+    obj['sound_a'] = obj['sound_a'].pitch(.8)
681
+    obj['sound_b'] = obj['sound_b'].pitch(.8)   
682
+    sound = aud.Factory(bge.logic.expandPath('//sounds/select.wav')) 
683
+    sound = sound.pitch(.8)
684
+
664 685
     if keyboard.events[bge.events.LEFTARROWKEY] == JUST_ACTIVATED or (dict['bBut'] == False and dict['last_bBut'] == True):
665
-        
666 686
         aud.device().play(obj['sound_b'])
667 687
         if dict['current_index'] not in dict['menu_end_points']:
668 688
             #print('lkey')
@@ -677,9 +697,7 @@ def get_inputs(dict, cont):
677 697
                 dict['current_index'] = dict['lv2_index']
678 698
         else:
679 699
             pass
680
-#            funct = dict['current_index']
681
-#            motion = 'dec'
682
-#            endpoint(funct, motion, dict)                               
700
+                              
683 701
         #a
684 702
     if (keyboard.events[bge.events.RIGHTARROWKEY] == JUST_ACTIVATED) or (dict['aBut'] == False and dict['last_aBut'] == True):
685 703
         aud.device().play(obj['sound_a'])
@@ -773,7 +791,7 @@ def init(own, dict):
773 791
     dict['mlevel'] = 0
774 792
     dict['current_opt'] = ''
775 793
     dict['pause_menu_text'] = ''
776
-    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', '1920x1080', '1280x720', '1024x768', '800x600', 'fullscreen', 'bloom on', 'cam height', 'focal length', 'min dist', 'max dist']
794
+    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', '1920x1080', '1280x720', '1024x768', '800x600', 'fullscreen', 'bloom on', 'cam height', 'focal length', 'min dist', 'max dist', 'enter replay', 'recorder on', 'record length']
777 795
     
778 796
 def output(dict):
779 797
     try:
@@ -869,9 +887,14 @@ def output(dict):
869 887
             outp = outp + ': ' + str(dict['bloom_on'])  
870 888
             
871 889
         if dict['current_opt'] ==  'cam height':
872
-            outp = outp + ': ' + str(dict['cam_height']) 
890
+            outp = outp + '(-0.4): ' + str(dict['cam_height']) 
873 891
         if dict['current_opt'] ==  'focal length':
874
-            outp = outp + ': ' + str(dict['focal_length'])                                                                         
892
+            outp = outp + '(16): ' + str(dict['focal_length'])  
893
+        
894
+        if dict['current_opt'] ==  'min dist':
895
+            outp = outp + '(1.6): ' + str(dict['cam_min'])  
896
+        if dict['current_opt'] ==  'max dist':
897
+            outp = outp + '(2.4): ' + str(dict['cam_max'])                                                                                         
875 898
             
876 899
     dict['pause_menu_text'] = outp
877 900
 def main(cont):

+ 2
- 6
walk.py Voir le fichier

@@ -177,11 +177,7 @@ else:
177 177
     
178 178
 wf = 1
179 179
 if own['last_walk_frame'] - own['last_roll_frame'] > 55:
180
-    wf = 0
181
-   
182
-   
183
-if dict['kb_lsh'] == 2 and dict['kb_ua'] == 2:   
184
-    print('wtf')   
180
+    wf = 0   
185 181
    
186 182
 if ((lup == 1 and aBut == 0) or (dict['kb_ua'] == 2 and dict['kb_lsh'] == 0)) and (r_ground.positive or own['stair_counter'] > 0) and xBut == 0 and wf == 0 and dict['kb_space'] == 0:
187 183
     own['walking'] = "regular"
@@ -388,7 +384,7 @@ def dropin():
388 384
         pass       
389 385
         
390 386
 def getonboard():
391
-    print(dict['kb_q'])
387
+    #print(dict['kb_q'])
392 388
     getonboard = own['getonboard']
393 389
     fliplay2 = 50#8560
394 390
     if yBut == True or dict['kb_q'] == 2:

Loading…
Annuler
Enregistrer