Just been backporting some of this code into a tge project. I've noticed In SimObject::setDataField, we have:
if(array1 >= 0 && array1 < fld->elementCount && fld->elementCount >= 1)
{
....
onStaticModified( slotName, value );
return;
}
if(fld->validator)
fld->validator->validateType(this, (void *) (((const char *)this) + fld->offset));
The problem is fields will never be validated because in 99% of cases the function will exit at the return. In T3D and other previous versions there is this block before the onStaticModified call:
if(fld->validator)
fld->validator->validateType(this, (void *) (((const char *)this) + fld->offset));
I suspect a bad merge may have taken place at one point.
Just been backporting some of this code into a tge project. I've noticed In
SimObject::setDataField, we have:The problem is fields will never be validated because in 99% of cases the function will exit at the return. In T3D and other previous versions there is this block before the
onStaticModifiedcall:I suspect a bad merge may have taken place at one point.