diff --git a/src/game/g_game.pas b/src/game/g_game.pas
index aa4c189bc549556117f56d5eb802c14e04aaee8d..7ad130f20a6b52c6a3029bb81de27ab5cab4c020 100644 (file)
--- a/src/game/g_game.pas
+++ b/src/game/g_game.pas
if NetUseMaster then
begin
+ {
if (gTime >= NetTimeToMaster) or g_Net_Slist_IsConnectionInProgress then
begin
if (not g_Net_Slist_IsConnectionActive) then g_Net_Slist_Connect(false); // non-blocking connection to the master
g_Net_Slist_Update;
NetTimeToMaster := gTime + NetMasterRate;
end;
+ }
+ g_Net_Slist_Pulse();
end;
end
else if (NetMode = NET_CLIENT) then
gPlayer1.Respawn(False, True);
if g_Game_IsNet and NetUseMaster then
- g_Net_Slist_Update;
+ begin
+ //g_Net_Slist_Update;
+ g_Net_Slist_Pulse();
+ end;
end;
Exit;
gPlayer2.Respawn(False, True);
if g_Game_IsNet and NetUseMaster then
- g_Net_Slist_Update;
+ begin
+ //g_Net_Slist_Update;
+ g_Net_Slist_Pulse();
+ end;
end;
Exit;
g_Player_Remove(Pl.UID);
if g_Game_IsNet and NetUseMaster then
- g_Net_Slist_Update;
+ begin
+ //g_Net_Slist_Update;
+ g_Net_Slist_Pulse();
+ end;
end else
gPlayer2 := nil;
Exit;
g_Player_Remove(Pl.UID);
if g_Game_IsNet and NetUseMaster then
- g_Net_Slist_Update;
+ begin
+ //g_Net_Slist_Update;
+ g_Net_Slist_Pulse();
+ end;
end else
begin
gPlayer1 := nil;
// Ìàñòåðñåðâåð
if NetUseMaster then
begin
+ {
if (not g_Net_Slist_IsConnectionActive) then g_Net_Slist_Connect(false); // non-blocking connection to the master
g_Net_Slist_Update;
+ }
+ g_Net_Slist_Pulse();
end;
if NetClients <> nil then
if Length(NetServerName) > 64 then
SetLength(NetServerName, 64);
if g_Game_IsServer and g_Game_IsNet and NetUseMaster then
- g_Net_Slist_Update;
+ begin
+ //g_Net_Slist_Update;
+ g_Net_Slist_Pulse();
+ end;
end;
g_Console_Add(cmd + ' = "' + NetServerName + '"');
if Length(NetPassword) > 24 then
SetLength(NetPassword, 24);
if g_Game_IsServer and g_Game_IsNet and NetUseMaster then
- g_Net_Slist_Update;
+ begin
+ //g_Net_Slist_Update;
+ g_Net_Slist_Pulse();
+ end;
end;
g_Console_Add(cmd + ' = "' + AnsiLowerCase(NetPassword) + '"');
end;
end;
if NetUseMaster then
- g_Net_Slist_Update;
+ begin
+ //g_Net_Slist_Update;
+ g_Net_Slist_Pulse();
+ end;
end;
end;
begin
if NetUseMaster then
begin
+ {
if (not g_Net_Slist_IsConnectionActive) then g_Net_Slist_Connect(false); // non-blocking connection to the master
g_Net_Slist_Update();
+ }
+ g_Net_Slist_Pulse();
end
else
begin
- if (not g_Net_Slist_IsConnectionActive) then g_Net_Slist_Disconnect();
+ //if (not g_Net_Slist_IsConnectionActive) then g_Net_Slist_Disconnect();
+ g_Net_Slist_Private();
end;
end;
end;
g_Console_Add(Format(_lc[I_PLAYER_KICK], [s]));
MH_SEND_GameEvent(NET_EV_PLAYER_KICK, 0, s);
if NetUseMaster then
- g_Net_Slist_Update;
+ begin
+ //g_Net_Slist_Update;
+ g_Net_Slist_Pulse();
+ end;
end else if gPlayers <> nil then
for a := Low(gPlayers) to High(gPlayers) do
if gPlayers[a] <> nil then
g_Console_Add(Format(_lc[I_PLAYER_LEAVE], [gPlayers[a].Name]), True);
g_Player_Remove(gPlayers[a].UID);
if NetUseMaster then
- g_Net_Slist_Update;
+ begin
+ //g_Net_Slist_Update;
+ g_Net_Slist_Pulse();
+ end;
// Åñëè íå ïåðåìåøàòü, ïðè äîáàâëåíèè íîâûõ áîòîâ ïîÿâÿòñÿ ñòàðûå
g_Bot_MixNames();
end;
g_Console_Add(Format(_lc[I_PLAYER_KICK], [s]));
MH_SEND_GameEvent(NET_EV_PLAYER_KICK, 0, s);
if NetUseMaster then
- g_Net_Slist_Update;
+ begin
+ //g_Net_Slist_Update;
+ g_Net_Slist_Pulse();
+ end;
end;
end;
end else
g_Console_Add(Format(_lc[I_PLAYER_BAN], [s]));
MH_SEND_GameEvent(NET_EV_PLAYER_BAN, 0, s);
if NetUseMaster then
- g_Net_Slist_Update;
+ begin
+ //g_Net_Slist_Update;
+ g_Net_Slist_Pulse();
+ end;
end else
g_Console_Add(Format(_lc[I_NET_ERR_NAME404], [P[1]]));
end else
g_Console_Add(Format(_lc[I_PLAYER_BAN], [s]));
MH_SEND_GameEvent(NET_EV_PLAYER_BAN, 0, s);
if NetUseMaster then
- g_Net_Slist_Update;
+ begin
+ //g_Net_Slist_Update;
+ g_Net_Slist_Pulse();
+ end;
end;
end else
g_Console_Add(_lc[I_MSG_SERVERONLY]);
g_Console_Add(Format(_lc[I_PLAYER_BAN], [s]));
MH_SEND_GameEvent(NET_EV_PLAYER_BAN, 0, s);
if NetUseMaster then
- g_Net_Slist_Update;
+ begin
+ //g_Net_Slist_Update;
+ g_Net_Slist_Pulse();
+ end;
end else
g_Console_Add(Format(_lc[I_NET_ERR_NAME404], [P[1]]));
end else
g_Console_Add(Format(_lc[I_PLAYER_BAN], [s]));
MH_SEND_GameEvent(NET_EV_PLAYER_BAN, 0, s);
if NetUseMaster then
- g_Net_Slist_Update;
+ begin
+ //g_Net_Slist_Update;
+ g_Net_Slist_Pulse();
+ end;
end;
end else
g_Console_Add(_lc[I_MSG_SERVERONLY]);