Hack to sync ammo over network until we have input replaying + Reload effect from all views

This commit is contained in:
2016-02-12 01:45:54 +01:00
parent 30f454e6a4
commit 5295133311
11 changed files with 171 additions and 71 deletions
+5 -2
View File
@@ -79,7 +79,6 @@ void RenderSystem::fillSprites(std::list<std::shared_ptr<RenderJob>>& jobs, Worl
bool RenderSystem::isEntityVisible(EntityWrapper& entity)
{
// Only render children of a camera if that camera is currently active
if (isChildOfACamera(entity) && !isChildOfCurrentCamera(entity)) {
return false;
@@ -87,7 +86,11 @@ bool RenderSystem::isEntityVisible(EntityWrapper& entity)
// Hide things parented to local player if they have the HiddenFromLocalPlayer component
bool outOfBodyExperience = ResourceManager::Load<ConfigFile>("Config.ini")->Get<bool>("Debug.OutOfBodyExperience", false);
if (entity.HasComponent("HiddenForLocalPlayer") && (entity == m_LocalPlayer || entity.IsChildOf(m_LocalPlayer)) && !outOfBodyExperience) {
if (
(entity.HasComponent("HiddenForLocalPlayer") || entity.FirstParentWithComponent("HiddenForLocalPlayer").Valid())
&& (entity == m_LocalPlayer || entity.IsChildOf(m_LocalPlayer))
&& !outOfBodyExperience
) {
return false;
}