UFO: Alien Invasion
Loading...
Searching...
No Matches
sv_mapcycle.cpp File Reference
#include "server.h"
#include "../shared/parse.h"
Include dependency graph for sv_mapcycle.cpp:

Go to the source code of this file.

Data Structures

struct  mapcycle_t
 map cycle list element More...

Functions

void SV_NextMapcycle (void)
 Start the next map in the cycle.
void SV_MapcycleClear (void)
 Empty the mapcycle list.
static void SV_MapcycleAdd (const char *mapName, bool day, const char *gameType)
 Append a new mapname to the list of maps for the cycle.
static void SV_ParseMapcycle (void)
 Parses the server mapcycle.
static void SV_MapcycleList_f (void)
static void SV_MapcycleAdd_f (void)
static void SV_MapcycleNext_f (void)
void SV_MapcycleInit (void)

Variables

static mapcycle_tmapcycleList
static int mapcycleCount

Function Documentation

◆ SV_MapcycleAdd()

void SV_MapcycleAdd ( const char * mapName,
bool day,
const char * gameType )
static

Append a new mapname to the list of maps for the cycle.

Todo
check for maps and valid gametypes here
See also
SV_MapcycleClear

Definition at line 159 of file sv_mapcycle.cpp.

References Com_DPrintf(), mapcycle_t::day, DEBUG_SERVER, mapcycle_t::map, mapcycleCount, mapcycleList, mapName, Mem_PoolAllocType, Mem_PoolStrDup, mapcycle_t::next, sv_genericPool, and mapcycle_t::type.

Referenced by SV_MapcycleAdd_f(), and SV_ParseMapcycle().

◆ SV_MapcycleAdd_f()

void SV_MapcycleAdd_f ( void )
static

Definition at line 239 of file sv_mapcycle.cpp.

References Cmd_Argc(), Cmd_Argv(), Com_Printf(), Q_streq, SV_CheckMap(), and SV_MapcycleAdd().

Referenced by SV_MapcycleInit().

◆ SV_MapcycleClear()

void SV_MapcycleClear ( void )

Empty the mapcycle list.

See also
SV_MapcycleAdd

Definition at line 137 of file sv_mapcycle.cpp.

References i, mapcycle_t::map, mapcycleCount, mapcycleList, Mem_Free, mapcycle_t::next, and mapcycle_t::type.

Referenced by SV_Clear(), and SV_MapcycleInit().

◆ SV_MapcycleInit()

void SV_MapcycleInit ( void )

◆ SV_MapcycleList_f()

void SV_MapcycleList_f ( void )
static

◆ SV_MapcycleNext_f()

void SV_MapcycleNext_f ( void )
static

Definition at line 261 of file sv_mapcycle.cpp.

References Com_Printf(), mapcycleCount, and SV_NextMapcycle().

Referenced by SV_MapcycleInit().

◆ SV_NextMapcycle()

◆ SV_ParseMapcycle()

void SV_ParseMapcycle ( void )
static

Variable Documentation

◆ mapcycleCount

int mapcycleCount
static

number of maps in the cycle

Definition at line 15 of file sv_mapcycle.cpp.

Referenced by SV_MapcycleAdd(), SV_MapcycleClear(), SV_MapcycleList_f(), SV_MapcycleNext_f(), SV_NextMapcycle(), and SV_ParseMapcycle().

◆ mapcycleList

mapcycle_t* mapcycleList
static

map cycle linked list

Definition at line 14 of file sv_mapcycle.cpp.

Referenced by SV_MapcycleAdd(), SV_MapcycleClear(), SV_MapcycleList_f(), SV_NextMapcycle(), and SV_ParseMapcycle().