Skip to content

Commit

Permalink
Fix CycleMap
Browse files Browse the repository at this point in the history
  • Loading branch information
ST-Chara committed Feb 18, 2024
1 parent 7e71f3a commit ba0a173
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/game/server/gamecontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ void IGameController::StartRound()

void IGameController::ChangeMap(const char *pToMap)
{
str_copy(g_Config.m_SvMap, pToMap, sizeof(m_aMapWish));
str_copy(m_aMapWish, pToMap, sizeof(m_aMapWish));
EndRound();
}

Expand Down Expand Up @@ -442,9 +442,9 @@ void IGameController::Tick()
// game over.. wait for restart
if (Server()->Tick() > m_GameOverTick + Server()->TickSpeed() * 2)
{
m_RoundCount++;
CycleMap();
StartRound();
m_RoundCount++;
}
}

Expand Down Expand Up @@ -772,6 +772,9 @@ static bool IsSeparator(char c) { return c == ';' || c == ' ' || c == ',' || c =

void IGameController::CycleMap()
{
if (m_RoundCount < g_Config.m_SvRoundsPerMap)
return;

if (m_aMapWish[0] != 0)
{
char aBuf[256];
Expand Down
8 changes: 8 additions & 0 deletions src/game/server/player.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,14 @@ class CPlayer
int m_Max;
} m_Latency;

enum
{
ZOMB_DEFAULT = 1,
ZOMB_WITCH,
};

int m_ZombClass;

private:
CCharacter *m_pCharacter;
int m_NumInputs;
Expand Down

0 comments on commit ba0a173

Please sign in to comment.