Mapcycle: add Mapcycle_Load(), which will allow modes to suggest their own mapcycle. Subject to change.
This commit is contained in:
parent
d1a90e9aa4
commit
7632d0debd
2 changed files with 13 additions and 5 deletions
|
@ -53,6 +53,7 @@ void Game_ServerModelEvent(float, int, string);
|
|||
void Event_ServerModelEvent(float, int, string);
|
||||
|
||||
int Rules_IsTeamPlay(void);
|
||||
void Mapcycle_Load(string);
|
||||
|
||||
entity eActivator;
|
||||
|
||||
|
|
|
@ -16,9 +16,10 @@
|
|||
|
||||
var int autocvar_mapcycle_enabled = TRUE;
|
||||
var string autocvar_mapcycle_file = "mapcycle.txt";
|
||||
var string g_mapcycle_override = __NULL__;
|
||||
|
||||
void
|
||||
Mapcycle_Init(void)
|
||||
Mapcycle_Load(string filename)
|
||||
{
|
||||
filestream fs_mapcycle;
|
||||
string temp;
|
||||
|
@ -29,15 +30,13 @@ Mapcycle_Init(void)
|
|||
if (!autocvar_mapcycle_enabled)
|
||||
return;
|
||||
|
||||
print("--------- Initializing MapCycle ----------\n");
|
||||
|
||||
/*if (Rules_IsMultiplayer())
|
||||
return;*/
|
||||
|
||||
fs_mapcycle = fopen(autocvar_mapcycle_file, FILE_READ);
|
||||
fs_mapcycle = fopen(filename, FILE_READ);
|
||||
|
||||
if (fs_mapcycle < 0) {
|
||||
print(strcat("^1could not load ", autocvar_mapcycle_file, "\n"));
|
||||
print(strcat("^1could not load ", filename, "\n"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -68,3 +67,11 @@ Mapcycle_Init(void)
|
|||
|
||||
print(sprintf("mapcycle initialized with %i entries.\n", mapcount));
|
||||
}
|
||||
|
||||
void
|
||||
Mapcycle_Init(void)
|
||||
{
|
||||
print("--------- Initializing MapCycle ----------\n");
|
||||
|
||||
Mapcycle_Load(autocvar_mapcycle_file);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue