Enum fixes

This commit is contained in:
parax0
2015-10-25 16:44:25 -06:00
parent 1dcfa63f3c
commit 8470923e45
3 changed files with 18 additions and 8 deletions

View File

@@ -154,9 +154,16 @@ EVolumeShape CScriptTemplate::VolumeShape(CScriptObject *pObj)
break;
case eLongProperty:
case eEnumProperty:
v = (int) static_cast<CLongProperty*>(pProp)->Get();
break;
case eEnumProperty: {
CEnumProperty *pEnumCast = static_cast<CEnumProperty*>(pProp);
CEnumTemplate *pEnumTemp = static_cast<CEnumTemplate*>(pEnumCast->Template());
int index = static_cast<CEnumProperty*>(pProp)->Get();
v = pEnumTemp->EnumeratorID(index);
break;
}
}
// Test and check whether any of the conditions are true