diff --git a/apps/mwinterpreter/context.cpp b/apps/mwinterpreter/context.cpp index 5d27a8fe36..ecf4bd8290 100644 --- a/apps/mwinterpreter/context.cpp +++ b/apps/mwinterpreter/context.cpp @@ -101,7 +101,7 @@ namespace SAInterpreter void Context::setGlobalFloat (const std::string& name, float value) {} - bool Context::isScriptRunning (const std::string& name) + bool Context::isScriptRunning (const std::string& name) const { return false; } @@ -110,7 +110,7 @@ namespace SAInterpreter void Context::stopScript (const std::string& name) {} - float Context::getDistance (const std::string& name) + float Context::getDistance (const std::string& name) const { return 0; } diff --git a/apps/mwinterpreter/context.hpp b/apps/mwinterpreter/context.hpp index e9535e9182..48ba40ca30 100644 --- a/apps/mwinterpreter/context.hpp +++ b/apps/mwinterpreter/context.hpp @@ -52,13 +52,13 @@ namespace SAInterpreter virtual void setGlobalFloat (const std::string& name, float value); - virtual bool isScriptRunning (const std::string& name); + virtual bool isScriptRunning (const std::string& name) const; virtual void startScript (const std::string& name); virtual void stopScript (const std::string& name); - virtual float getDistance (const std::string& name); + virtual float getDistance (const std::string& name) const; virtual float getSecondsPassed() const; diff --git a/apps/openmw/mwscript/interpretercontext.cpp b/apps/openmw/mwscript/interpretercontext.cpp index 92840fdd58..0b1610f4f6 100644 --- a/apps/openmw/mwscript/interpretercontext.cpp +++ b/apps/openmw/mwscript/interpretercontext.cpp @@ -125,7 +125,7 @@ namespace MWScript *reinterpret_cast (&value); } - bool InterpreterContext::isScriptRunning (const std::string& name) + bool InterpreterContext::isScriptRunning (const std::string& name) const { return mEnvironment.mGlobalScripts->isRunning (name); } @@ -140,7 +140,7 @@ namespace MWScript mEnvironment.mGlobalScripts->removeScript (name); } - float InterpreterContext::getDistance (const std::string& name) + float InterpreterContext::getDistance (const std::string& name) const { if (mReference.isEmpty()) throw std::runtime_error ("no implicit reference"); diff --git a/apps/openmw/mwscript/interpretercontext.hpp b/apps/openmw/mwscript/interpretercontext.hpp index 4b3dfa124e..9477562620 100644 --- a/apps/openmw/mwscript/interpretercontext.hpp +++ b/apps/openmw/mwscript/interpretercontext.hpp @@ -61,13 +61,13 @@ namespace MWScript virtual void setGlobalFloat (const std::string& name, float value); - virtual bool isScriptRunning (const std::string& name); + virtual bool isScriptRunning (const std::string& name) const; virtual void startScript (const std::string& name); virtual void stopScript (const std::string& name); - virtual float getDistance (const std::string& name); + virtual float getDistance (const std::string& name) const; virtual bool hasBeenActivated() const; diff --git a/components/interpreter/context.hpp b/components/interpreter/context.hpp index a8f0eaf8b6..34b78d580f 100644 --- a/components/interpreter/context.hpp +++ b/components/interpreter/context.hpp @@ -47,13 +47,13 @@ namespace Interpreter virtual void setGlobalFloat (const std::string& name, float value) = 0; - virtual bool isScriptRunning (const std::string& name) = 0; + virtual bool isScriptRunning (const std::string& name) const = 0; virtual void startScript (const std::string& name) = 0; virtual void stopScript (const std::string& name) = 0; - virtual float getDistance (const std::string& name) = 0; + virtual float getDistance (const std::string& name) const = 0; virtual float getSecondsPassed() const = 0; };