mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
moved slist loading into cl_slist.c
This commit is contained in:
parent
930da9109c
commit
69fd58944e
3 changed files with 21 additions and 14 deletions
|
@ -63,4 +63,5 @@ char *gettokstart(char *str, int req, char delim);
|
|||
int gettoklen(char *str, int req, char delim);
|
||||
|
||||
void timepassed (double time1, double *time2);
|
||||
void SList_Init (void);
|
||||
#endif // _CL_SLIST_H
|
||||
|
|
|
@ -1111,9 +1111,7 @@ CL_Download_f (void)
|
|||
void
|
||||
CL_Init (void)
|
||||
{
|
||||
QFile *servlist;
|
||||
char st[80];
|
||||
char e_path[MAX_OSPATH];
|
||||
|
||||
cls.state = ca_disconnected;
|
||||
|
||||
|
@ -1135,18 +1133,8 @@ CL_Init (void)
|
|||
CL_TEnts_Init ();
|
||||
Pmove_Init ();
|
||||
|
||||
Qexpand_squiggle (fs_userpath->string, e_path);
|
||||
if ((servlist = Qopen (va ("%s/servers.txt", e_path), "r"))) {
|
||||
slist = SL_LoadF (servlist, slist);
|
||||
Qclose (servlist);
|
||||
} else {
|
||||
Qexpand_squiggle (fs_sharepath->string, e_path);
|
||||
if ((servlist = Qopen (va ("%s/servers.txt", e_path), "r"))) {
|
||||
slist = SL_LoadF (servlist, slist);
|
||||
Qclose (servlist);
|
||||
}
|
||||
}
|
||||
|
||||
SList_Init ();
|
||||
|
||||
//
|
||||
// register our commands
|
||||
//
|
||||
|
|
|
@ -316,3 +316,21 @@ void timepassed (double time1, double *time2)
|
|||
{
|
||||
*time2 -= time1;
|
||||
}
|
||||
|
||||
void SList_Init (void)
|
||||
{
|
||||
QFile *servlist;
|
||||
char e_path[MAX_OSPATH];
|
||||
|
||||
Qexpand_squiggle (fs_userpath->string, e_path);
|
||||
if ((servlist = Qopen (va ("%s/servers.txt", e_path), "r"))) {
|
||||
slist = SL_LoadF (servlist, slist);
|
||||
Qclose (servlist);
|
||||
} else {
|
||||
Qexpand_squiggle (fs_sharepath->string, e_path);
|
||||
if ((servlist = Qopen (va ("%s/servers.txt", e_path), "r"))) {
|
||||
slist = SL_LoadF (servlist, slist);
|
||||
Qclose (servlist);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue