handling rare case where cprint tries to send message to disconnected player
This commit is contained in:
parent
1b2d2e48ff
commit
de2dbcb9c5
@ -1019,7 +1019,7 @@ public Handle get_most_nominated_maps()
|
|||||||
int nominate_count_for_particular_map = 0;
|
int nominate_count_for_particular_map = 0;
|
||||||
sm.GetValue(map_iteration, nominate_count_for_particular_map);
|
sm.GetValue(map_iteration, nominate_count_for_particular_map);
|
||||||
nominate_count_for_particular_map++;
|
nominate_count_for_particular_map++;
|
||||||
//if i is 0 its admin nominated map that must come into the vote
|
//if i is 0 its admin nominated map that most come into the vote
|
||||||
if(!i)
|
if(!i)
|
||||||
{
|
{
|
||||||
nominate_count_for_particular_map = 999;
|
nominate_count_for_particular_map = 999;
|
||||||
@ -2588,8 +2588,11 @@ void CheckMapRestrictions(bool time = false, bool players = false)
|
|||||||
if(TimeRestriction)
|
if(TimeRestriction)
|
||||||
{
|
{
|
||||||
remove = true;
|
remove = true;
|
||||||
|
|
||||||
CPrintToChat(client, "[MCE] %t", "Nomination Removed Time Error", map);
|
if (client > 0 && client <= MaxClients && IsClientConnected(client) && IsClientInGame(client))
|
||||||
|
{
|
||||||
|
CPrintToChat(client, "[MCE] %t", "Nomination Removed Time Error", map);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2600,10 +2603,13 @@ void CheckMapRestrictions(bool time = false, bool players = false)
|
|||||||
{
|
{
|
||||||
remove = true;
|
remove = true;
|
||||||
|
|
||||||
if(PlayerRestriction < 0)
|
if (client > 0 && client <= MaxClients && IsClientConnected(client) && IsClientInGame(client))
|
||||||
CPrintToChat(client, "[MCE] %t", "Nomination Removed MinPlayers Error", map);
|
{
|
||||||
else
|
if(PlayerRestriction < 0)
|
||||||
CPrintToChat(client, "[MCE] %t", "Nomination Removed MaxPlayers Error", map);
|
CPrintToChat(client, "[MCE] %t", "Nomination Removed MinPlayers Error", map);
|
||||||
|
else
|
||||||
|
CPrintToChat(client, "[MCE] %t", "Nomination Removed MaxPlayers Error", map);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user