Skip to content

Commit

Permalink
Update player_manager.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
qubka committed Jan 5, 2025
1 parent 3fdf19d commit 92cb315
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/player_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ CServerSideClientBase* CPlayer::GetClient() const {

bool CPlayer::IsAuthenticated() const {
auto client = GetClient();
return client && client->IsConnected() && !client->IsFakeClient() && g_pEngineServer->IsClientFullyAuthenticated(GetPlayerSlot());
return client && client->IsConnected() && !client->IsFakeClient() && g_pEngineServer2->IsClientFullyAuthenticated(GetPlayerSlot());
}

bool CPlayer::IsConnected() const {
Expand Down Expand Up @@ -127,7 +127,7 @@ float CPlayer::GetLatency() const {
}

void CPlayer::Kick(const char* internalReason, ENetworkDisconnectionReason reason) const {
g_pEngineServer->KickClient(GetPlayerSlot(), internalReason, reason);
g_pEngineServer2->KickClient(GetPlayerSlot(), internalReason, reason);
}

void CPlayerManager::RunAuthChecks() {
Expand Down Expand Up @@ -325,7 +325,7 @@ CPlayer* CPlayerManager::ToPlayer(CEntityIndex entIndex) const {

CPlayer* CPlayerManager::ToPlayer(CPlayerUserId userID) const {
for (int slot = 0; slot < MaxClients(); slot++) {
if (g_pEngineServer->GetPlayerUserId(slot) == userID) {
if (g_pEngineServer2->GetPlayerUserId(slot) == userID) {
return ToPlayer(CPlayerSlot(slot));
}
}
Expand Down

0 comments on commit 92cb315

Please sign in to comment.