mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
Don't require a reference for GetSoundPlaying (#8389)
This commit is contained in:
parent
5f92d520ee
commit
8cb1838c4a
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…
Add table
Add a link
Reference in a new issue