Files
iw5-gsc-utils/src/game/scripting/function.cpp
Federico Cecchetto 640fb032ea Print errors
2021-11-08 01:36:48 +01:00

31 lines
542 B
C++

#include <stdinc.hpp>
#include "function.hpp"
#include "execution.hpp"
namespace scripting
{
function::function(const char* pos)
: pos_(pos)
{
}
script_value function::get_raw() const
{
game::VariableValue value;
value.type = game::SCRIPT_FUNCTION;
value.u.codePosValue = this->pos_;
return value;
}
const char* function::get_pos() const
{
return this->pos_;
}
script_value function::call(const entity& self, std::vector<script_value> arguments) const
{
return exec_ent_thread(self, this->pos_, arguments);
}
}