Fixing some stuff related to attacks
This commit is contained in:
1 parent
9d03b52c2a
commit
92929118d5
7 files changed
+32
-7
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user