Merge pull request #206 from teamfisk/CapturePointFixBranch

CapturePointSystem now sets all children visible/not visible for each
This commit is contained in:
William Moberg
2016-03-11 14:26:45 +01:00
3 changed files with 112 additions and 9 deletions
+7 -2
View File
@@ -234,9 +234,14 @@ void CapturePointSystem::UpdateComponent(EntityWrapper& capturePointEntity, Comp
void CapturePointSystem::ChangeCapturePointModelsVisibility(EntityWrapper &capturePointModels, bool isOwner) {
(bool&)capturePointModels["Model"]["Visible"] = isOwner;
for (auto& capModel : capturePointModels.ChildrenWithComponent("Model"))
for (auto& capModel : capturePointModels.ChildrenWithComponent("Transform"))
{
(bool&)capModel["Model"]["Visible"] = isOwner;
if (capModel.HasComponent("Model")) {
(bool&)capModel["Model"]["Visible"] = isOwner;
}
if (capModel.HasComponent("PointLight")) {
(bool&)capModel["PointLight"]["Visible"] = isOwner;
}
}
}