2017-07-18 02:51:48 +00:00
|
|
|
if ( $pref::Shell::lastBackground > 4 )
|
|
|
|
|
$pref::Shell::lastBackground = 0;
|
|
|
|
|
else
|
|
|
|
|
$pref::Shell::lastBackground++;
|
|
|
|
|
|
|
|
|
|
// load default controls:
|
|
|
|
|
exec("scripts/controlDefaults.cs");
|
|
|
|
|
|
|
|
|
|
// override with control settings
|
|
|
|
|
if ( $pref::Input::ActiveConfig !$= "" )
|
|
|
|
|
exec( "prefs/" @ $pref::Input::ActiveConfig @ ".cs", false, true );
|
|
|
|
|
|
|
|
|
|
//exec any user created .cs files found in scripts/autoexec (order is that returned by the OS)
|
|
|
|
|
function loadCustomScripts()
|
|
|
|
|
{
|
|
|
|
|
%path = "scripts/autoexec/*.cs";
|
|
|
|
|
for( %file = findFirstFile( %path ); %file !$= ""; %file = findNextFile( %path ) )
|
|
|
|
|
exec( %file );
|
|
|
|
|
}
|
|
|
|
|
loadCustomScripts();
|
|
|
|
|
|
|
|
|
|
// override settings from autoexec.cs
|
|
|
|
|
exec("autoexec.cs");
|
|
|
|
|
$LoginName = "";
|
|
|
|
|
$LoginPassword = "";
|
|
|
|
|
|
|
|
|
|
//TINMAN hack to add a command line option for starting a bot match...
|
|
|
|
|
if ($CmdLineBotCount !$= "")
|
|
|
|
|
{
|
|
|
|
|
$Host::BotCount = $CmdLineBotCount;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// message.cs is loaded so autoexec can add new message callbacks
|
|
|
|
|
|
|
|
|
|
exec("scripts/message.cs");
|
|
|
|
|
|
|
|
|
|
//function to be called when the game exits
|
|
|
|
|
function onExit()
|
|
|
|
|
{
|
|
|
|
|
IRCClient::quit();
|
|
|
|
|
|
|
|
|
|
echo("exporting pref::* to ClientPrefs.cs");
|
|
|
|
|
export("$pref::*", "prefs/ClientPrefs.cs", False);
|
|
|
|
|
BanList::Export("prefs/banlist.cs");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
exec("scripts/LaunchLanGui.cs");
|
|
|
|
|
exec("scripts/GameGui.cs");
|
|
|
|
|
exec("scripts/ChooseFilterDlg.cs");
|
|
|
|
|
exec("scripts/TrainingGui.cs");
|
|
|
|
|
exec("scripts/webstuff.cs");
|
|
|
|
|
exec("scripts/webforums.cs");
|
|
|
|
|
exec("scripts/webemail.cs");
|
|
|
|
|
exec("scripts/webbrowser.cs");
|
|
|
|
|
exec("scripts/webtest.cs");
|
|
|
|
|
exec("scripts/webnews.cs");
|
|
|
|
|
exec("scripts/weblinks.cs");
|
|
|
|
|
exec("scripts/OptionsDlg.cs");
|
|
|
|
|
exec("scripts/EditChatMenuGui.cs");
|
|
|
|
|
exec("scripts/scoreList.cs");
|
|
|
|
|
exec("scripts/LobbyGui.cs");
|
|
|
|
|
exec("scripts/DebriefGui.cs");
|
|
|
|
|
exec("scripts/commonDialogs.cs");
|
|
|
|
|
exec("scripts/client.cs");
|
|
|
|
|
exec("scripts/server.cs");
|
|
|
|
|
exec("scripts/hud.cs");
|
|
|
|
|
exec("scripts/objectiveHud.cs");
|
|
|
|
|
exec("scripts/vehicles/clientVehicleHud.cs");
|
|
|
|
|
exec("scripts/inventoryHud.cs");
|
|
|
|
|
exec("scripts/chatMenuHud.cs");
|
|
|
|
|
exec("scripts/scoreScreen.cs");
|
|
|
|
|
exec("scripts/loadingGui.cs");
|
|
|
|
|
exec("scripts/helpGuiText.cs");
|
|
|
|
|
exec("scripts/voiceChat.cs");
|
|
|
|
|
exec("scripts/clientTasks.cs");
|
|
|
|
|
exec("scripts/targetManager.cs");
|
|
|
|
|
exec("scripts/gameCanvas.cs");
|
|
|
|
|
exec("scripts/centerPrint.cs");
|
|
|
|
|
exec("scripts/CreditsGui.cs");
|
2017-07-18 02:55:25 +00:00
|
|
|
exec("scripts/ChatGui.cs");
|
2017-07-18 02:51:48 +00:00
|
|
|
|
|
|
|
|
// see if the mission and type are valid
|
|
|
|
|
// if they are they will be assigned into $Host::Map and $Host::MissionType
|
|
|
|
|
if($mission !$= "" && $missionType !$= "")
|
|
|
|
|
validateMissionAndType($mission, $missionType);
|
|
|
|
|
|
|
|
|
|
if($LaunchMode $= "DedicatedServer")
|
|
|
|
|
{
|
|
|
|
|
enableWinConsole(true);
|
|
|
|
|
$Host::Dedicated = true;
|
|
|
|
|
$HostGameType = "Online";
|
|
|
|
|
$ServerName = $Host::GameName;
|
|
|
|
|
$HostGameBotCount = $Host::BotCount;
|
|
|
|
|
setNetPort($Host::Port);
|
|
|
|
|
CreateServer($Host::Map, $Host::MissionType);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
else if($LaunchMode $= "Console")
|
|
|
|
|
{
|
|
|
|
|
enableWinConsole(true);
|
|
|
|
|
$Host::Dedicated = true;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
else if($LaunchMode $= "NavBuild")
|
|
|
|
|
{
|
|
|
|
|
enableWinConsole(true);
|
|
|
|
|
$Host::Dedicated = true;
|
|
|
|
|
$ServerName = $Host::GameName;
|
|
|
|
|
$Host::MissionType = $missionType;
|
|
|
|
|
$Host::Map = $Mission;
|
|
|
|
|
setNetPort($Host::Port);
|
|
|
|
|
CreateServer($Mission, $missionType);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
else if($LaunchMode $= "SpnBuild")
|
|
|
|
|
{
|
|
|
|
|
enableWinConsole(true);
|
|
|
|
|
$Host::Dedicated = true;
|
|
|
|
|
$ServerName = $Host::GameName;
|
|
|
|
|
$Host::MissionType = $missionType;
|
|
|
|
|
$Host::Map = $Mission;
|
|
|
|
|
setNetPort($Host::Port);
|
|
|
|
|
CreateServer($Mission, $missionType);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function recordMovie(%movieName, %fps)
|
|
|
|
|
{
|
|
|
|
|
$timeAdvance = 1000 / %fps;
|
|
|
|
|
$screenGrabThread = schedule("movieGrabScreen(" @ %movieName @ ", 0);", $timeAdvance);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function movieGrabScreen(%movieName, %frameNumber)
|
|
|
|
|
{
|
|
|
|
|
if(%frameNumber < 10)
|
|
|
|
|
%frameNumber = "0" @ %frameNumber;
|
|
|
|
|
if(%frameNumber < 100)
|
|
|
|
|
%frameNumber = "0" @ %frameNumber;
|
|
|
|
|
if(%frameNumber < 1000)
|
|
|
|
|
%frameNumber = "0" @ %frameNumber;
|
|
|
|
|
if(%frameNumber < 10000)
|
|
|
|
|
%frameNumber = "0" @ %frameNumber;
|
|
|
|
|
screenshot(%movieName @ %frameNumber @ ".png");
|
|
|
|
|
$screenGrabThread = schedule("movieGrabScreen(" @ %movieName @ "," @ %frameNumber + 1 @ ");", $timeAdvance);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function stopMovie()
|
|
|
|
|
{
|
|
|
|
|
cancel($screenGrabThread);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function loadGui(%gui)
|
|
|
|
|
{
|
|
|
|
|
exec("gui/" @ %gui @ ".gui");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
exec("scripts/clientAudio.cs");
|
|
|
|
|
exec("gui/guiProfiles.cs");
|
|
|
|
|
exec("scripts/recordings.cs");
|
|
|
|
|
|
|
|
|
|
// tool guis
|
|
|
|
|
loadGui("GuiEditorGui");
|
|
|
|
|
loadGui("consoleDlg");
|
|
|
|
|
loadGui("InspectDlg");
|
|
|
|
|
loadGui("CommonLoadDlg");
|
|
|
|
|
loadGui("CommonSaveDlg");
|
|
|
|
|
loadGui("FrameOverlayGui");
|
|
|
|
|
loadGui("TribeAdminMemberDlg");
|
|
|
|
|
loadGui("TSShowGui");
|
|
|
|
|
loadGui("TSShowLoadDlg");
|
|
|
|
|
loadGui("TSShowMiscDlg");
|
|
|
|
|
loadGui("TSShowThreadControlDlg");
|
|
|
|
|
loadGui("TSShowEditScale");
|
|
|
|
|
loadGui("TSShowLightDlg");
|
|
|
|
|
loadGui("TSShowTransitionDlg");
|
|
|
|
|
loadGui("TSShowTranDurEditDlg");
|
|
|
|
|
loadGui("TSShowDetailControlDlg");
|
|
|
|
|
|
|
|
|
|
// debugger GUI's
|
|
|
|
|
function Debugger()
|
|
|
|
|
{
|
|
|
|
|
if(!$DebuggerLoaded)
|
|
|
|
|
{
|
|
|
|
|
loadGui("debuggerGui");
|
|
|
|
|
loadGui("DebuggerBreakConditionDlg");
|
|
|
|
|
loadGui("DebuggerConnectDlg");
|
|
|
|
|
loadGui("DebuggerEditWatchDlg");
|
|
|
|
|
loadGui("DebuggerWatchDlg");
|
|
|
|
|
loadGui("DebuggerFindDlg");
|
|
|
|
|
exec("scripts/debuggerGui.cs");
|
|
|
|
|
$DebuggerLoaded = true;
|
|
|
|
|
}
|
|
|
|
|
Canvas.setContent(DebuggerGui);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// test GUIs
|
|
|
|
|
loadGui("GuiTestGui");
|
|
|
|
|
|
|
|
|
|
// common shell dialogs:
|
|
|
|
|
loadGui("MessageBoxDlg");
|
|
|
|
|
loadGui("MessagePopupDlg");
|
|
|
|
|
loadGui("ShellLoadFileDlg");
|
|
|
|
|
loadGui("ShellSaveFileDlg");
|
|
|
|
|
|
|
|
|
|
// menus
|
|
|
|
|
loadGui("AddressDlg");
|
|
|
|
|
loadGui("GenDialog");
|
|
|
|
|
loadGui("LaunchGui");
|
|
|
|
|
loadGui("LaunchToolbarDlg");
|
|
|
|
|
loadGui("GameGui");
|
|
|
|
|
loadGui("ChooseFilterDlg");
|
|
|
|
|
loadGui("ServerInfoDlg");
|
|
|
|
|
loadGui("AdvancedHostDlg");
|
|
|
|
|
loadGui("NewWarriorDlg");
|
|
|
|
|
loadGui("JoinChatDlg");
|
|
|
|
|
loadGui("ChannelKeyDlg");
|
2017-07-18 02:55:25 +00:00
|
|
|
loadGui("ChatOptionsDlg");
|
2017-07-18 02:51:48 +00:00
|
|
|
loadGui("ChannelOptionsDlg");
|
|
|
|
|
loadGui("ChannelBanDlg");
|
|
|
|
|
loadGui("FilterEditDlg");
|
|
|
|
|
loadGui("PasswordDlg");
|
|
|
|
|
loadGui("OptionsDlg");
|
|
|
|
|
loadGui("DriverInfoDlg");
|
|
|
|
|
loadGui("RemapDlg");
|
|
|
|
|
loadGui("MouseConfigDlg");
|
|
|
|
|
loadGui("JoystickConfigDlg");
|
|
|
|
|
loadGui("EditChatMenuGui");
|
|
|
|
|
loadGui("EditChatMenuDlg");
|
|
|
|
|
loadGui("EditChatCommandDlg");
|
|
|
|
|
loadGui("ChatGui");
|
|
|
|
|
loadGui("EmailGui");
|
|
|
|
|
loadGui("NewsGui");
|
|
|
|
|
loadGui("NewsPostDlg");
|
|
|
|
|
loadGui("NewsEditMOTDDlg");
|
|
|
|
|
loadGui("EmailBlockDlg");
|
|
|
|
|
loadGui("EmailComposeDlg");
|
|
|
|
|
loadGui("ForumsGui");
|
|
|
|
|
loadGui("ForumsComposeDlg");
|
|
|
|
|
loadGui("TribeAndWarriorBrowserGui");
|
|
|
|
|
loadGui("TribePropertiesDlg");
|
|
|
|
|
loadGui("WarriorPropertiesDlg");
|
|
|
|
|
loadGui("BrowserSearchDlg");
|
|
|
|
|
loadGui("BrowserEditInfoDlg");
|
|
|
|
|
loadGui("CreateTribeDlg");
|
|
|
|
|
loadGui("RecordingsDlg");
|
|
|
|
|
loadGui("TrainingGui");
|
|
|
|
|
loadGui("SinglePlayerEscapeDlg");
|
|
|
|
|
loadGui("LobbyGui");
|
|
|
|
|
loadGui("DebriefGui");
|
|
|
|
|
loadGui("CreditsGui");
|
|
|
|
|
|
|
|
|
|
loadGui("NewMissionGui");
|
|
|
|
|
loadGui("ChatDlg");
|
|
|
|
|
loadGui("PlayGui");
|
|
|
|
|
loadGui("PanoramaGui");
|
|
|
|
|
loadGui("LoadingGui");
|
|
|
|
|
loadGui("TestGui");
|
|
|
|
|
loadGui("BriefingGui");
|
|
|
|
|
|
|
|
|
|
// HUD GUI's:
|
|
|
|
|
loadGui("HUDDlgs");
|
|
|
|
|
|
|
|
|
|
// terraformer GUI's
|
|
|
|
|
loadGui("TerraformerGui");
|
|
|
|
|
loadGui("TerraformerTextureGui");
|
|
|
|
|
loadGui("TerraformerHeightfieldGui");
|
|
|
|
|
loadGui("TerraformerFullScreenGui");
|
|
|
|
|
loadGui("helpTextGui");
|
|
|
|
|
//
|
|
|
|
|
loadGui("InteriorPreviewGui");
|
|
|
|
|
loadGui("InteriorDebug");
|
|
|
|
|
loadGui("EditorGui");
|
|
|
|
|
loadGui("SceneLightingGui");
|
|
|
|
|
loadGui("InspectAddFieldDlg");
|
|
|
|
|
|
|
|
|
|
loadGui("PickTeamDlg");
|
|
|
|
|
|
|
|
|
|
loadGui("DetailSetDlg");
|
|
|
|
|
|
|
|
|
|
loadGui("IHVTest");
|
|
|
|
|
|
|
|
|
|
// Load material properties
|
|
|
|
|
echo("Load Material Properties:");
|
|
|
|
|
exec("textures/badlands/badlandsPropMap.cs");
|
|
|
|
|
exec("textures/desert/desertPropMap.cs");
|
|
|
|
|
exec("textures/ice/icePropMap.cs");
|
|
|
|
|
exec("textures/lava/lavaPropMap.cs");
|
|
|
|
|
exec("textures/lush/lushPropMap.cs");
|
|
|
|
|
|
|
|
|
|
// commander map
|
|
|
|
|
exec("scripts/commanderProfiles.cs");
|
|
|
|
|
exec("scripts/commanderMap.cs");
|
|
|
|
|
exec("scripts/commanderMapHelpText.cs");
|
|
|
|
|
|
|
|
|
|
loadGui(CommanderMapGui);
|
|
|
|
|
loadGui(cmdMapHelpText);
|
|
|
|
|
loadGui(TaskHudDlg);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function frameCounter()
|
|
|
|
|
{
|
|
|
|
|
return " FPS: " @ $fps::real @
|
|
|
|
|
" mspf: " @ 1000 / $fps::real;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function terrMetrics()
|
|
|
|
|
{
|
|
|
|
|
return frameCounter() @
|
|
|
|
|
" L0: " @ $T2::levelZeroCount @
|
|
|
|
|
" FMC: " @ $T2::fullMipCount @
|
|
|
|
|
" DTC: " @ $T2::dynamicTextureCount @
|
|
|
|
|
" UNU: " @ $T2::unusedTextureCount @
|
|
|
|
|
" STC: " @ $T2::staticTextureCount @
|
|
|
|
|
" DTSU: " @ $T2::textureSpaceUsed @
|
|
|
|
|
" STSU: " @ $T2::staticTSU @
|
|
|
|
|
" FRB: " @ $T2::FogRejections;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function triMetrics()
|
|
|
|
|
{
|
|
|
|
|
return frameCounter() @
|
|
|
|
|
" TC: " @ $OpenGL::triCount0 + $OpenGL::triCount1 + $OpenGL::triCount2 + $OpenGL::triCount3 @
|
|
|
|
|
" PC: " @ $OpenGL::primCount0 + $OpenGL::primCount1 + $OpenGL::primCount2 + $OpenGL::primCount3 @
|
|
|
|
|
" T_T: " @ $OpenGL::triCount1 @
|
|
|
|
|
" T_P: " @ $OpenGL::primCount1 @
|
|
|
|
|
" I_T: " @ $OpenGL::triCount2 @
|
|
|
|
|
" I_P: " @ $OpenGL::primCount2 @
|
|
|
|
|
" TS_T: " @ $OpenGL::triCount3 @
|
|
|
|
|
" TS_P: " @ $OpenGL::primCount3 @
|
|
|
|
|
" ?_T: " @ $OpenGL::triCount0 @
|
|
|
|
|
" ?_P: " @ $OpenGL::primCount0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function interiorMetrics()
|
|
|
|
|
{
|
|
|
|
|
return frameCounter() @
|
|
|
|
|
" NTL: " @ $Video::numTexelsLoaded @
|
|
|
|
|
" TRP: " @ $Video::texResidentPercentage @
|
|
|
|
|
" INP: " @ $Metrics::Interior::numPrimitives @
|
|
|
|
|
" INT: " @ $Matrics::Interior::numTexturesUsed @
|
|
|
|
|
" INO: " @ $Metrics::Interior::numInteriors;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function textureMetrics()
|
|
|
|
|
{
|
|
|
|
|
return frameCounter() @
|
|
|
|
|
" NTL: " @ $Video::numTexelsLoaded @
|
|
|
|
|
" TRP: " @ $Video::texResidentPercentage @
|
|
|
|
|
" TCM: " @ $Video::textureCacheMisses;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function waterMetrics()
|
|
|
|
|
{
|
|
|
|
|
return frameCounter() @
|
|
|
|
|
" Tri#: " @ $T2::waterTriCount @
|
|
|
|
|
" Pnt#: " @ $T2::waterPointCount @
|
|
|
|
|
" Hz#: " @ $T2::waterHazePointCount;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function timeMetrics()
|
|
|
|
|
{
|
|
|
|
|
return frameCounter() @ " Time: " @ getSimTime() @ " Mod: " @ getSimTime() % 32;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function vehicleMetrics()
|
|
|
|
|
{
|
|
|
|
|
return frameCounter() @
|
|
|
|
|
" R: " @ $Vehicle::retryCount @
|
|
|
|
|
" C: " @ $Vehicle::searchCount @
|
|
|
|
|
" P: " @ $Vehicle::polyCount @
|
|
|
|
|
" V: " @ $Vehicle::vertexCount;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function audioMetrics()
|
|
|
|
|
{
|
|
|
|
|
return frameCounter() @
|
|
|
|
|
" OH: " @ $Audio::numOpenHandles @
|
|
|
|
|
" OLH: " @ $Audio::numOpenLoopingHandles @
|
|
|
|
|
" OVH: " @ $Audio::numOpenVoiceHandles @
|
|
|
|
|
" AS: " @ $Audio::numActiveStreams @
|
|
|
|
|
" NAS: " @ $Audio::numNullActiveStreams @
|
|
|
|
|
" LAS: " @ $Audio::numActiveLoopingStreams @
|
|
|
|
|
" VAS: " @ $Audio::numActiveVoiceStreams @
|
|
|
|
|
" LS: " @ $Audio::numLoopingStreams @
|
|
|
|
|
" ILS: " @ $Audio::numInactiveLoopingStreams @
|
|
|
|
|
" CLS: " @ $Audio::numCulledLoopingStreams @
|
|
|
|
|
" MEM: " @ $Audio::memUsage @
|
|
|
|
|
" DYN: " @ $Audio::dynamicMemUsage @
|
|
|
|
|
" / " @ $Audio::dynamicMemSize @
|
|
|
|
|
" CNT: " @ $Audio::dynamicBufferCount @
|
|
|
|
|
" / " @ $Audio::bufferCount;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function DebugMetrics()
|
|
|
|
|
{
|
|
|
|
|
return frameCounter() @
|
|
|
|
|
" NTL: " @ $Video::numTexelsLoaded @
|
|
|
|
|
" TRP: " @ $Video::texResidentPercentage @
|
|
|
|
|
" NP: " @ $Metrics::numPrimitives @
|
|
|
|
|
" NT: " @ $Metrics::numTexturesUsed @
|
|
|
|
|
" NO: " @ $Metrics::numObjectsRendered;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function showTerr()
|
|
|
|
|
{
|
|
|
|
|
show("terrMetrics()");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function showTri()
|
|
|
|
|
{
|
|
|
|
|
GLEnableMetrics(true);
|
|
|
|
|
show("triMetrics()");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function showTime()
|
|
|
|
|
{
|
|
|
|
|
show("timeMetrics()");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function showWater()
|
|
|
|
|
{
|
|
|
|
|
show("waterMetrics()");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function showTexture()
|
|
|
|
|
{
|
|
|
|
|
show("textureMetrics()");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function showInterior()
|
|
|
|
|
{
|
|
|
|
|
$fps::virtual = 0;
|
|
|
|
|
$Interior::numPolys = 0;
|
|
|
|
|
$Interior::numTextures = 0;
|
|
|
|
|
$Interior::numTexels = 0;
|
|
|
|
|
$Interior::numLightmaps = 0;
|
|
|
|
|
$Interior::numLumels = 0;
|
|
|
|
|
show("interiorMetrics()");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function showVehicle()
|
|
|
|
|
{
|
|
|
|
|
show("vehicleMetrics()");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function showAudio()
|
|
|
|
|
{
|
|
|
|
|
show("audioMetrics()");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function showDebug()
|
|
|
|
|
{
|
|
|
|
|
show("DebugMetrics()");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function show(%expr)
|
|
|
|
|
{
|
|
|
|
|
if(%expr $= "")
|
|
|
|
|
{
|
|
|
|
|
GLEnableMetrics(false);
|
|
|
|
|
Canvas.popDialog(FrameOverlayGui);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
Canvas.pushDialog(FrameOverlayGui, 1000);
|
|
|
|
|
TextOverlayControl.setValue(%expr);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//showInterior();
|
|
|
|
|
|
|
|
|
|
// check the launch mode:
|
|
|
|
|
|
|
|
|
|
Canvas.setCursor("DefaultCursor");
|
|
|
|
|
|
|
|
|
|
function dumpFile(%fileName)
|
|
|
|
|
{
|
|
|
|
|
%file = new FileObject();
|
|
|
|
|
if(%file.openForRead(%fileName))
|
|
|
|
|
{
|
|
|
|
|
while(!%file.isEOF())
|
|
|
|
|
echo(%file.readLine());
|
|
|
|
|
}
|
|
|
|
|
%file.delete();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function doScreenShot(%val)
|
|
|
|
|
{
|
|
|
|
|
$pref::interior::showdetailmaps = false;
|
|
|
|
|
if(!%val)
|
|
|
|
|
screenShot("screen" @ $screenshotnum++ @ ".png");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// set up the movement action map
|
|
|
|
|
GlobalActionMap.bind(keyboard, "print", doScreenShot);
|
|
|
|
|
GlobalActionMap.bindCmd(keyboard, "alt enter", "", "toggleFullScreen();");
|
|
|
|
|
|
|
|
|
|
// Get the joystick binding functions:
|
|
|
|
|
exec( "scripts/joystickBind.cs" );
|
|
|
|
|
|
|
|
|
|
function clientCMDgetManagerID(%client)
|
|
|
|
|
{
|
|
|
|
|
$client = %client;
|
|
|
|
|
}
|
|
|
|
|
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- //
|
|
|
|
|
|
|
|
|
|
function abs(%val)
|
|
|
|
|
{
|
|
|
|
|
if (%val < 0)
|
|
|
|
|
return %val * -1;
|
|
|
|
|
else
|
|
|
|
|
return %val;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//##############################################################################
|
|
|
|
|
//CreateServer(testmission);
|
|
|
|
|
//LocalConnect(UberBob);
|
|
|
|
|
//##############################################################################
|
|
|
|
|
|
|
|
|
|
function ServerConnectionAccepted()
|
|
|
|
|
{
|
2017-07-18 03:10:36 +00:00
|
|
|
%info = GMJ_Browser.getServerInfoString();
|
|
|
|
|
%desc = "joined a" SPC getField(%info,4) @ " game (" @ getField(%info,3) @ ") on the \"" @ getField(%info,0) @ "\" server.";
|
|
|
|
|
|
|
|
|
|
IRCClient::onJoinGame($JoinGameAddress,%desc);
|
|
|
|
|
|
|
|
|
|
if ( !$pref::Net::CheckEmail )
|
|
|
|
|
CancelEmailCheck();
|
|
|
|
|
|
|
|
|
|
// if($pref::Net::DisconnectChat)
|
|
|
|
|
// IRCClient::quit();
|
|
|
|
|
|
|
|
|
|
Canvas.setContent("LoadingGui");
|
2017-07-18 02:51:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function LocalConnectionAccepted()
|
2017-07-18 03:10:36 +00:00
|
|
|
{
|
|
|
|
|
%desc = $pref::IRCClient::hostmsg;
|
|
|
|
|
|
|
|
|
|
IRCClient::onJoinGame("", %desc);
|
|
|
|
|
|
|
|
|
|
if ( !$pref::Net::CheckEmail )
|
|
|
|
|
CancelEmailCheck();
|
|
|
|
|
|
|
|
|
|
// if($pref::Net::DisconnectChat)
|
|
|
|
|
// IRCClient::quit(); //this is screwed up right now ^^
|
|
|
|
|
|
|
|
|
|
Canvas.setContent("LoadingGui");
|
2017-07-18 02:51:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function DispatchLaunchMode()
|
|
|
|
|
{
|
|
|
|
|
switch$($LaunchMode)
|
|
|
|
|
{
|
|
|
|
|
case "InteriorView":
|
|
|
|
|
if ( isFile( "missions/interiorTest.mis" ) )
|
|
|
|
|
{
|
|
|
|
|
$InteriorArgument = $TestObjectFileName;
|
|
|
|
|
$extension = fileExt( $TestObjectFileName );
|
|
|
|
|
if ( stricmp( $extension, ".dif\"" ) == 0 )
|
|
|
|
|
{
|
|
|
|
|
// Have to adjust for quotes:
|
|
|
|
|
$TestObjectFileName = getSubStr( $TestObjectFileName,
|
|
|
|
|
1, strlen( $TestObjectFileName ) - 2 );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ( getSubStr( $TestObjectFileName, strlen( $TestObjectFileName ) - 6, 1 ) $= "_" )
|
|
|
|
|
{
|
|
|
|
|
// Strip the detail part off...
|
|
|
|
|
$TestObjectFileName = getSubStr( $TestObjectFileName, 0, strlen( $TestObjectFileName ) - 6 ) @ ".dif";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
echo( $TestObjectFileName @ " is the file loaded" );
|
|
|
|
|
|
|
|
|
|
$ServerName = $Host::GameName;
|
|
|
|
|
$Host::TimeLimit = 60;
|
|
|
|
|
CreateServer( "interiorTest", "InteriorTest" );
|
|
|
|
|
localConnect( "TestGuy" );
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
MessageBoxOK( "FILE NOT FOUND", "You do not have the interior test mission in your mission folder.\nTalk to Brad or Tom to get it.", "quit();" );
|
|
|
|
|
case "Connect":
|
2017-07-18 02:55:25 +00:00
|
|
|
OnlineLogIn();
|
2017-07-18 02:51:48 +00:00
|
|
|
setNetPort(0);
|
2017-07-18 02:55:25 +00:00
|
|
|
JoinGame($JoinGameAddress);
|
2017-07-18 02:51:48 +00:00
|
|
|
case "HostGame":
|
|
|
|
|
$ServerName = $Host::GameName;
|
|
|
|
|
$Host::MissionType = $MissionType;
|
|
|
|
|
$Host::Map = $Mission;
|
|
|
|
|
CreateServer($Mission, $MissionType);
|
|
|
|
|
localConnect();
|
|
|
|
|
case "Normal":
|
|
|
|
|
OnlineLogIn();
|
|
|
|
|
case "Offline":
|
|
|
|
|
PlayOffline();
|
|
|
|
|
case "TSShow":
|
|
|
|
|
startShow();
|
|
|
|
|
case "SceneLight":
|
|
|
|
|
CreateServer($Mission);
|
|
|
|
|
localConnect();
|
|
|
|
|
case "Demo":
|
|
|
|
|
LoopDemos();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
v22649 (04/28/01):
- Fixed buddy filter. You can now use the Filter option on the JOIN screen to find games that have players in them that are listed on your buddy list. (Use the Email or Warrior Browser functions to add/remove people from your buddy list.)
- You can now add a player to your server admin lists (so that server admins can auto-admin players when they join a server, if desired). How this is done: If you are a SuperAdmin (owner of the server), you can go into the lobby and right-click on a player's name. You will then have the ability to add them to your Admin or SuperAdmin lists.
- "Vote Spamming" has been prevented in-game.
- Added "quickbuy" keyboard shortcuts to use at vehicle station. (Default keys are the 1-6 number keys. 1 is Wildcat, 6 is Havoc). (NOTE: These key bindings are not currently editable. However, since you are on the vehicle purchase pad when they are in effect, they cannot interfere with any custom keys you've created, so you should have no problems.)
- Moved some of the CD check from script into code, where it should be.
- Missile reticle is improved aesthetically. This is part 1 of 2 of the missile reticle changes. The second part will be in the next patch.
- Team Damage ON/OFF can be changed by Admins/SuperAdmins as well as being voted on by players. If you are an Admin or SuperAdmin, then just go to Lobby and look up where the "Vote" options are listed. There are options there to toggle the Team Damage flag. Regular players can also Vote to Enable/Disable Team Damage in the same spot.
- Default server prefs have been changed so that the default time limit is now 30 minutes (instead of 20) and Team Damage is OFF.
- The "sticking" mouse button problem is now fixed.
- Deployables are now easier to place on walls and other surfaces. There were some inconsistencies on which surfaces could be placed upon and those are now resolved.
- (gameplay change) Flag captures are now worth 100 points, instead of 1 point. Additionally, each time someone grabs the flag *from the enemy flag stand* they will gain 1 point, regardless of whether they actually capture it or not. You will ONLY get this single point if the flag was actually on the flagstand. You will NOT get the point by touching the flag anywhere else on the field. This change will help prevent tie situations and will reward aggressive offensive play. NOTE: The "touch" point can only be gained once every 20 seconds...so a "scrum" around the flag base will not result in a large group of points being gained.
- (gameplay change) Deployable inventory stations can no longer be deployed directly next to each other. They must be at least 20 meters apart in order to be deployed properly.
- (gameplay change) Many team damage fixes occurred. When Team Damage is OFF the following are now true: Friendly teammates are no longer prevented from destroying deployables. The ELF will no longer drain energy from friendly players. If a friendly player blinds another friendly player with Whiteout grenades, then a message is displayed in the Chat HUD so that the blinded person knows who did it. (There are more Team Damage changes coming in the next patch.)
- (gameplay change) Medium now has a standard loadout of 12 grenades in the grenade launcher instead of 10. Light: 10; Medium: 12; Heavy: 15.
- (gameplay change) Deployable pulse sensors now have a range of 150m instead of 120m to make them a more attractive option to deploy.
- (gameplay change) Ejection speed increased slightly to more easily accomodate jumping out of moving vehicles.
- (gameplay change) Siege: Alcatraz. The generators have been moved around a bit. There are two entrances to that base. One is the "front door" and the other is the "back door". (The back door is the one that has a team-pass-only force field blocking enemies from the switch room.) There is now an upper generator down the chute from the "front door" that powers the "back door" force field. Additionally, there is a solar panel outside that powers the base turrets and sentry turrets. None of these generators have to be destroyed to get to the switch, but their destruction makes it MUCH easier to do so. There are four generators total on this map (all are waypointed now), and the destruction of all four is necessary before the base power will go down.
- (gameplay change) Siege: Caldera. The generator has been moved out of the switch room and into the very big main room that has the inventory stations in it. It is no longer necessary to destroy the generators in a particular sequence. Destroying the two main generators (Primary and Secondary) will drop the force field that protects the switch. Both gens must be down in order for the switch force field to drop.
2017-07-18 03:12:56 +00:00
|
|
|
// if($LaunchMode !$= "Demo")
|
|
|
|
|
// VerifyCDCheck(DispatchLaunchMode);
|
|
|
|
|
// else
|
2017-07-18 02:51:48 +00:00
|
|
|
DispatchLaunchMode();
|