From 718eebd9cee4a873af4e412590fd3f7163552f02 Mon Sep 17 00:00:00 2001 From: d3fault Date: Sun, 29 Sep 2019 13:05:03 -0700 Subject: [PATCH 1/2] Revert "Force spawn order of teams. Fix #1828" This broke respawn rate limiting and didn't even fix #1828. When primary tee hits kill tiles, dummy still gets strong hook. This reverts commit 02f57233211559fd510eeedf750549cf1739a6e3. --- src/game/server/teams.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/game/server/teams.cpp b/src/game/server/teams.cpp index c602d4596..7eca61256 100644 --- a/src/game/server/teams.cpp +++ b/src/game/server/teams.cpp @@ -646,8 +646,6 @@ void CGameTeams::OnCharacterSpawn(int ClientID) void CGameTeams::OnCharacterDeath(int ClientID, int Weapon) { - GameServer()->m_apPlayers[ClientID]->Respawn(); // queue the spawn as kill tiles don't - m_Core.SetSolo(ClientID, false); int Team = m_Core.Team(ClientID); From 5f193d009e59d4e0149436125a7bfc856cc08203 Mon Sep 17 00:00:00 2001 From: d3fault Date: Sun, 29 Sep 2019 13:12:55 -0700 Subject: [PATCH 2/2] Properly force spawn order of teams, so dummy doesn't get strong hook. Fix #1828 Mimic old behavior of having a respawn tick > 0 ticks after current tick. 2 ticks later is still "instant enough". The code below the change mentions strong spawning, so without deciphering it we simply give 2 extra ticks to make sure that it executes before spawning (2 instead of 1 so that it definitely executes for both primary and dummy). --- src/game/server/player.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/server/player.cpp b/src/game/server/player.cpp index b6b9c3888..edb3fc536 100644 --- a/src/game/server/player.cpp +++ b/src/game/server/player.cpp @@ -195,7 +195,7 @@ void CPlayer::Tick() if(!GameServer()->m_World.m_Paused) { int EarliestRespawnTick = m_PreviousDieTick+Server()->TickSpeed()*3; - int RespawnTick = maximum(m_DieTick, EarliestRespawnTick); + int RespawnTick = maximum(m_DieTick, EarliestRespawnTick)+2; if(!m_pCharacter && RespawnTick <= Server()->Tick()) m_Spawning = true;