Will this do the trick? Now tells the server to send HUD entities too.

This commit is contained in:
stiffly
2016-02-22 10:41:37 +01:00
parent c7d31cac2d
commit 23dc8e07b2
+3 -1
View File
@@ -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()