1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 19:49:56 +00:00

Treat <> and << operators as < and >< and >> as > in scripts

(bug #4597)
This commit is contained in:
Capostrophic 2018-08-19 18:36:43 +03:00 committed by Capostrophic
parent 7f3769d5fc
commit a06c9c767d
2 changed files with 11 additions and 0 deletions

View file

@ -98,6 +98,7 @@
Bug #4575: Weird result of attack animation blending with movement animations
Bug #4576: Reset of idle animations when attack can not be started
Bug #4591: Attack strength should be 0 if player did not hold the attack button
Bug #4597: <> operator causes a compile error
Feature #1645: Casting effects from objects
Feature #2606: Editor: Implemented (optional) case sensitive global search
Feature #3083: Play animation when NPC is casting spell via script

View file

@ -502,6 +502,11 @@ namespace Compiler
if (get (c) && c!='=') // <== is a allowed as an alternative to <= :(
putback (c);
}
else if (c == '<' || c == '>') // Treat <> and << as <
{
special = S_cmpLT;
mErrorHandler.warning (std::string("invalid operator <") + c + ", treating it as <", mLoc);
}
else
{
putback (c);
@ -525,6 +530,11 @@ namespace Compiler
if (get (c) && c!='=') // >== is a allowed as an alternative to >= :(
putback (c);
}
else if (c == '<' || c == '>') // Treat >< and >> as >
{
special = S_cmpGT;
mErrorHandler.warning (std::string("invalid operator >") + c + ", treating it as >", mLoc);
}
else
{
putback (c);