mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-01-19 08:01:50 +00:00
Allow FindFunctionPointer to return non-virtual methods
This commit is contained in:
parent
d9a88d7080
commit
0e9135132d
1 changed files with 2 additions and 1 deletions
|
@ -54,6 +54,7 @@
|
|||
#include "i_time.h"
|
||||
|
||||
#include "maps.h"
|
||||
#include "types.h"
|
||||
|
||||
static ZSMap<FName, DObject*> AllServices;
|
||||
|
||||
|
@ -1352,7 +1353,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(_QuatStruct, Inverse, QuatInverse)
|
|||
PFunction * FindFunctionPointer(PClass * cls, int fn_name)
|
||||
{
|
||||
auto fn = dyn_cast<PFunction>(cls->FindSymbol(ENamedName(fn_name), true));
|
||||
return (fn && fn->GetImplicitArgs() == 0) ? fn : nullptr;
|
||||
return (fn && (fn->Variants[0].Flags & (VARF_Action | VARF_Virtual)) == 0 ) ? fn : nullptr;
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(DObject, FindFunction, FindFunctionPointer)
|
||||
|
|
Loading…
Reference in a new issue