mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 07:12:02 +00:00
- fixed WP_NOCHANGE changes with a restart, so this must be taken into account for the script variable holding it.
This commit is contained in:
parent
fa0be4d4a9
commit
68b47d81de
1 changed files with 2 additions and 1 deletions
|
@ -65,6 +65,7 @@ static TArray<AFuncDesc> AFTable;
|
|||
static TArray<FieldDesc> FieldTable;
|
||||
extern int BackbuttonTime;
|
||||
extern float BackbuttonAlpha;
|
||||
static AWeapon *wpnochg;
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
|
@ -924,7 +925,7 @@ void InitThingdef()
|
|||
// Argh. It sucks when bad hacks need to be supported. WP_NOCHANGE is just a bogus pointer but it used everywhere as a special flag.
|
||||
// It cannot be defined as constant because constants can either be numbers or strings but nothing else, so the only 'solution'
|
||||
// is to create a static variable from it and reference that in the script. Yuck!!!
|
||||
static AWeapon *wpnochg = WP_NOCHANGE;
|
||||
wpnochg = WP_NOCHANGE;
|
||||
fieldptr = new PField("WP_NOCHANGE", NewPointer(RUNTIME_CLASS(AWeapon), false), VARF_Native | VARF_Static | VARF_ReadOnly, (intptr_t)&wpnochg);
|
||||
Namespaces.GlobalNamespace->Symbols.AddSymbol(fieldptr);
|
||||
|
||||
|
|
Loading…
Reference in a new issue