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>2009-04-12 10:41:01 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-04-12 10:41:01 +0400
commit33170295c8a2f3eb815b6086f47147113fd3de13 (patch)
tree4d0b1bcf15da67209c2b3c0f1834f7f63838c9f3 /source/gameengine/Ketsji
parent4cd088b1059afa2e7b998c184b2c9deecd4be4a9 (diff)
use long long rather then int for storing game logic properties.
There were also some problems with int to python conversion - assigning a PyLong to a KX_GameObject from python would raise an error - PyLong were coerced into floats when used with internal CValue arithmetic Changes... - PyLong is converted into CIntValue for coercing and assigning from python - CValue's generic GetNumber() function returns a double rather then a float. - Print an error when a PyType cant be coerced into a CValue Tested with python, expressions and property sensor.
Diffstat (limited to 'source/gameengine/Ketsji')
-rw-r--r--source/gameengine/Ketsji/KX_GameObject.cpp2
-rw-r--r--source/gameengine/Ketsji/KX_GameObject.h2
-rw-r--r--source/gameengine/Ketsji/KX_MeshProxy.cpp2
-rw-r--r--source/gameengine/Ketsji/KX_MeshProxy.h2
-rw-r--r--source/gameengine/Ketsji/KX_PolyProxy.cpp2
-rw-r--r--source/gameengine/Ketsji/KX_PolyProxy.h2
-rw-r--r--source/gameengine/Ketsji/KX_VertexProxy.cpp2
-rw-r--r--source/gameengine/Ketsji/KX_VertexProxy.h2
8 files changed, 8 insertions, 8 deletions
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp
index 13e839d9d2e..f5bf868dd59 100644
--- a/source/gameengine/Ketsji/KX_GameObject.cpp
+++ b/source/gameengine/Ketsji/KX_GameObject.cpp
@@ -164,7 +164,7 @@ const STR_String & KX_GameObject::GetText()
-float KX_GameObject::GetNumber()
+double KX_GameObject::GetNumber()
{
return 0;
}
diff --git a/source/gameengine/Ketsji/KX_GameObject.h b/source/gameengine/Ketsji/KX_GameObject.h
index f4d35faaeb6..58f2c56c1da 100644
--- a/source/gameengine/Ketsji/KX_GameObject.h
+++ b/source/gameengine/Ketsji/KX_GameObject.h
@@ -208,7 +208,7 @@ public:
/**
* Inherited from CValue -- does nothing!
*/
- float
+ double
GetNumber(
);
diff --git a/source/gameengine/Ketsji/KX_MeshProxy.cpp b/source/gameengine/Ketsji/KX_MeshProxy.cpp
index bcda4a8e3c4..e7f562bda8e 100644
--- a/source/gameengine/Ketsji/KX_MeshProxy.cpp
+++ b/source/gameengine/Ketsji/KX_MeshProxy.cpp
@@ -120,7 +120,7 @@ CValue* KX_MeshProxy::Calc(VALUE_OPERATOR op, CValue *val) { return NULL;}
CValue* KX_MeshProxy::CalcFinal(VALUE_DATA_TYPE dtype, VALUE_OPERATOR op, CValue *val) { return NULL;}
const STR_String & KX_MeshProxy::GetText() {return m_meshobj->GetName();};
-float KX_MeshProxy::GetNumber() { return -1;}
+double KX_MeshProxy::GetNumber() { return -1;}
STR_String KX_MeshProxy::GetName() { return m_meshobj->GetName();}
void KX_MeshProxy::SetName(STR_String name) { };
CValue* KX_MeshProxy::GetReplica() { return NULL;}
diff --git a/source/gameengine/Ketsji/KX_MeshProxy.h b/source/gameengine/Ketsji/KX_MeshProxy.h
index 56a6dfcac42..3b72099eebb 100644
--- a/source/gameengine/Ketsji/KX_MeshProxy.h
+++ b/source/gameengine/Ketsji/KX_MeshProxy.h
@@ -46,7 +46,7 @@ public:
virtual CValue* Calc(VALUE_OPERATOR op, CValue *val) ;
virtual CValue* CalcFinal(VALUE_DATA_TYPE dtype, VALUE_OPERATOR op, CValue *val);
virtual const STR_String & GetText();
- virtual float GetNumber();
+ virtual double GetNumber();
virtual RAS_MeshObject* GetMesh() { return m_meshobj; }
virtual STR_String GetName();
virtual void SetName(STR_String name); // Set the name of the value
diff --git a/source/gameengine/Ketsji/KX_PolyProxy.cpp b/source/gameengine/Ketsji/KX_PolyProxy.cpp
index 1e6f49ead2e..e102ca4e0e6 100644
--- a/source/gameengine/Ketsji/KX_PolyProxy.cpp
+++ b/source/gameengine/Ketsji/KX_PolyProxy.cpp
@@ -177,7 +177,7 @@ CValue* KX_PolyProxy::Calc(VALUE_OPERATOR, CValue *) { return NULL;}
CValue* KX_PolyProxy::CalcFinal(VALUE_DATA_TYPE, VALUE_OPERATOR, CValue *) { return NULL;}
STR_String sPolyName="polygone";
const STR_String & KX_PolyProxy::GetText() {return sPolyName;};
-float KX_PolyProxy::GetNumber() { return -1;}
+double KX_PolyProxy::GetNumber() { return -1;}
STR_String KX_PolyProxy::GetName() { return sPolyName;}
void KX_PolyProxy::SetName(STR_String) { };
CValue* KX_PolyProxy::GetReplica() { return NULL;}
diff --git a/source/gameengine/Ketsji/KX_PolyProxy.h b/source/gameengine/Ketsji/KX_PolyProxy.h
index a549d9841cc..275e65da810 100644
--- a/source/gameengine/Ketsji/KX_PolyProxy.h
+++ b/source/gameengine/Ketsji/KX_PolyProxy.h
@@ -45,7 +45,7 @@ public:
CValue* Calc(VALUE_OPERATOR op, CValue *val) ;
CValue* CalcFinal(VALUE_DATA_TYPE dtype, VALUE_OPERATOR op, CValue *val);
const STR_String & GetText();
- float GetNumber();
+ double GetNumber();
STR_String GetName();
void SetName(STR_String name); // Set the name of the value
void ReplicaSetName(STR_String name);
diff --git a/source/gameengine/Ketsji/KX_VertexProxy.cpp b/source/gameengine/Ketsji/KX_VertexProxy.cpp
index f3e9bbf86b1..bb12f405332 100644
--- a/source/gameengine/Ketsji/KX_VertexProxy.cpp
+++ b/source/gameengine/Ketsji/KX_VertexProxy.cpp
@@ -332,7 +332,7 @@ CValue* KX_VertexProxy::Calc(VALUE_OPERATOR, CValue *) { return NULL;}
CValue* KX_VertexProxy::CalcFinal(VALUE_DATA_TYPE, VALUE_OPERATOR, CValue *) { return NULL;}
STR_String sVertexName="vertex";
const STR_String & KX_VertexProxy::GetText() {return sVertexName;};
-float KX_VertexProxy::GetNumber() { return -1;}
+double KX_VertexProxy::GetNumber() { return -1;}
STR_String KX_VertexProxy::GetName() { return sVertexName;}
void KX_VertexProxy::SetName(STR_String) { };
CValue* KX_VertexProxy::GetReplica() { return NULL;}
diff --git a/source/gameengine/Ketsji/KX_VertexProxy.h b/source/gameengine/Ketsji/KX_VertexProxy.h
index 26772fc7d60..67a15d96768 100644
--- a/source/gameengine/Ketsji/KX_VertexProxy.h
+++ b/source/gameengine/Ketsji/KX_VertexProxy.h
@@ -46,7 +46,7 @@ public:
CValue* Calc(VALUE_OPERATOR op, CValue *val) ;
CValue* CalcFinal(VALUE_DATA_TYPE dtype, VALUE_OPERATOR op, CValue *val);
const STR_String & GetText();
- float GetNumber();
+ double GetNumber();
STR_String GetName();
void SetName(STR_String name); // Set the name of the value
void ReplicaSetName(STR_String name);