Fixing some stuff related to attacks

This commit is contained in:
Vladislav Khorev committed 2026-07-12 16:55:23 +03:00
1 parent 9d03b52c2a
commit 92929118d5
7 files changed
+32 -7

No files matched your search

+1 -1
View File
@@ -27,7 +27,7 @@ void CharacterState::stopInPlace() {
void CharacterState::setHp(float newHp) {
hp = newHp;
if (hp < 0.f) hp = 0.f;
if (onHpChanged) onHpChanged(hp, initialHp);
if (onHpChanged) onHpChanged(hp, initialHp, CharacterState::kNoTarget);
}
void CharacterState::save(nlohmann::json& out) const