- scriptified the rest of the weapon pieces.

This commit is contained in:
Christoph Oelckers 2017-01-18 18:46:24 +01:00
commit 1ce7b80158
12 changed files with 66 additions and 176 deletions

View file

@ -571,7 +571,7 @@ DEFINE_ACTION_FUNCTION(DObject, GetClassName)
void *DObject::ScriptVar(FName field, PType *type)
{
auto sym = dyn_cast<PField>(GetClass()->Symbols.FindSymbol(field, true));
if (sym && sym->Type == type)
if (sym && (sym->Type == type || type == nullptr))
{
return (((char*)this) + sym->Offset);
}