2012-07-27 10:00:10 +00:00
|
|
|
|
|
|
|
#include "action.hpp"
|
|
|
|
|
2012-07-27 10:19:25 +00:00
|
|
|
#include "../mwbase/environment.hpp"
|
2012-08-09 12:33:21 +00:00
|
|
|
#include "../mwbase/soundmanager.hpp"
|
2012-07-27 10:19:25 +00:00
|
|
|
|
2012-07-27 10:00:10 +00:00
|
|
|
MWWorld::Action::Action() {}
|
|
|
|
|
|
|
|
MWWorld::Action::~Action() {}
|
|
|
|
|
|
|
|
void MWWorld::Action::execute (const Ptr& actor)
|
|
|
|
{
|
2012-07-27 10:19:25 +00:00
|
|
|
if (!mSoundId.empty())
|
2012-08-19 23:11:50 +00:00
|
|
|
{
|
|
|
|
if (onActor)
|
|
|
|
{
|
|
|
|
std::cout << "Douglas - Som Normal" << std::endl;
|
|
|
|
MWBase::Environment::get().getSoundManager()->playSound(mSoundId, 1.0, 1.0,
|
|
|
|
MWBase::SoundManager::Play_NoTrack);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
std::cout << "Douglas - Som 3D" << std::endl;
|
|
|
|
MWBase::Environment::get().getSoundManager()->playSound3D (actor, mSoundId, 1.0, 1.0,
|
|
|
|
MWBase::SoundManager::Play_NoTrack);
|
|
|
|
}
|
|
|
|
}
|
2012-07-27 10:19:25 +00:00
|
|
|
|
2012-07-27 10:00:10 +00:00
|
|
|
executeImp (actor);
|
|
|
|
}
|
2012-07-27 10:19:25 +00:00
|
|
|
|
2012-08-19 23:11:50 +00:00
|
|
|
void MWWorld::Action::setSound (const std::string& id, const bool onActorValue)
|
2012-07-27 10:19:25 +00:00
|
|
|
{
|
|
|
|
mSoundId = id;
|
2012-08-19 23:11:50 +00:00
|
|
|
onActor = onActorValue;
|
2012-07-27 10:19:25 +00:00
|
|
|
}
|