Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-07-23 12:28:28 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-07-23 12:28:28 +0400
commit28299d98fb93e87b2322d0533395254e2792a86f (patch)
treeb32d6cff39d1cc5f31bfa1201b623dd24dde04ff /source/gameengine/Expressions/IntValue.cpp
parent4a999f9e96965bd4aa45ce4cdd5c225bbf901226 (diff)
svn merge ^/trunk/blender -c58374 -c58406 -c58422 -c58427 -c58436 -c58440 -c58441 -c58463 -c58504 -c58509 -c58512 -c58513 -c58514 -c58516 -c58520 -c58532 -c58534v2.68a
Diffstat (limited to 'source/gameengine/Expressions/IntValue.cpp')
-rw-r--r--source/gameengine/Expressions/IntValue.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/gameengine/Expressions/IntValue.cpp b/source/gameengine/Expressions/IntValue.cpp
index 2cacea98467..fa4c9ad8ac9 100644
--- a/source/gameengine/Expressions/IntValue.cpp
+++ b/source/gameengine/Expressions/IntValue.cpp
@@ -96,7 +96,7 @@ object and val
return new CIntValue (-m_int);
break;
case VALUE_NOT_OPERATOR:
- return new CErrorValue (op2str(op) + "only allowed on booleans");
+ return new CBoolValue (m_int == 0);
break;
case VALUE_AND_OPERATOR:
case VALUE_OR_OPERATOR:
@@ -170,7 +170,11 @@ CValue* CIntValue::CalcFinal(VALUE_DATA_TYPE dtype, VALUE_OPERATOR op, CValue *v
case VALUE_POS_OPERATOR:
ret = new CIntValue (m_int);
break;
+ case VALUE_NOT_OPERATOR:
+ ret = new CBoolValue(m_int == 0);
+ break;
default:
+ printf("Found op: %d\n", op);
ret = new CErrorValue("illegal operator. please send a bug report.");
break;
}
@@ -215,6 +219,9 @@ CValue* CIntValue::CalcFinal(VALUE_DATA_TYPE dtype, VALUE_OPERATOR op, CValue *v
case VALUE_LEQ_OPERATOR:
ret = new CBoolValue(((CFloatValue *) val)->GetFloat() <= m_int);
break;
+ case VALUE_NOT_OPERATOR:
+ ret = new CBoolValue(m_int == 0);
+ break;
default:
ret = new CErrorValue("illegal operator. please send a bug report.");
break;