mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-14 01:19:59 +00:00
Don't require a reference for GetSoundPlaying (#8389)
This commit is contained in:
parent
5f92d520ee
commit
8cb1838c4a
@ -162,11 +162,17 @@ namespace MWScript
|
||||
public:
|
||||
void execute(Interpreter::Runtime& runtime) override
|
||||
{
|
||||
MWWorld::Ptr ptr = R()(runtime);
|
||||
MWWorld::Ptr ptr = R()(runtime, false);
|
||||
|
||||
int index = runtime[0].mInteger;
|
||||
runtime.pop();
|
||||
|
||||
if (ptr.isEmpty())
|
||||
{
|
||||
runtime.push(0);
|
||||
return;
|
||||
}
|
||||
|
||||
bool ret = MWBase::Environment::get().getSoundManager()->getSoundPlaying(
|
||||
ptr, ESM::RefId::stringRefId(runtime.getStringLiteral(index)));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user