- fixed: Deprecation messages should never appear in DECORATE.

- removed some console message spam.
This commit is contained in:
Christoph Oelckers 2016-10-26 13:22:36 +02:00
parent d4ea991763
commit e50315bd31
4 changed files with 7 additions and 6 deletions

View file

@ -4198,7 +4198,7 @@ FxExpression *FxIdentifier::Resolve(FCompileContext& ctx)
// 2. This is a static function
// 3. This is an action function with a restricted self pointer
// 4. This is a normal member or unrestricted action function.
if (vsym->Flags & VARF_Deprecated)
if ((vsym->Flags & VARF_Deprecated) && !ctx.FromDecorate)
{
ScriptPosition.Message(MSG_WARNING, "Accessing deprecated member variable %s", sym->SymbolName.GetChars());
}

View file

@ -202,8 +202,10 @@ void LoadActors ()
FScriptPosition::ResetErrorCounter();
InitThingdef();
FScriptPosition::StrictErrors = true;
ParseScripts();
FScriptPosition::StrictErrors = false;
ParseAllDecorate();
FunctionBuildList.Build();

View file

@ -1901,7 +1901,6 @@ void ZCCCompiler::InitDefaults()
bag.CurrentState = 0;
bag.Lumpnum = c->cls->SourceLump;
bag.DropItemList = nullptr;
bag.ScriptPosition.StrictErrors = true;
// The actual script position needs to be set per property.
for (auto d : c->Defaults)
@ -2425,7 +2424,6 @@ FxExpression *ZCCCompiler::ConvertNode(ZCC_TreeNode *ast)
case AST_ExprMemberAccess:
{
auto ema = static_cast<ZCC_ExprMemberAccess *>(fcall->Function);
Printf("Member call to %s\n", FName(ema->Right).GetChars());
return new FxMemberFunctionCall(ConvertNode(ema->Left), ema->Right, ConvertNodeList(fcall->Parameters), *ast);
}