DEADSOFTWARE

Merge branch 'master' of ssh://repo.or.cz/d2df-sdl
[d2df-sdl.git] / src / game / g_net.pas
index 16e6bb511d3c2437e8d0bd76da86a26fec99343b..cbf5120782839a5703caa116a5d0041465411410 100644 (file)
@@ -1,4 +1,4 @@
-(* Copyright (C)  DooM 2D:Forever Developers
+(* Copyright (C)  Doom 2D: Forever Developers
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -19,10 +19,10 @@ unit g_net;
 interface
 
 uses
-  e_log, e_msg, ENet, Classes;
+  e_log, e_msg, ENet, Classes, MAPDEF;
 
 const
-  NET_PROTOCOL_VER = 172;
+  NET_PROTOCOL_VER = 173;
 
   NET_MAXCLIENTS = 24;
   NET_CHANS = 11;
@@ -414,7 +414,7 @@ begin
   NetMode := NET_NONE;
 
   g_Net_Cleanup;
-  e_WriteLog('NET: Server stopped', MSG_NOTIFY);
+  e_WriteLog('NET: Server stopped', TMsgType.Notify);
 end;
 
 
@@ -582,7 +582,7 @@ begin
           TP.Lives := 0;
           TP.Kill(K_SIMPLEKILL, 0, HIT_DISCON);
           g_Console_Add(Format(_lc[I_PLAYER_LEAVE], [TP.Name]), True);
-          e_WriteLog('NET: Client ' + TP.Name + ' [' + IntToStr(ID) + '] disconnected.', MSG_NOTIFY);
+          e_WriteLog('NET: Client ' + TP.Name + ' [' + IntToStr(ID) + '] disconnected.', TMsgType.Notify);
           g_Player_Remove(TP.UID);
         end;
 
@@ -636,7 +636,7 @@ begin
   end
   else
   begin
-    e_WriteLog('NET: Kicked from server: ' + IntToStr(NetEvent.data), MSG_NOTIFY);
+    e_WriteLog('NET: Kicked from server: ' + IntToStr(NetEvent.data), TMsgType.Notify);
     if (NetEvent.data <= NET_DISC_MAX) then
       g_Console_Add(_lc[I_NET_MSG] + _lc[I_NET_MSG_KICK] +
         _lc[TStrings_Locale(Cardinal(I_NET_DISC_NONE) + NetEvent.data)], True);
@@ -650,7 +650,7 @@ begin
   g_Console_Add(_lc[I_NET_MSG] + _lc[I_NET_MSG_CLIENT_DISC]);
 
   g_Net_Cleanup;
-  e_WriteLog('NET: Disconnected', MSG_NOTIFY);
+  e_WriteLog('NET: Disconnected', TMsgType.Notify);
 end;
 
 procedure g_Net_Client_Send(Reliable: Boolean; Chan: Byte = NET_CHAN_GAME);
@@ -789,8 +789,6 @@ begin
 
     ProcessLoading(true);
 
-    e_PollInput();
-
     if e_KeyPressed(IK_ESCAPE) or e_KeyPressed(IK_SPACE) then
       OuterLoop := False;
   end;
@@ -954,8 +952,6 @@ begin
 
     ProcessLoading(true);
 
-    e_PollInput();
-
     if e_KeyPressed(IK_ESCAPE) or e_KeyPressed(IK_SPACE) then
       break;
   end;