Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added rectests/AIR_TURN.REC
Binary file not shown.
1 change: 1 addition & 0 deletions run_rectests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ tests=(
"Jaguar throw deals half stun due to rehit rules:DAMPENED_STUN.REC"
"Pyros's flames cannot be hit:PYROS_PRIORITY.REC"
"Flail's destruct sequence works completely:FLAIL_DESTRUCT.REC"
"Jaguar hits with a turnaround j.K:AIR_TURN.REC"
"Electra is stuck blocking until Thorn's ul tag wears off:UL_TAG_HOLD_UP.REC"
"Pyros's destruct sequence works completely:PYROS_DESTRUCT.REC"
"Katana's corkscrew blade has landing recovery:LANDING_RECOVERY.REC"
Expand Down
27 changes: 14 additions & 13 deletions src/game/objects/har.c
Original file line number Diff line number Diff line change
Expand Up @@ -2203,19 +2203,20 @@ int har_act(object *obj, int act_type) {
}

// Send an event if the har tries to turn in the air by pressing either left/right/downleft/downright
int opp_id = h->player_id ? 0 : 1;
object *opp =
game_state_find_object(obj->gs, game_player_get_har_obj_id(game_state_get_player(obj->gs, opp_id)));
if(last_input == '4' || last_input == '6' || last_input == '1' || last_input == '3') {
if(object_get_pos(obj).x > object_get_pos(opp).x) {
if(direction != OBJECT_FACE_LEFT) {
har_event_air_turn(h, ctrl);
return 1;
}
} else {
if(direction != OBJECT_FACE_RIGHT) {
har_event_air_turn(h, ctrl);
return 1;
if(is_har_idle_air(obj)) {
if(last_input == '4' || last_input == '6' || last_input == '1' || last_input == '3') {
if(object_get_pos(obj).x > object_get_pos(enemy_obj).x) {
if(direction != OBJECT_FACE_LEFT) {
har_face_enemy(obj, enemy_obj);
har_event_air_turn(h, ctrl);
return 1;
}
} else {
if(direction != OBJECT_FACE_RIGHT) {
har_face_enemy(obj, enemy_obj);
har_event_air_turn(h, ctrl);
return 1;
}
}
}
}
Expand Down