From f4983cf9610d6a2562cee64d29b86598e950cf22 Mon Sep 17 00:00:00 2001 From: Tleety Date: Thu, 3 Mar 2016 13:53:40 +0100 Subject: [PATCH] WIP --- resources/Schema/Entities/ScoreIdentity.xml | 104 ++++++++++++-------- src/Game/Systems/ScoreScreenSystem.cpp | 7 +- 2 files changed, 65 insertions(+), 46 deletions(-) diff --git a/resources/Schema/Entities/ScoreIdentity.xml b/resources/Schema/Entities/ScoreIdentity.xml index 7d1e2437..daf9d4eb 100644 --- a/resources/Schema/Entities/ScoreIdentity.xml +++ b/resources/Schema/Entities/ScoreIdentity.xml @@ -9,24 +9,17 @@ - - - - Simon needs to push shit shit so i can write text from Component - Fonts/DroidSans.ttf,64 - - - - - - - - ID + -1 Fonts/DroidSans.ttf,64 + + ScoreIdentity + ScoreIdentity + ID + @@ -36,35 +29,16 @@ - DickButt + Fonts/DroidSans.ttf,64 + + ScoreIdentity + ScoreIdentity + Name + - - - - - - - - - 5 - Fonts/DroidSans.ttf,64 - - - - - - - - - - - 12 - Fonts/DroidSans.ttf,64 - - - + @@ -72,11 +46,50 @@ - 0.42 + 0 Fonts/DroidSans.ttf,64 + + ScoreIdentity + ScoreIdentity + KD + - + + + + + + + + + 0 + Fonts/DroidSans.ttf,64 + + + ScoreIdentity + ScoreIdentity + Kills + + + + + + + + + + + 0 + Fonts/DroidSans.ttf,64 + + + ScoreIdentity + ScoreIdentity + Deaths + + + @@ -84,11 +97,16 @@ - 84 + 0 Fonts/DroidSans.ttf,64 + + ScoreIdentity + ScoreIdentity + Ping + - + diff --git a/src/Game/Systems/ScoreScreenSystem.cpp b/src/Game/Systems/ScoreScreenSystem.cpp index 361d9f1f..0713e13b 100644 --- a/src/Game/Systems/ScoreScreenSystem.cpp +++ b/src/Game/Systems/ScoreScreenSystem.cpp @@ -14,6 +14,10 @@ ScoreScreenSystem::ScoreScreenSystem(SystemParams params) void ScoreScreenSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapper& capturePoint, double dt) { //TODO: Check team al + if (!IsServer) { + return; + } + if(!entity.HasComponent("ScoreScreen")){ return; } @@ -62,9 +66,6 @@ void ScoreScreenSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapper& (int&)cScoreIdentity["ID"] = data.ID; (int&)cScoreIdentity["Ping"] = 1337; - std::string IdentityName = "#" + std::to_string(data.ID) + ": " + data.Name; - - m_World->SetName(scoreIdentity.ID, IdentityName); m_World->SetParent(scoreIdentity.ID, entity.ID); } }