use long long rather then int for storing game logic properties.
authorCampbell Barton <ideasman42@gmail.com>
Sun, 12 Apr 2009 06:41:01 +0000 (06:41 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 12 Apr 2009 06:41:01 +0000 (06:41 +0000)
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.

36 files changed:
source/gameengine/Expressions/BoolValue.cpp
source/gameengine/Expressions/BoolValue.h
source/gameengine/Expressions/ConstExpr.cpp
source/gameengine/Expressions/ConstExpr.h
source/gameengine/Expressions/EmptyValue.cpp
source/gameengine/Expressions/EmptyValue.h
source/gameengine/Expressions/ErrorValue.cpp
source/gameengine/Expressions/ErrorValue.h
source/gameengine/Expressions/FloatValue.cpp
source/gameengine/Expressions/FloatValue.h
source/gameengine/Expressions/InputParser.cpp
source/gameengine/Expressions/InputParser.h
source/gameengine/Expressions/IntValue.cpp
source/gameengine/Expressions/IntValue.h
source/gameengine/Expressions/ListValue.cpp
source/gameengine/Expressions/ListValue.h
source/gameengine/Expressions/StringValue.cpp
source/gameengine/Expressions/StringValue.h
source/gameengine/Expressions/Value.cpp
source/gameengine/Expressions/Value.h
source/gameengine/Expressions/VectorValue.cpp
source/gameengine/Expressions/VectorValue.h
source/gameengine/Expressions/VoidValue.h
source/gameengine/GameLogic/SCA_ExpressionController.cpp
source/gameengine/GameLogic/SCA_ILogicBrick.cpp
source/gameengine/GameLogic/SCA_ILogicBrick.h
source/gameengine/GameLogic/SCA_ISensor.cpp
source/gameengine/GameLogic/SCA_ISensor.h
source/gameengine/Ketsji/KX_GameObject.cpp
source/gameengine/Ketsji/KX_GameObject.h
source/gameengine/Ketsji/KX_MeshProxy.cpp
source/gameengine/Ketsji/KX_MeshProxy.h
source/gameengine/Ketsji/KX_PolyProxy.cpp
source/gameengine/Ketsji/KX_PolyProxy.h
source/gameengine/Ketsji/KX_VertexProxy.cpp
source/gameengine/Ketsji/KX_VertexProxy.h

index cadb34d7e8f26a3b4ef641d17d0a3b33dc8ccddc..13c870b68e54600d4c9acbab3edc93bc465e4033 100644 (file)
@@ -181,9 +181,9 @@ ret: the bool stored in the object
 
 
 
-float CBoolValue::GetNumber()
+double CBoolValue::GetNumber()
 {
-       return (float)m_bool;
+       return (double)m_bool;
 }
 
 
index 6c4d964249f1594aba8d3c2d5449a385f5f44820..9352b9d4b922848537910c880ea17d479a2f8046 100644 (file)
@@ -33,7 +33,7 @@ public:
        CBoolValue(bool innie, STR_String name, AllocationTYPE alloctype = CValue::HEAPVALUE);
 
        virtual const STR_String& GetText();
-       virtual float           GetNumber();
+       virtual double          GetNumber();
        bool                            GetBool();
        virtual void            SetValue(CValue* newval);
        
index e33ba091ac407ebf29e6f6b6b83c5f1b7b526592..6b64be9c9a99c6e5e0d1661a39a2aff9ec1ed6bc 100644 (file)
@@ -84,7 +84,7 @@ void CConstExpr::ClearModified()
 
 
 
-float CConstExpr::GetNumber()
+double CConstExpr::GetNumber()
 {
        return -1;
 }
index e27ece52a83a5e350397b1ccd379d6b404ae35ac..b117140fe70e1432996173757493b91bd3067260 100644 (file)
@@ -32,7 +32,7 @@ public:
        //bool IsInside(float x,float y,float z,bool bBorderInclude=true);
        bool NeedsRecalculated();
        void ClearModified();
-       virtual float GetNumber();
+       virtual double GetNumber();
        virtual CValue* Calculate();
        CConstExpr(CValue* constval);
        CConstExpr();
index c2b60e590a4fec7cb30f5e3bbd0142d32b636e3d..f72ddc470960fc7cdec5f9233cb03391c287f3e0 100644 (file)
@@ -76,7 +76,7 @@ this object
 
 
 
-float CEmptyValue::GetNumber()
+double CEmptyValue::GetNumber()
 {
        return 0;
 }
index b9cca0e57e5138a5d6f0c4921af8a03f700315d4..fb6b4a477a6840175d38528042221c48e4e6c632 100644 (file)
@@ -27,7 +27,7 @@ public:
        virtual                                 ~CEmptyValue();
 
        virtual const STR_String &      GetText();
-       virtual float                   GetNumber();
+       virtual double                  GetNumber();
        CListValue*                             GetPolySoup();
        virtual double*                 GetVector3(bool bGetTransformedVec=false);
        bool                                    IsInside(CValue* testpoint,bool bBorderInclude=true);
index e52be4c8021b8e0dd266b14da17cf795837f5730..651a772db196b02a396acd67fe29f29abeaed9aa 100644 (file)
@@ -99,7 +99,7 @@ ret: a new object containing the result of applying operator op to val and
 
 
 
-float CErrorValue::GetNumber()
+double CErrorValue::GetNumber()
 {
        return -1;
 }
index 16e608ca01aa48c5844b56a3e612ceb7e5a5bc19..5b5795196ba1838358ac887a46d6dec06c777f92 100644 (file)
@@ -23,7 +23,7 @@ class CErrorValue : public CPropValue
 
 public:
        virtual const STR_String & GetText();
-       virtual float GetNumber();
+       virtual double GetNumber();
        CErrorValue();
        CErrorValue(STR_String errmsg);
        virtual ~CErrorValue();
index 460eaa73f356816b9aae3c193b806d681d11fe0a..212a55fe4578bd4f4dac2215214296067eabf14d 100644 (file)
@@ -278,7 +278,7 @@ ret: the float stored in the object
 
 
 
-float CFloatValue::GetNumber()
+double CFloatValue::GetNumber()
 {
        return m_float;
 }
@@ -287,7 +287,7 @@ float CFloatValue::GetNumber()
 
 void CFloatValue::SetValue(CValue* newval)
 {      
-       m_float = newval->GetNumber(); 
+       m_float = (float)newval->GetNumber(); 
        SetModified(true);
 }
 
index 33f05f1d7f2103ac34bf01e923adb9c0010ade52..41f70b5c54cc25b3bd1e220eb22a264cf413562b 100644 (file)
@@ -28,7 +28,7 @@ public:
        virtual const STR_String & GetText();
 
        void Configure(CValue* menuvalue);
-       virtual float GetNumber();
+       virtual double GetNumber();
        virtual void SetValue(CValue* newval);
        float GetFloat();
        void SetFloat(float fl);
index 94663c4a365b0bb71ae7cc845b3a2d39a4d3c26e..677bbb36d70c3c2ea7e79a245d1ea8174e2ae559 100644 (file)
@@ -319,12 +319,14 @@ void CParser::NextSym()
        }
 }
 
+#if 0
 int CParser::MakeInt() {
        // returns the integer representation of the value in the global
        // variable const_as_string
        // pre: const_as_string contains only numercal chars
        return atoi(const_as_string);
 }
+#endif
 
 STR_String CParser::Symbol2Str(int s) {
        // returns a string representation of of symbol s,
@@ -436,8 +438,8 @@ CExpression *CParser::Ex(int i) {
                                        break;
                                case inttype:
                                        {
-                                               int temp;
-                                               temp = atoi(const_as_string);
+                                               cInt temp;
+                                               temp = strtoll(const_as_string, NULL, 10); /* atoi is for int only */
                                                e1 = new CConstExpr(new CIntValue(temp));
                                                break;
                                        }
@@ -580,7 +582,7 @@ float CParser::GetFloat(STR_String txt)
        CExpression* expr = ProcessText(txt);
        if (expr) {
                val = expr->Calculate();
-               result=val->GetNumber();
+               result=(float)val->GetNumber();
                
                
        
index f51c473ba188c41cd153255441550714f6ea7d20..3d5172226393ba016a0c777ab70cf4237e2dcae3 100644 (file)
@@ -94,7 +94,9 @@ private:
        void CharRep();
        void GrabString(int start);
        void NextSym();
+#if 0  /* not used yet */
        int MakeInt();
+#endif
        STR_String Symbol2Str(int s);
        void Term(int s);
        int Priority(int optor);
index fb586cb4979ff99fe6a2385bce194f6b69aa6f10..4e86f7bf7899b995360adb8b65be19ec00cab94f 100644 (file)
@@ -42,10 +42,10 @@ effect: constructs a new CIntValue
 
 
 
-CIntValue::CIntValue(int innie)
+CIntValue::CIntValue(cInt innie)
 /*
 pre:
-effect: constructs a new CIntValue containing int innie
+effect: constructs a new CIntValue containing cInt innie
 */
 {
        m_int = innie;
@@ -54,7 +54,7 @@ effect: constructs a new CIntValue containing int innie
 
 
 
-CIntValue::CIntValue(int innie,STR_String name,AllocationTYPE alloctype)
+CIntValue::CIntValue(cInt innie,STR_String name,AllocationTYPE alloctype)
 {
        m_int = innie;
        SetName(name);
@@ -280,10 +280,10 @@ this object
 
 
 
-int CIntValue::GetInt()
+cInt CIntValue::GetInt()
 /*
 pre:
-ret: the int stored in the object
+ret: the cInt stored in the object
 */
 {
        return m_int;
@@ -291,7 +291,7 @@ ret: the int stored in the object
 
 
 
-float CIntValue::GetNumber()
+double CIntValue::GetNumber()
 {
        return (float) m_int;
 }
@@ -302,7 +302,7 @@ const STR_String & CIntValue::GetText()
 {
        if (!m_pstrRep)
                m_pstrRep=new STR_String();
-       m_pstrRep->Format("%d",m_int);
+       m_pstrRep->Format("%lld",m_int);
        
        return *m_pstrRep;
 }
@@ -321,7 +321,7 @@ CValue* CIntValue::GetReplica() {
 
 void CIntValue::SetValue(CValue* newval)
 {      
-       m_int = (int)newval->GetNumber(); 
+       m_int = (cInt)newval->GetNumber(); 
        SetModified(true);
 }
 
@@ -329,5 +329,8 @@ void CIntValue::SetValue(CValue* newval)
 
 PyObject* CIntValue::ConvertValueToPython()
 {
-       return PyInt_FromLong(m_int);
+       if((m_int > INT_MIN) && (m_int < INT_MAX))
+               return PyInt_FromLong(m_int);
+       else
+               return PyLong_FromLongLong(m_int);
 }
index 4fdc1089857aadf71399f4a688d74adf3ee02234..0f3a38b274baaf83d189c3c3b855650b21a303a8 100644 (file)
 
 #include "Value.h"
 
+typedef long long cInt; 
+
 class CIntValue : public CPropValue  
 {
        //PLUGIN_DECLARE_SERIAL (CIntValue,CValue)
 
 public:
        virtual const STR_String& GetText();
-       virtual float                   GetNumber();
+       virtual double                  GetNumber();
        
-       int GetInt();
+       cInt GetInt();
        CIntValue();
-       CIntValue(int innie);
-       CIntValue(int innie,
+       CIntValue(cInt innie);
+       CIntValue(cInt innie,
                          STR_String name,
                          AllocationTYPE alloctype=CValue::HEAPVALUE);
        
@@ -51,7 +53,7 @@ protected:
        virtual                 ~CIntValue();
 
 private:
-       int                             m_int;
+       cInt                    m_int;
        STR_String*             m_pstrRep;
 
 };
index 16b4fbef6b7a503d9cf22ba5218d52f9f0b6fdee..0f163ad07c1772b480455468c97d58347c1afbe0 100644 (file)
@@ -561,7 +561,7 @@ void CListValue::Add(CValue* value)
 
 
 
-float CListValue::GetNumber()
+double CListValue::GetNumber()
 {
        return -1;
 }
index 6f70acb93674b7a5b6debf6db017bfc13f1c66cc..cf2976c2bbbd8314597c4b4c362febc819460d63 100644 (file)
@@ -36,7 +36,7 @@ public:
        virtual CValue* CalcFinal(VALUE_DATA_TYPE dtype,
                                                          VALUE_OPERATOR op,
                                                          CValue* val);
-       virtual float GetNumber();
+       virtual double GetNumber();
        virtual CValue* GetReplica();
 
 public:
index 1ef8c5629a00a906862c6777b42403c4bf260c37..2b3c62c411e579fdac063a730c6f162a0c244422 100644 (file)
@@ -113,7 +113,7 @@ this object
 
 
 
-float CStringValue::GetNumber()
+double CStringValue::GetNumber()
 {
        return -1;
 }
index b824d4ef86d318cd56d3cf7c1b1092938b3c643f..16575ed7ffa7b00cc4270233470780b4ed6320af 100644 (file)
@@ -33,7 +33,7 @@ public:
        /// CValue implementation
        virtual bool            IsEqual(const STR_String & other);
        virtual const STR_String &      GetText();
-       virtual float           GetNumber();
+       virtual double          GetNumber();
        
        virtual CValue*         Calc(VALUE_OPERATOR op, CValue *val);
        virtual CValue*         CalcFinal(VALUE_DATA_TYPE dtype, VALUE_OPERATOR op, CValue *val);
index a631d58d21a62f1611591e48fb684f0e3a0e6482..47f0686c4c31c8abf48b7f0ece15b49a12823c5a 100644 (file)
@@ -86,20 +86,17 @@ int MyPyCompare (PyObject* v,PyObject* w)
 int cvalue_coerce(PyObject** pv,PyObject** pw)
 {
        if (PyInt_Check(*pw)) {
-               double db  = (double)PyInt_AsLong(*pw);
-               *pw = new CIntValue((int) db);
+               *pw = new CIntValue((cInt)PyInt_AsLong(*pw));
                Py_INCREF(*pv);
                return 0;
        }
        else if (PyLong_Check(*pw)) {
-               double db = PyLong_AsDouble(*pw);
-               *pw = new CFloatValue(db);
+               *pw = new CIntValue((cInt)PyLong_AsLongLong(*pw));
                Py_INCREF(*pv);
                return 0;
        }
        else if (PyFloat_Check(*pw)) {
-               double db = PyFloat_AsDouble(*pw);
-               *pw = new CFloatValue(db);
+               *pw = new CFloatValue((float)PyFloat_AsDouble(*pw));
                Py_INCREF(*pv);
                return 0;
        } else if (PyString_Check(*pw)) {
@@ -108,6 +105,8 @@ int cvalue_coerce(PyObject** pv,PyObject** pw)
                Py_INCREF(*pv);
                return 0;
        }
+       
+       PyErr_SetString(PyExc_TypeError, "unable to coerce python type to cvalue");
        return 1; /* Can't do it */
 
 }
@@ -402,7 +401,7 @@ float CValue::GetPropertyNumber(const STR_String& inName,float defnumber)
 {
        CValue *property = GetProperty(inName);
        if (property)
-               return property->GetNumber();
+               return property->GetNumber(); 
        else
                return defnumber;
 }
@@ -757,7 +756,11 @@ CValue* CValue::ConvertPythonToValue(PyObject* pyobj)
        } else
        if (PyInt_Check(pyobj))
        {
-               vallie = new CIntValue( (int)PyInt_AS_LONG(pyobj) );
+               vallie = new CIntValue( (cInt)PyInt_AS_LONG(pyobj) );
+       } else
+       if (PyLong_Check(pyobj))
+       {
+               vallie = new CIntValue( (cInt)PyLong_AsLongLong(pyobj) );
        } else
        if (PyString_Check(pyobj))
        {
index 7a2816a9778ee6e500865b6108324a0d81f7f79d..4cdc80dc9bd423bdd6848a9d841002846b4bc26c 100644 (file)
@@ -306,7 +306,7 @@ public:
        virtual void            SetColorOperator(VALUE_OPERATOR op);
 
        virtual const STR_String &      GetText() = 0;
-       virtual float           GetNumber() = 0;
+       virtual double          GetNumber() = 0;
        double*                         ZeroVector() { return m_sZeroVec; };
        virtual double*         GetVector3(bool bGetTransformedVec = false);
 
index bea6902eba88afa45e67529044790723169fa21b..497a50b90e78543405f3c1759a79b5466c275a9c 100644 (file)
@@ -156,7 +156,7 @@ this object
        return ret;
 }
 
-float CVectorValue::GetNumber()
+double CVectorValue::GetNumber()
 {
        return m_vec[KX_X];
 }
index 5d9b2a9889195adc0997859ddca09fbd4702b90a..99bf0abb11bf71b98738d1a90e78e3b924fae1a8 100644 (file)
@@ -32,7 +32,7 @@ public:
        void SetVector(double newvec[]);
        void Configure(CValue* menuvalue);
        virtual double* GetVector3(bool bGetTransformedVec=false);
-       virtual float           GetNumber();
+       virtual double          GetNumber();
        
        CValue*         Calc(VALUE_OPERATOR op, CValue *val) {
                return val->CalcFinal(VALUE_VECTOR_TYPE, op, this);
index 4bde025478734df1ac7d32dec7b944c3f138ec0c..10a6ff9ad3dcbb9d5f4eb1a64ceea13b26a5a4aa 100644 (file)
@@ -47,7 +47,7 @@ public:
 
        /// Value -> String or number
        virtual const STR_String &      GetText();                                                                                              // Get string description of void value (unimplemented)
-       virtual float           GetNumber()                                                                                             { return -1; }
+       virtual double          GetNumber()                                                                                             { return -1; }
 
        /// Value calculation
        virtual CValue*         Calc(VALUE_OPERATOR op, CValue *val);
index 8ed46beb7f3e5b89c33d87134c85221ef803f080..352a39a6fea646413213ed5681bc9d02d72957b1 100644 (file)
@@ -109,7 +109,7 @@ void SCA_ExpressionController::Trigger(SCA_LogicManager* logicmgr)
                                printf(value->GetText());
                        } else
                        {
-                               float num = value->GetNumber();
+                               float num = (float)value->GetNumber();
                                expressionresult = !MT_fuzzyZero(num);
                        }
                        value->Release();
index 900975b9f15f4f8023d139bf7084a9fa925d38b8..46e132c65fc009d188375594f16364bf312a93b8 100644 (file)
@@ -123,7 +123,7 @@ const STR_String& SCA_ILogicBrick::GetText()
 
 
 
-float SCA_ILogicBrick::GetNumber()
+double SCA_ILogicBrick::GetNumber()
 {
        return -1;
 }
index c098f9dfd8ab735cc400b55dabb4ebc93d6569c7..20fa3c2d6872dfb6cef0bb905f84d356b0e0cf01 100644 (file)
@@ -69,7 +69,7 @@ public:
        virtual CValue* CalcFinal(VALUE_DATA_TYPE dtype, VALUE_OPERATOR op, CValue *val);
 
        virtual const STR_String &      GetText();
-       virtual float           GetNumber();
+       virtual double          GetNumber();
        virtual STR_String      GetName();
        virtual void            SetName(STR_String name);
        virtual void            ReplicaSetName(STR_String name);
index bb1f73bf7f9de1e4198897d53ff19c42d2f92c22..3c21cf66e09b172bb64af507129ae855ce389606 100644 (file)
@@ -105,7 +105,7 @@ void SCA_ISensor::SetLevel(bool lvl) {
 }
 
 
-float SCA_ISensor::GetNumber() {
+double SCA_ISensor::GetNumber() {
        return IsPositiveTrigger();
 }
 
index cfc956820897ad3f75b4571d9c5f3082bc6c9330..18d630fce0ee1f7cec1574d48a07e4e5cd29328c 100644 (file)
@@ -113,7 +113,7 @@ public:
        virtual void RegisterToManager();
        virtual void UnregisterToManager();
 
-       virtual float GetNumber();
+       virtual double GetNumber();
 
        /** Stop sensing for a while. */
        void Suspend();
index 13e839d9d2e08949bfecc56cdf8c9ab3208b0c91..f5bf868dd59eae65425964e090ff0d0819d17681 100644 (file)
@@ -164,7 +164,7 @@ const STR_String & KX_GameObject::GetText()
 
 
 
-float KX_GameObject::GetNumber()
+double KX_GameObject::GetNumber()
 {
        return 0;
 }
index f4d35faaeb69de3826759038914f481218b7bdb2..58f2c56c1daeb5819e0e10dc2f9c698b1cd68289 100644 (file)
@@ -208,7 +208,7 @@ public:
        /**
         * Inherited from CValue -- does nothing!
         */
-               float                           
+               double
        GetNumber(
        );
 
index bcda4a8e3c48c3ede1e6b5396214c0d25321addd..e7f562bda8e367ce6de921c7b224aff0e2da02cd 100644 (file)
@@ -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;}
index 56a6dfcac42a6750d42aa1a645e95a18dedfc472..3b72099eebbe999066cefddb3cad647422d9c033 100644 (file)
@@ -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
index 1e6f49ead2e59dff2c69c8440b8a5828704d3c33..e102ca4e0e6a85396ee755139c4d032fce78a295 100644 (file)
@@ -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;}
index a549d9841cc7761e39c9efdbd7f433abfcae4cc6..275e65da81040bfc3b8c3021963af308e588af2e 100644 (file)
@@ -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);
index f3e9bbf86b186b769fe5b2abac12a5a30d53c21b..bb12f4053326aa9d505e5249fee96917d3439438 100644 (file)
@@ -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;}
index 26772fc7d60aed75ba2c89397d1cc00f5af02e19..67a15d96768720e93a691fc601c3ba5ea6073087 100644 (file)
@@ -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);