DEADSOFTWARE

fix playerstats netmessage; zero gTime before spawning players
authorfgsfds <pvt.fgsfds@gmail.com>
Sun, 9 Feb 2020 21:37:52 +0000 (00:37 +0300)
committerfgsfds <pvt.fgsfds@gmail.com>
Sun, 9 Feb 2020 21:40:57 +0000 (00:40 +0300)
src/game/g_game.pas
src/game/g_net.pas
src/game/g_netmsg.pas
src/game/g_player.pas

index 8d784c2a2be634127f934150244bae03af5e5cb2..feaf1591041441ee1e22591c3d7d371bf5fc361b 100644 (file)
@@ -4949,6 +4949,8 @@ begin
     ResName := Map;
   end;
 
+  gTime := 0;
+
   //writeln('********: gsw=', gGameSettings.WAD, '; rn=', ResName);
   result := false;
   if (ResName <> '') and (NewWAD <> '') then
@@ -4985,7 +4987,6 @@ begin
   gExit := 0;
   gPauseMain := false;
   gPauseHolmes := false;
-  gTime := 0;
   NetTimeToUpdate := 1;
   NetTimeToReliable := 0;
   NetTimeToMaster := NetMasterRate;
index 0f1cf30a8c346c705b6e57280001f7a5b6c0b1b7..217825ea98184bec8fdafb7d9f6be59e90fc3339 100644 (file)
@@ -21,7 +21,7 @@ uses
   e_log, e_msg, ENet, Classes, md5, MAPDEF{$IFDEF USE_MINIUPNPC}, miniupnpc;{$ELSE};{$ENDIF}
 
 const
-  NET_PROTOCOL_VER = 183;
+  NET_PROTOCOL_VER = 184;
 
   NET_MAXCLIENTS = 24;
   NET_CHANS = 12;
index 235cbb1b280b1ebb1c821f508f1cd3fc2bcbdc5d..1fd6f7c5a8d3e7a6be8a0dad2ce9ea3980b2b78c 100644 (file)
@@ -2354,6 +2354,7 @@ begin
     if (OldFire <= 0) and (FFireTime > 0) then
       g_Sound_PlayExAt('SOUND_IGNITE', Obj.X, Obj.Y);
     Flam := M.ReadByte() <> 0;
+    FSpawnInvul := M.ReadLongInt();
     if OldJet and not FJetpack then
       JetpackOff
     else if not OldJet and FJetpack then
index 59e6456da19b1e763143c897d5ac0ea1e537b9cd..2f089d711a6bd6265a1a6284c36c4f12b04c7ce1 100644 (file)
@@ -4368,6 +4368,7 @@ begin
   FMonsterKills := 0;
   FDeath := 0;
   FSecrets := 0;
+  FSpawnInvul := 0;
   FReady := False;
   if FNoRespawn then
   begin
@@ -4560,6 +4561,7 @@ begin
   FShellTimer := -1;
   FPain := 0;
   FLastHit := 0;
+  FSpawnInvul := 0;
 
   if not g_Game_IsServer then
     Exit;
@@ -6303,6 +6305,7 @@ begin
       if FMegaRulez[MR_INVUL] < gTime+PLAYER_INVUL_TIME then
       begin
         FMegaRulez[MR_INVUL] := gTime+PLAYER_INVUL_TIME;
+        FSpawnInvul := 0;
       end;
 
     ITEM_INVIS: