From 7e8d7eb2ecc74c07f61fdb753bf820b2f540e8e8 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 13 Oct 2016 22:52:31 +0200 Subject: [PATCH] - fixed parsing of 'damage' default property. - fixed processing of goto labels. --- src/scripting/zscript/zcc_compile.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/scripting/zscript/zcc_compile.cpp b/src/scripting/zscript/zcc_compile.cpp index 6e8447690..5e0e64856 100644 --- a/src/scripting/zscript/zcc_compile.cpp +++ b/src/scripting/zscript/zcc_compile.cpp @@ -1575,8 +1575,13 @@ void ZCCCompiler::DispatchProperty(FPropertyInfo *prop, ZCC_PropertyStmt *proper switch ((*p) & 223) { - case 'I': case 'X': // Expression in parentheses or number. We only support the constant here. The function will have to be handled by a separate property to get past the parser. + conv.i = GetInt(exp); + params.Push(conv); + conv.exp = nullptr; + break; + + case 'I': case 'M': // special case for morph styles in DECORATE . This expression-aware parser will not need this. case 'N': // special case for thing activations in DECORATE. This expression-aware parser will not need this. conv.i = GetInt(exp); @@ -2188,7 +2193,7 @@ void ZCCCompiler::CompileStates() auto part = sg->Label; do { - statename << part->Id << '.'; + statename << FName(part->Id) << '.'; part = static_cast(part->SiblingNext); } while (part != sg->Label); statename.Truncate((long)statename.Len() - 1); // remove the last '.' in the label name