]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host_cmd.c
fix a bunch of warnings if compiling darkplaces as C++ in MSVC2008
[xonotic/darkplaces.git] / host_cmd.c
index 24111c58ccf9c396ae8793628cea9bd2eea843eb..32d8bb35ec7f9736b8bcbc24d6057e41551dba4b 100644 (file)
@@ -924,6 +924,9 @@ void Host_Loadgame_f (void)
 
                        // parse the global vars
                        PRVM_ED_ParseGlobals (start);
+
+                       // restore the autocvar globals
+                       Cvar_UpdateAllAutoCvars();
                }
                else
                {
@@ -999,7 +1002,7 @@ void Host_Loadgame_f (void)
                                        if (i >= 0 && i < MAX_MODELS)
                                        {
                                                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.modelname : NULL);
+                                               sv.models[i] = Mod_ForName (sv.model_precache[i], true, false, sv.model_precache[i][0] == '*' ? sv.worldname : NULL);
                                        }
                                        else
                                                Con_Printf("unsupported model %i \"%s\"\n", i, com_token);
@@ -2488,7 +2491,8 @@ void Host_PQRcon_f (void)
                SZ_Clear(&net_message);
                MSG_WriteLong (&net_message, 0);
                MSG_WriteByte (&net_message, CCREQ_RCON);
-               SZ_Write(&net_message, (void*)rcon_password.string, n);
+               SZ_Write(&net_message, (const unsigned char*)rcon_password.string, n);
+               MSG_WriteByte (&net_message, 0); // terminate the (possibly partial) string
                MSG_WriteString (&net_message, Cmd_Args());
                StoreBigLong(net_message.data, NETFLAG_CTL | (net_message.cursize & NETFLAG_LENGTH_MASK));
                NetConn_Write(mysocket, net_message.data, net_message.cursize, &to);