From e403e82025dfe9dc92b0c8f18b8cf7666ff3dc17 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Tue, 30 Jun 2009 21:03:21 +0000 Subject: [PATCH] ACS update: - Add clientside script flag for Skulltag support. - Change GetActorMomX/Y/Z to GetActorVelX/Y/Z. SVN r1690 (trunk) --- parse.c | 7 +++++++ pcode.h | 3 ++- token.c | 1 + token.h | 1 + zspecial.acs | 6 +++--- 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/parse.c b/parse.c index 19ead25..b0b923b 100644 --- a/parse.c +++ b/parse.c @@ -696,6 +696,13 @@ static void OuterScript(void) scriptNumber += NET_SCRIPT_FLAG; TK_NextToken(); } + // [BB] If NET and CLIENTSIDE are specified, this construction can only parse + // "NET CLIENTSIDE" but not "CLIENTSIDE NET". + if(tk_Token == TK_CLIENTSIDE) + { + scriptNumber += CLIENTSIDE_SCRIPT_FLAG; + TK_NextToken(); + } CountScript(scriptType); PC_AddScript(scriptNumber + scriptType, ScriptVarCount); pc_LastAppendedCommand = PCD_NOP; diff --git a/pcode.h b/pcode.h index 9b5df0c..0b5e12e 100644 --- a/pcode.h +++ b/pcode.h @@ -35,7 +35,8 @@ enum // Values added to script number to indicate flags (requires new-style .o) enum { - NET_SCRIPT_FLAG = 0x00010000 + NET_SCRIPT_FLAG = 0x00010000, + CLIENTSIDE_SCRIPT_FLAG = 0x00020000, // [BB] }; // Or'ed with variable index when passing variables of type "out" diff --git a/token.c b/token.c index 7049881..92284f5 100644 --- a/token.c +++ b/token.c @@ -189,6 +189,7 @@ static struct keyword_s { "libdefine", TK_LIBDEFINE }, { "bool", TK_BOOL }, { "net", TK_NET }, + { "clientside", TK_CLIENTSIDE }, // [BB] { "disconnect", TK_DISCONNECT }, { "unloading", TK_UNLOADING }, { "static", TK_STATIC } diff --git a/token.h b/token.h index 0ed793b..bc0a55e 100644 --- a/token.h +++ b/token.h @@ -119,6 +119,7 @@ typedef enum TK_LIBDEFINE, // 'libdefine' TK_BOOL, // 'bool' TK_NET, // 'net' + TK_CLIENTSIDE, // 'clientside' TK_DISCONNECT, // 'disconnect' TK_UNLOADING, // 'unloading' TK_STATIC, // 'static' diff --git a/zspecial.acs b/zspecial.acs index f902447..3739b3f 100644 --- a/zspecial.acs +++ b/zspecial.acs @@ -224,9 +224,9 @@ special -6:GetSectorUDMFFixed(2), -7:GetSideUDMFInt(3), -8:GetSideUDMFFixed(3), - -9:GetActorMomX(1), - -10:GetActorMomY(1), - -11:GetActorMomZ(1), + -9:GetActorVelX(1), + -10:GetActorVelY(1), + -11:GetActorVelZ(1), -12:SetActivator(1), -13:SetActivatorToTarget(1), -14:GetActorViewHeight(1),