mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-26 14:55:39 +00:00
Console Refactor
This commit is contained in:
parent
626de074cc
commit
89b0c7f73b
89 changed files with 1883 additions and 1553 deletions
|
|
@ -26,9 +26,9 @@
|
|||
#include "afx/arcaneFX.h"
|
||||
|
||||
#include "console/engineAPI.h"
|
||||
#include "console/script.h"
|
||||
#include "T3D/gameBase/gameConnection.h"
|
||||
#include "math/mathIO.h"
|
||||
#include "console/compiler.h"
|
||||
|
||||
#include "afx/afxConstraint.h"
|
||||
#include "afx/afxChoreographer.h"
|
||||
|
|
@ -108,12 +108,11 @@ bool afxChoreographerData::preload(bool server, String &errorStr)
|
|||
|
||||
if (!server && client_script_file != ST_NULLSTRING)
|
||||
{
|
||||
Compiler::gSyntaxError = false;
|
||||
Con::evaluate(avar("exec(\"%s\");", client_script_file), false, 0);
|
||||
if (Compiler::gSyntaxError)
|
||||
Con::EvalResult result = Con::evaluate(avar("exec(\"%s\");", client_script_file), false, 0);
|
||||
|
||||
if (!result.valid)
|
||||
{
|
||||
Con::errorf("afxChoreographerData: failed to exec clientScriptFile \"%s\" -- syntax error", client_script_file);
|
||||
Compiler::gSyntaxError = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,8 +31,9 @@
|
|||
#include "T3D/gameBase/gameProcess.h"
|
||||
#include "T3D/player.h"
|
||||
#include "math/mathUtils.h"
|
||||
#include "console/compiler.h"
|
||||
|
||||
#include "console/engineAPI.h"
|
||||
#include "console/script.h"
|
||||
|
||||
#include "afx/afxChoreographer.h"
|
||||
#include "afx/afxSelectron.h"
|
||||
|
|
@ -672,7 +673,7 @@ DefineEngineFunction(wasSyntaxError, bool, (),,
|
|||
"for detecting syntax errors after reloading a script.\n\n"
|
||||
"@ingroup AFX")
|
||||
{
|
||||
return Compiler::gSyntaxError;
|
||||
return Con::getLastEvalResult().valid == false;
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//
|
||||
|
|
|
|||
|
|
@ -26,8 +26,8 @@
|
|||
#include <typeinfo>
|
||||
#include "afx/arcaneFX.h"
|
||||
|
||||
#include "console/compiler.h"
|
||||
#include "T3D/player.h"
|
||||
#include "console/script.h"
|
||||
|
||||
#include "afx/afxEffectDefs.h"
|
||||
#include "afx/afxPhrase.h"
|
||||
|
|
@ -314,13 +314,10 @@ void afxEA_PhraseEffect::trigger_new_phrase()
|
|||
}
|
||||
b[0] = '\0';
|
||||
|
||||
Compiler::gSyntaxError = false;
|
||||
//Con::errorf("EVAL [%s]", avar("%s;", buffer));
|
||||
Con::evaluate(avar("%s;", buffer), false, 0);
|
||||
if (Compiler::gSyntaxError)
|
||||
Con::EvalResult result = Con::evaluate(avar("%s;", buffer), false, 0);
|
||||
if (!result.valid)
|
||||
{
|
||||
Con::errorf("onTriggerCommand \"%s\" -- syntax error", phrase_fx_data->on_trig_cmd);
|
||||
Compiler::gSyntaxError = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue