Merge remote-tracking branch 'origin/master' into Menu
# Conflicts: # resources/Schema/Components.xsd # resources/Schema/Entities/NewMapWSpectatorCam.xml # resources/Schema/Types/Entity.xsd # src/Game/Game.cpp
This commit is contained in:
@@ -40,7 +40,7 @@ bool ButtonSystem::OnMousePress(const Events::MousePress& e)
|
||||
//You have clicked on a button entity, send pressed event.
|
||||
if (m_World->HasComponent(m_PickData.Entity, "InputCmdButton")) {
|
||||
Events::InputCommand eInputCmd;
|
||||
eInputCmd.PlayerID = LocalPlayer.ID;
|
||||
eInputCmd.PlayerID = -1;
|
||||
eInputCmd.Player = LocalPlayer;
|
||||
EntityWrapper button = EntityWrapper(m_World, m_PickData.Entity);
|
||||
eInputCmd.Command = (std::string)button["InputCmdButton"]["Command"];
|
||||
@@ -68,7 +68,7 @@ bool ButtonSystem::OnMouseRelease(const Events::MouseRelease& e)
|
||||
|
||||
if (m_World->HasComponent(m_PickData.Entity, "InputCmdButton")) {
|
||||
Events::InputCommand eInputCmd;
|
||||
eInputCmd.PlayerID = LocalPlayer.ID;
|
||||
eInputCmd.PlayerID = -1;
|
||||
eInputCmd.Player = LocalPlayer;
|
||||
EntityWrapper button = EntityWrapper(m_World, m_PickData.Entity);
|
||||
eInputCmd.Command = (std::string)button["InputCmdButton"]["Command"];
|
||||
|
||||
@@ -641,22 +641,7 @@ void Server::parsePlayerTransform(Packet& packet)
|
||||
|
||||
bool Server::shouldSendToClient(EntityWrapper childEntity)
|
||||
{
|
||||
auto children = m_World->GetDirectChildren(childEntity.ID);
|
||||
for (auto it = children.first; it != children.second; it++) {
|
||||
EntityWrapper child(m_World, it->second);
|
||||
if (child.HasComponent("CapturePoint") || child.HasComponent("HealthPickup")
|
||||
|| child.HasComponent("AmmoPickup")) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return childEntity.HasComponent("Player")
|
||||
|| childEntity.FirstParentWithComponent("Player").Valid()
|
||||
|| childEntity.HasComponent("CapturePoint")
|
||||
|| childEntity.HasComponent("HealthPickup")
|
||||
|| childEntity.HasComponent("AmmoPickup")
|
||||
|| childEntity.HasComponent("ScoreScreen")
|
||||
|| childEntity.FirstParentWithComponent("ScoreScreen").Valid()
|
||||
|| childEntity.FirstParentWithComponent("CapturePoint").Valid();
|
||||
return childEntity.HasComponent("NetworkComponent") || childEntity.FirstParentWithComponent("NetworkComponent").Valid();
|
||||
}
|
||||
|
||||
PlayerID Server::getPlayerIDFromEndpoint()
|
||||
|
||||
Reference in New Issue
Block a user