perf: harden runtime for weaker hardware

This commit is contained in:
Rijad Zuzo
2026-08-12 10:02:45 +02:00
parent cd29da95e0
commit 34428d836a
47 changed files with 2164 additions and 243 deletions
+16 -1
View File
@@ -67,8 +67,23 @@ func _test_player_downing() -> void:
for _tick in 22:
manager.simulate_tick()
_check(not player_state.is_downed(), "The downed player should recover and stand again")
var player_combatant: CombatantStateRecord = manager.get_combatant(&"player_combatant")
_check(
player_state.get_health() > 0.0, "Recovery should restore the player to a fighting baseline"
(
player_state.get_health() > 0.0
and player_combatant != null
and player_combatant.is_alive()
and is_equal_approx(player_combatant.get_health(), player_state.get_health())
),
"Recovery should revive both authoritative player records at matching health"
)
manager.update_player_combatant(Vector3(100.0, 0.0, 100.0))
manager.spawn_wolf(Vector3(100.0, 0.0, 100.0))
var recovered_health := player_state.get_health()
manager.simulate_tick()
_check(
player_state.get_health() < recovered_health,
"A recovered player should become targetable and vulnerable again"
)
manager.free()