From 23dc8e07b28fdcf9247d2376d05489d86973f58e Mon Sep 17 00:00:00 2001 From: stiffly Date: Mon, 22 Feb 2016 10:41:37 +0100 Subject: [PATCH] Will this do the trick? Now tells the server to send HUD entities too. --- src/Engine/Network/Server.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Engine/Network/Server.cpp b/src/Engine/Network/Server.cpp index 0bed0b62..d05a4bb4 100644 --- a/src/Engine/Network/Server.cpp +++ b/src/Engine/Network/Server.cpp @@ -189,6 +189,7 @@ void Server::addChildrenToPacket(Packet & packet, EntityID entityID) for (auto it = itPair.first; it != itPair.second; it++) { EntityID childEntityID = it->second; // HACK: Only sync players for now, since the map turned out to be TOO LARGE to send in one snapshot and Simon's computer shits itself + // HACK: Also checked CapturePointHUD for now. (this would get out of sync); EntityWrapper childEntity(m_World, childEntityID); if (!shouldSendToClient(childEntity)) { continue; @@ -547,7 +548,8 @@ void Server::parsePlayerTransform(Packet& packet) bool Server::shouldSendToClient(EntityWrapper childEntity) { - return childEntity.HasComponent("Player") || childEntity.FirstParentWithComponent("Player").Valid(); + return childEntity.HasComponent("Player") || childEntity.FirstParentWithComponent("Player").Valid() + || childEntity.HasComponent("CapturePointHUD"); } PlayerID Server::GetPlayerIDFromEndpoint()