Play trap activation sound on trapped object, not actor

pull/1/head
Allofich 9 years ago
parent 251ba041f3
commit d4e656ceaf

@ -173,7 +173,7 @@ namespace MWClass
else else
{ {
// Activate trap // Activate trap
boost::shared_ptr<MWWorld::Action> action(new MWWorld::ActionTrap(actor, ptr.getCellRef().getTrap(), ptr)); boost::shared_ptr<MWWorld::Action> action(new MWWorld::ActionTrap(ptr.getCellRef().getTrap(), ptr));
action->setSound(trapActivationSound); action->setSound(trapActivationSound);
return action; return action;
} }

@ -139,7 +139,7 @@ namespace MWClass
if(!ptr.getCellRef().getTrap().empty()) if(!ptr.getCellRef().getTrap().empty())
{ {
// Trap activation // Trap activation
boost::shared_ptr<MWWorld::Action> action(new MWWorld::ActionTrap(actor, ptr.getCellRef().getTrap(), ptr)); boost::shared_ptr<MWWorld::Action> action(new MWWorld::ActionTrap(ptr.getCellRef().getTrap(), ptr));
action->setSound(trapActivationSound); action->setSound(trapActivationSound);
return action; return action;
} }

@ -18,10 +18,9 @@ namespace MWWorld
public: public:
/// @param spellId /// @param spellId
/// @param actor Actor that activated the trap
/// @param trapSource /// @param trapSource
ActionTrap (const Ptr& actor, const std::string& spellId, const Ptr& trapSource) ActionTrap (const std::string& spellId, const Ptr& trapSource)
: Action(false, actor), mSpellId(spellId), mTrapSource(trapSource) {} : Action(false, trapSource), mSpellId(spellId), mTrapSource(trapSource) {}
}; };
} }

Loading…
Cancel
Save