File tree 1 file changed +17
-2
lines changed
canon_collision/src/entity/fighters
1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -1232,8 +1232,23 @@ impl Player {
1232
1232
1233
1233
fn grabbing_idle_action ( & mut self , context : & mut StepContext , state : & ActionState ) -> Option < ActionResult > {
1234
1234
self . apply_friction ( context. entity_def , state) ;
1235
-
1236
- if state. frame_no_restart > 60 { // TODO: additionally check if grabbed player is still in a grabbed state
1235
+ if ( context. input [ 0 ] . stick_x <= -0.66 && context. input [ 1 ] . stick_x > -0.66 )
1236
+ || ( context. input [ 0 ] . c_stick_x <= -0.66 && context. input [ 1 ] . c_stick_x > -0.66 ) {
1237
+ ActionResult :: set_action ( PlayerAction :: Fthrow )
1238
+ }
1239
+ else if ( context. input [ 0 ] . stick_x >= 0.66 && context. input [ 1 ] . stick_x < 0.66 )
1240
+ || ( context. input [ 0 ] . c_stick_x >= 0.66 && context. input [ 1 ] . c_stick_x < 0.66 ) {
1241
+ ActionResult :: set_action ( PlayerAction :: Fthrow )
1242
+ }
1243
+ else if ( context. input [ 0 ] . stick_y >= 0.66 && context. input [ 1 ] . stick_y < 0.66 )
1244
+ || ( context. input [ 0 ] . c_stick_y >= 0.66 && context. input [ 1 ] . c_stick_y < 0.66 ) {
1245
+ ActionResult :: set_action ( PlayerAction :: Uthrow )
1246
+ }
1247
+ else if ( context. input [ 0 ] . stick_y <= -0.66 && context. input [ 1 ] . stick_y > -0.66 )
1248
+ || ( context. input [ 0 ] . c_stick_y <= -0.66 && context. input [ 1 ] . c_stick_y > -0.66 ) {
1249
+ ActionResult :: set_action ( PlayerAction :: Dthrow )
1250
+ }
1251
+ else if state. frame_no_restart > 60 { // TODO: additionally check if grabbed player is still in a grabbed state
1237
1252
ActionResult :: set_action ( PlayerAction :: GrabbingEnd )
1238
1253
} else {
1239
1254
None
You can’t perform that action at this time.
0 commit comments