X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=host_cmd.c;h=4852da38f29fd41ec163ef72390f3210d35acde3;hb=c1bd2ffa056ccb144254a29313a98688e85e43f1;hp=25d861c260d3366328daea7b70a0b5c14e5a1cf0;hpb=e5004f482e1e5ff6c17e6b9252a0ff1381ce90db;p=xonotic%2Fdarkplaces.git diff --git a/host_cmd.c b/host_cmd.c index 25d861c2..4852da38 100644 --- a/host_cmd.c +++ b/host_cmd.c @@ -24,7 +24,7 @@ int current_skill; char sv_spawnmap[MAX_QPATH]; char sv_loadgame[MAX_OSPATH]; -dfunction_t *ED_FindFunction (char *name); +mfunction_t *ED_FindFunction (char *name); /* ================== @@ -379,7 +379,7 @@ Host_Savegame_f void Host_Savegame_f (void) { char name[256]; - QFile *f; + qfile_t *f; int i; char comment[SAVEGAME_COMMENT_LENGTH+1]; @@ -425,34 +425,35 @@ void Host_Savegame_f (void) } } - sprintf (name, "%s/%s", com_gamedir, Cmd_Argv(1)); - COM_DefaultExtension (name, ".sav"); + strncpy (name, Cmd_Argv(1), sizeof (name) - 1); + name[sizeof (name) - 1] = '\0'; + FS_DefaultExtension (name, ".sav"); Con_Printf ("Saving game to %s...\n", name); - f = Qopen (name, "w"); + f = FS_Open (name, "w", false); if (!f) { Con_Printf ("ERROR: couldn't open.\n"); return; } - Qprintf (f, "%i\n", SAVEGAME_VERSION); + FS_Printf (f, "%i\n", SAVEGAME_VERSION); Host_SavegameComment (comment); - Qprintf (f, "%s\n", comment); + FS_Printf (f, "%s\n", comment); for (i=0 ; ispawn_parms[i]); - Qprintf (f, "%d\n", current_skill); - Qprintf (f, "%s\n", sv.name); - Qprintf (f, "%f\n",sv.time); + FS_Printf (f, "%f\n", svs.clients->spawn_parms[i]); + FS_Printf (f, "%d\n", current_skill); + FS_Printf (f, "%s\n", sv.name); + FS_Printf (f, "%f\n",sv.time); // write the light styles for (i=0 ; ispawn_parms[i] = spawn_parms[i]; @@ -821,7 +822,7 @@ void Host_Tell_f(void) { if (!client->active || !client->spawned) continue; - if (Q_strcasecmp(client->name, Cmd_Argv(1))) + if (strcasecmp(client->name, Cmd_Argv(1))) continue; host_client = client; SV_ClientPrintf("%s", text); @@ -840,7 +841,7 @@ void Host_Color_f(void) { int top, bottom; int playercolor; - dfunction_t *f; + mfunction_t *f; func_t SV_ChangeTeam; if (Cmd_Argc() == 1) @@ -995,7 +996,7 @@ void Host_Spawn_f (void) client_t *client; edict_t *ent; func_t RestoreGame; - dfunction_t *f; + mfunction_t *f; if (cmd_source == src_command) { @@ -1185,7 +1186,7 @@ void Host_Kick_f (void) { if (!host_client->active) continue; - if (Q_strcasecmp(host_client->name, Cmd_Argv(1)) == 0) + if (strcasecmp(host_client->name, Cmd_Argv(1)) == 0) break; } } @@ -1224,7 +1225,7 @@ void Host_Kick_f (void) SV_ClientPrintf ("Kicked by %s: %s\n", who, message); else SV_ClientPrintf ("Kicked by %s\n", who); - SV_DropClient (false); + SV_DropClient (false); // kicked } host_client = save;