Skip to content

Commit eb03ce4

Browse files
committed
Do not create light visuals on server side (#2888)
Signed-off-by: Ian Chen <[email protected]> (cherry picked from commit 6444e71)
1 parent 7f4401e commit eb03ce4

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

src/rendering/RenderUtil.cc

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1261,14 +1261,17 @@ void RenderUtil::Update()
12611261

12621262
if (newLightRendering)
12631263
{
1264-
rendering::VisualPtr lightVisual =
1265-
this->dataPtr->sceneManager.CreateLightVisual(
1266-
std::get<0>(light) + 1,
1267-
std::get<1>(light),
1268-
std::get<2>(light),
1269-
std::get<0>(light));
1270-
this->dataPtr->matchLightWithVisuals[std::get<0>(light)] =
1271-
std::get<0>(light) + 1;
1264+
if (!this->dataPtr->enableSensors)
1265+
{
1266+
rendering::VisualPtr lightVisual =
1267+
this->dataPtr->sceneManager.CreateLightVisual(
1268+
std::get<0>(light) + 1,
1269+
std::get<1>(light),
1270+
std::get<2>(light),
1271+
std::get<0>(light));
1272+
this->dataPtr->matchLightWithVisuals[std::get<0>(light)] =
1273+
std::get<0>(light) + 1;
1274+
}
12721275
}
12731276
else
12741277
{

0 commit comments

Comments
 (0)