X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=blobdiff_plain;f=sv_save.c;h=b90f748775029e8b2ff0b9640fdfef52bd768961;hp=b32cd9c6f5574f686bf834785a1e3ccdf73ad4b8;hb=HEAD;hpb=d1c3f1065fde02ed39b7eecc2d9b9a637388d091 diff --git a/sv_save.c b/sv_save.c index b32cd9c6..414e97a9 100644 --- a/sv_save.c +++ b/sv_save.c @@ -37,7 +37,7 @@ void SV_Savegame_to(prvm_prog_t *prog, const char *name) int i, k, l, numbuffers, lightstyles = 64; char comment[SAVEGAME_COMMENT_LENGTH+1]; char line[MAX_INPUTLINE]; - qboolean isserver; + qbool isserver; char *s; // first we have to figure out if this can be saved in 64 lightstyles @@ -76,7 +76,7 @@ void SV_Savegame_to(prvm_prog_t *prog, const char *name) for (i=0 ; ifields.fp, 0, prog->entityfields * sizeof(prvm_vec_t)); - ent->priv.server->free = false; + ent->free = false; if(developer_entityparsing.integer) Con_Printf("SV_Loadgame_f: loading edict %d\n", entnum); @@ -436,7 +437,7 @@ void SV_Loadgame_f(cmd_state_t *cmd) PRVM_ED_ParseEdict (prog, start, ent); // link it into the bsp tree - if (!ent->priv.server->free && !VectorCompare(PRVM_serveredictvector(ent, absmin), PRVM_serveredictvector(ent, absmax))) + if (!ent->free) SV_LinkEdict(ent); } @@ -480,7 +481,7 @@ void SV_Loadgame_f(cmd_state_t *cmd) i = atoi(com_token); COM_ParseToken_Simple(&t, false, false, true); if (i >= 0 && i < MAX_LIGHTSTYLES) - strlcpy(sv.lightstyles[i], com_token, sizeof(sv.lightstyles[i])); + dp_strlcpy(sv.lightstyles[i], com_token, sizeof(sv.lightstyles[i])); else Con_Printf("unsupported lightstyle %i \"%s\"\n", i, com_token); } @@ -491,7 +492,7 @@ void SV_Loadgame_f(cmd_state_t *cmd) COM_ParseToken_Simple(&t, false, false, true); if (i >= 0 && i < MAX_MODELS) { - strlcpy(sv.model_precache[i], com_token, sizeof(sv.model_precache[i])); + dp_strlcpy(sv.model_precache[i], com_token, sizeof(sv.model_precache[i])); sv.models[i] = Mod_ForName (sv.model_precache[i], true, false, sv.model_precache[i][0] == '*' ? sv.worldname : NULL); } else @@ -503,7 +504,7 @@ void SV_Loadgame_f(cmd_state_t *cmd) i = atoi(com_token); COM_ParseToken_Simple(&t, false, false, true); if (i >= 0 && i < MAX_SOUNDS) - strlcpy(sv.sound_precache[i], com_token, sizeof(sv.sound_precache[i])); + dp_strlcpy(sv.sound_precache[i], com_token, sizeof(sv.sound_precache[i])); else Con_Printf("unsupported sound %i \"%s\"\n", i, com_token); } @@ -572,6 +573,6 @@ void SV_Loadgame_f(cmd_state_t *cmd) Con_Printf("SV_Loadgame_f: finished\n"); // make sure we're connected to loopback - if (sv.active && cls.state == ca_disconnected) - CL_EstablishConnection("local:1", -2); + if(sv.active && host.hook.ConnectLocal) + host.hook.ConnectLocal(); }