From: Mario Date: Sun, 31 May 2020 20:48:15 +0000 (+1000) Subject: Merge branch 'master' into Mario/ext_entityparam X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8fcbbb10d27dabefbd27a11c6784c783ca035e75;p=xonotic%2Fdarkplaces.git Merge branch 'master' into Mario/ext_entityparam --- 8fcbbb10d27dabefbd27a11c6784c783ca035e75 diff --cc csprogs.c index 13c27ec3,c0c4eb42..6d83a784 --- a/csprogs.c +++ b/csprogs.c @@@ -522,9 -517,7 +524,9 @@@ qboolean CL_VM_ConsoleCommand (hook_val PRVM_clientglobalfloat(time) = cl.time; PRVM_clientglobaledict(self) = cl.csqc_server2csqcentitynumber[cl.playerentity]; restorevm_tempstringsbuf_cursize = prog->tempstringsbuf.cursize; - PRVM_G_INT(OFS_PARM0) = PRVM_SetTempString(prog, cmd); + PRVM_G_INT(OFS_PARM0) = PRVM_SetTempString(prog, arg->str); + // optional entity parameter for self (EXT_ENTITYPARAM) + PRVM_G_INT(OFS_PARM1) = cl.csqc_server2csqcentitynumber[cl.playerentity]; prog->ExecuteProgram(prog, PRVM_clientfunction(CSQC_ConsoleCommand), "QC function CSQC_ConsoleCommand is missing"); prog->tempstringsbuf.cursize = restorevm_tempstringsbuf_cursize; r = CSQC_RETURNVAL != 0;