Forgot this
This commit is contained in:
parent
bdb6b7324e
commit
b6400b2b9f
@ -283,6 +283,23 @@ namespace scripting::lua
|
|||||||
return scripting::lua::entity_to_struct(s, id);
|
return scripting::lua::entity_to_struct(s, id);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
entity_type["scriptcall"] = [](const entity& entity, const sol::this_state s, const std::string& filename,
|
||||||
|
const std::string function, sol::variadic_args va)
|
||||||
|
{
|
||||||
|
std::vector<script_value> arguments{};
|
||||||
|
|
||||||
|
for (auto arg : va)
|
||||||
|
{
|
||||||
|
arguments.push_back(convert({s, arg}));
|
||||||
|
}
|
||||||
|
|
||||||
|
notifies::hook_enabled = false;
|
||||||
|
const auto result = convert(s, call_script_function(entity, filename, function, arguments));
|
||||||
|
notifies::hook_enabled = true;
|
||||||
|
|
||||||
|
return result;
|
||||||
|
};
|
||||||
|
|
||||||
struct game
|
struct game
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user