forked from mirror/openmw-tes3mp
Play locked sounds on locked objects instead of actors
This commit is contained in:
parent
6b45a757a9
commit
cb9bb92b26
4 changed files with 5 additions and 5 deletions
|
@ -190,7 +190,7 @@ namespace MWClass
|
|||
}
|
||||
else
|
||||
{
|
||||
boost::shared_ptr<MWWorld::Action> action(new MWWorld::FailedAction);
|
||||
boost::shared_ptr<MWWorld::Action> action(new MWWorld::FailedAction(std::string(), ptr));
|
||||
action->setSound(lockedSound);
|
||||
return action;
|
||||
}
|
||||
|
|
|
@ -220,7 +220,7 @@ namespace MWClass
|
|||
else
|
||||
{
|
||||
// locked, and we can't open.
|
||||
boost::shared_ptr<MWWorld::Action> action(new MWWorld::FailedAction);
|
||||
boost::shared_ptr<MWWorld::Action> action(new MWWorld::FailedAction(std::string(), ptr));
|
||||
action->setSound(lockedSound);
|
||||
return action;
|
||||
}
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
|
||||
namespace MWWorld
|
||||
{
|
||||
FailedAction::FailedAction(const std::string &msg)
|
||||
: Action(false), mMessage(msg)
|
||||
FailedAction::FailedAction(const std::string &msg, const Ptr& target)
|
||||
: Action(false, target), mMessage(msg)
|
||||
{ }
|
||||
|
||||
void FailedAction::executeImp(const Ptr &actor)
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace MWWorld
|
|||
virtual void executeImp(const Ptr &actor);
|
||||
|
||||
public:
|
||||
FailedAction(const std::string &message = std::string());
|
||||
FailedAction(const std::string &message = std::string(), const Ptr& target = Ptr());
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue