mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-26 14:36:40 -04:00
Merge pull request #1014 from Allofich/sounds
Play locked sounds on locked objects instead of actors
This commit is contained in:
commit
3925f1fe81
@ -190,7 +190,7 @@ namespace MWClass
|
|||||||
}
|
}
|
||||||
else
|
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);
|
action->setSound(lockedSound);
|
||||||
return action;
|
return action;
|
||||||
}
|
}
|
||||||
|
@ -220,7 +220,7 @@ namespace MWClass
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// locked, and we can't open.
|
// 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);
|
action->setSound(lockedSound);
|
||||||
return action;
|
return action;
|
||||||
}
|
}
|
||||||
|
@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
namespace MWWorld
|
namespace MWWorld
|
||||||
{
|
{
|
||||||
FailedAction::FailedAction(const std::string &msg)
|
FailedAction::FailedAction(const std::string &msg, const Ptr& target)
|
||||||
: Action(false), mMessage(msg)
|
: Action(false, target), mMessage(msg)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
void FailedAction::executeImp(const Ptr &actor)
|
void FailedAction::executeImp(const Ptr &actor)
|
||||||
|
@ -13,7 +13,7 @@ namespace MWWorld
|
|||||||
virtual void executeImp(const Ptr &actor);
|
virtual void executeImp(const Ptr &actor);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FailedAction(const std::string &message = std::string());
|
FailedAction(const std::string &message = std::string(), const Ptr& target = Ptr());
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user