From 066ca6075dc1819defe5fbe0dbf03208d6279a0c Mon Sep 17 00:00:00 2001 From: viktorljung Date: Sun, 13 Mar 2016 21:19:21 +0100 Subject: [PATCH] hp fixed? --- src/Game/Systems/HealthSystem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Game/Systems/HealthSystem.cpp b/src/Game/Systems/HealthSystem.cpp index c19d1b65..4343eeeb 100644 --- a/src/Game/Systems/HealthSystem.cpp +++ b/src/Game/Systems/HealthSystem.cpp @@ -58,7 +58,7 @@ bool HealthSystem::OnPlayerHealthPickup(Events::PlayerHealthPickup& e) ComponentWrapper cHealth = e.Player["Health"]; Field health = cHealth["Health"]; health += e.HealthAmount; - health = std::min((double)health, (double)cHealth["MaxHealth"]); + health = std::min(*health, (const double&)cHealth["MaxHealth"]); return true; }