2.5 BGE
authorNathan Letwory <nathan@letworyinteractive.com>
Wed, 24 Dec 2008 21:23:07 +0000 (21:23 +0000)
committerNathan Letwory <nathan@letworyinteractive.com>
Wed, 24 Dec 2008 21:23:07 +0000 (21:23 +0000)
* dna property types had define names renamed for RNA, do that here too.

source/gameengine/Converter/KX_ConvertProperties.cpp

index dfbc6f0c48d1d14a014116dc284574380f482422..53769dc30a181c9222280082ea57083d41a4ec5f 100644 (file)
@@ -66,58 +66,58 @@ void BL_ConvertProperties(Object* object,KX_GameObject* gameobj,SCA_TimeEventMan
                show_debug_info = bool (prop->flag & PROP_DEBUG);
 
                switch(prop->type) {
-               case PROP_BOOL:
-               {
-                       propval = new CBoolValue((bool)(prop->data != 0));
-                       gameobj->SetProperty(prop->name,propval);
-                       //promp->poin= &prop->data;
-                       break;
-               }
-               case PROP_INT:
-               {
-                       propval = new CIntValue((int)prop->data);
-                       gameobj->SetProperty(prop->name,propval);
-                       break;
-               }
-               case PROP_FLOAT:
-               {
-                       //prop->poin= &prop->data;
-                       float floatprop = *((float*)&prop->data);
-                       propval = new CFloatValue(floatprop);
-                       gameobj->SetProperty(prop->name,propval);
-               }
-               break;
-               case PROP_STRING:
-               {
-                       //prop->poin= callocN(MAX_PROPSTRING, "property string");
-                       propval = new CStringValue((char*)prop->poin,"");
-                       gameobj->SetProperty(prop->name,propval);
+                       case GPROP_BOOL:
+                       {
+                               propval = new CBoolValue((bool)(prop->data != 0));
+                               gameobj->SetProperty(prop->name,propval);
+                               //promp->poin= &prop->data;
+                               break;
+                       }
+                       case GPROP_INT:
+                       {
+                               propval = new CIntValue((int)prop->data);
+                               gameobj->SetProperty(prop->name,propval);
+                               break;
+                       }
+                       case GPROP_FLOAT:
+                       {
+                               //prop->poin= &prop->data;
+                               float floatprop = *((float*)&prop->data);
+                               propval = new CFloatValue(floatprop);
+                               gameobj->SetProperty(prop->name,propval);
+                       }
                        break;
-               }
-               case PROP_TIME:
-               {
-                       float floatprop = *((float*)&prop->data);
-
-                       CValue* timeval = new CFloatValue(floatprop);
-                       // set a subproperty called 'timer' so that 
-                       // we can register the replica of this property 
-                       // at the time a game object is replicated (AddObjectActuator triggers this)
-                       CValue *bval = new CBoolValue(true);
-                       timeval->SetProperty("timer",bval);
-                       bval->Release();
-                       if (isInActiveLayer)
+                       case GPROP_STRING:
                        {
-                               timemgr->AddTimeProperty(timeval);
+                               //prop->poin= callocN(MAX_PROPSTRING, "property string");
+                               propval = new CStringValue((char*)prop->poin,"");
+                               gameobj->SetProperty(prop->name,propval);
+                               break;
                        }
-                       
-                       propval = timeval;
-                       gameobj->SetProperty(prop->name,timeval);
+                       case GPROP_TIME:
+                       {
+                               float floatprop = *((float*)&prop->data);
 
-               }
-               default:
-               {
-                       // todo make an assert etc.
-               }
+                               CValue* timeval = new CFloatValue(floatprop);
+                               // set a subproperty called 'timer' so that 
+                               // we can register the replica of this property 
+                               // at the time a game object is replicated (AddObjectActuator triggers this)
+                               CValue *bval = new CBoolValue(true);
+                               timeval->SetProperty("timer",bval);
+                               bval->Release();
+                               if (isInActiveLayer)
+                               {
+                                       timemgr->AddTimeProperty(timeval);
+                               }
+                               
+                               propval = timeval;
+                               gameobj->SetProperty(prop->name,timeval);
+
+                       }
+                       default:
+                       {
+                               // todo make an assert etc.
+                       }
                }
                
                if (propval)