From: Mario Date: Thu, 28 May 2020 12:38:53 +0000 (+1000) Subject: Add an entity parameter for CSQC_InputEvent X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4297a9d970e88dae61030269d113f25f3386897b;p=xonotic%2Fdarkplaces.git Add an entity parameter for CSQC_InputEvent --- diff --git a/csprogs.c b/csprogs.c index 68e7b3c0..13c27ec3 100644 --- a/csprogs.c +++ b/csprogs.c @@ -456,6 +456,8 @@ qboolean CL_VM_InputEvent (int eventtype, float x, float y) PRVM_G_FLOAT(OFS_PARM0) = eventtype; PRVM_G_FLOAT(OFS_PARM1) = x; // key or x PRVM_G_FLOAT(OFS_PARM2) = y; // ascii or y + // optional entity parameter for self (EXT_ENTITYPARAM) + PRVM_G_INT(OFS_PARM3) = cl.csqc_server2csqcentitynumber[cl.playerentity]; prog->ExecuteProgram(prog, PRVM_clientfunction(CSQC_InputEvent), "QC function CSQC_InputEvent is missing"); r = CSQC_RETURNVAL != 0; }