Codechange: rename ClientIndex to ClientPoolID

This commit is contained in:
Rubidium 2025-02-01 10:23:36 +01:00 committed by rubidium42
parent 50e581cd31
commit 2c7b3bb55d
4 changed files with 5 additions and 5 deletions

View File

@ -872,7 +872,7 @@ CommandCost CmdCompanyCtrl(DoCommandFlag flags, CompanyCtrlAction cca, CompanyID
/* This command is only executed in a multiplayer game */ /* This command is only executed in a multiplayer game */
if (!_networking) return CMD_ERROR; if (!_networking) return CMD_ERROR;
/* Has the network client a correct ClientIndex? */ /* Has the network client a correct ClientID? */
if (!(flags & DC_EXEC)) return CommandCost(); if (!(flags & DC_EXEC)) return CommandCost();
NetworkClientInfo *ci = NetworkClientInfo::GetByClientID(client_id); NetworkClientInfo *ci = NetworkClientInfo::GetByClientID(client_id);

View File

@ -17,7 +17,7 @@
#include "../timer/timer_game_economy.h" #include "../timer/timer_game_economy.h"
/** Type for the pool with client information. */ /** Type for the pool with client information. */
typedef Pool<NetworkClientInfo, ClientIndex, 8, MAX_CLIENT_SLOTS, PT_NCLIENT> NetworkClientInfoPool; using NetworkClientInfoPool = Pool<NetworkClientInfo, ClientPoolID, 8, MAX_CLIENT_SLOTS, PT_NCLIENT>;
extern NetworkClientInfoPool _networkclientinfo_pool; extern NetworkClientInfoPool _networkclientinfo_pool;
/** Container for all information known about a client. */ /** Container for all information known about a client. */

View File

@ -17,7 +17,7 @@ class ServerNetworkGameSocketHandler;
/** Make the code look slightly nicer/simpler. */ /** Make the code look slightly nicer/simpler. */
typedef ServerNetworkGameSocketHandler NetworkClientSocket; typedef ServerNetworkGameSocketHandler NetworkClientSocket;
/** Pool with all client sockets. */ /** Pool with all client sockets. */
typedef Pool<NetworkClientSocket, ClientIndex, 8, MAX_CLIENT_SLOTS, PT_NCLIENT> NetworkClientSocketPool; using NetworkClientSocketPool = Pool<NetworkClientSocket, ClientPoolID, 8, MAX_CLIENT_SLOTS, PT_NCLIENT>;
extern NetworkClientSocketPool _networkclientsocket_pool; extern NetworkClientSocketPool _networkclientsocket_pool;
/** Class for handling the server side of the game connection. */ /** Class for handling the server side of the game connection. */

View File

@ -52,8 +52,8 @@ enum ClientID : uint32_t {
CLIENT_ID_FIRST = 2, ///< The first client ID CLIENT_ID_FIRST = 2, ///< The first client ID
}; };
/** Indices into the client tables */ /** Indices into the client related pools */
typedef uint8_t ClientIndex; typedef uint8_t ClientPoolID;
/** Indices into the admin tables. */ /** Indices into the admin tables. */
typedef uint8_t AdminID; typedef uint8_t AdminID;