[Bug Fix] Fix event_consider any_cast error (#4210)

This commit is contained in:
Xackery 2024-03-27 11:31:38 -07:00 committed by GitHub
parent cf7f0f4321
commit 4692799677
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1245,9 +1245,9 @@ void handle_player_consider(
lua_setfield(L, -2, "entity_id");
if (extra_pointers && extra_pointers->size() == 1) {
Lua_NPC l_npc(std::any_cast<NPC*>(extra_pointers->at(0)));
luabind::adl::object l_npc_o = luabind::adl::object(L, l_npc);
l_npc_o.push(L);
Lua_Mob l_mob(std::any_cast<Mob*>(extra_pointers->at(0)));
luabind::adl::object l_mob_o = luabind::adl::object(L, l_mob);
l_mob_o.push(L);
lua_setfield(L, -2, "other");
}
}