summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4e51e14)
raw | patch | inline | side by side (parent: 4e51e14)
author | fgsfds <pvt.fgsfds@gmail.com> | |
Sun, 1 Mar 2020 19:42:29 +0000 (22:42 +0300) | ||
committer | fgsfds <pvt.fgsfds@gmail.com> | |
Sun, 1 Mar 2020 19:42:29 +0000 (22:42 +0300) |
src/game/g_game.pas | patch | blob | history | |
src/game/g_netmsg.pas | patch | blob | history |
diff --git a/src/game/g_game.pas b/src/game/g_game.pas
index bc645b0a57fd12de70a6888d4e8c4c32ec9c52fd..f4486028795f4f80134a47d33b5de80b517f9f53 100644 (file)
--- a/src/game/g_game.pas
+++ b/src/game/g_game.pas
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
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 57e51369af7a7d2f7f701b6a3e3bd79b8a39fcc3..5e95a6a57dd97b42a4d31178c153e94589092816 100644 (file)
--- a/src/game/g_netmsg.pas
+++ b/src/game/g_netmsg.pas
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);
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;