Browse Source

6-15-19 cleaning

shuvit 4 years ago
parent
commit
20f47fc993

+ 4
- 4
scripts/Settings.py View File

@@ -29,7 +29,7 @@ def to_dict(section, key):
29 29
 def readChar():
30 30
     mainDir = GameLogic.expandPath("//characters/")    
31 31
     fileName = mainDir + dict['character'] + ".ini"
32
-    print('loading character settings', fileName)
32
+    #print('loading character settings', fileName)
33 33
     char_config = ConfigObj(fileName, interpolation=True)
34 34
     
35 35
     
@@ -45,7 +45,7 @@ def readChar():
45 45
                 except:
46 46
                     pass
47 47
         dict[key] = value  
48
-        print(key, value)      
48
+        #print(key, value)      
49 49
     
50 50
     
51 51
     char_config.walk(to_dict2, char_config)
@@ -90,7 +90,7 @@ def setres():
90 90
     resx = int(dict["resx"])
91 91
     resy = int(dict["resy"])
92 92
     fullscreen = bge.render.getFullScreen()
93
-    print("fullscreen = ", fullscreen)
93
+    #print("fullscreen = ", fullscreen)
94 94
     if fullscreen != True:
95 95
         if dict['fullscreen_on'] == 1:
96 96
             bge.render.setFullScreen(True)
@@ -99,7 +99,7 @@ def setres():
99 99
             bge.render.setFullScreen(False) 
100 100
             
101 101
     bge.render.setWindowSize(resx, resy)         
102
-    print("resolution = ", resx, resy)       
102
+    #print("resolution = ", resx, resy)       
103 103
         
104 104
 def loadlevel():
105 105
     import GameLogic

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


+ 3
- 3
scripts/actionsFSMlist.py View File

@@ -1646,9 +1646,9 @@ reg_5050_in = a_class(
1646 1646
 	#player armature action name, start, end frames
1647 1647
 	'reg_5050', 1, 20,
1648 1648
 	#deck action name, start, end frames  
1649
-	'b_reg', 1, 20,
1649
+	'b_reg', 1, 30,
1650 1650
 	#layer, speed, mode (0 = play, 1 = loop), blendin
1651
-	1, .5, 0, 10,
1651
+	1, 1, 0, 10,
1652 1652
 	#intro, length
1653 1653
 	None, 0,
1654 1654
 	#exits
@@ -1660,7 +1660,7 @@ reg_5050_in = a_class(
1660 1660
 
1661 1661
 reg_5050 = a_class(
1662 1662
 	#player armature action name, start, end frames
1663
-	'reg_5050', 20, 50,
1663
+	'reg_5050', 30, 60,
1664 1664
 	#deck action name, start, end frames  
1665 1665
 	'b_reg', 1, 30,
1666 1666
 	#layer, speed, mode (0 = play, 1 = loop), blendin

+ 15
- 13
scripts/birds.py View File

@@ -26,19 +26,21 @@ def main(cont, scene):
26 26
                 own['bird_list'].append(x)
27 27
                 
28 28
     def do_birds(scene, own, cont):
29
-        num = random.randint(0,2)
30
-        if own['life'] % 50 == 0 and num == 1:
31
-            #print('add bird')
32
-            top = len(own['bird_list']) - 1
33
-            start = random.randint(0, top)
34
-            end = start
35
-            while end == start:
36
-                end = random.randint(0, top)
37
-            obj = scene.addObject('bird_cont', own['bird_list'][start], 0)                
38
-            obj['start'] = own['bird_list'][start]
39
-            obj['end'] = own['bird_list'][end]
40
-            obj.worldPosition = obj['start'].worldPosition
41
-            #print(obj['start'], obj['end'])
29
+        
30
+        if own['life'] % 50 == 0:
31
+            num = random.randint(0,2)
32
+            if num == 1:
33
+                #print('add bird')
34
+                top = len(own['bird_list']) - 1
35
+                start = random.randint(0, top)
36
+                end = start
37
+                while end == start:
38
+                    end = random.randint(0, top)
39
+                obj = scene.addObject('bird_cont', own['bird_list'][start], 0)                
40
+                obj['start'] = own['bird_list'][start]
41
+                obj['end'] = own['bird_list'][end]
42
+                obj.worldPosition = obj['start'].worldPosition
43
+                #print(obj['start'], obj['end'])
42 44
             
43 45
     def life(own):
44 46
         if 'life' in own:

+ 9
- 8
scripts/camera.py View File

@@ -4,7 +4,6 @@ import mathutils
4 4
 from mathutils import *
5 5
 scene = bge.logic.getCurrentScene()
6 6
 import camFSM
7
-import birds
8 7
 
9 8
 def main(cont):
10 9
     #camFSM.main(cont)
@@ -44,7 +43,6 @@ def main(cont):
44 43
     cam3 = scene.objects['followcam']
45 44
     camList = scene.cameras
46 45
     freecam = camList["freecam"]
47
-    dict['camera'] = cam1
48 46
 
49 47
     if 'init' not in own:
50 48
         own['init'] = 1
@@ -62,6 +60,7 @@ def main(cont):
62 60
         cam.height = dict['cam_height']
63 61
         dict['cam_state'] = 'walking'
64 62
         controlcube['ragdoll_active'] = False
63
+        dict['camera'] = cam1
65 64
     acam = scene.active_camera
66 65
 
67 66
     def get_cam_state():
@@ -92,13 +91,16 @@ def main(cont):
92 91
 
93 92
         if down.triggered == False and LAST_GRIND == False and cam_moved == 0 and walk == 0:
94 93
             camempty['hitdown'] = False
95
-            if cam_height > (cam_def_height + .06) and zdist > -.2 and raised == 0:
94
+            if cam_height > (cam_def_height + .08) and zdist > -.2 and raised == 0:
96 95
                 cam.height = cam_height - .02
96
+                print('raising a')
97 97
         if cam_height < -.6 and cam_moved == 0 and LAST_GRIND == False and zdist > -.2 and raised == 0 and walk == 0:
98 98
             cam_height = .1
99
+            print('raising b')
99 100
         if LAST_GRIND == True and walk == 0:
100 101
             if cam.height < -.5 or zdist < -.2:
101 102
                 cam.height = cam.height + .013
103
+                print('raising c')
102 104
             if cam.height >= -.5 and not down.triggered:
103 105
                 pass
104 106
 
@@ -148,15 +150,15 @@ def main(cont):
148 150
         if hit[0]:
149 151
             #if hitobj != control and walk == 0 and 'vert' not in hit[0] and 'ground' in hit[0] and controlcube['ragdoll_active'] == False:
150 152
             if hitobj != control and walk == 0 and 'vert' not in hit[0] and 'ground' in hit[0]:
151
-                cam.damping = .0
153
+                cam.damping = .01
152 154
                 if cam.height < 2:
153 155
                     cam.height = cam_height + .1
154 156
                     cam.max = cam.max - .2
155
-                    #print('small move')
157
+                    print('small move', cam.height, dict['cam_height'])
156 158
                 elif cam.height >= 2 and cam.height < 4:
157 159
                     cam.height = cam_height + .05
158 160
                     cam.max = cam.max - .05
159
-                    #print('big move')
161
+                    print('big move')
160 162
 
161 163
     if dict['menu_idle_timer'] > 300:
162 164
         move_len = 2048
@@ -358,5 +360,4 @@ def main(cont):
358 360
             pass
359 361
     set_lens_dist()        
360 362
     get_cam_state()
361
-    camFSM.main(cont)
362
-    birds.main(cont, scene) 
363
+    camFSM.main(cont)

+ 2
- 2
scripts/colors.py View File

@@ -52,7 +52,7 @@ def main():
52 52
     #print(dict['shirt_color'])
53 53
     scol = [dict['shirt_color_r'], dict['shirt_color_g'], dict['shirt_color_b'], 1]
54 54
     deckC = [dict['deck_color_r'], dict['deck_color_g'], dict['deck_color_b'], 1]
55
-    print(scol)
55
+    #print(scol)
56 56
     shirt.color = scol
57 57
     deck.color = deckC
58 58
     throw_deck.color = deckC
@@ -164,7 +164,7 @@ def update_shirt_tex():
164 164
         fileName2 = mainDir + 'textures//shirt//*.png'  
165 165
     shirtList = glob.glob(fileName2)
166 166
     dict['shirtList'] = shirtList  
167
-    print(shirtList, 'shirtList')
167
+    #print(shirtList, 'shirtList')
168 168
     ID = texture.materialID(shirt, 'MAshirt')
169 169
     shirt_texture = texture.Texture(shirt, ID)
170 170
     new_source2 = texture.ImageFFmpeg(shirtList[dict["shirt_logo"]])

+ 66
- 90
scripts/controller2.py View File

@@ -4510,16 +4510,72 @@ def main():
4510 4510
                 own['ragdoll_out'] = 0
4511 4511
                 stre = 0
4512 4512
                 
4513
-
4514 4513
             armature = scene.objects['Char4']
4515 4514
             for const in armature.constraints:
4516 4515
                 #print(const, 'const')
4517 4516
                 if ('rd_cl' in str(const) or 'rd_cr' in str(const)):
4518
-                    #print(const, 'const', strength)
4519 4517
                     const.enforce = stre  
4520 4518
 
4521 4519
 
4522 4520
 
4521
+    def land_mod():
4522
+        if own['requestAction'] == 'reg_land':
4523
+            if land_overRideL == True:
4524
+                own['requestAction'] = 'reg_landL'
4525
+                print('requesting unbalanced land1')
4526
+                own['lland'] = own['requestAction']
4527
+            elif land_overRideR == True:
4528
+                own['requestAction'] = 'reg_landR'
4529
+                print('requesting unbalanced land2')
4530
+                own['lland'] = own['requestAction']
4531
+            elif land_overRideLb == True:
4532
+                own['requestAction'] = 'reg_landLb'
4533
+                print('requesting unbalanced land1b')
4534
+                own['lland'] = own['requestAction']
4535
+            elif land_overRideRb == True:
4536
+                own['requestAction'] = 'reg_landRb'
4537
+                print('requesting unbalanced land2b')
4538
+                own['lland'] = own['requestAction']
4539
+            else:
4540
+                own['lland'] = own['requestAction']    
4541
+
4542
+        if own['requestAction'] == 'fak_land':
4543
+            if land_overRideL == True:
4544
+                own['requestAction'] = 'fak_landL'
4545
+                print('requesting unbalanced landf1')
4546
+                own['lland'] = own['requestAction']
4547
+            elif land_overRideR == True:
4548
+                own['requestAction'] = 'fak_landR'
4549
+                print('requesting unbalanced landf2')
4550
+                own['lland'] = own['requestAction']
4551
+            elif land_overRideLb == True:
4552
+                own['requestAction'] = 'fak_landLb'
4553
+                print('requesting unbalanced landf1b')
4554
+                own['lland'] = own['requestAction']
4555
+            elif land_overRideRb == True:
4556
+                own['requestAction'] = 'fak_landRb'
4557
+                print('requesting unbalanced landf2b')
4558
+                own['lland'] = own['requestAction']
4559
+            else:
4560
+                own['lland'] = own['requestAction']   
4561
+
4562
+    def incline_action():
4563
+        own['ground_since'] = ground_since
4564
+        if own['rotz'] < .97:
4565
+            if own['requestAction'] == 'reg_roll':
4566
+                own['requestAction'] = 'reg_opos'
4567
+            if own['requestAction'] == 'reg_turnLeft':
4568
+                own['requestAction'] = 'reg_pump_left'
4569
+            if own['requestAction'] == 'reg_turnRight':
4570
+                own['requestAction'] = 'reg_pump_right'
4571
+
4572
+            if own['requestAction'] == 'fak_roll':
4573
+                own['requestAction'] = 'fak_opos'
4574
+            if own['requestAction'] == 'fak_turnLeft':
4575
+                own['requestAction'] = 'fak_pump_left'
4576
+            if own['requestAction'] == 'fak_turnRight':
4577
+                own['requestAction'] = 'fak_pump_right'        
4578
+
4523 4579
     jump_Timer()
4524 4580
     check_landing()
4525 4581
     nextframe()
@@ -4541,6 +4597,8 @@ def main():
4541 4597
     dropinRotate()
4542 4598
     onboard()
4543 4599
     grind_but_align()
4600
+    land_mod()
4601
+    incline_action()
4544 4602
     #ragdoll_out()
4545 4603
     linvelx = own.getLinearVelocity(True)
4546 4604
     own["linvelx"] = linvelx.x
@@ -4579,31 +4637,7 @@ def main():
4579 4637
     own['lastxBut_ground'] = xBut_ground
4580 4638
     own["last_sel"] = own["sel"]
4581 4639
     own["sel"] = bkBut
4582
-
4583
-    # if r_ground.triggered and own["jump_timer"] < 20:
4584
-    #     if 1 == 1:
4585
-    #         force2 = [0.0, 0, dict['antibounce']]
4586
-
4587
-    #         gdist = ((own.worldPosition.z - r_ground.hitPosition[2]))
4588
-    #         if gdist < .2875 and gdist > .1:
4589
-    #             move = (.2875 - gdist)*.33
4590
-    #             if move > 0:
4591
-    #                 own.worldPosition.z = own.worldPosition.z + move
4592
-    #             else:
4593
-    #                 own.worldPosition.z = own.worldPosition.z - move
4594
-    #             own.linearVelocity.z = 0
4595
-
4596
-    #             friction = .998
4597
-    #             own.linearVelocity.x *= friction
4598
-    #     else:
4599
-    #         gdist = ((own.worldPosition.z - r_ground.hitPosition[2]))
4600
-    #         if gdist < .2875 and gdist > .1:
4601
-    #             move = (.2875 - gdist)*.4
4602
-    #             if move > 0:
4603
-    #                 own.worldPosition.z = own.worldPosition.z + move
4604
-    #             else:
4605
-    #                 own.worldPosition.z = own.worldPosition.z - move
4606
-    #             own.linearVelocity.z = 0
4640
+    dict['walk'] = 0
4607 4641
 
4608 4642
     Axis = 2
4609 4643
     Distance = -10
@@ -4636,7 +4670,7 @@ def main():
4636 4670
             own.applyMovement((0, 0, (.295 - (localHitDist))), True)
4637 4671
             #own.applyMovement((0, 0, (.32 - (localHitDist))), True)
4638 4672
             #own.applyMovement((0, 0, (.5 - localHitDist)), True)
4639
-            print('moving new ray a')
4673
+            #print('moving new ray a')
4640 4674
             #if localRay[2] != [0, 0, -1] and grindHit == 0:
4641 4675
             if localRay[2] != [0, 0, -1]:    
4642 4676
                 #own.alignAxisToVect(localRay[2], 2, .25)
@@ -4750,7 +4784,7 @@ def main():
4750 4784
     if (grindDar == False and onGround and own['grindTouch'] == False) or own['jump_timer'] > 40:
4751 4785
         own['grindType'] = ''
4752 4786
 
4753
-    dict['walk'] = 0
4787
+    
4754 4788
 
4755 4789
 
4756 4790
 
@@ -4763,64 +4797,6 @@ def main():
4763 4797
 
4764 4798
 
4765 4799
 
4766
-    if own['requestAction'] == 'reg_land':
4767
-        print('*****************ra', land_overRideL, land_overRideR, land_overRideLb, land_overRideRb)
4768
-        if land_overRideL == True:
4769
-            own['requestAction'] = 'reg_landL'
4770
-            print('requesting unbalanced land1')
4771
-            own['lland'] = own['requestAction']
4772
-        elif land_overRideR == True:
4773
-            own['requestAction'] = 'reg_landR'
4774
-            print('requesting unbalanced land2')
4775
-            own['lland'] = own['requestAction']
4776
-        elif land_overRideLb == True:
4777
-            own['requestAction'] = 'reg_landLb'
4778
-            print('requesting unbalanced land1b')
4779
-            own['lland'] = own['requestAction']
4780
-        elif land_overRideRb == True:
4781
-            own['requestAction'] = 'reg_landRb'
4782
-            print('requesting unbalanced land2b')
4783
-            own['lland'] = own['requestAction']
4784
-        else:
4785
-            own['lland'] = own['requestAction']    
4786
-
4787
-    if own['requestAction'] == 'fak_land':
4788
-        print('*****************ra', land_overRideL, land_overRideR, land_overRideLb, land_overRideRb)
4789
-        if land_overRideL == True:
4790
-            own['requestAction'] = 'fak_landL'
4791
-            print('requesting unbalanced landf1')
4792
-            own['lland'] = own['requestAction']
4793
-        elif land_overRideR == True:
4794
-            own['requestAction'] = 'fak_landR'
4795
-            print('requesting unbalanced landf2')
4796
-            own['lland'] = own['requestAction']
4797
-        elif land_overRideLb == True:
4798
-            own['requestAction'] = 'fak_landLb'
4799
-            print('requesting unbalanced landf1b')
4800
-            own['lland'] = own['requestAction']
4801
-        elif land_overRideRb == True:
4802
-            own['requestAction'] = 'fak_landRb'
4803
-            print('requesting unbalanced landf2b')
4804
-            own['lland'] = own['requestAction']
4805
-        else:
4806
-            own['lland'] = own['requestAction']    
4807
-    # if own['requestAction'] in ['fak_land', 'reg_land', 'fak_landL', 'fak_landLb', 'reg_landR', 'reg_landRb', 'fak_landR' 'fak_landRb', 'reg_landL', 'reg_landLb']:
4808
-    #print(own['requestAction'], 'controller end request')
4809
-
4810
-
4811
-
4812
-    own['ground_since'] = ground_since
4813
-    if own['rotz'] < .97:
4814
-        if own['requestAction'] == 'reg_roll':
4815
-            own['requestAction'] = 'reg_opos'
4816
-        if own['requestAction'] == 'reg_turnLeft':
4817
-            own['requestAction'] = 'reg_pump_left'
4818
-        if own['requestAction'] == 'reg_turnRight':
4819
-            own['requestAction'] = 'reg_pump_right'
4820
-
4821
-        if own['requestAction'] == 'fak_roll':
4822
-            own['requestAction'] = 'fak_opos'
4823
-        if own['requestAction'] == 'fak_turnLeft':
4824
-            own['requestAction'] = 'fak_pump_left'
4825
-        if own['requestAction'] == 'fak_turnRight':
4826
-            own['requestAction'] = 'fak_pump_right'
4800
+ 
4801
+
4802
+

+ 19
- 54
scripts/ragdoll.py View File

@@ -15,20 +15,12 @@ def zero_constraints(own, scene):
15 15
         
16 16
         if 'rd_cl' in str(const):
17 17
             const.enforce = 0
18
-            #print(const)
18
+            print(const)
19 19
         if 'rd_cr' in str(const):
20 20
             const.enforce = 0   
21 21
     for x in own['rd_rb'].groupMembers:
22 22
         x.suspendDynamics(True)
23 23
 
24
-def set_influence(own, scene, strength):
25
-    armature = scene.objects['Char4']
26
-    for const in armature.constraints:
27
-        #print(const, 'const')
28
-        if ('rd_cl' in str(const) or 'rd_cr' in str(const)):
29
-            #print(const, 'const', strength)
30
-            const.enforce = strength  
31
-
32 24
     
33 25
 def update_rb(physBody, scene):
34 26
     #print('updating rigid body positions')
@@ -98,10 +90,8 @@ def main():
98 90
         own['rd_set_vel'] = False
99 91
         own['rd_vel'] = None
100 92
         own['rd_incer'] = 0
101
-        own['rd_life'] = 0
102
-        zero_constraints(own, scene) 
93
+        zero_constraints(own, scene)    
103 94
 
104
-    #print(own['rd_life'], 'ragdoll incer')
105 95
     #if (sens.positive) or (dict['aBut'] == 1 and dict['bBut'] == 1) or own['fall'] == True:
106 96
     if (sens.positive) or own['fall'] == True:
107 97
         #print('option1')
@@ -110,7 +100,6 @@ def main():
110 100
             #own['fall'] = 1
111 101
             own['fall'] = True
112 102
             print('do ragdoll')
113
-            own['rd_life'] = 0
114 103
             incer = -1
115 104
             update_rb(own['rd_rb'], scene)   
116 105
             while incer < 20:
@@ -133,7 +122,7 @@ def main():
133 122
             cont.actuators['Camera'].height = 2.0
134 123
             #cont.actuators['Camera'].min = 14.0
135 124
             #cont.actuators['Camera'].max = 18.0
136
-            cont.actuators['Camera'].damping = 0.001
125
+            cont.actuators['Camera'].damping = .000001
137 126
             cont.activate(cont.actuators['Camera']) 
138 127
                         
139 128
             #own.suspendDynamics()
@@ -142,20 +131,16 @@ def main():
142 131
 
143 132
         if own['ragdoll_active'] == True:
144 133
             #pass
145
-            own['rd_life'] += 1
146
-            #scene.objects[armature].stopAction(2)
147
-            #scene.objects[armature].stopAction(7)
148
-            #scene.objects[armature].update()
149
-            #cont.actuators['Camera'].object = scene.objects['ragdoll_parent']
150
-            own.worldPosition = scene.objects['ragdoll_parent'].worldPosition
151
-            #cont.actuators['Camera'].object = own
134
+            scene.objects[armature].stopAction(2)
135
+            scene.objects[armature].stopAction(7)
136
+            scene.objects[armature].update()
137
+            cont.actuators['Camera'].object = scene.objects['ragdoll_parent']
152 138
             wp = scene.objects['camCube'].worldPosition - scene.objects['ragdoll_parent'].worldPosition
153 139
             wp = wp * .9
154
-            cont.actuators['Camera'].height = 1.7
140
+            cont.actuators['Camera'].height = 2.0
155 141
             cont.actuators['Camera'].min = 4.0
156
-            cont.actuators['Camera'].max = 7.0
157
-            #cont.actuators['Camera'].damping = .000001
158
-            cont.actuators['Camera'].damping = .006#.99
142
+            cont.actuators['Camera'].max = 8.0
143
+            cont.actuators['Camera'].damping = .000001
159 144
             cont.activate(cont.actuators['Camera']) 
160 145
             #print(own['rd_set_vel'], 'vel setter')
161 146
             if own['rd_set_vel'] == True:
@@ -171,7 +156,7 @@ def main():
171 156
                     #scene.objects['npc_ed_arm_phys_master'].worldLinearVelocity.x = 100
172 157
                     #scene.objects['npc_ed_arm_phys_master'].applyForce([5000,0,0], False)
173 158
                     for pB in own['rd_rb'].groupMembers:
174
-                        #print('setting', pB, own['rd_vel'])
159
+                        print('setting', pB, own['rd_vel'])
175 160
                         
176 161
                         try:
177 162
                             #pass
@@ -179,15 +164,14 @@ def main():
179 164
                             #pB.worldLinearVelocity.x = 100
180 165
                             #pB.worldLinearVelocity = own['rd_vel']
181 166
                             pB.setLinearVelocity(own['rd_vel'], False)
182
-                            #print('adding force to', pB, pB.worldLinearVelocity)
167
+                            print('adding force to', pB, pB.worldLinearVelocity)
183 168
                         except:
184
-                            #print('cant add force to ', pB)
185
-                            pass
169
+                            print('cant add force to ', pB)
186 170
                 else:
187 171
                     own['rd_incer'] = 0
188 172
                     own['rd_set_vel'] = False
189 173
             
190
-            if dict['last_yBut'] == 1 and dict['yBut'] == 0:                
174
+            if dict['yBut'] == 1:                
191 175
                 print('turn off ragdoll')
192 176
                 zero_constraints(own, scene)
193 177
                 scene.objects[armature].setParent(own, False, True)
@@ -195,24 +179,20 @@ def main():
195 179
                 for x in own['rd_rb'].groupMembers:
196 180
                     x.suspendDynamics(True)
197 181
                 own['ragdoll_active'] = False    
198
-                own['rd_life'] = 0
199
-                #print(scene.objects[armature].parent, 'parent')
182
+                print(scene.objects[armature].parent, 'parent')
200 183
                 cont.actuators['Camera'].object = scene.objects['camCube']
201 184
                 cont.activate(cont.actuators['Camera']) 
202 185
                 own.worldPosition = scene.objects['npc_ed_arm_phys_master'].worldPosition
203 186
                 own.worldPosition.z += .4
204
-                own['requestAction'] = 'reg_onboard'
205
-                own['ragdoll_out'] = 1
206 187
                 cont.activate(cont.actuators['walk']) 
207
-                
208 188
 
209 189
 
210
-            if dict['lUD'] < -.08 and own['rd_life'] > 360:
190
+            if dict['lUD'] < -.08:
211 191
                 physBody = own['rd_rb']
212 192
                 excludes = ['npc_ed_arm_phys_hand.R', 'npc_ed_arm_phys_hand.L', 'npc_ed_arm_phys_forearm.fk.L', 'npc_ed_arm_phys_forearm.fk.R', 'npc_ed_arm_phys_upper_arm.fk.L', 'npc_ed_arm_phys_upper_arm.fk.R']
213 193
                 #excludes = []
214 194
                 for x in physBody.groupMembers:
215
-                    #print(x.name)
195
+                    print(x.name)
216 196
                                     
217 197
                     if x.name not in excludes:
218 198
                         pass
@@ -232,23 +212,8 @@ def main():
232 212
                 scene.objects['npc_ed_arm_phys_clavicle.L'].applyForce([0,0,200], False)
233 213
                 scene.objects['npc_ed_arm_phys_clavicle.R'].applyForce([0,0,200], False)
234 214
 
235
-            if dict['rUD'] > .08 and own['rd_life'] > 360:
215
+            if dict['rUD'] > .08:
236 216
                 scene.objects['npc_ed_arm_phys_master'].applyForce([0,600,0], True)
237
-
238
-            blendamt = 20
239
-            if own['rd_life'] < blendamt:
240
-                dif = own['rd_life'] / blendamt
241
-            else:
242
-                dif = 1
243
-            set_influence(own, scene, dif)
244
-             
245
-            # scene.objects[armature].stopAction(1)
246
-            # scene.objects[armature].stopAction(2)
247
-            # scene.objects[armature].stopAction(3)
248
-            # scene.objects[armature].stopAction(4)
249
-            # scene.objects[armature].update()
250
- 
251 217
         else:
252 218
             update_rb(own['rd_rb'], scene)   
253
-            #pass
254
-        scene.objects[armature].update()    
219
+            #pass

+ 1
- 0
scripts/scene_init.py View File

@@ -160,6 +160,7 @@ def main():
160 160
         own['lland'] = ''
161 161
         own['grinding'] = False
162 162
         own['ground_since'] = 100
163
+        own['last_transition_frame'] = 0
163 164
         
164 165
         colors.update_shirt_tex() 
165 166
         colors.update_truck_tex()

Loading…
Cancel
Save