1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-05 15:55:45 +00:00
OpenMW/apps/openmw/mwworld/actiontrap.cpp
scrawl 039398c8ae Basic RefData and CellRef change tracking
Wrapped item charge handling in getItemHealth function
2014-05-25 14:30:07 +02:00

18 lines
371 B
C++

#include "actiontrap.hpp"
#include "../mwmechanics/spellcasting.hpp"
namespace MWWorld
{
void ActionTrap::executeImp(const Ptr &actor)
{
MWMechanics::CastSpell cast(mTrapSource, actor);
cast.mHitPosition = Ogre::Vector3(actor.getRefData().getPosition().pos);
cast.cast(mSpellId);
mTrapSource.getCellRef().setTrap("");
}
}