implemented basic object activation

pull/7/head
Marc Zinnschlag 15 years ago
parent 2d695cc806
commit f630157bf8

@ -269,5 +269,19 @@ void OMW::Engine::go()
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…
Cancel
Save