diff --git a/plugins/rendermax/renderer_light.cpp b/plugins/rendermax/renderer_light.cpp index 187b3d2d8..05f1d2c96 100644 --- a/plugins/rendermax/renderer_light.cpp +++ b/plugins/rendermax/renderer_light.cpp @@ -2,12 +2,14 @@ #include #include +#include #include "Types.h" #include "modules/Gui.h" #include "modules/Screen.h" #include "modules/Maps.h" +#include "modules/Units.h" #include "df/graphic.h" #include "df/viewscreen_dwarfmodest.h" @@ -503,4 +505,15 @@ void lightingEngineViewscreen::doOcupancyAndLights() int tile=getIndex(wx,wy); addLight(tile,cursor); } -} \ No newline at end of file + lightSource citizen(lightCell(0.80f,0.80f,0.90f),6); + for (int i=0;iunits.active.size();++i) + { + df::unit *u = df::global::world->units.active[i]; + if (u->pos.z != window_z || + (u->pos.x < window_x || u->pos.x >= window_x+vpW) || + (u->pos.y < window_y || u->pos.y >= window_y+vpH)) + continue; + if (DFHack::Units::isCitizen(u)) + addLight(getIndex(u->pos.x-window_x+1, u->pos.y-window_y+1),citizen); + } +}