Remove player health, use playermap
This commit is contained in:
1 parent
b932a07cba
commit
be8ee31f03
14 files changed
+27
-39
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user