forked from teamnwah/openmw-tes3coop
implemented basic object activation
This commit is contained in:
parent
2d695cc806
commit
f630157bf8
1 changed files with 15 additions and 1 deletions
|
@ -269,5 +269,19 @@ void OMW::Engine::go()
|
||||||
|
|
||||||
void OMW::Engine::activate()
|
void OMW::Engine::activate()
|
||||||
{
|
{
|
||||||
std::cout << "activate" << std::endl;
|
std::string handle = mEnvironment.mWorld->getFacedHandle();
|
||||||
|
|
||||||
|
if (handle.empty())
|
||||||
|
return;
|
||||||
|
|
||||||
|
MWWorld::Ptr ptr = mEnvironment.mWorld->getPtrViaHandle (handle);
|
||||||
|
|
||||||
|
if (ptr.isEmpty())
|
||||||
|
return;
|
||||||
|
|
||||||
|
boost::shared_ptr<MWWorld::Action> action =
|
||||||
|
MWWorld::Class::get (ptr).activate (ptr, mEnvironment.mWorld->getPlayerPos().getPlayer(),
|
||||||
|
mEnvironment);
|
||||||
|
|
||||||
|
action->execute (mEnvironment);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue