- fixed missing deprecation warnings for ZScript global variables

https://forum.zdoom.org/viewtopic.php?t=64830
This commit is contained in:
alexey.lysiuk 2019-05-29 17:37:31 +03:00 committed by Rachael Alexanderson
parent 1f69013de8
commit ae94aa029c

View file

@ -6127,7 +6127,7 @@ FxExpression *FxIdentifier::Resolve(FCompileContext& ctx)
{
if (sym->mVersion <= ctx.Version)
{
if (!(ctx.Function->Variants[0].Flags & VARF_Deprecated) && Wads.GetLumpFile(ctx.Lump) == 0)
if (!(ctx.Function->Variants[0].Flags & VARF_Deprecated) && Wads.GetLumpFile(ctx.Lump) != 0)
{
ScriptPosition.Message(MSG_WARNING, "Accessing deprecated global variable %s - deprecated since %d.%d.%d", sym->SymbolName.GetChars(), vsym->mVersion.major, vsym->mVersion.minor, vsym->mVersion.revision);
}