|
@@ -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
|
+
|