|
@@ -969,8 +969,6 @@ def jump():
|
969
|
969
|
|
970
|
970
|
def jump_Timer():
|
971
|
971
|
jump_timer = own['jump_timer']
|
972
|
|
- if jump_timer == 1:
|
973
|
|
- pass
|
974
|
972
|
if jump_timer > 0:
|
975
|
973
|
jump_timer = jump_timer - 1
|
976
|
974
|
own['jump_timer'] = jump_timer
|
|
@@ -1017,10 +1015,10 @@ def roll():
|
1017
|
1015
|
pass
|
1018
|
1016
|
def stop():
|
1019
|
1017
|
if linVelocity.x < .05 and linVelocity.x > -.05:
|
1020
|
|
- can_stop = 1
|
|
1018
|
+ can_stop = 0
|
1021
|
1019
|
own["lastStop"] = True
|
1022
|
1020
|
else:
|
1023
|
|
- can_stop = 0
|
|
1021
|
+ can_stop = 1
|
1024
|
1022
|
if r_ground.triggered == 1 and STANCE == False and can_stop == 1:
|
1025
|
1023
|
own['requestAction'] = 'reg_stop'
|
1026
|
1024
|
yvel = linVelocity.x * .985
|
|
@@ -2093,6 +2091,9 @@ def grind():
|
2093
|
2091
|
STANCE = own["stance"]
|
2094
|
2092
|
jumpstance = own["jump_stance"]
|
2095
|
2093
|
lif = frame - own['last_invert_frame']
|
|
2094
|
+ if own['LAST_GRIND'] == False and grindHit == True:
|
|
2095
|
+ own['grindstartFrame'] = own['framenum']
|
|
2096
|
+ print(own['grindstartFrame'])
|
2096
|
2097
|
if grindHit == True and own['invert_on'] == 0 and own['footplant_on'] == False and own['manual'] == 0 and lif > 40 and own['dropinTimer'] < 30:
|
2097
|
2098
|
gblend = 1
|
2098
|
2099
|
if LAST_GRIND == 0:
|
|
@@ -2869,7 +2870,14 @@ if rUD > .070:
|
2869
|
2870
|
q5on = 1
|
2870
|
2871
|
q5oncd = countdown
|
2871
|
2872
|
own["Q5oncd"] = q5oncd
|
2872
|
|
- oposin()
|
|
2873
|
+ oposin()
|
|
2874
|
+
|
|
2875
|
+if (rTrig > 0.02 and GRAB_ON == False and r_ground.triggered == 1) or (lTrig > 0.02 and GRAB_ON == False and r_ground.triggered == 1):
|
|
2876
|
+ pump()
|
|
2877
|
+else:
|
|
2878
|
+ own["lastPump"] = False
|
|
2879
|
+ own["Pump"] = False
|
|
2880
|
+
|
2873
|
2881
|
if rUD > .02:
|
2874
|
2882
|
grindpos = own['grindpos']
|
2875
|
2883
|
jumpstance = own["jump_stance"]
|
|
@@ -3424,11 +3432,7 @@ if lTrig <= 0.02 and GRAB_ON == True and lTrig >= -.02 and rTrig <= .02 and rTri
|
3424
|
3432
|
own["GRAB_PLAYED"] = GRAB_PLAYED
|
3425
|
3433
|
|
3426
|
3434
|
#frontside pump #backside pump
|
3427
|
|
-if (rTrig > 0.02 and GRAB_ON == False and r_ground.triggered == 1) or (lTrig > 0.02 and GRAB_ON == False and r_ground.triggered == 1):
|
3428
|
|
- pump()
|
3429
|
|
-else:
|
3430
|
|
- own["lastPump"] = False
|
3431
|
|
- own["Pump"] = False
|
|
3435
|
+
|
3432
|
3436
|
def footplant():
|
3433
|
3437
|
framenum = own['framenum']
|
3434
|
3438
|
last_ground_frame = own['lF_ground_frame']
|
|
@@ -3914,13 +3918,14 @@ def grind_turn():
|
3914
|
3918
|
jumping = None
|
3915
|
3919
|
gotcd = 25
|
3916
|
3920
|
force = [0,0,0]
|
3917
|
|
- grindHit = own['grindTouch']
|
|
3921
|
+ grindHit = own['grindTouch']
|
|
3922
|
+ sincegrinding = own['framenum'] - own['grindstartFrame']
|
3918
|
3923
|
if rUD > turnsens or rLR > turnsens or rUD < -turnsens or rLR < -turnsens:
|
3919
|
3924
|
jumping = True
|
3920
|
3925
|
if grindHit == False:
|
3921
|
3926
|
cont.deactivate(own.actuators['grindoutRight'])
|
3922
|
3927
|
cont.deactivate(own.actuators['grindoutLeft'])
|
3923
|
|
- if grindHit == True and jumping == None:
|
|
3928
|
+ if grindHit == True and jumping == None and sincegrinding > 20:
|
3924
|
3929
|
outloc = 0.022
|
3925
|
3930
|
bsoutloc = .07
|
3926
|
3931
|
bsoutvel = .1
|