Commit MetaInfo

Revisiondcea4405a9fccb6b05248c9737b4f6ecd70b2086 (tree)
Time2018-09-04 14:52:56
Author <apogee@d560...>

Log Message

Local light sources: sources with VIS_COCKPIT visibility flag are now skipped in external views, and sources with VIS_EXTERNAL are skipped in cockpit views to avoid filling the available slots with inactive lights [issue #1319]

Change Summary

Incremental Difference

diff -r 30dcd55cde78 -r dcea4405a9fc D3D7Client/Scene.cpp
--- a/D3D7Client/Scene.cpp Sat Aug 11 23:10:42 2018 +0000
+++ b/D3D7Client/Scene.cpp Tue Sep 04 05:52:56 2018 +0000
@@ -334,6 +334,14 @@
334334 for (j = 0; j < nemitter; j++) {
335335 const LightEmitter *em = vessel->GetLightEmitter(j);
336336 if (!em->IsActive() || !em->GetIntensity()) continue;
337+ if (oapiCameraInternal()) {
338+ if (em->GetVisibility() == LightEmitter::VIS_EXTERNAL)
339+ continue;
340+ }
341+ else {
342+ if (em->GetVisibility() == LightEmitter::VIS_COCKPIT)
343+ continue;
344+ }
337345 const VECTOR3 *pos = em->GetPositionRef();
338346 D3DVECTOR q, p = {(float)pos->x, (float)pos->y, (float)pos->z};
339347 D3DMAT_VectorMatrixMultiply (&q, &p, &pv->vobj->MWorld());
Show on old repository browser