mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-21 12:09:43 +00:00
Merge pull request #2894 from Capostrophic/disable
Ignore bogus string arguments for Disable/Enable again
This commit is contained in:
commit
52d27dee5c
3 changed files with 4 additions and 13 deletions
|
@ -247,8 +247,8 @@ namespace Compiler
|
|||
extensions.registerInstruction ("startscript", "c", opcodeStartScript, opcodeStartScriptExplicit);
|
||||
extensions.registerInstruction ("stopscript", "c", opcodeStopScript);
|
||||
extensions.registerFunction ("getsecondspassed", 'f', "", opcodeGetSecondsPassed);
|
||||
extensions.registerInstruction ("enable", "", opcodeEnable, opcodeEnableExplicit);
|
||||
extensions.registerInstruction ("disable", "", opcodeDisable, opcodeDisableExplicit);
|
||||
extensions.registerInstruction ("enable", "x", opcodeEnable, opcodeEnableExplicit);
|
||||
extensions.registerInstruction ("disable", "x", opcodeDisable, opcodeDisableExplicit);
|
||||
extensions.registerFunction ("getdisabled", 'l', "x", opcodeGetDisabled, opcodeGetDisabledExplicit);
|
||||
extensions.registerFunction ("xbox", 'l', "", opcodeXBox);
|
||||
extensions.registerFunction ("onactivate", 'l', "", opcodeOnActivate, opcodeOnActivateExplicit);
|
||||
|
|
|
@ -86,13 +86,6 @@ namespace Compiler
|
|||
bool LineParser::parseName (const std::string& name, const TokenLoc& loc,
|
||||
Scanner& scanner)
|
||||
{
|
||||
if (mState==PotentialEndState)
|
||||
{
|
||||
getErrorHandler().warning ("Stray string argument", loc);
|
||||
mState = EndState;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (mState==SetState)
|
||||
{
|
||||
std::string name2 = Misc::StringUtils::lowerCase (name);
|
||||
|
@ -445,8 +438,7 @@ namespace Compiler
|
|||
return true;
|
||||
}
|
||||
|
||||
if (code==Scanner::S_newline &&
|
||||
(mState==EndState || mState==BeginState || mState==PotentialEndState))
|
||||
if (code==Scanner::S_newline && (mState==EndState || mState==BeginState))
|
||||
return false;
|
||||
|
||||
if (code==Scanner::S_comma && mState==MessageState)
|
||||
|
|
|
@ -25,8 +25,7 @@ namespace Compiler
|
|||
SetState, SetLocalVarState, SetGlobalVarState, SetPotentialMemberVarState,
|
||||
SetMemberVarState, SetMemberVarState2,
|
||||
MessageState, MessageCommaState, MessageButtonState, MessageButtonCommaState,
|
||||
EndState, PotentialEndState /* may have a stray string argument */,
|
||||
PotentialExplicitState, ExplicitState, MemberState
|
||||
EndState, PotentialExplicitState, ExplicitState, MemberState
|
||||
};
|
||||
|
||||
Locals& mLocals;
|
||||
|
|
Loading…
Reference in a new issue