1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Player/LocalPlayer/RemotePlayer inheritance cleanup (part 2 on X)

* Server/Client Environments now have an helper to cast Player object in the right type to use it
* Server: use RemotePlayer everywhere and remove previous added casts
* Client: use LocalPlayer where needed
* Environment: remove unused functions (getPlayers(), getRandomConnectedPlayer(), getNearestConnectedPlayer())
This commit is contained in:
Loic Blot 2016-10-08 12:21:41 +02:00 committed by Ner'zhul
parent 9393e4a0a8
commit 656faf7373
12 changed files with 97 additions and 156 deletions

View file

@ -420,7 +420,7 @@ void InvRef::create(lua_State *L, const InventoryLocation &loc)
luaL_getmetatable(L, className);
lua_setmetatable(L, -2);
}
void InvRef::createPlayer(lua_State *L, Player *player)
void InvRef::createPlayer(lua_State *L, RemotePlayer *player)
{
NO_MAP_LOCK_REQUIRED;
InventoryLocation loc;