1923: Properly force spawn order of teams. Fix #1828 r=Learath2 a=d3fault

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).

Co-authored-by: d3fault <d3fault@d3fault.net>
This commit is contained in:
bors[bot] 2019-10-03 12:11:50 +00:00 committed by GitHub
commit 112d0432e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 3 deletions

View file

@ -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;

View file

@ -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);