From 92f5158a708fd095ab87e7d89d4bf3413a16a70e Mon Sep 17 00:00:00 2001 From: helixhorned Date: Thu, 24 Jan 2013 20:02:52 +0000 Subject: [PATCH] CON parser: don't accept read-only gamevars for 1st arg of *sprite{sect,stat}. git-svn-id: https://svn.eduke32.com/eduke32@3429 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/gamedef.c | 5 ++++- polymer/eduke32/source/gamestructures.c | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index 9dd5f4017..b27975cc9 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -4950,13 +4950,16 @@ repeatcase: case CON_QSTRCPY: case CON_QSTRLEN: case CON_QGETSYSSTR: + C_GetManyVars(2); + continue; case CON_HEADSPRITESTAT: case CON_PREVSPRITESTAT: case CON_NEXTSPRITESTAT: case CON_HEADSPRITESECT: case CON_PREVSPRITESECT: case CON_NEXTSPRITESECT: - C_GetManyVars(2); + C_GetNextVarType(GAMEVAR_READONLY); + C_GetNextVar(); continue; case CON_QSUBSTR: C_GetManyVars(4); diff --git a/polymer/eduke32/source/gamestructures.c b/polymer/eduke32/source/gamestructures.c index 6925665f5..b087bd68f 100644 --- a/polymer/eduke32/source/gamestructures.c +++ b/polymer/eduke32/source/gamestructures.c @@ -924,6 +924,8 @@ static void __fastcall VM_AccessActiveProjectile(int32_t iSet, int32_t lVar1, in { int32_t lValue=0,proj=vm.g_i; + // http://forums.duke4.net/topic/775-eduke32-20-and-polymer/page__view__findpost__p__143260 + if (lVar1 != g_iThisActorID) proj=Gv_GetVarX(lVar1);