From 70f104be076321330a0827010704761a040d8ec7 Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Sat, 8 Oct 2016 23:13:38 +0200 Subject: Environment cleanup * Move client list to ServerEnvironment and use RemotePlayer members instead of Player * ClientEnvironment only use setLocalPlayer to specify the current player * Remove ClientEnvironment dead code on player list (in fact other players are CAO not Player objects) * Drop LocalPlayer::getPlayer(xxx) functions which aren't used. * Improve a little bit performance by using const ref list for ClientEnvironment::getPlayerNames() & Client::getConnectedPlayerNames() * Drop isLocal() function from (Local)Player which is not needed anymore because of previous changes This change permits to cleanup shared client list which is very old code. ClientEnvironment doesn't use player list anymore, it only contains the local player, as addPlayer is only called from Client constructor client side. Clients are only CAO on client side, this cleanup permit to remove confusion about player list. --- src/localplayer.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/localplayer.h') diff --git a/src/localplayer.h b/src/localplayer.h index 9d43128aa..eb727d7e3 100644 --- a/src/localplayer.h +++ b/src/localplayer.h @@ -38,11 +38,6 @@ public: LocalPlayer(Client *gamedef, const char *name); virtual ~LocalPlayer(); - bool isLocal() const - { - return true; - } - ClientActiveObject *parent; bool got_teleported; -- cgit v1.2.3