Fix MapLayer functions on derived prop lists (#935)

scancodes-fix
Sven Eberhardt 2013-03-24 13:29:04 +01:00
parent 4b6c26a48a
commit 671a815223
2 changed files with 14 additions and 2 deletions

View File

@ -381,6 +381,18 @@ C4Def const * C4PropList::GetDef() const
return 0;
}
class C4MapScriptLayer * C4PropList::GetMapScriptLayer()
{
if (prototype) return prototype->GetMapScriptLayer();
return NULL;
}
class C4MapScriptMap * C4PropList::GetMapScriptMap()
{
if (prototype) return prototype->GetMapScriptMap();
return NULL;
}
C4PropListNumbered * C4PropList::GetPropListNumbered()
{
if (prototype) return prototype->GetPropListNumbered();

View File

@ -83,8 +83,8 @@ public:
virtual C4Effect * GetEffect();
virtual C4PropListNumbered * GetPropListNumbered();
C4PropList * GetPrototype() const { return prototype; }
virtual class C4MapScriptLayer * GetMapScriptLayer() { return NULL; }
virtual class C4MapScriptMap * GetMapScriptMap() { return NULL; }
virtual class C4MapScriptLayer * GetMapScriptLayer();
virtual class C4MapScriptMap * GetMapScriptMap();
// saved as a reference to a global constant?
virtual class C4PropListStatic * IsStatic() { return NULL; }