diff --git a/apps/openmw/mwclass/door.cpp b/apps/openmw/mwclass/door.cpp index d15a01e9f3..c22b8005e4 100644 --- a/apps/openmw/mwclass/door.cpp +++ b/apps/openmw/mwclass/door.cpp @@ -15,6 +15,8 @@ #include "../mwrender/cellimp.hpp" +#include + namespace MWClass { void Door::insertObj (const MWWorld::Ptr& ptr, MWRender::CellRenderImp& cellRender, @@ -50,7 +52,14 @@ namespace MWClass ESMS::LiveCellRef *ref = ptr.get(); - // TODO check lock + if (ptr.getCellRef().lockLevel>0) + { + // TODO check for key + // TODO report failure to player (message, sound?). Look up behaviour of original MW. + std::cout << "Locked!" << std::endl; + return boost::shared_ptr (new MWWorld::NullAction); + } + // TODO check trap if (ref->ref.teleport)