Bladeren bron

manual lands fix

shuvit 6 jaren geleden
bovenliggende
commit
5aa75ebd4f
5 gewijzigde bestanden met toevoegingen van 60 en 33 verwijderingen
  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 Bestand weergeven

83
     dict['bloom_on'] = int(data[53]) 
83
     dict['bloom_on'] = int(data[53]) 
84
     dict['cam_height'] = float(data[55]) 
84
     dict['cam_height'] = float(data[55]) 
85
     dict['focal_length'] = int(data[56])        
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
     #print('bc = ', dict['bc'])        
90
     #print('bc = ', dict['bc'])        
156
         writing.write(str(dict["bloom_on"])+"\n")  
156
         writing.write(str(dict["bloom_on"])+"\n")  
157
         writing.write(str("//cam")+"\n")
157
         writing.write(str("//cam")+"\n")
158
         writing.write(str(dict["cam_height"])+"\n") 
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
         #writing.write(str(own["framerate"])+"\n")
164
         #writing.write(str(own["framerate"])+"\n")

+ 8
- 8
co_ActionState.py Bestand weergeven

438
 
438
 
439
 
439
 
440
         #print(requestAction)
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
             requestAction = 'reg-fak_nmanual'
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
             requestAction = 'fak-reg_nmanual' 
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
             requestAction = 'fak-reg_manual'   
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
             requestAction = 'reg-fak_manual'
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
             requestAction = 'fak-reg_manual' 
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
 #            requestAction = 'fak-reg_manual'  
455
 #            requestAction = 'fak-reg_manual'  
456
-#            #print('this???')
456
+            #print('this???')
457
 #        if l_actionState == 'fak-reg_manual' and requestAction == 'reg_nmanual':
457
 #        if l_actionState == 'fak-reg_manual' and requestAction == 'reg_nmanual':
458
 #            requestAction = 'reg_manual'                
458
 #            requestAction = 'reg_manual'                
459
             
459
             
3830
         cur_frame = skater.getActionFrame(trans_layer)  
3830
         cur_frame = skater.getActionFrame(trans_layer)  
3831
         cur_frame = round(cur_frame, 2)     
3831
         cur_frame = round(cur_frame, 2)     
3832
     #print("oG: ", og_request, "rA:", requestAction, "|aS:", own['actionState'], "q", queueAction, own['actionTimer'], 'cf', cur_frame)
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
     cur_frame = skater.getActionFrame(trans_layer)
3834
     cur_frame = skater.getActionFrame(trans_layer)
3835
     #print(cur_frame)
3835
     #print(cur_frame)
3836
     def printplaying():
3836
     def printplaying():

+ 11
- 4
controller2.py Bestand weergeven

442
                     #print('---requesting fak nose manual')
442
                     #print('---requesting fak nose manual')
443
                     own['manual_v2_type'] = 'fak manual' 
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
             #print('change manual stance')
446
             #print('change manual stance')
447
             own['manual_v2_type'] = 'reg nose manual' 
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
             #print('change manual stance')                        
453
             #print('change manual stance')                        
450
             own['manual_v2_type'] = 'fak nose manual'
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
             #print('change manual stance')
460
             #print('change manual stance')
454
             own['manual_v2_type'] = 'reg manual' 
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
             #print('change manual stance')                        
463
             #print('change manual stance')                        
457
             own['manual_v2_type'] = 'fak manual'  
464
             own['manual_v2_type'] = 'fak manual'  
458
             
465
             

+ 34
- 11
menuV3.py Bestand weergeven

21
     shoeL = scene.objects['Char4:Shoes02.L']
21
     shoeL = scene.objects['Char4:Shoes02.L']
22
     deck = scene.objects["deck"]
22
     deck = scene.objects["deck"]
23
     throw_deck = scene.objectsInactive["throw_deck"] 
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
     c_move = .025 #color move amount  
27
     c_move = .025 #color move amount  
26
     if funct == 'exit':
28
     if funct == 'exit':
27
         #print("exit function", motion)
29
         #print("exit function", motion)
457
             b -= 2    
459
             b -= 2    
458
         dict['focal_length'] = b                   
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
     #levels
478
     #levels
601
 def get_c_list(dict):
616
 def get_c_list(dict):
602
     #main menu
617
     #main menu
603
     if dict['mlevel'] == 0:
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
     #opt = dict['current_list'][dict['current_index']]
621
     #opt = dict['current_list'][dict['current_index']]
607
     
622
     
660
     obj['sound'] = aud.Factory(bge.logic.expandPath('//sounds/select.wav'))
675
     obj['sound'] = aud.Factory(bge.logic.expandPath('//sounds/select.wav'))
661
     obj['sound_a'] = aud.Factory(bge.logic.expandPath('//sounds/a.wav'))
676
     obj['sound_a'] = aud.Factory(bge.logic.expandPath('//sounds/a.wav'))
662
     obj['sound_b'] = aud.Factory(bge.logic.expandPath('//sounds/b.wav')) 
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
     if keyboard.events[bge.events.LEFTARROWKEY] == JUST_ACTIVATED or (dict['bBut'] == False and dict['last_bBut'] == True):
685
     if keyboard.events[bge.events.LEFTARROWKEY] == JUST_ACTIVATED or (dict['bBut'] == False and dict['last_bBut'] == True):
665
-        
666
         aud.device().play(obj['sound_b'])
686
         aud.device().play(obj['sound_b'])
667
         if dict['current_index'] not in dict['menu_end_points']:
687
         if dict['current_index'] not in dict['menu_end_points']:
668
             #print('lkey')
688
             #print('lkey')
677
                 dict['current_index'] = dict['lv2_index']
697
                 dict['current_index'] = dict['lv2_index']
678
         else:
698
         else:
679
             pass
699
             pass
680
-#            funct = dict['current_index']
681
-#            motion = 'dec'
682
-#            endpoint(funct, motion, dict)                               
700
+                              
683
         #a
701
         #a
684
     if (keyboard.events[bge.events.RIGHTARROWKEY] == JUST_ACTIVATED) or (dict['aBut'] == False and dict['last_aBut'] == True):
702
     if (keyboard.events[bge.events.RIGHTARROWKEY] == JUST_ACTIVATED) or (dict['aBut'] == False and dict['last_aBut'] == True):
685
         aud.device().play(obj['sound_a'])
703
         aud.device().play(obj['sound_a'])
773
     dict['mlevel'] = 0
791
     dict['mlevel'] = 0
774
     dict['current_opt'] = ''
792
     dict['current_opt'] = ''
775
     dict['pause_menu_text'] = ''
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
 def output(dict):
796
 def output(dict):
779
     try:
797
     try:
869
             outp = outp + ': ' + str(dict['bloom_on'])  
887
             outp = outp + ': ' + str(dict['bloom_on'])  
870
             
888
             
871
         if dict['current_opt'] ==  'cam height':
889
         if dict['current_opt'] ==  'cam height':
872
-            outp = outp + ': ' + str(dict['cam_height']) 
890
+            outp = outp + '(-0.4): ' + str(dict['cam_height']) 
873
         if dict['current_opt'] ==  'focal length':
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
     dict['pause_menu_text'] = outp
899
     dict['pause_menu_text'] = outp
877
 def main(cont):
900
 def main(cont):

+ 2
- 6
walk.py Bestand weergeven

177
     
177
     
178
 wf = 1
178
 wf = 1
179
 if own['last_walk_frame'] - own['last_roll_frame'] > 55:
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
 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:
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
     own['walking'] = "regular"
183
     own['walking'] = "regular"
388
         pass       
384
         pass       
389
         
385
         
390
 def getonboard():
386
 def getonboard():
391
-    print(dict['kb_q'])
387
+    #print(dict['kb_q'])
392
     getonboard = own['getonboard']
388
     getonboard = own['getonboard']
393
     fliplay2 = 50#8560
389
     fliplay2 = 50#8560
394
     if yBut == True or dict['kb_q'] == 2:
390
     if yBut == True or dict['kb_q'] == 2:

Laden…
Annuleren
Opslaan