Skip to content
This repository has been archived by the owner on Jan 2, 2021. It is now read-only.

Fix 1hp player #80

Merged
merged 1 commit into from
Nov 13, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
current HP change according to changes to max hp
  • Loading branch information
yanis-fourel committed Nov 12, 2020
commit 4d7167eb312b50a1050ecdd0697c0ee8b41c229a
2 changes: 1 addition & 1 deletion src/Application/src/GameLogic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ auto game::GameLogic::apply_class_to_player(entt::registry &world, entt::entity

auto &health = world.get<Health>(player);

health.current += newClass.maxHealth - health.max;
health.max = newClass.maxHealth;
if (health.current > health.max) health.current = health.max;
world.get<Classes>(player).ids.push_back(newClass.id);


Expand Down