mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-05-30 08:31:29 +00:00
- reviewed all places where VARF_Action and NAP were used and fixed what was still wrong.
This commit is contained in:
parent
371712c53a
commit
37914223f0
5 changed files with 20 additions and 17 deletions
|
@ -38,7 +38,7 @@
|
|||
**
|
||||
*/
|
||||
|
||||
#include "actor.h"
|
||||
#include "a_pickups.h"
|
||||
#include "info.h"
|
||||
#include "sc_man.h"
|
||||
#include "tarray.h"
|
||||
|
@ -602,16 +602,16 @@ void ParseFunctionParameters(FScanner &sc, PClassActor *cls, TArray<FxExpression
|
|||
int pnum = 0;
|
||||
bool zeroparm;
|
||||
|
||||
if (afd->Variants[0].Flags & VARF_Method)
|
||||
if (afd->Variants[0].Flags & VARF_Action)
|
||||
{
|
||||
numparams -= NAP;
|
||||
pnum += NAP;
|
||||
}
|
||||
else if (afd->Variants[0].Flags & VARF_Method)
|
||||
{
|
||||
numparams--;
|
||||
pnum++;
|
||||
}
|
||||
if (afd->Variants[0].Flags & VARF_Action)
|
||||
{
|
||||
numparams -= 2;
|
||||
pnum += 2;
|
||||
}
|
||||
assert(numparams >= 0);
|
||||
zeroparm = numparams == 0;
|
||||
if (numparams > 0 && !(paramflags[pnum] & VARF_Optional))
|
||||
|
|
|
@ -143,7 +143,7 @@ PFunction *CreateAnonymousFunction(PClass *containingclass, PType *returntype, i
|
|||
SetImplicitArgs(&args, &argflags, &argnames, containingclass, flags);
|
||||
|
||||
PFunction *sym = new PFunction(containingclass, NAME_None); // anonymous functions do not have names.
|
||||
sym->AddVariant(NewPrototype(rets, args), argflags, argnames, nullptr, VARF_Action|VARF_Method);
|
||||
sym->AddVariant(NewPrototype(rets, args), argflags, argnames, nullptr, flags);
|
||||
return sym;
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
**
|
||||
*/
|
||||
|
||||
#include "actor.h"
|
||||
#include "a_pickups.h"
|
||||
#include "thingdef.h"
|
||||
#include "sc_man.h"
|
||||
#include "c_console.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue