mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add entity:set_enabled(...)
This commit is contained in:
parent
13fde2116d
commit
f2101f6504
6 changed files with 32 additions and 3 deletions
|
|
@ -614,6 +614,10 @@ static void process_entity_callback(
|
|||
) {
|
||||
auto L = lua::get_main_state();
|
||||
lua::pushenv(L, *env);
|
||||
if (lua::hasfield(L, "__disabled")) {
|
||||
lua::pop(L);
|
||||
return;
|
||||
}
|
||||
if (lua::getfield(L, name)) {
|
||||
if (args) {
|
||||
lua::call_nothrow(L, args(L), 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue