We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a49a900 + 8cb1838 commit 73bb170Copy full SHA for 73bb170
apps/openmw/mwscript/soundextensions.cpp
@@ -162,11 +162,17 @@ namespace MWScript
162
public:
163
void execute(Interpreter::Runtime& runtime) override
164
{
165
- MWWorld::Ptr ptr = R()(runtime);
+ MWWorld::Ptr ptr = R()(runtime, false);
166
167
int index = runtime[0].mInteger;
168
runtime.pop();
169
170
+ if (ptr.isEmpty())
171
+ {
172
+ runtime.push(0);
173
+ return;
174
+ }
175
+
176
bool ret = MWBase::Environment::get().getSoundManager()->getSoundPlaying(
177
ptr, ESM::RefId::stringRefId(runtime.getStringLiteral(index)));
178
0 commit comments