mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 19:53:48 +00:00
Improve handling of non-default script filenames
This commit is contained in:
parent
099dd4f1f3
commit
9ccaa6d3ea
118 changed files with 534 additions and 528 deletions
|
|
@ -1197,6 +1197,13 @@ bool executeFile(const char* fileName, bool noCalls, bool journalScript)
|
|||
|
||||
if (!ext)
|
||||
{
|
||||
// Try appending the default script extension and see if that succeeds
|
||||
|
||||
if (executeFile(fileName + String("." TORQUE_SCRIPT_EXTENSION), noCalls, journalScript))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// We need an extension!
|
||||
Con::errorf(ConsoleLogEntry::Script, "exec: invalid script file name %s.", scriptFilenameBuffer);
|
||||
execDepth--;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue