]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - svvm_cmds.c
changed strzone, stuffcmd, and localcmd to be able to take multiple strings
[xonotic/darkplaces.git] / svvm_cmds.c
index 89b03104523a0b2f068c5b38f780fc49ec938ac5..e096554524ed8389a361c93dea4a7fdcd6be73a9 100644 (file)
@@ -653,14 +653,14 @@ PF_stuffcmd
 
 Sends text over to the client's execution buffer
 
-stuffcmd (clientent, value)
+stuffcmd (clientent, value, ...)
 =================
 */
 void PF_stuffcmd (void)
 {
        int             entnum;
-       const char      *str;
        client_t        *old;
+       char    string[VM_STRINGTEMP_LENGTH];
 
        entnum = PRVM_G_EDICTNUM(OFS_PARM0);
        if (entnum < 1 || entnum > svs.maxclients || !svs.clients[entnum-1].active)
@@ -668,11 +668,12 @@ void PF_stuffcmd (void)
                Con_Print("Can't stuffcmd to a non-client\n");
                return;
        }
-       str = PRVM_G_STRING(OFS_PARM1);
+
+       VM_VarString(1, string, sizeof(string));
 
        old = host_client;
        host_client = svs.clients + entnum-1;
-       Host_ClientCommands ("%s", str);
+       Host_ClientCommands ("%s", string);
        host_client = old;
 }