From 8a1d1c539bcf42dc2cff3494b3df67d6ea1da424 Mon Sep 17 00:00:00 2001 From: myT Date: Sat, 8 Feb 2020 02:07:20 +0100 Subject: [PATCH] Escape down in cgame triggers CG_EVENT_HANDLING again instead of CG_KEY_EVENT with that, CPMA demo playback and /protect work as intended again --- changelog.txt | 3 +++ code/client/cl_keys.cpp | 2 +- code/qcommon/cg_public.h | 7 +++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index 377fc42..c420bb0 100644 --- a/changelog.txt +++ b/changelog.txt @@ -89,6 +89,9 @@ add: r_mapBrightness now works on q3map2's external lightmap atlas images add: the renderer can now batch surfaces with different (but sufficiently similar) shaders this new optimization works with the output of "Frozen Sand Particle Studio" +chg: reverted an old change to the Escape key handling for cgame + this fixes demo playback behavior in CPMA, which enables custom binds after pressing Escape once + chg: searching for valid sample counts for MSAA in GL2 and GL3 instead of failing right away add: /modellist /skinlist /imagelist /shaderlist can now filter results with pattern matching diff --git a/code/client/cl_keys.cpp b/code/client/cl_keys.cpp index 2411501..9900176 100644 --- a/code/client/cl_keys.cpp +++ b/code/client/cl_keys.cpp @@ -1089,7 +1089,7 @@ void CL_KeyEvent( int key, qbool down, unsigned time ) // escape always gets out of CGAME stuff if (cls.keyCatchers & KEYCATCH_CGAME) { cls.keyCatchers &= ~KEYCATCH_CGAME; - VM_Call( cgvm, CG_KEY_EVENT, key, down ); + VM_Call( cgvm, CG_EVENT_HANDLING, CGAME_EVENT_NONE ); return; } diff --git a/code/qcommon/cg_public.h b/code/qcommon/cg_public.h index 56c0ab8..81588ea 100644 --- a/code/qcommon/cg_public.h +++ b/code/qcommon/cg_public.h @@ -59,6 +59,13 @@ typedef struct { #define CMD_MASK (CMD_BACKUP - 1) +// CG_EVENT_HANDLING constants +enum { + CGAME_EVENT_NONE + // the rest is private mod business +}; + + /* ==================================================================