mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 07:04:36 +00:00
lotsa fixes.
This commit is contained in:
parent
db047275f1
commit
6f7fdca87d
178 changed files with 230 additions and 245 deletions
|
|
@ -143,6 +143,7 @@ function parseMissionGroupForIds( %className, %childGroup )
|
|||
if(!isObject(%currentGroup))
|
||||
return "";
|
||||
|
||||
%classIds = "";
|
||||
for(%i = 0; %i < (%currentGroup).getCount(); %i++)
|
||||
{
|
||||
if( (%currentGroup).getObject(%i).getClassName() $= %className )
|
||||
|
|
|
|||
|
|
@ -193,6 +193,9 @@ function resetMission()
|
|||
|
||||
clearServerPaths();
|
||||
|
||||
// TODO: Is this right?
|
||||
%client = ClientGroup.getObject(0);
|
||||
|
||||
// Inform the game code we're resetting.
|
||||
%hasGameMode = callGamemodeFunction("onMissionReset", %client);
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
%guiContent = new GuiControl(ConsoleDlg) {
|
||||
$guiContent = new GuiControl(ConsoleDlg) {
|
||||
position = "0 0";
|
||||
extent = "1024 768";
|
||||
minExtent = "8 8";
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ function ConsoleEntry::eval()
|
|||
&& !startsWith(%text, "for(")
|
||||
&& !startsWith(%text, "switch(")
|
||||
&& !startsWith(%text, "switch$("))
|
||||
eval("%result = " @ %text);
|
||||
%result = eval("return" SPC %text);
|
||||
else
|
||||
eval(%text);
|
||||
$Con::warnVoidAssignment = %oldWarnVoidAssignment;
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ function PostFXManager::loadPresetFile()
|
|||
{
|
||||
//Show the dialog and set the flag
|
||||
getLoadFilename($PostFXManager::fileFilter, "PostFXManager::loadPresetHandler");
|
||||
$PostFXManager::currentPreset = $Tools::FileDialogs::LastFilePath();
|
||||
$PostFXManager::currentPreset = $Tools::FileDialogs::LastFilePath;
|
||||
}
|
||||
|
||||
function PostFXManager::loadPresetHandler( %filename )
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ function findGameObject(%name)
|
|||
|
||||
//%assetName = AssetDatabase.getAssetName(%assetId);
|
||||
|
||||
if(%assetId $= %name)
|
||||
if(%assetId $= %name)
|
||||
{
|
||||
%gameObjectAsset = AssetDatabase.acquireAsset(%assetId);
|
||||
|
||||
|
|
@ -47,7 +47,7 @@ function spawnGameObject(%name, %addToScene)
|
|||
%go.setHidden(false);
|
||||
%go.setScopeAlways();
|
||||
|
||||
if(%addToMissionGroup == true) //save instance when saving level
|
||||
if(%addToScene == true) //save instance when saving level
|
||||
getScene(0).add(%go);
|
||||
else // clear instance on level exit
|
||||
MissionCleanup.add(%go);
|
||||
|
|
|
|||
|
|
@ -524,7 +524,9 @@ function loadDir(%dir)
|
|||
|
||||
function loadDirs(%dirPath)
|
||||
{
|
||||
%dirPath = nextToken(%dirPath, token, ";");
|
||||
%dirPath = nextToken(%dirPath, "$token", ";");
|
||||
%token = $token;
|
||||
|
||||
if (%dirPath !$= "")
|
||||
loadDirs(%dirPath);
|
||||
|
||||
|
|
|
|||
|
|
@ -67,28 +67,28 @@ function parseArgs()
|
|||
$isDedicated = true;
|
||||
$Server::Dedicated = true;
|
||||
enableWinConsole(true);
|
||||
$argUsed[%i]++;
|
||||
$argUsed[$i]++;
|
||||
|
||||
//--------------------
|
||||
case "-mission":
|
||||
$argUsed[%i]++;
|
||||
$argUsed[$i]++;
|
||||
if ($hasNextArg)
|
||||
{
|
||||
$missionArg = $nextArg;
|
||||
$argUsed[%i+1]++;
|
||||
%i++;
|
||||
$argUsed[$i+1]++;
|
||||
$i++;
|
||||
}
|
||||
else
|
||||
error("Error: Missing Command Line argument. Usage: -mission <filename>");
|
||||
|
||||
//--------------------
|
||||
case "-connect":
|
||||
$argUsed[%i]++;
|
||||
$argUsed[$i]++;
|
||||
if ($hasNextArg)
|
||||
{
|
||||
$JoinGameAddress = $nextArg;
|
||||
$argUsed[%i+1]++;
|
||||
%i++;
|
||||
$argUsed[$i+1]++;
|
||||
$i++;
|
||||
}
|
||||
else
|
||||
error("Error: Missing Command Line argument. Usage: -connect <ip_address>");
|
||||
|
|
@ -271,9 +271,9 @@ function parseArgs()
|
|||
{
|
||||
$levelToLoad = $nextArg @ " ";
|
||||
|
||||
for(%i = $i + 2; %i < $Game::argc; %i++)
|
||||
for(%j = $i + 2; %j < $Game::argc; %j++)
|
||||
{
|
||||
$arg = $Game::argv[%i];
|
||||
$arg = $Game::argv[%j];
|
||||
%hasExt = strpos($arg, ".mis");
|
||||
|
||||
if(%hasExt == -1)
|
||||
|
|
@ -329,30 +329,30 @@ function parseArgs()
|
|||
|
||||
case "-fullscreen":
|
||||
$cliFullscreen = true;
|
||||
$argUsed[%i]++;
|
||||
$argUsed[$i]++;
|
||||
|
||||
case "-windowed":
|
||||
$cliFullscreen = false;
|
||||
$argUsed[%i]++;
|
||||
$argUsed[$i]++;
|
||||
|
||||
case "-openGL":
|
||||
$pref::Video::displayDevice = "OpenGL";
|
||||
$argUsed[%i]++;
|
||||
$argUsed[$i]++;
|
||||
|
||||
case "-directX":
|
||||
$pref::Video::displayDevice = "D3D";
|
||||
$argUsed[%i]++;
|
||||
$argUsed[$i]++;
|
||||
|
||||
case "-autoVideo":
|
||||
$pref::Video::displayDevice = "";
|
||||
$argUsed[%i]++;
|
||||
$argUsed[$i]++;
|
||||
|
||||
case "-prefs":
|
||||
$argUsed[%i]++;
|
||||
$argUsed[$i]++;
|
||||
if ($hasNextArg) {
|
||||
exec($nextArg, true, true);
|
||||
$argUsed[%i+1]++;
|
||||
%i++;
|
||||
$argUsed[$i+1]++;
|
||||
$i++;
|
||||
}
|
||||
else
|
||||
error("Error: Missing Command Line argument. Usage: -prefs <path/script." @ $TorqueScriptFileExtension @ ">");
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
function callGamemodeFunction(%gameModeFuncName, %arg0, %arg1, %arg2, %arg3, %arg4, %arg5, %arg6)
|
||||
{
|
||||
if(%data !$= "")
|
||||
%data = "\""@%data@"\"";
|
||||
|
||||
%activeSceneCount = getSceneCount();
|
||||
|
||||
%hasGameMode = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue