]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host_cmd.c
Sync .gitignore from master branch
[xonotic/darkplaces.git] / host_cmd.c
index 1f4048fdb4debe41534149dd085d8a3826518f12..582a58f9737162c0d8a7a64b406aacec2f1f325c 100644 (file)
@@ -964,7 +964,7 @@ static void Host_Loadgame_f (void)
                        PRVM_ED_ParseEdict (prog, start, ent);
 
                        // link it into the bsp tree
-                       if (!ent->priv.server->free)
+                       if (!ent->priv.server->free && !VectorCompare(PRVM_serveredictvector(ent, absmin), PRVM_serveredictvector(ent, absmax)))
                                SV_LinkEdict(ent);
                }
 
@@ -2615,7 +2615,6 @@ static void Host_Rcon_f (void) // credit: taken from QuakeWorld
        int i, n;
        const char *e;
        lhnetsocket_t *mysocket;
-       char vabuf[1024];
 
        if (Cmd_Argc() == 1)
        {
@@ -2684,7 +2683,10 @@ static void Host_Rcon_f (void) // credit: taken from QuakeWorld
                }
                else
                {
-                       NetConn_WriteString(mysocket, va(vabuf, sizeof(vabuf), "\377\377\377\377rcon %.*s %s", n, rcon_password.string, Cmd_Args()), &cls.rcon_address);
+                       char buf[1500];
+                       memcpy(buf, "\377\377\377\377", 4);
+                       dpsnprintf(buf+4, sizeof(buf)-4, "rcon %.*s %s",  n, rcon_password.string, Cmd_Args());
+                       NetConn_WriteString(mysocket, buf, &cls.rcon_address);
                }
        }
 }