|
|
|
@ -8,9 +8,12 @@
|
|
|
|
|
#include "../mwworld/ptr.hpp"
|
|
|
|
|
#include "../mwworld/actiontake.hpp"
|
|
|
|
|
#include "../mwworld/nullaction.hpp"
|
|
|
|
|
#include "../mwworld/environment.hpp"
|
|
|
|
|
|
|
|
|
|
#include "../mwrender/cellimp.hpp"
|
|
|
|
|
|
|
|
|
|
#include "../mwsound/soundmanager.hpp"
|
|
|
|
|
|
|
|
|
|
#include "containerutil.hpp"
|
|
|
|
|
|
|
|
|
|
namespace MWClass
|
|
|
|
@ -41,6 +44,17 @@ namespace MWClass
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Light::enable (const MWWorld::Ptr& ptr, MWWorld::Environment& environment) const
|
|
|
|
|
{
|
|
|
|
|
ESMS::LiveCellRef<ESM::Light, MWWorld::RefData> *ref =
|
|
|
|
|
ptr.get<ESM::Light>();
|
|
|
|
|
|
|
|
|
|
if (!ref->base->sound.empty())
|
|
|
|
|
{
|
|
|
|
|
environment.mSoundManager->playSound3D (ptr, ref->base->sound, 1.0, 1.0, true);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
std::string Light::getName (const MWWorld::Ptr& ptr) const
|
|
|
|
|
{
|
|
|
|
|
ESMS::LiveCellRef<ESM::Light, MWWorld::RefData> *ref =
|
|
|
|
|