BGE fix: KX_Lamp using strcmp wrongly + typo in rna_define
This commit is contained in:
@@ -478,7 +478,7 @@ void RNA_struct_free(BlenderRNA *brna, StructRNA *srna)
|
||||
|
||||
if(srna->flag & STRUCT_RUNTIME) {
|
||||
if(RNA_struct_py_type_get(srna)) {
|
||||
fprintf(stderr, "StructRNA \"%s\" freed while holdng a python reference\n", srna->name);
|
||||
fprintf(stderr, "StructRNA \"%s\" freed while holding a python reference\n", srna->name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -345,11 +345,11 @@ PyObject* KX_LightObject::pyattr_get_typeconst(void *self_v, const KX_PYATTRIBUT
|
||||
|
||||
const char* type = attrdef->m_name;
|
||||
|
||||
if(strcmp(type, "SPOT")) {
|
||||
if(!strcmp(type, "SPOT")) {
|
||||
retvalue = PyLong_FromSsize_t(RAS_LightObject::LIGHT_SPOT);
|
||||
} else if (strcmp(type, "SUN")) {
|
||||
} else if (!strcmp(type, "SUN")) {
|
||||
retvalue = PyLong_FromSsize_t(RAS_LightObject::LIGHT_SUN);
|
||||
} else if (strcmp(type, "NORMAL")) {
|
||||
} else if (!strcmp(type, "NORMAL")) {
|
||||
retvalue = PyLong_FromSsize_t(RAS_LightObject::LIGHT_NORMAL);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user