From a192c0b164766b2145a011938ee11dfa854a42c5 Mon Sep 17 00:00:00 2001 From: Ketmar Dark Date: Sun, 13 Oct 2019 20:56:22 +0300 Subject: [PATCH] net: added useless wall of text into initial player spawning packet handler. writing comments is way easier than writing the real code. --- src/game/g_netmsg.pas | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/game/g_netmsg.pas b/src/game/g_netmsg.pas index 244b2eb..1c44aca 100644 --- a/src/game/g_netmsg.pas +++ b/src/game/g_netmsg.pas @@ -442,11 +442,22 @@ begin e_LogWritefln('*** client #%u (cid #%u) authenticated...', [C.ID, C.Player]); //e_LogWritefln('spawning player with pid #%u...', [PID]); //Respawn(gGameSettings.GameType = GT_SINGLE); - //k8: no, do not spawn a player yet, wait for a 'i am ready' packet + //k8: no, do not spawn a player yet, wait for "request full state" packet Lives := 0; Spectate; FNoRespawn := True; - FWantsInGame := false; // TODO: look into this later + // `FWantsInGame` seems to mean "spawn the player on the next occasion". + // that is, if we'll set it to `true`, the player can be spawned after + // warmup time ran out, for example, regardless of the real player state. + // also, this seems to work only for the initial connection. further + // map changes could initiate resource downloading, but the player will + // be spawned immediately. + // the proper solution will require another player state, "ephemeral". + // the player should start any map in "ephemeral" state, and turned into + // real mobj only when they sent a special "i am ready" packet. this packet + // must be sent after receiving the full state, so the player will get a full + // map view before going into game. + FWantsInGame := false; C^.WaitForFirstSpawn := true; end; end; -- 2.29.2