Remove error checking from redirect

This commit is contained in:
2026-06-02 02:52:42 -04:00
parent f0460cdc71
commit 6c9f75bfac

View File

@@ -379,14 +379,14 @@ LuaDefine(tangible_redirect, "actor1, actor2",
World *w = World::fetch_global_pointer(L);
Tangible *actor1 = w->tangible_get(LS, lactor1, true);
Tangible *actor2 = w->tangible_get(LS, lactor2, true);
if (!actor1->is_controlled_) {
luaL_error(L, "Actor1 is not a controlled actor.");
return 0;
}
if ((!actor2->can_be_controlled_) || (actor2->is_controlled_)) {
luaL_error(L, "Actor2 is not an uncontrolled actor.");
return 0;
}
// if (!actor1->is_controlled_) {
// luaL_error(L, "Actor1 is not a controlled actor.");
// return 0;
// }
// if ((!actor2->can_be_controlled_) || (actor2->is_controlled_)) {
// luaL_error(L, "Actor2 is not an uncontrolled actor.");
// return 0;
// }
w->add_redirect(actor1->id(), actor2->id());
return LS.result();
}