1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 20:29:57 +00:00

blocked using of locked doors (keys are not considered yet)

This commit is contained in:
Marc Zinnschlag 2010-08-30 12:02:47 +02:00
parent 459dd82896
commit 61c4fa0630

View file

@ -15,6 +15,8 @@
#include "../mwrender/cellimp.hpp"
#include <iostream>
namespace MWClass
{
void Door::insertObj (const MWWorld::Ptr& ptr, MWRender::CellRenderImp& cellRender,
@ -50,7 +52,14 @@ namespace MWClass
ESMS::LiveCellRef<ESM::Door, MWWorld::RefData> *ref =
ptr.get<ESM::Door>();
// 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<MWWorld::Action> (new MWWorld::NullAction);
}
// TODO check trap
if (ref->ref.teleport)