diff --git a/plugins/rendermax/renderer_light.cpp b/plugins/rendermax/renderer_light.cpp index 5dcc47dca..4a59ac5a3 100644 --- a/plugins/rendermax/renderer_light.cpp +++ b/plugins/rendermax/renderer_light.cpp @@ -21,6 +21,7 @@ #include "df/world.h" #include "df/building.h" #include "df/building_doorst.h" +#include "df/building_floodgatest.h" #include "df/plant.h" #include "df/plant_raw.h" @@ -901,6 +902,12 @@ void lightingEngineViewscreen::doOcupancyAndLights() if(!door->door_flags.bits.closed) continue; } + else if(type==df::enums::building_type::Floodgate) + { + df::building_floodgatest* gate=static_cast(bld); + if(!gate->gate_flags.bits.closed) + continue; + } if(def->useMaterial) diff --git a/plugins/rendermax/renderer_light.hpp b/plugins/rendermax/renderer_light.hpp index ad90ca5eb..5466ff01f 100644 --- a/plugins/rendermax/renderer_light.hpp +++ b/plugins/rendermax/renderer_light.hpp @@ -128,6 +128,7 @@ struct buildingLightDef bool useMaterial; float thickness; float size; + buildingLightDef():poweredOnly(false),useMaterial(true),thickness(1.0f),size(1.0f){} }; class lightingEngineViewscreen:public lightingEngine { diff --git a/plugins/rendermax/rendermax.lua b/plugins/rendermax/rendermax.lua index cbd7b3536..c5e7c21a7 100644 --- a/plugins/rendermax/rendermax.lua +++ b/plugins/rendermax/rendermax.lua @@ -145,4 +145,5 @@ addBuilding("Statue",{1,1,1},{0.9,0.75,0.3},8) addBuilding("Bed",{1,1,1},{0.3,0.2,0.0},2) addBuilding("WindowGlass",nil,nil,0,{"useMaterial"}) addBuilding("WindowGem",nil,nil,0,{"useMaterial"}) -addBuilding("Door",nil,nil,0,{"useMaterial"}) -- special case, only closed door obstruct/emit light \ No newline at end of file +addBuilding("Door",nil,nil,0,{"useMaterial"}) -- special case, only closed door obstruct/emit light +addBuilding("Floodgate",nil,nil,0,{"useMaterial"}) -- special case, only closed door obstruct/emit light