mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
RemotePlayer/LocalPlayer Player base class proper separation (code cleanup) (patch 3 of X)
* remove IGameDef from Player class, only LocalPlayer has it now * move many attributes/functions only used by LocalPlayer from Player to LocalPlayer * move many attributes/functions only used by RemotePlayer from Player to RemotePlayer * make some functions const * hudGetHotbarSelectedImage now returns const ref * RemotePlayer getHotbarSelectedImage now returns const ref * various code style fixes
This commit is contained in:
@@ -317,7 +317,10 @@ public:
|
||||
void hudSetHotbarImage(RemotePlayer *player, std::string name);
|
||||
std::string hudGetHotbarImage(RemotePlayer *player);
|
||||
void hudSetHotbarSelectedImage(RemotePlayer *player, std::string name);
|
||||
std::string hudGetHotbarSelectedImage(RemotePlayer *player);
|
||||
const std::string &hudGetHotbarSelectedImage(RemotePlayer *player) const
|
||||
{
|
||||
return player->getHotbarSelectedImage();
|
||||
}
|
||||
|
||||
inline Address getPeerAddress(u16 peer_id)
|
||||
{ return m_con.GetPeerAddress(peer_id); }
|
||||
|
Reference in New Issue
Block a user