- fix handling of the global script in FraggleScript.
Depending on serialization order is not a good idea here, so now it's no longer stored as a parent in the main level script but explicitly checked for when looking for a variable.
This commit is contained in:
parent
4d98c10ea3
commit
11c453a71f
5 changed files with 25 additions and 22 deletions
|
|
@ -34,7 +34,7 @@
|
|||
#include <stdarg.h>
|
||||
#include "t_script.h"
|
||||
#include "v_text.h"
|
||||
|
||||
#include "g_levellocals.h"""
|
||||
|
||||
CVAR(Bool, script_debug, false, 0)
|
||||
|
||||
|
|
@ -561,7 +561,7 @@ void FParser::SimpleEvaluate(svalue_t &returnvar, int n)
|
|||
break;
|
||||
|
||||
case name_:
|
||||
var = Script->FindVariable(Tokens[n]);
|
||||
var = Script->FindVariable(Tokens[n], Level->FraggleScriptThinker->GlobalScript);
|
||||
if(!var)
|
||||
{
|
||||
script_error("unknown variable '%s'\n", Tokens[n]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue