Skip to content

Commit c2aa1d4

Browse files
committed
Fix has_jump
1 parent 4a56992 commit c2aa1d4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/necto/rlgym_compat/game_state.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,10 @@ def _decode_player(
5555
player_data.inverted_car_data.invert(player_data.car_data)
5656

5757
if player_info.air_state == flat.AirState.OnGround:
58-
self._on_ground_ticks[index] = 0
59-
self._air_time_since_jump[index] = 0
60-
self._has_jumped[index] = False
58+
if not self._has_jumped[index] or self._air_time_since_jump[index] > 0:
59+
self._has_jumped[index] = False
60+
self._on_ground_ticks[index] = 0
61+
self._air_time_since_jump[index] = 0
6162
else:
6263
self._on_ground_ticks[index] += ticks_elapsed
6364

0 commit comments

Comments
 (0)