From 103fe98fe2b0add7d6679517b81fe688a3d96f63 Mon Sep 17 00:00:00 2001 From: Tleety Date: Fri, 4 Mar 2016 03:06:42 +0100 Subject: [PATCH] KD now updated --- src/Game/Systems/ScoreScreenSystem.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Game/Systems/ScoreScreenSystem.cpp b/src/Game/Systems/ScoreScreenSystem.cpp index 2ad45f53..57b7a4da 100644 --- a/src/Game/Systems/ScoreScreenSystem.cpp +++ b/src/Game/Systems/ScoreScreenSystem.cpp @@ -66,6 +66,9 @@ void ScoreScreenSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapper& //Update Kills for child (int&)child["ScoreIdentity"]["Deaths"] = it->second.Deaths; //KD is not updated at the moment. + if (it->second.Deaths != 0) { + (double&)child["ScoreIdentity"]["KD"] = it->second.Kills/it->second.Deaths; + } //Update position for child glm::vec3 offset = (glm::vec3)entity["ScoreScreen"]["Offset"];