CapturePointSystem now sets all children visible/not visible for each red/blue/spectator

This commit is contained in:
verysecrethero
2016-03-11 14:15:46 +01:00
parent 0869afd529
commit 0aedeb61b4
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;
}
}
}