redirect code in place

This commit is contained in:
2026-06-02 02:42:28 -04:00
parent bfaf161d30
commit f0460cdc71
4 changed files with 99 additions and 11 deletions

View File

@@ -345,6 +345,17 @@ void World::disconnected(int64_t actor_id) {
}
}
bool World::redirected(int64_t actor_id, int64_t new_id) {
disconnected(actor_id);
Tangible *tan = tangible_get(new_id);
if (tan && (tan->can_be_controlled_) && (!tan->is_controlled_)) {
tan->is_controlled_ = true;
return true;
} else {
return false;
}
}
eng::string World::probe_lua_expr(int64_t actor_id, std::string_view lua) {
assert(stack_is_clear());
lua_State *L = state();