Fixed crash when L4D server went into hibernation mode after having had an active bot and a reserved name was used by this bot
- When going into hibernation, ClientSettingsChanged is called for remaining bots - Hook checks bot's name against reserved names in admins config and tries to kick using IClient::Disconnect - Method of getting IClient relies on client having an INetChannel pointer - Bots do not have an INetChannel pointer so this results in a crash
This commit is contained in:
parent
c2756c731f
commit
9c1e45d97c
@ -699,6 +699,11 @@ void PlayerManager::OnClientSettingsChanged(edict_t *pEntity)
|
|||||||
m_clinfochanged->PushCell(client);
|
m_clinfochanged->PushCell(client);
|
||||||
m_clinfochanged->Execute(&res, NULL);
|
m_clinfochanged->Execute(&res, NULL);
|
||||||
|
|
||||||
|
if (pPlayer->IsFakeClient())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
IPlayerInfo *info = pPlayer->GetPlayerInfo();
|
IPlayerInfo *info = pPlayer->GetPlayerInfo();
|
||||||
const char *new_name = info ? info->GetName() : engine->GetClientConVarValue(client, "name");
|
const char *new_name = info ? info->GetName() : engine->GetClientConVarValue(client, "name");
|
||||||
const char *old_name = pPlayer->m_Name.c_str();
|
const char *old_name = pPlayer->m_Name.c_str();
|
||||||
|
Loading…
Reference in New Issue
Block a user