Minor dialogue and UI bug fixing

This commit is contained in:
Vladislav Khorev committed 2026-06-13 20:58:44 +03:00
1 parent fff5a9d4aa
commit db456bde09
11 files changed
+2350 -21

No files matched your search

+3 -3
View File
@@ -324,7 +324,7 @@ namespace ZL {
[loc](float value) {
if (loc->player)
{
loc->player->hp = value;
loc->player->setHp(value);
if (loc->player->currentState == AnimationState::ACTION_TO_DEATH || loc->player->currentState == AnimationState::DEATH_IDLE)
{
loc->player->currentState = AnimationState::STAND;
@@ -335,7 +335,7 @@ namespace ZL {
// get_player_hp() → float (0 if no player)
api.set_function("get_player_hp",
[loc]() -> float {
return loc->player ? loc->player->hp : 0.0f;
return loc->player ? loc->player->getHp() : 0.0f;
});
// Global integer store — shared across all location scripts.
@@ -453,7 +453,7 @@ namespace ZL {
std::cerr << "[script] npc_set_hp: index " << index << " out of range\n";
return;
}
npcs[index]->hp = value;
npcs[index]->setHp(value);
});
// npc_set_position(index, x, y, z) — teleports an NPC instantly, no walking.