Remove player health, use playermap

This commit is contained in:
Vladislav Khorev committed 2026-11-07 13:48:54 +06:00
1 parent b932a07cba
commit be8ee31f03
14 files changed
+27 -39

No files matched your search

+4 -4
View File
@@ -431,15 +431,15 @@ namespace FRG {
return state ? state->position.z() : 0.0f;
});
// set_player_hp(value) — sets the player's current HP directly.
api.set_function("set_player_hp",
[loc](float value) {
api.set_function("refill_current_player_hp",
[loc]() {
if (loc->player)
{
loc->setCharacterHp(*loc->player, value);
loc->refillCharacterHp(*loc->player);
loc->resetCharacterAfterDeath(*loc->player);
}
});
// get_player_hp() → float (0 if no player)
api.set_function("get_player_hp",
[loc]() -> float {