#include "light4.hpp" #include "classmodel.hpp" #include "../mwphysics/physicssystem.hpp" #include "../mwrender/objects.hpp" #include "../mwrender/renderinginterface.hpp" #include "../mwworld/cellstore.hpp" #include "../mwworld/ptr.hpp" #include namespace MWClass { ESM4Light::ESM4Light() : MWWorld::RegisteredClass>(ESM4::Light::sRecordId) { } void ESM4Light ::insertObjectRendering( const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface) const { MWWorld::LiveCellRef* ref = ptr.get(); // Insert even if model is empty, so that the light is added renderingInterface.getObjects().insertModel(ptr, model, !(ref->mBase->mData.flags & ESM4::Light::OffDefault)); } }