forked from teamnwah/openmw-tes3coop
implemented GetDistance function
parent
cc0c21cf35
commit
34b824cb70
@ -0,0 +1,22 @@
|
||||
#ifndef INTERPRETER_SPATIALOPCODES_H_INCLUDED
|
||||
#define INTERPRETER_SPATIALOPCODES_H_INCLUDED
|
||||
|
||||
#include "opcodes.hpp"
|
||||
#include "runtime.hpp"
|
||||
|
||||
namespace Interpreter
|
||||
{
|
||||
class OpGetDistance : public Opcode0
|
||||
{
|
||||
public:
|
||||
|
||||
virtual void execute (Runtime& runtime)
|
||||
{
|
||||
std::string name = runtime.getStringLiteral (runtime[0]);
|
||||
runtime[0] = runtime.getContext().getDistance (name);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue