1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 20:53:50 +00:00

Merge pull request #2189 from Capostrophic/global

Ignore global variable stray explicit reference calls
This commit is contained in:
Bret Curtis 2019-02-26 22:13:20 +01:00 committed by GitHub
commit 96808f3a16
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 3 deletions

View file

@ -35,6 +35,7 @@
Bug #4837: CTD when a mesh with NiLODNode root node with particles is loaded
Bug #4860: Actors outside of processing range visible for one frame after spawning
Bug #4876: AI ratings handling inconsistencies
Bug #4888: Global variable stray explicit reference calls break script compilation
Feature #2229: Improve pathfinding AI
Feature #3442: Default values for fallbacks from ini file
Feature #3610: Option to invert X axis

View file

@ -277,10 +277,18 @@ namespace Compiler
{
if (!mExplicit.empty())
{
if (mMemberOp && handleMemberAccess (name))
return true;
if (!mRefOp)
{
if (mMemberOp && handleMemberAccess (name))
return true;
return Parser::parseName (name, loc, scanner);
return Parser::parseName (name, loc, scanner);
}
else
{
mExplicit.clear();
getErrorHandler().warning ("Ignoring stray explicit reference", loc);
}
}
mFirst = false;

View file

@ -506,6 +506,13 @@ namespace Compiler
return true;
}
if (code==Scanner::S_ref && mState==SetPotentialMemberVarState)
{
getErrorHandler().warning ("Ignoring stray explicit reference", loc);
mState = SetState;
return true;
}
if (code==Scanner::S_ref && mState==PotentialExplicitState)
{
mState = ExplicitState;