diff options
-rw-r--r-- | source/gameengine/Converter/KX_ConvertProperties.cpp | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/source/gameengine/Converter/KX_ConvertProperties.cpp b/source/gameengine/Converter/KX_ConvertProperties.cpp index dfbc6f0c48d..53769dc30a1 100644 --- a/source/gameengine/Converter/KX_ConvertProperties.cpp +++ b/source/gameengine/Converter/KX_ConvertProperties.cpp @@ -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) |