mirror of
https://github.com/OpenMW/openmw.git
synced 2025-05-11 22:41:26 +00:00
Merge branch 'getsoundplaying' into 'master'
Don't require a reference for GetSoundPlaying (#8389) Closes #8389 See merge request OpenMW/openmw!4576
This commit is contained in:
commit
73bb17009e
1 changed files with 7 additions and 1 deletions
|
@ -162,11 +162,17 @@ namespace MWScript
|
||||||
public:
|
public:
|
||||||
void execute(Interpreter::Runtime& runtime) override
|
void execute(Interpreter::Runtime& runtime) override
|
||||||
{
|
{
|
||||||
MWWorld::Ptr ptr = R()(runtime);
|
MWWorld::Ptr ptr = R()(runtime, false);
|
||||||
|
|
||||||
int index = runtime[0].mInteger;
|
int index = runtime[0].mInteger;
|
||||||
runtime.pop();
|
runtime.pop();
|
||||||
|
|
||||||
|
if (ptr.isEmpty())
|
||||||
|
{
|
||||||
|
runtime.push(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
bool ret = MWBase::Environment::get().getSoundManager()->getSoundPlaying(
|
bool ret = MWBase::Environment::get().getSoundManager()->getSoundPlaying(
|
||||||
ptr, ESM::RefId::stringRefId(runtime.getStringLiteral(index)));
|
ptr, ESM::RefId::stringRefId(runtime.getStringLiteral(index)));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue