From: fgsfds Date: Sun, 1 Mar 2020 19:42:29 +0000 (+0300) Subject: host can't spawn during an LMS round anymore X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=11b921b75f679ec727a0af28a6499bbaba17eca2;p=d2df-sdl.git host can't spawn during an LMS round anymore --- diff --git a/src/game/g_game.pas b/src/game/g_game.pas index bc645b0..f448602 100644 --- a/src/game/g_game.pas +++ b/src/game/g_game.pas @@ -4251,6 +4251,10 @@ begin if ((not gGameOn) and (gState <> STATE_INTERCUSTOM)) or (not (gGameSettings.GameType in [GT_CUSTOM, GT_SERVER, GT_CLIENT])) then Exit; + + if (gGameSettings.MaxLives > 0) and (gLMSRespawn = LMS_RESPAWN_NONE) then + Exit; + if gPlayer1 = nil then begin if g_Game_IsClient then @@ -5220,6 +5224,8 @@ begin gLMSRespawn := LMS_RESPAWN_WARMUP; gLMSRespawnTime := gTime + gGameSettings.WarmupTime*1000; gLMSSoftSpawn := NoMapRestart; + if g_Game_IsNet then + MH_SEND_GameEvent(NET_EV_LMS_WARMUP, gLMSRespawnTime - gTime); Exit; end; diff --git a/src/game/g_netmsg.pas b/src/game/g_netmsg.pas index 57e5136..5e95a6a 100644 --- a/src/game/g_netmsg.pas +++ b/src/game/g_netmsg.pas @@ -595,7 +595,7 @@ begin begin if Pl.FSpectator then begin - if (gGameSettings.MaxLives = 0) or (gLMSRespawn = LMS_RESPAWN_WARMUP) then + if (gGameSettings.MaxLives = 0) or (gLMSRespawn > LMS_RESPAWN_NONE) then Pl.Respawn(False) else MH_SEND_GameEvent(NET_EV_LMS_NOSPAWN, Pl.UID); @@ -2344,12 +2344,12 @@ begin FSpectator := M.ReadByte() <> 0; if FSpectator then begin - if PID = NetPlrUID1 then + if UID = NetPlrUID1 then begin gSpectLatchPID1 := UID; gPlayer1 := nil; end; - if PID = NetPlrUID2 then + if UID = NetPlrUID2 then begin gSpectLatchPID2 := UID; gPlayer2 := nil;