Fix for Morph virtual
Allows class<MorphedMonster> to be used as an argument type in place of class<Actor> within the third argument for backwards compatibility.
This commit is contained in:
parent
5ed4f477ed
commit
06eee55671
3 changed files with 17 additions and 1 deletions
|
|
@ -57,6 +57,19 @@ PFunction* FindBuiltinFunction(FName funcname);
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
bool ShouldAllowGameSpecificVirtual(FName name, unsigned index, PType* arg, PType* varg)
|
||||
{
|
||||
return (name == NAME_Morph && index == 3u && arg->isClassPointer() && varg->isClassPointer()
|
||||
&& PType::toClassPointer(varg)->ClassRestriction->TypeName == NAME_Actor
|
||||
&& PType::toClassPointer(arg)->ClassRestriction->TypeName == NAME_MorphedMonster);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
bool isActor(PContainerType *type)
|
||||
{
|
||||
auto cls = PType::toClass(type);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue