diff --git a/SierraUp.cfg b/SierraUp.cfg index de76627..018cf66 100644 --- a/SierraUp.cfg +++ b/SierraUp.cfg @@ -1,7 +1,7 @@ ProductName "Tribes2" DisplayName "Tribes 2" PatchFolder .\patch -CurrentVersion 0.23115.0.0 +CurrentVersion 0.23669.0.0 AutoStart MonitorPatch LaunchExe "tribes2.exe" diff --git a/base/console_end.cs b/base/console_end.cs index 67ee6c6..7710dff 100644 --- a/base/console_end.cs +++ b/base/console_end.cs @@ -37,11 +37,14 @@ exec("scripts/message.cs"); //function to be called when the game exits function onExit() { - IRCClient::quit(); + if ( !isDemo() && !isDemoServer() ) + IRCClient::quit(); echo("exporting pref::* to ClientPrefs.cs"); export("$pref::*", "prefs/ClientPrefs.cs", False); BanList::Export("prefs/banlist.cs"); + if ( $PlayingOnline ) + savePlayerDatabase(); } @@ -80,6 +83,8 @@ exec("scripts/targetManager.cs"); exec("scripts/gameCanvas.cs"); exec("scripts/centerPrint.cs"); exec("scripts/CreditsGui.cs"); +if (isDemo()) + exec("scripts/DemoEndGui.cs"); exec("scripts/ChatGui.cs"); // see if the mission and type are valid @@ -213,6 +218,7 @@ loadGui("GameGui"); loadGui("ChooseFilterDlg"); loadGui("ServerInfoDlg"); loadGui("EnterIPDlg"); +loadGui("FindServerDlg"); loadGui("AdvancedHostDlg"); loadGui("NewWarriorDlg"); loadGui("JoinChatDlg"); @@ -251,6 +257,8 @@ loadGui("SinglePlayerEscapeDlg"); loadGui("LobbyGui"); loadGui("DebriefGui"); loadGui("CreditsGui"); +if (isDemo()) + loadGui("DemoEndGui"); loadGui("MoveThreadDlg"); loadGui("NewMissionGui"); loadGui("ChatDlg"); @@ -523,33 +531,56 @@ function abs(%val) function ServerConnectionAccepted() { - %info = GMJ_Browser.getServerInfoString(); - %desc = "joined a" SPC getField(%info,4) @ " game (" @ getField(%info,3) @ ") on the \"" @ getField(%info,0) @ "\" server."; + if ( !isDemo() && !isDemoServer() ) + { + %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); + IRCClient::onJoinGame($JoinGameAddress,%desc); - if ( !$pref::Net::CheckEmail ) - CancelEmailCheck(); + if ( !$pref::Net::CheckEmail ) + CancelEmailCheck(); -// if($pref::Net::DisconnectChat) -// IRCClient::quit(); + // if($pref::Net::DisconnectChat) + // IRCClient::quit(); + } - Canvas.setContent("LoadingGui"); + checkGotLoadInfo(); } function LocalConnectionAccepted() { - %desc = $pref::IRCClient::hostmsg; + if ( !isDemo() && !isDemoServer() ) + { + %desc = $pref::IRCClient::hostmsg; - IRCClient::onJoinGame("", %desc); + IRCClient::onJoinGame("", %desc); - if ( !$pref::Net::CheckEmail ) - CancelEmailCheck(); + if ( !$pref::Net::CheckEmail ) + CancelEmailCheck(); -// if($pref::Net::DisconnectChat) -// IRCClient::quit(); //this is screwed up right now ^^ + // if($pref::Net::DisconnectChat) + // IRCClient::quit(); //this is screwed up right now ^^ + } - Canvas.setContent("LoadingGui"); + checkGotLoadInfo(); +} + +function checkGotLoadInfo() +{ + if ( LoadingGui.gotLoadInfo ) + Canvas.setContent( LoadingGui ); + else + LoadingGui.checkSchedule = schedule( 500, 0, checkGotLoadInfo ); +} + +function cancelLoadInfoCheck() +{ + if ( LoadingGui.checkSchedule ) + { + cancel( LoadingGui.checkSchedule ); + LoadingGui.checkSchedule = ""; + } } function DispatchLaunchMode() diff --git a/base/gui/AdvancedHostDlg.gui b/base/gui/AdvancedHostDlg.gui index 4e6b231..9ce766b 100644 --- a/base/gui/AdvancedHostDlg.gui +++ b/base/gui/AdvancedHostDlg.gui @@ -7,16 +7,20 @@ new GuiControl(AdvancedHostDlg) { extent = "640 480"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; new ShellPaneCtrl() { profile = "ShellDlgPaneProfile"; horizSizing = "center"; vertSizing = "center"; - position = "70 30"; - extent = "500 420"; + position = "50 30"; + extent = "540 420"; minExtent = "48 92"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "ADVANCED HOST OPTIONS"; maxLength = "255"; @@ -26,10 +30,12 @@ new GuiControl(AdvancedHostDlg) { profile = "ShellTextRightProfile"; horizSizing = "right"; vertSizing = "bottom"; - position = "88 40"; + position = "114 40"; extent = "40 22"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "Port:"; maxLength = "255"; @@ -38,24 +44,30 @@ new GuiControl(AdvancedHostDlg) { profile = "NewTextEditNumericProfile"; horizSizing = "right"; vertSizing = "bottom"; - position = "124 32"; + position = "150 32"; extent = "98 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; maxLength = "8"; historySize = "0"; password = "0"; + tabComplete = "0"; + deniedSound = "InputDeniedSound"; glowOffset = "9 9"; }; new GuiTextCtrl() { profile = "ShellTextRightProfile"; horizSizing = "right"; vertSizing = "bottom"; - position = "223 40"; + position = "249 40"; extent = "64 22"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "Time Limit:"; maxLength = "255"; @@ -64,24 +76,30 @@ new GuiControl(AdvancedHostDlg) { profile = "NewTextEditNumericProfile"; horizSizing = "right"; vertSizing = "bottom"; - position = "283 32"; + position = "309 32"; extent = "68 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; maxLength = "3"; historySize = "0"; password = "0"; + tabComplete = "0"; + deniedSound = "InputDeniedSound"; glowOffset = "9 9"; }; new GuiTextCtrl() { profile = "ShellTextProfile"; horizSizing = "right"; vertSizing = "bottom"; - position = "349 40"; + position = "375 40"; extent = "41 22"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "Minutes"; maxLength = "255"; @@ -90,10 +108,12 @@ new GuiControl(AdvancedHostDlg) { profile = "ShellTextRightProfile"; horizSizing = "right"; vertSizing = "bottom"; - position = "97 70"; + position = "123 70"; extent = "110 22"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "Admin Password:"; maxLength = "255"; @@ -102,60 +122,86 @@ new GuiControl(AdvancedHostDlg) { profile = "NewTextEditProfile"; horizSizing = "right"; vertSizing = "bottom"; - position = "203 62"; + position = "229 62"; extent = "180 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; maxLength = "16"; historySize = "0"; password = "0"; + tabComplete = "0"; + deniedSound = "InputDeniedSound"; glowOffset = "9 9"; }; new ShellToggleButton(AH_DedicatedTgl) { profile = "ShellRadioProfile"; horizSizing = "right"; vertSizing = "bottom"; - position = "82 106"; + position = "94 106"; extent = "150 30"; minExtent = "26 27"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "DEDICATED"; maxLength = "255"; }; - new ShellToggleButton(AH_AdminVoteTgl) { + new ShellToggleButton(AH_PureServerTgl) { profile = "ShellRadioProfile"; horizSizing = "right"; vertSizing = "bottom"; - position = "268 106"; + position = "296 106"; extent = "150 30"; minExtent = "26 27"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; - text = "ALLOW ADMIN VOTES"; + text = "PURE SERVER"; maxLength = "255"; }; new ShellToggleButton(AH_TournamentTgl) { profile = "ShellRadioProfile"; horizSizing = "right"; vertSizing = "bottom"; - position = "82 136"; + position = "32 136"; extent = "150 30"; minExtent = "26 27"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "TOURNAMENT MODE"; maxLength = "255"; }; + new ShellToggleButton(AH_AdminVoteTgl) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "195 136"; + extent = "150 30"; + minExtent = "26 27"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "ALLOW ADMIN VOTES"; + maxLength = "255"; + }; new ShellToggleButton(AH_AllowSmurfTgl) { profile = "ShellRadioProfile"; horizSizing = "right"; vertSizing = "bottom"; - position = "268 136"; + position = "358 136"; extent = "150 30"; minExtent = "26 27"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "ALLOW ALIASES"; maxLength = "255"; @@ -164,10 +210,12 @@ new GuiControl(AdvancedHostDlg) { profile = "ShellTextProfile"; horizSizing = "right"; vertSizing = "bottom"; - position = "62 174"; + position = "79 174"; extent = "114 22"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "Vote Pass Percentage:"; maxLength = "255"; @@ -176,10 +224,12 @@ new GuiControl(AdvancedHostDlg) { profile = "ShellAltTextProfile"; horizSizing = "right"; vertSizing = "bottom"; - position = "181 175"; + position = "198 175"; extent = "29 20"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "60%"; maxLength = "255"; @@ -188,10 +238,12 @@ new GuiControl(AdvancedHostDlg) { profile = "ShellSliderProfile"; horizSizing = "right"; vertSizing = "bottom"; - position = "72 189"; + position = "89 189"; extent = "170 24"; minExtent = "12 24"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; variable = "value"; altCommand = "AH_VotePassText.update();"; helpTag = "0"; @@ -204,10 +256,12 @@ new GuiControl(AdvancedHostDlg) { profile = "ShellTextProfile"; horizSizing = "right"; vertSizing = "bottom"; - position = "62 214"; + position = "79 214"; extent = "54 22"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "Vote Time:"; maxLength = "255"; @@ -216,10 +270,12 @@ new GuiControl(AdvancedHostDlg) { profile = "ShellAltTextProfile"; horizSizing = "right"; vertSizing = "bottom"; - position = "121 215"; + position = "138 215"; extent = "69 20"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "20 seconds"; maxLength = "255"; @@ -228,10 +284,12 @@ new GuiControl(AdvancedHostDlg) { profile = "ShellSliderProfile"; horizSizing = "right"; vertSizing = "bottom"; - position = "72 229"; + position = "89 229"; extent = "170 24"; minExtent = "12 24"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; variable = "value"; altCommand = "AH_VoteTimeText.update();"; helpTag = "0"; @@ -244,10 +302,12 @@ new GuiControl(AdvancedHostDlg) { profile = "ShellTextProfile"; horizSizing = "right"; vertSizing = "bottom"; - position = "260 175"; + position = "277 175"; extent = "93 22"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "Observer Timeout:"; maxLength = "255"; @@ -256,10 +316,12 @@ new GuiControl(AdvancedHostDlg) { profile = "ShellAltTextProfile"; horizSizing = "right"; vertSizing = "bottom"; - position = "358 176"; + position = "375 176"; extent = "69 20"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "30 seconds"; maxLength = "255"; @@ -268,10 +330,12 @@ new GuiControl(AdvancedHostDlg) { profile = "ShellSliderProfile"; horizSizing = "right"; vertSizing = "bottom"; - position = "270 190"; + position = "287 190"; extent = "170 24"; minExtent = "12 24"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; variable = "value"; altCommand = "AH_RespawnText.update();"; helpTag = "0"; @@ -284,10 +348,12 @@ new GuiControl(AdvancedHostDlg) { profile = "ShellTextProfile"; horizSizing = "right"; vertSizing = "bottom"; - position = "260 215"; + position = "277 215"; extent = "72 22"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "Warmup Time:"; maxLength = "255"; @@ -296,10 +362,12 @@ new GuiControl(AdvancedHostDlg) { profile = "ShellAltTextProfile"; horizSizing = "right"; vertSizing = "bottom"; - position = "337 216"; + position = "354 216"; extent = "69 20"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "30 seconds"; maxLength = "255"; @@ -308,10 +376,12 @@ new GuiControl(AdvancedHostDlg) { profile = "ShellSliderProfile"; horizSizing = "right"; vertSizing = "bottom"; - position = "270 230"; + position = "287 230"; extent = "170 24"; minExtent = "12 24"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; variable = "value"; altCommand = "AH_WarmupText.update();"; helpTag = "0"; @@ -324,22 +394,26 @@ new GuiControl(AdvancedHostDlg) { profile = "ShellTextProfile"; horizSizing = "right"; vertSizing = "top"; - position = "123 262"; + position = "143 262"; extent = "58 22"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; text = "Server Info:"; maxLength = "255"; }; new ShellScrollCtrl() { profile = "NewScrollCtrlProfile"; - horizSizing = "right"; + horizSizing = "center"; vertSizing = "top"; - position = "120 275"; + position = "140 275"; extent = "260 85"; minExtent = "24 52"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; willFirstRespond = "1"; hScrollBar = "alwaysOff"; @@ -357,6 +431,8 @@ new GuiControl(AdvancedHostDlg) { extent = "230 71"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; new GuiMLTextEditCtrl(AH_ServerInfo) { @@ -367,10 +443,13 @@ new GuiControl(AdvancedHostDlg) { extent = "230 71"; minExtent = "8 8"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; helpTag = "0"; lineSpacing = "2"; allowColorChars = "0"; maxChars = "-1"; + deniedSound = "InputDeniedSound"; }; }; }; @@ -378,10 +457,12 @@ new GuiControl(AdvancedHostDlg) { profile = "ShellButtonProfile"; horizSizing = "right"; vertSizing = "top"; - position = "74 365"; - extent = "140 38"; + position = "95 365"; + extent = "128 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "Canvas.popDialog( AdvancedHostDlg );"; accelerator = "escape"; helpTag = "0"; @@ -392,10 +473,12 @@ new GuiControl(AdvancedHostDlg) { profile = "ShellButtonProfile"; horizSizing = "right"; vertSizing = "top"; - position = "287 365"; - extent = "140 38"; + position = "317 365"; + extent = "128 38"; minExtent = "32 38"; visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; command = "AdvancedHostDlg.Accept();"; helpTag = "0"; text = "SAVE"; diff --git a/base/gui/EmailComposeDlg.gui b/base/gui/EmailComposeDlg.gui index f4798c5..ae62441 100644 --- a/base/gui/EmailComposeDlg.gui +++ b/base/gui/EmailComposeDlg.gui @@ -10,12 +10,14 @@ new GuiControl(EMailComposeDlg) { hideCursor = "0"; bypassHideCursor = "0"; helpTag = "0"; + state = "done"; + key = "6"; new ShellWindowCtrl(EmailComposeWindow) { profile = "ShellWindowProfile"; horizSizing = "right"; vertSizing = "bottom"; - position = "67 37"; + position = "77 37"; extent = "500 408"; minExtent = "386 230"; visible = "1"; @@ -32,7 +34,7 @@ new GuiControl(EMailComposeDlg) { canClose = "1"; closeCommand = "EmailComposeDlg.Cancel();"; - new ShellTextEditCtrl(Email_ToEdit) { + new ShellTextEditCtrl(Email_TOEdit) { profile = "NewTextEditProfile"; horizSizing = "width"; vertSizing = "bottom"; @@ -42,16 +44,15 @@ new GuiControl(EMailComposeDlg) { visible = "1"; hideCursor = "0"; bypassHideCursor = "0"; - variable = "$EmailToAddress"; helpTag = "0"; - maxLength = "2000"; + maxLength = "2001"; historySize = "0"; password = "0"; tabComplete = "0"; deniedSound = "InputDeniedSound"; glowOffset = "9 9"; }; - new ShellTextEditCtrl(EMail_CCEdit) { + new ShellTextEditCtrl(Email_CCEdit) { profile = "NewTextEditProfile"; horizSizing = "width"; vertSizing = "bottom"; @@ -61,9 +62,8 @@ new GuiControl(EMailComposeDlg) { visible = "1"; hideCursor = "0"; bypassHideCursor = "0"; - variable = "$EmailCCAddress"; helpTag = "0"; - maxLength = "2000"; + maxLength = "2001"; historySize = "0"; password = "0"; tabComplete = "0"; diff --git a/base/gui/FindServerDlg.gui b/base/gui/FindServerDlg.gui new file mode 100644 index 0000000..85aeb94 --- /dev/null +++ b/base/gui/FindServerDlg.gui @@ -0,0 +1,111 @@ +//--- OBJECT WRITE BEGIN --- +new GuiControl(FindServerDlg) { + profile = "DlgBackProfile"; + horizSizing = "width"; + vertSizing = "height"; + position = "0 0"; + extent = "640 480"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + + new ShellPaneCtrl() { + profile = "ShellDlgPaneProfile"; + horizSizing = "center"; + vertSizing = "center"; + position = "155 156"; + extent = "330 167"; + minExtent = "48 92"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "FIND SERVER"; + maxLength = "255"; + noTitleBar = "0"; + + new GuiTextCtrl() { + profile = "ShellTextRightProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "20 45"; + extent = "75 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Find Text:"; + maxLength = "255"; + }; + new ShellTextEditCtrl(FS_SearchPattern) { + profile = "NewTextEditProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "91 36"; + extent = "205 38"; + minExtent = "32 38"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + command = "FS_SearchPattern.validate();"; + altCommand = "FindServerDlg::onGo();"; + helpTag = "0"; + maxLength = "24"; + historySize = "5"; + password = "0"; + tabComplete = "0"; + deniedSound = "InputDeniedSound"; + glowOffset = "9 9"; + }; + new ShellToggleButton() { + profile = "ShellRadioProfile"; + horizSizing = "center"; + vertSizing = "bottom"; + position = "85 76"; + extent = "160 30"; + minExtent = "26 27"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "$pref::ServerBrowser::IgnoreCase"; + helpTag = "0"; + text = "IGNORE CASE"; + maxLength = "255"; + }; + new ShellBitmapButton() { + profile = "ShellButtonProfile"; + horizSizing = "right"; + vertSizing = "top"; + position = "43 112"; + extent = "100 38"; + minExtent = "32 38"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + command = "Canvas.popDialog( FindServerDlg );"; + accelerator = "escape"; + helpTag = "0"; + text = "CANCEL"; + simpleStyle = "0"; + }; + new ShellBitmapButton(FS_GoBtn) { + profile = "ShellButtonProfile"; + horizSizing = "right"; + vertSizing = "top"; + position = "187 112"; + extent = "100 38"; + minExtent = "32 38"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + command = "FindServerDlg.onGo();"; + helpTag = "0"; + text = "GO"; + simpleStyle = "0"; + }; + }; +}; +//--- OBJECT WRITE END --- diff --git a/base/gui/GuiEditorGui.gui b/base/gui/GuiEditorGui.gui index 1ed3898..5eb4fe5 100644 --- a/base/gui/GuiEditorGui.gui +++ b/base/gui/GuiEditorGui.gui @@ -431,4 +431,5 @@ function GuiEditor::onSelect(%this, %ctrl) GuiEditorInspectName.setValue(%ctrl.getName()); } -GlobalActionMap.bind(keyboard, "alt f1", GuiEdit); +if (!isDemo()) + GlobalActionMap.bind(keyboard, "alt f1", GuiEdit); diff --git a/base/gui/OptionsDlg.gui b/base/gui/OptionsDlg.gui index de68bba..1fe4bf5 100644 --- a/base/gui/OptionsDlg.gui +++ b/base/gui/OptionsDlg.gui @@ -1,2439 +1,2458 @@ //--- OBJECT WRITE BEGIN --- new GuiControl(OptionsDlg) { - profile = "DlgBackProfile"; - horizSizing = "width"; - vertSizing = "height"; - position = "0 0"; - extent = "640 480"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - pane = "VIDEO"; + profile = "DlgBackProfile"; + horizSizing = "width"; + vertSizing = "height"; + position = "0 0"; + extent = "640 480"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + pane = "VIDEO"; - new ShellPaneCtrl() { - profile = "ShellDlgPaneProfile"; - horizSizing = "center"; - vertSizing = "center"; - position = "20 30"; - extent = "600 420"; - minExtent = "48 92"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "SETTINGS"; - maxLength = "255"; - noTitleBar = "0"; + new ShellPaneCtrl() { + profile = "ShellDlgPaneProfile"; + horizSizing = "center"; + vertSizing = "center"; + position = "20 30"; + extent = "600 420"; + minExtent = "48 92"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "SETTINGS"; + maxLength = "255"; + noTitleBar = "0"; - new ShellBitmapButton() { - profile = "ShellButtonProfile"; - horizSizing = "right"; - vertSizing = "top"; - position = "34 362"; - extent = "82 38"; - minExtent = "32 38"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - command = "Canvas.popDialog(OptionsDlg);"; - helpTag = "0"; - text = "DONE"; - simpleStyle = "0"; - }; - new ShellTabButton(OP_VideoTab) { - profile = "ShellTabProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "19 46"; - extent = "108 38"; - minExtent = "48 38"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - command = "OptionsDlg.setPane(Video);"; - helpTag = "0"; - text = "VIDEO"; - maxLength = "255"; - simpleStyle = "0"; - }; - new ShellTabButton(OP_GraphicsTab) { - profile = "ShellTabProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "19 76"; - extent = "108 38"; - minExtent = "48 38"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - command = "OptionsDlg.setPane(Graphics);"; - helpTag = "0"; - text = "GRAPHICS"; - maxLength = "255"; - simpleStyle = "0"; - }; - new ShellTabButton(OP_TexturesTab) { - profile = "ShellTabProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "19 106"; - extent = "108 38"; - minExtent = "48 38"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - command = "OptionsDlg.setPane(Textures);"; - helpTag = "0"; - text = "TEXTURES"; - maxLength = "255"; - simpleStyle = "0"; - }; - new ShellTabButton(OP_SoundTab) { - profile = "ShellTabProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "19 136"; - extent = "108 38"; - minExtent = "48 38"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - command = "OptionsDlg.setPane(Sound);"; - helpTag = "0"; - text = "SOUND"; - maxLength = "255"; - simpleStyle = "0"; - }; - new ShellTabButton(OP_VoiceTab) { - profile = "ShellTabProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "19 166"; - extent = "108 38"; - minExtent = "48 38"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - command = "OptionsDlg.setPane(Voice);"; - helpTag = "0"; - text = "VOICE"; - maxLength = "255"; - simpleStyle = "0"; - }; - new ShellTabButton(OP_ControlsTab) { - profile = "ShellTabProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "19 196"; - extent = "108 38"; - minExtent = "48 38"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - command = "OptionsDlg.setPane(Controls);"; - helpTag = "0"; - text = "CONTROLS"; - maxLength = "255"; - simpleStyle = "0"; - }; - new ShellTabButton(OP_NetworkTab) { - profile = "ShellTabProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "19 226"; - extent = "108 38"; - minExtent = "48 38"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - command = "OptionsDlg.setPane(Network);"; - helpTag = "0"; - text = "NETWORK"; - maxLength = "255"; - simpleStyle = "0"; - }; - new ShellTabButton(OP_GameTab) { - profile = "ShellTabProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "19 256"; - extent = "108 38"; - minExtent = "48 38"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - command = "OptionsDlg.setPane(Game);"; - helpTag = "0"; - text = "GAME"; - maxLength = "255"; - simpleStyle = "0"; - }; - new ShellTabFrame() { - profile = "ShellTabFrameProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "127 31"; - extent = "254 368"; - minExtent = "254 26"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - isVertical = "1"; - useCloseButton = "0"; - edgeInset = "0"; - }; - new ShellFieldCtrl(OP_VideoPane) { - profile = "ShellFieldProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "138 42"; - extent = "437 346"; - minExtent = "16 18"; - visible = "0"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; + new ShellBitmapButton() { + profile = "ShellButtonProfile"; + horizSizing = "right"; + vertSizing = "top"; + position = "34 362"; + extent = "82 38"; + minExtent = "32 38"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + command = "Canvas.popDialog(OptionsDlg);"; + helpTag = "0"; + text = "DONE"; + simpleStyle = "0"; + }; + new ShellTabButton(OP_VideoTab) { + profile = "ShellTabProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "19 46"; + extent = "108 38"; + minExtent = "48 38"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + command = "OptionsDlg.setPane(Video);"; + helpTag = "0"; + text = "VIDEO"; + maxLength = "255"; + simpleStyle = "0"; + }; + new ShellTabButton(OP_GraphicsTab) { + profile = "ShellTabProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "19 76"; + extent = "108 38"; + minExtent = "48 38"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + command = "OptionsDlg.setPane(Graphics);"; + helpTag = "0"; + text = "GRAPHICS"; + maxLength = "255"; + simpleStyle = "0"; + }; + new ShellTabButton(OP_TexturesTab) { + profile = "ShellTabProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "19 106"; + extent = "108 38"; + minExtent = "48 38"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + command = "OptionsDlg.setPane(Textures);"; + helpTag = "0"; + text = "TEXTURES"; + maxLength = "255"; + simpleStyle = "0"; + }; + new ShellTabButton(OP_SoundTab) { + profile = "ShellTabProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "19 136"; + extent = "108 38"; + minExtent = "48 38"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + command = "OptionsDlg.setPane(Sound);"; + helpTag = "0"; + text = "SOUND"; + maxLength = "255"; + simpleStyle = "0"; + }; + new ShellTabButton(OP_VoiceTab) { + profile = "ShellTabProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "19 166"; + extent = "108 38"; + minExtent = "48 38"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + command = "OptionsDlg.setPane(Voice);"; + helpTag = "0"; + text = "VOICE"; + maxLength = "255"; + simpleStyle = "0"; + }; + new ShellTabButton(OP_ControlsTab) { + profile = "ShellTabProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "19 196"; + extent = "108 38"; + minExtent = "48 38"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + command = "OptionsDlg.setPane(Controls);"; + helpTag = "0"; + text = "CONTROLS"; + maxLength = "255"; + simpleStyle = "0"; + }; + new ShellTabButton(OP_NetworkTab) { + profile = "ShellTabProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "19 226"; + extent = "108 38"; + minExtent = "48 38"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + command = "OptionsDlg.setPane(Network);"; + helpTag = "0"; + text = "NETWORK"; + maxLength = "255"; + simpleStyle = "0"; + }; + new ShellTabButton(OP_GameTab) { + profile = "ShellTabProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "19 256"; + extent = "108 38"; + minExtent = "48 38"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + command = "OptionsDlg.setPane(Game);"; + helpTag = "0"; + text = "GAME"; + maxLength = "255"; + simpleStyle = "0"; + }; + new ShellTabFrame() { + profile = "ShellTabFrameProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "127 31"; + extent = "254 368"; + minExtent = "254 26"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + isVertical = "1"; + useCloseButton = "0"; + edgeInset = "0"; + }; + new ShellFieldCtrl(OP_VideoPane) { + profile = "ShellFieldProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "138 42"; + extent = "437 346"; + minExtent = "16 18"; + visible = "0"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; - new GuiTextCtrl() { - profile = "ShellTextRightProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "2 16"; - extent = "100 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Video Driver:"; - maxLength = "255"; - }; - new ShellPopupMenu(OP_VideoDriverMenu) { - profile = "ShellPopupProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "99 7"; - extent = "140 36"; - minExtent = "49 36"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Select Driver"; - maxLength = "255"; - maxPopupHeight = "200"; - buttonBitmap = "gui/shll_pulldown"; - rolloverBarBitmap = "gui/shll_pulldownbar_rol"; - selectedBarBitmap = "gui/shll_pulldownbar_act"; - noButtonStyle = "0"; - }; - new GuiTextCtrl() { - profile = "ShellTextRightProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "2 54"; - extent = "100 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Resolution:"; - maxLength = "255"; - }; - new ShellPopupMenu(OP_ResMenu) { - profile = "ShellPopupProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "99 45"; - extent = "140 36"; - minExtent = "49 36"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Select Resolution"; - maxLength = "255"; - maxPopupHeight = "200"; - buttonBitmap = "gui/shll_pulldown"; - rolloverBarBitmap = "gui/shll_pulldownbar_rol"; - selectedBarBitmap = "gui/shll_pulldownbar_act"; - noButtonStyle = "0"; - }; - new GuiTextCtrl() { - profile = "ShellTextRightProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "2 92"; - extent = "100 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Bit Depth:"; - maxLength = "255"; - }; - new ShellPopupMenu(OP_BPPMenu) { - profile = "ShellPopupProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "99 83"; - extent = "140 36"; - minExtent = "49 36"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Default"; - maxLength = "255"; - maxPopupHeight = "200"; - buttonBitmap = "gui/shll_pulldown"; - rolloverBarBitmap = "gui/shll_pulldownbar_rol"; - selectedBarBitmap = "gui/shll_pulldownbar_act"; - noButtonStyle = "0"; - }; - new ShellToggleButton(OP_FullScreenTgl) { - profile = "ShellRadioProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "102 125"; - extent = "127 30"; - minExtent = "26 27"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "FULL SCREEN"; - maxLength = "255"; - }; - new ShellBitmapButton(OP_ApplyBtn) { - profile = "ShellButtonProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "275 176"; - extent = "128 38"; - minExtent = "32 38"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - command = "OptionsDlg.applyGraphicChanges();"; - helpTag = "0"; - text = "APPLY CHANGES"; - simpleStyle = "0"; - }; - new ShellBitmapButton() { - profile = "ShellButtonProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "275 8"; - extent = "128 38"; - minExtent = "32 38"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - command = "Canvas.pushDialog(DriverInfoDlg);"; - helpTag = "0"; - text = "DRIVER INFO"; - simpleStyle = "0"; - }; - new ShellToggleButton(OP_VSyncTgl) { - profile = "ShellRadioProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "133 243"; - extent = "170 30"; - minExtent = "26 27"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "DISABLE VERTICAL SYNC"; - maxLength = "255"; - }; - }; - new ShellFieldCtrl(OP_GraphicsPane) { - profile = "ShellFieldProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "138 42"; - extent = "437 346"; - minExtent = "16 18"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; + new GuiTextCtrl() { + profile = "ShellTextRightProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "2 16"; + extent = "100 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Video Driver:"; + maxLength = "255"; + }; + new ShellPopupMenu(OP_VideoDriverMenu) { + profile = "ShellPopupProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "99 7"; + extent = "140 36"; + minExtent = "49 36"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Select Driver"; + maxLength = "255"; + maxPopupHeight = "200"; + buttonBitmap = "gui/shll_pulldown"; + rolloverBarBitmap = "gui/shll_pulldownbar_rol"; + selectedBarBitmap = "gui/shll_pulldownbar_act"; + noButtonStyle = "0"; + }; + new GuiTextCtrl() { + profile = "ShellTextRightProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "2 54"; + extent = "100 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Resolution:"; + maxLength = "255"; + }; + new ShellPopupMenu(OP_ResMenu) { + profile = "ShellPopupProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "99 45"; + extent = "140 36"; + minExtent = "49 36"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Select Resolution"; + maxLength = "255"; + maxPopupHeight = "200"; + buttonBitmap = "gui/shll_pulldown"; + rolloverBarBitmap = "gui/shll_pulldownbar_rol"; + selectedBarBitmap = "gui/shll_pulldownbar_act"; + noButtonStyle = "0"; + }; + new GuiTextCtrl() { + profile = "ShellTextRightProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "2 92"; + extent = "100 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Bit Depth:"; + maxLength = "255"; + }; + new ShellPopupMenu(OP_BPPMenu) { + profile = "ShellPopupProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "99 83"; + extent = "140 36"; + minExtent = "49 36"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Default"; + maxLength = "255"; + maxPopupHeight = "200"; + buttonBitmap = "gui/shll_pulldown"; + rolloverBarBitmap = "gui/shll_pulldownbar_rol"; + selectedBarBitmap = "gui/shll_pulldownbar_act"; + noButtonStyle = "0"; + }; + new ShellToggleButton(OP_FullScreenTgl) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "102 125"; + extent = "127 30"; + minExtent = "26 27"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "FULL SCREEN"; + maxLength = "255"; + }; + new ShellBitmapButton(OP_ApplyBtn) { + profile = "ShellButtonProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "275 176"; + extent = "128 38"; + minExtent = "32 38"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + command = "OptionsDlg.applyGraphicChanges();"; + helpTag = "0"; + text = "APPLY CHANGES"; + simpleStyle = "0"; + }; + new ShellBitmapButton() { + profile = "ShellButtonProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "275 8"; + extent = "128 38"; + minExtent = "32 38"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + command = "Canvas.pushDialog(DriverInfoDlg);"; + helpTag = "0"; + text = "DRIVER INFO"; + simpleStyle = "0"; + }; + new ShellToggleButton(OP_VSyncTgl) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "133 243"; + extent = "170 30"; + minExtent = "26 27"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "DISABLE VERTICAL SYNC"; + maxLength = "255"; + }; + }; + new ShellFieldCtrl(OP_GraphicsPane) { + profile = "ShellFieldProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "138 42"; + extent = "437 346"; + minExtent = "16 18"; + visible = "0"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; - new GuiTextCtrl() { - profile = "ShellTextProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "231 6"; - extent = "97 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Gamma Correction:"; - maxLength = "255"; - }; - new ShellSliderCtrl(OP_GammaSlider) { - profile = "ShellSliderProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "241 21"; - extent = "170 24"; - minExtent = "12 24"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "value"; - altCommand = "updateGammaCorrection();"; - helpTag = "0"; - range = "0.000000 1.000000"; - ticks = "1000"; - value = "0.903509"; - usePlusMinus = "1"; - }; - new GuiTextCtrl() { - profile = "ShellTextProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "26 6"; - extent = "72 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Terrain Detail:"; - maxLength = "255"; - }; - new ShellSliderCtrl(OP_TerrainSlider) { - profile = "ShellSliderProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "36 21"; - extent = "170 24"; - minExtent = "12 24"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "value"; - command = "updateTerrainDetail();"; - helpTag = "0"; - range = "0.000000 25.000000"; - ticks = "26"; - value = "17"; - usePlusMinus = "1"; - }; - new GuiTextCtrl() { - profile = "ShellTextProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "231 44"; - extent = "67 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Shape Detail:"; - maxLength = "255"; - }; - new ShellSliderCtrl(OP_ShapeSlider) { - profile = "ShellSliderProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "241 59"; - extent = "170 24"; - minExtent = "12 24"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "value"; - helpTag = "0"; - range = "0.000000 1.000000"; - ticks = "19"; - value = "1"; - usePlusMinus = "1"; - }; - new GuiTextCtrl() { - profile = "ShellTextProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "27 44"; - extent = "77 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Shadow Detail:"; - maxLength = "255"; - }; - new ShellSliderCtrl(OP_ShadowSlider) { - profile = "ShellSliderProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "37 59"; - extent = "170 24"; - minExtent = "12 24"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "value"; - helpTag = "0"; - range = "0.000000 1.000000"; - ticks = "1000"; - value = "0.5"; - usePlusMinus = "1"; - }; - new GuiTextCtrl() { - profile = "ShellTextProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "27 82"; - extent = "72 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Interior Detail:"; - maxLength = "255"; - }; - new ShellSliderCtrl(OP_InteriorDetailSlider) { - profile = "ShellSliderProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "37 97"; - extent = "170 24"; - minExtent = "12 24"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "value"; - helpTag = "0"; - range = "0.300000 1.000000"; - ticks = "1000"; - value = "0.82193"; - usePlusMinus = "1"; - }; - new GuiTextCtrl() { - profile = "ShellTextProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "231 82"; - extent = "85 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Visible Distance:"; - maxLength = "255"; - }; - new ShellSliderCtrl(OP_VisibleDistanceSlider) { - profile = "ShellSliderProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "241 97"; - extent = "170 24"; - minExtent = "12 24"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "value"; - helpTag = "0"; - range = "0.600000 1.000000"; - ticks = "400"; - value = "1"; - usePlusMinus = "1"; - }; - new GuiTextCtrl() { - profile = "ShellTextProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "27 120"; - extent = "84 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Particle Density:"; - maxLength = "255"; - }; - new ShellSliderCtrl(OP_ParticleDensitySlider) { - profile = "ShellSliderProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "37 135"; - extent = "170 24"; - minExtent = "12 24"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "value"; - helpTag = "0"; - range = "0.000000 3.000000"; - ticks = "1000"; - value = "1"; - usePlusMinus = "1"; - }; - new GuiTextCtrl(OP_DynamicLightText) { - profile = "ShellTextProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "231 120"; - extent = "108 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Dynamic Light Visible Distance:"; - maxLength = "255"; - }; - new GuiTextCtrl(OP_DynamicLightText_Disabled) { - profile = "DisabledTextProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "231 120"; - extent = "108 22"; - minExtent = "8 8"; - visible = "0"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Dynamic Light Visible Distance:"; - maxLength = "255"; - }; - new ShellSliderCtrl(OP_DynamicLightSlider) { - profile = "ShellSliderProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "241 135"; - extent = "170 24"; - minExtent = "12 24"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "value"; - helpTag = "0"; - range = "0.000000 100.000000"; - ticks = "100"; - value = "75"; - usePlusMinus = "1"; - }; - new GuiTextCtrl() { - profile = "ShellTextRightProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "79 168"; - extent = "70 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Sky Detail:"; - maxLength = "255"; - }; - new ShellPopupMenu(OP_SkyDetailMenu) { - profile = "ShellPopupProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "146 159"; - extent = "200 36"; - minExtent = "49 36"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Default"; - maxLength = "255"; - maxPopupHeight = "200"; - buttonBitmap = "gui/shll_pulldown"; - rolloverBarBitmap = "gui/shll_pulldownbar_rol"; - selectedBarBitmap = "gui/shll_pulldownbar_act"; - noButtonStyle = "0"; - }; - new GuiTextCtrl() { - profile = "ShellTextRightProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "35 198"; - extent = "114 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "First Person Draw:"; - maxLength = "255"; - }; - new ShellPopupMenu(OP_PlayerRenderMenu) { - profile = "ShellPopupProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "146 189"; - extent = "200 36"; - minExtent = "49 36"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Default"; - maxLength = "255"; - maxPopupHeight = "200"; - buttonBitmap = "gui/shll_pulldown"; - rolloverBarBitmap = "gui/shll_pulldownbar_rol"; - selectedBarBitmap = "gui/shll_pulldownbar_act"; - noButtonStyle = "0"; - }; - new ShellToggleButton() { - profile = "ShellRadioProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "31 226"; - extent = "170 30"; - minExtent = "26 27"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "$pref::precipitationOn"; - helpTag = "0"; - text = "PRECIPITATION"; - maxLength = "255"; - }; - new ShellToggleButton() { - profile = "ShellRadioProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "236 226"; - extent = "170 30"; - minExtent = "26 27"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "$pref::Interior::DynamicLights"; - command = "updateDynamicLightSliderState();"; - helpTag = "0"; - text = "DYNAMIC INTERIOR LIGHTS"; - maxLength = "255"; - }; - new ShellToggleButton() { - profile = "ShellRadioProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "31 256"; - extent = "170 30"; - minExtent = "26 27"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "$pref::decalsOn"; - helpTag = "0"; - text = "DECALS"; - maxLength = "255"; - }; - new ShellToggleButton() { - profile = "ShellRadioProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "236 256"; - extent = "170 30"; - minExtent = "26 27"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "$pref::Terrain::dynamicLights"; - command = "updateDynamicLightSliderState();"; - helpTag = "0"; - text = "DYNAMIC TERRAIN LIGHTS"; - maxLength = "255"; - }; - new ShellToggleButton() { - profile = "ShellRadioProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "31 286"; - extent = "170 30"; - minExtent = "26 27"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "$pref::Terrain::enableDetails"; - helpTag = "0"; - text = "TERRAIN DETAILS"; - maxLength = "255"; - }; - new ShellToggleButton(OP_IntTexturedFogTgl) { - profile = "ShellRadioProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "236 286"; - extent = "170 30"; - minExtent = "26 27"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "INTERIOR TEXTURED FOG"; - maxLength = "255"; - }; - new ShellToggleButton(OP_VertexLightTgl) { - profile = "ShellRadioProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "133 316"; - extent = "170 30"; - minExtent = "26 27"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "VERTEX LIGHTING"; - maxLength = "255"; - }; - }; - new ShellFieldCtrl(OP_TexturesPane) { - profile = "ShellFieldProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "138 42"; - extent = "437 346"; - minExtent = "16 18"; - visible = "0"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; + new GuiTextCtrl() { + profile = "ShellTextProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "231 6"; + extent = "97 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Gamma Correction:"; + maxLength = "255"; + }; + new ShellSliderCtrl(OP_GammaSlider) { + profile = "ShellSliderProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "241 21"; + extent = "170 24"; + minExtent = "12 24"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "value"; + altCommand = "updateGammaCorrection();"; + helpTag = "0"; + range = "0.000000 1.000000"; + ticks = "1000"; + value = "0.903509"; + usePlusMinus = "1"; + }; + new GuiTextCtrl() { + profile = "ShellTextProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "26 6"; + extent = "72 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Terrain Detail:"; + maxLength = "255"; + }; + new ShellSliderCtrl(OP_TerrainSlider) { + profile = "ShellSliderProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "36 21"; + extent = "170 24"; + minExtent = "12 24"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "value"; + command = "updateTerrainDetail();"; + helpTag = "0"; + range = "0.000000 25.000000"; + ticks = "26"; + value = "17"; + usePlusMinus = "1"; + }; + new GuiTextCtrl() { + profile = "ShellTextProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "231 44"; + extent = "67 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Shape Detail:"; + maxLength = "255"; + }; + new ShellSliderCtrl(OP_ShapeSlider) { + profile = "ShellSliderProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "241 59"; + extent = "170 24"; + minExtent = "12 24"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "value"; + helpTag = "0"; + range = "0.000000 1.000000"; + ticks = "19"; + value = "1"; + usePlusMinus = "1"; + }; + new GuiTextCtrl() { + profile = "ShellTextProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "27 44"; + extent = "77 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Shadow Detail:"; + maxLength = "255"; + }; + new ShellSliderCtrl(OP_ShadowSlider) { + profile = "ShellSliderProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "37 59"; + extent = "170 24"; + minExtent = "12 24"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "value"; + helpTag = "0"; + range = "0.000000 1.000000"; + ticks = "1000"; + value = "0.5"; + usePlusMinus = "1"; + }; + new GuiTextCtrl() { + profile = "ShellTextProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "27 82"; + extent = "72 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Interior Detail:"; + maxLength = "255"; + }; + new ShellSliderCtrl(OP_InteriorDetailSlider) { + profile = "ShellSliderProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "37 97"; + extent = "170 24"; + minExtent = "12 24"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "value"; + helpTag = "0"; + range = "0.300000 1.000000"; + ticks = "1000"; + value = "0.82193"; + usePlusMinus = "1"; + }; + new GuiTextCtrl() { + profile = "ShellTextProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "231 82"; + extent = "85 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Visible Distance:"; + maxLength = "255"; + }; + new ShellSliderCtrl(OP_VisibleDistanceSlider) { + profile = "ShellSliderProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "241 97"; + extent = "170 24"; + minExtent = "12 24"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "value"; + helpTag = "0"; + range = "0.600000 1.000000"; + ticks = "400"; + value = "1"; + usePlusMinus = "1"; + }; + new GuiTextCtrl() { + profile = "ShellTextProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "27 120"; + extent = "84 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Particle Density:"; + maxLength = "255"; + }; + new ShellSliderCtrl(OP_ParticleDensitySlider) { + profile = "ShellSliderProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "37 135"; + extent = "170 24"; + minExtent = "12 24"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "value"; + helpTag = "0"; + range = "0.000000 3.000000"; + ticks = "1000"; + value = "1"; + usePlusMinus = "1"; + }; + new GuiTextCtrl(OP_DynamicLightText) { + profile = "ShellTextProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "231 120"; + extent = "160 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Dynamic Light Visible Distance:"; + maxLength = "255"; + }; + new GuiTextCtrl(OP_DynamicLightText_Disabled) { + profile = "DisabledTextProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "231 120"; + extent = "160 22"; + minExtent = "8 8"; + visible = "0"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Dynamic Light Visible Distance:"; + maxLength = "255"; + }; + new ShellSliderCtrl(OP_DynamicLightSlider) { + profile = "ShellSliderProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "241 135"; + extent = "170 24"; + minExtent = "12 24"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "value"; + helpTag = "0"; + range = "0.000000 100.000000"; + ticks = "100"; + value = "75"; + usePlusMinus = "1"; + }; + new GuiTextCtrl() { + profile = "ShellTextRightProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "79 168"; + extent = "70 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Sky Detail:"; + maxLength = "255"; + }; + new ShellPopupMenu(OP_SkyDetailMenu) { + profile = "ShellPopupProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "146 159"; + extent = "200 36"; + minExtent = "49 36"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Default"; + maxLength = "255"; + maxPopupHeight = "200"; + buttonBitmap = "gui/shll_pulldown"; + rolloverBarBitmap = "gui/shll_pulldownbar_rol"; + selectedBarBitmap = "gui/shll_pulldownbar_act"; + noButtonStyle = "0"; + }; + new GuiTextCtrl() { + profile = "ShellTextRightProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "35 198"; + extent = "114 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "First Person Draw:"; + maxLength = "255"; + }; + new ShellPopupMenu(OP_PlayerRenderMenu) { + profile = "ShellPopupProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "146 189"; + extent = "200 36"; + minExtent = "49 36"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Default"; + maxLength = "255"; + maxPopupHeight = "200"; + buttonBitmap = "gui/shll_pulldown"; + rolloverBarBitmap = "gui/shll_pulldownbar_rol"; + selectedBarBitmap = "gui/shll_pulldownbar_act"; + noButtonStyle = "0"; + }; + new ShellToggleButton() { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "31 226"; + extent = "170 30"; + minExtent = "26 27"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "$pref::precipitationOn"; + helpTag = "0"; + text = "PRECIPITATION"; + maxLength = "255"; + }; + new ShellToggleButton() { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "236 226"; + extent = "170 30"; + minExtent = "26 27"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "$pref::Interior::DynamicLights"; + command = "updateDynamicLightSliderState();"; + helpTag = "0"; + text = "DYNAMIC INTERIOR LIGHTS"; + maxLength = "255"; + }; + new ShellToggleButton() { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "31 256"; + extent = "170 30"; + minExtent = "26 27"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "$pref::decalsOn"; + helpTag = "0"; + text = "DECALS"; + maxLength = "255"; + }; + new ShellToggleButton() { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "236 256"; + extent = "170 30"; + minExtent = "26 27"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "$pref::Terrain::dynamicLights"; + command = "updateDynamicLightSliderState();"; + helpTag = "0"; + text = "DYNAMIC TERRAIN LIGHTS"; + maxLength = "255"; + }; + new ShellToggleButton() { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "31 286"; + extent = "170 30"; + minExtent = "26 27"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "$pref::Terrain::enableDetails"; + helpTag = "0"; + text = "TERRAIN DETAILS"; + maxLength = "255"; + }; + new ShellToggleButton(OP_IntTexturedFogTgl) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "236 286"; + extent = "170 30"; + minExtent = "26 27"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "INTERIOR TEXTURED FOG"; + maxLength = "255"; + }; + new ShellToggleButton(OP_VertexLightTgl) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "133 316"; + extent = "170 30"; + minExtent = "26 27"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "VERTEX LIGHTING"; + maxLength = "255"; + }; + }; + new ShellFieldCtrl(OP_TexturesPane) { + profile = "ShellFieldProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "138 42"; + extent = "437 346"; + minExtent = "16 18"; + visible = "0"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; - new GuiTextCtrl() { - profile = "ShellTextRightProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "37 16"; - extent = "100 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Texture Quality:"; - maxLength = "255"; - }; - new ShellPopupMenu(OP_TexQualityMenu) { - profile = "ShellPopupProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "134 7"; - extent = "140 36"; - minExtent = "49 36"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Default"; - maxLength = "255"; - maxPopupHeight = "200"; - buttonBitmap = "gui/shll_pulldown"; - rolloverBarBitmap = "gui/shll_pulldownbar_rol"; - selectedBarBitmap = "gui/shll_pulldownbar_act"; - noButtonStyle = "0"; - }; - new GuiTextCtrl() { - profile = "ShellTextProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "26 85"; - extent = "114 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Terrain Texture Detail:"; - maxLength = "255"; - }; - new ShellSliderCtrl(OP_TerrainTexSlider) { - profile = "ShellSliderProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "36 100"; - extent = "170 24"; - minExtent = "12 24"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "value"; - helpTag = "0"; - range = "0.000000 6.000000"; - ticks = "7"; - value = "5"; - usePlusMinus = "1"; - }; - new GuiTextCtrl() { - profile = "ShellTextProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "231 85"; - extent = "109 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Shape Texture Detail:"; - maxLength = "255"; - }; - new ShellSliderCtrl(OP_ShapeTexSlider) { - profile = "ShellSliderProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "241 100"; - extent = "170 24"; - minExtent = "12 24"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "value"; - helpTag = "0"; - range = "0.000000 1.000000"; - ticks = "6"; - value = "1"; - usePlusMinus = "1"; - }; - new GuiTextCtrl() { - profile = "ShellTextProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "26 123"; - extent = "119 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Building Texture Detail:"; - maxLength = "255"; - }; - new ShellSliderCtrl(OP_BuildingTexSlider) { - profile = "ShellSliderProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "36 138"; - extent = "170 24"; - minExtent = "12 24"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "value"; - helpTag = "0"; - range = "0.000000 1.000000"; - ticks = "6"; - value = "0.8"; - usePlusMinus = "1"; - }; - new GuiTextCtrl() { - profile = "ShellTextProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "231 123"; - extent = "97 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Sky Texture Detail:"; - maxLength = "255"; - }; - new ShellSliderCtrl(OP_SkyTexSlider) { - profile = "ShellSliderProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "241 138"; - extent = "170 24"; - minExtent = "12 24"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "value"; - helpTag = "0"; - range = "0.000000 1.000000"; - ticks = "6"; - value = "0.8"; - usePlusMinus = "1"; - }; - new GuiTextCtrl(OP_CompressLabel) { - profile = "ShellTextRightProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "17 46"; - extent = "120 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Texture Compression:"; - maxLength = "255"; - }; - new GuiTextCtrl(OP_CompressLabel_Disabled) { - profile = "DisabledTextRightProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "6 46"; - extent = "135 22"; - minExtent = "8 8"; - visible = "0"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Texture Compression:"; - maxLength = "255"; - }; - new ShellPopupMenu(OP_CompressMenu) { - profile = "ShellPopupProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "134 37"; - extent = "140 36"; - minExtent = "49 36"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "None"; - maxLength = "255"; - maxPopupHeight = "200"; - buttonBitmap = "gui/shll_pulldown"; - rolloverBarBitmap = "gui/shll_pulldownbar_rol"; - selectedBarBitmap = "gui/shll_pulldownbar_act"; - noButtonStyle = "0"; - }; - new GuiTextCtrl(OP_AnisotropyLabel) { - profile = "ShellTextProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "26 179"; - extent = "58 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Anisotropy:"; - maxLength = "255"; - }; - new GuiTextCtrl(OP_AnisotropyLabel_Disabled) { - profile = "DisabledTextProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "26 179"; - extent = "58 22"; - minExtent = "8 8"; - visible = "0"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Anisotropy:"; - maxLength = "255"; - }; - new ShellSliderCtrl(OP_AnisotropySlider) { - profile = "ShellSliderProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "37 194"; - extent = "170 24"; - minExtent = "12 24"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "value"; - helpTag = "0"; - range = "0.000000 1.000000"; - ticks = "1000"; - value = "0"; - usePlusMinus = "1"; - }; - new ShellToggleButton(OP_EnvMapTgl) { - profile = "ShellRadioProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "236 180"; - extent = "170 30"; - minExtent = "26 27"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "$pref::environmentMaps"; - helpTag = "0"; - text = "ENVIRONMENT MAPS"; - maxLength = "255"; - }; - new ShellToggleButton(OP_IntEnvMapTgl) { - profile = "ShellRadioProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "236 210"; - extent = "170 30"; - minExtent = "26 27"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "$pref::Interior::ShowEnvironmentMaps"; - helpTag = "0"; - text = "INTERIOR ENV. MAPS"; - maxLength = "255"; - }; - }; - new ShellFieldCtrl(OP_SoundPane) { - profile = "ShellFieldProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "138 42"; - extent = "437 346"; - minExtent = "16 18"; - visible = "0"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; + new GuiTextCtrl() { + profile = "ShellTextRightProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "37 16"; + extent = "100 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Texture Quality:"; + maxLength = "255"; + }; + new ShellPopupMenu(OP_TexQualityMenu) { + profile = "ShellPopupProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "134 7"; + extent = "140 36"; + minExtent = "49 36"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Default"; + maxLength = "255"; + maxPopupHeight = "200"; + buttonBitmap = "gui/shll_pulldown"; + rolloverBarBitmap = "gui/shll_pulldownbar_rol"; + selectedBarBitmap = "gui/shll_pulldownbar_act"; + noButtonStyle = "0"; + }; + new GuiTextCtrl() { + profile = "ShellTextProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "26 85"; + extent = "114 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Terrain Texture Detail:"; + maxLength = "255"; + }; + new ShellSliderCtrl(OP_TerrainTexSlider) { + profile = "ShellSliderProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "36 100"; + extent = "170 24"; + minExtent = "12 24"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "value"; + helpTag = "0"; + range = "0.000000 6.000000"; + ticks = "7"; + value = "5"; + usePlusMinus = "1"; + }; + new GuiTextCtrl() { + profile = "ShellTextProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "231 85"; + extent = "109 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Shape Texture Detail:"; + maxLength = "255"; + }; + new ShellSliderCtrl(OP_ShapeTexSlider) { + profile = "ShellSliderProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "241 100"; + extent = "170 24"; + minExtent = "12 24"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "value"; + helpTag = "0"; + range = "0.000000 1.000000"; + ticks = "6"; + value = "1"; + usePlusMinus = "1"; + }; + new GuiTextCtrl() { + profile = "ShellTextProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "26 123"; + extent = "119 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Building Texture Detail:"; + maxLength = "255"; + }; + new ShellSliderCtrl(OP_BuildingTexSlider) { + profile = "ShellSliderProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "36 138"; + extent = "170 24"; + minExtent = "12 24"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "value"; + helpTag = "0"; + range = "0.000000 1.000000"; + ticks = "6"; + value = "0.8"; + usePlusMinus = "1"; + }; + new GuiTextCtrl() { + profile = "ShellTextProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "231 123"; + extent = "97 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Sky Texture Detail:"; + maxLength = "255"; + }; + new ShellSliderCtrl(OP_SkyTexSlider) { + profile = "ShellSliderProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "241 138"; + extent = "170 24"; + minExtent = "12 24"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "value"; + helpTag = "0"; + range = "0.000000 1.000000"; + ticks = "6"; + value = "0.8"; + usePlusMinus = "1"; + }; + new GuiTextCtrl(OP_CompressLabel) { + profile = "ShellTextRightProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "17 46"; + extent = "120 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Texture Compression:"; + maxLength = "255"; + }; + new GuiTextCtrl(OP_CompressLabel_Disabled) { + profile = "DisabledTextRightProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "6 46"; + extent = "135 22"; + minExtent = "8 8"; + visible = "0"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Texture Compression:"; + maxLength = "255"; + }; + new ShellPopupMenu(OP_CompressMenu) { + profile = "ShellPopupProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "134 37"; + extent = "140 36"; + minExtent = "49 36"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "None"; + maxLength = "255"; + maxPopupHeight = "200"; + buttonBitmap = "gui/shll_pulldown"; + rolloverBarBitmap = "gui/shll_pulldownbar_rol"; + selectedBarBitmap = "gui/shll_pulldownbar_act"; + noButtonStyle = "0"; + }; + new GuiTextCtrl(OP_AnisotropyLabel) { + profile = "ShellTextProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "26 179"; + extent = "58 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Anisotropy:"; + maxLength = "255"; + }; + new GuiTextCtrl(OP_AnisotropyLabel_Disabled) { + profile = "DisabledTextProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "26 179"; + extent = "58 22"; + minExtent = "8 8"; + visible = "0"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Anisotropy:"; + maxLength = "255"; + }; + new ShellSliderCtrl(OP_AnisotropySlider) { + profile = "ShellSliderProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "37 194"; + extent = "170 24"; + minExtent = "12 24"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "value"; + helpTag = "0"; + range = "0.000000 1.000000"; + ticks = "1000"; + value = "0"; + usePlusMinus = "1"; + }; + new ShellToggleButton(OP_EnvMapTgl) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "236 180"; + extent = "170 30"; + minExtent = "26 27"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "$pref::environmentMaps"; + helpTag = "0"; + text = "ENVIRONMENT MAPS"; + maxLength = "255"; + }; + new ShellToggleButton(OP_IntEnvMapTgl) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "236 210"; + extent = "170 30"; + minExtent = "26 27"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "$pref::Interior::ShowEnvironmentMaps"; + helpTag = "0"; + text = "INTERIOR ENV. MAPS"; + maxLength = "255"; + }; + }; + new ShellFieldCtrl(OP_SoundPane) { + profile = "ShellFieldProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "138 42"; + extent = "437 346"; + minExtent = "16 18"; + visible = "0"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; - new GuiTextCtrl() { - profile = "ShellTextRightProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "10 16"; - extent = "72 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "3D Provider:"; - maxLength = "255"; - }; - new ShellPopupMenu(OP_AudioProviderMenu) { - profile = "ShellPopupProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "79 7"; - extent = "268 36"; - minExtent = "49 36"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Select Provider"; - maxLength = "255"; - maxPopupHeight = "200"; - buttonBitmap = "gui/shll_pulldown"; - rolloverBarBitmap = "gui/shll_pulldownbar_rol"; - selectedBarBitmap = "gui/shll_pulldownbar_act"; - noButtonStyle = "0"; - }; - new ShellBitmapButton(OP_AudioResetProvider) { - profile = "ShellButtonProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "339 7"; - extent = "79 38"; - minExtent = "32 38"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "RESET"; - simpleStyle = "0"; - }; - new ShellToggleButton(OP_AudioEnvironmentTgl) { - profile = "ShellRadioProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "249 42"; - extent = "160 30"; - minExtent = "26 27"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "$pref::Audio::environmentEnabled"; - helpTag = "0"; - text = "ENVIRONMENT ENABLED"; - maxLength = "255"; - }; - new GuiTextCtrl() { - profile = "ShellTextRightProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "10 46"; - extent = "72 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Speakers:"; - maxLength = "255"; - }; - new ShellPopupMenu(OP_AudioSpeakerMenu) { - profile = "ShellPopupProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "79 37"; - extent = "169 36"; - minExtent = "49 36"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Select Speaker"; - maxLength = "255"; - maxPopupHeight = "200"; - buttonBitmap = "gui/shll_pulldown"; - rolloverBarBitmap = "gui/shll_pulldownbar_rol"; - selectedBarBitmap = "gui/shll_pulldownbar_act"; - noButtonStyle = "0"; - }; - new GuiTextCtrl() { - profile = "ShellTextRightProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "11 97"; - extent = "72 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Frequency:"; - maxLength = "255"; - }; - new ShellPopupMenu(OP_AudioFrequencyMenu) { - profile = "ShellPopupProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "80 88"; - extent = "169 36"; - minExtent = "49 36"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Select Frequency"; - maxLength = "255"; - maxPopupHeight = "200"; - buttonBitmap = "gui/shll_pulldown"; - rolloverBarBitmap = "gui/shll_pulldownbar_rol"; - selectedBarBitmap = "gui/shll_pulldownbar_act"; - noButtonStyle = "0"; - }; - new GuiTextCtrl() { - profile = "ShellTextRightProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "11 127"; - extent = "72 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Bit Rate:"; - maxLength = "255"; - }; - new ShellPopupMenu(OP_AudioBitRateMenu) { - profile = "ShellPopupProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "80 118"; - extent = "100 36"; - minExtent = "49 36"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Select Bit Rate"; - maxLength = "255"; - maxPopupHeight = "200"; - buttonBitmap = "gui/shll_pulldown"; - rolloverBarBitmap = "gui/shll_pulldownbar_rol"; - selectedBarBitmap = "gui/shll_pulldownbar_act"; - noButtonStyle = "0"; - }; - new GuiTextCtrl() { - profile = "ShellTextRightProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "221 127"; - extent = "60 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Channels:"; - maxLength = "255"; - }; - new ShellPopupMenu(OP_AudioChannelsMenu) { - profile = "ShellPopupProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "278 118"; - extent = "100 36"; - minExtent = "49 36"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Select # Channels"; - maxLength = "255"; - maxPopupHeight = "200"; - buttonBitmap = "gui/shll_pulldown"; - rolloverBarBitmap = "gui/shll_pulldownbar_rol"; - selectedBarBitmap = "gui/shll_pulldownbar_act"; - noButtonStyle = "0"; - }; - new GuiTextCtrl() { - profile = "ShellTextProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "26 177"; - extent = "79 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Master Volume:"; - maxLength = "255"; - }; - new ShellSliderCtrl(OP_MasterVolumeSlider) { - profile = "ShellSliderProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "36 192"; - extent = "170 24"; - minExtent = "12 24"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "value"; - altCommand = "updateMasterVolume();"; - helpTag = "0"; - range = "0.000000 1.000000"; - ticks = "1000"; - value = "0.894737"; - usePlusMinus = "1"; - }; - new GuiTextCtrl() { - profile = "ShellTextProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "231 177"; - extent = "79 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Effects Volume:"; - maxLength = "255"; - }; - new ShellSliderCtrl(OP_EffectsVolumeSlider) { - profile = "ShellSliderProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "241 192"; - extent = "170 24"; - minExtent = "12 24"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "value"; - helpTag = "0"; - range = "0.000000 1.000000"; - ticks = "1000"; - value = "1"; - usePlusMinus = "1"; - }; - new GuiTextCtrl() { - profile = "ShellTextProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "26 215"; - extent = "60 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Gui Volume:"; - maxLength = "255"; - }; - new ShellSliderCtrl(OP_GuiVolumeSlider) { - profile = "ShellSliderProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "36 230"; - extent = "170 24"; - minExtent = "12 24"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "value"; - altCommand = "updateGuiVolume();"; - helpTag = "0"; - range = "0.000000 1.000000"; - ticks = "1000"; - value = "0.692982"; - usePlusMinus = "1"; - }; - new GuiTextCtrl() { - profile = "ShellTextProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "231 215"; - extent = "97 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Voice Bind Volume:"; - maxLength = "255"; - }; - new ShellSliderCtrl(OP_VoiceBindVolumeSlider) { - profile = "ShellSliderProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "241 230"; - extent = "170 24"; - minExtent = "12 24"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "value"; - helpTag = "0"; - range = "0.000000 1.000000"; - ticks = "1000"; - value = "0.8"; - usePlusMinus = "1"; - }; - new ShellToggleButton(OP_MusicTgl) { - profile = "ShellRadioProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "31 266"; - extent = "170 30"; - minExtent = "26 27"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "$pref::Audio::musicEnabled"; - helpTag = "0"; - text = "MP3 MUSIC"; - maxLength = "255"; - }; - new GuiTextCtrl(OP_MusicVolumeLabel) { - profile = "ShellTextProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "231 257"; - extent = "74 22"; - minExtent = "8 8"; - visible = "0"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Music Volume:"; - maxLength = "255"; - }; - new GuiTextCtrl(OP_MusicVolumeLabel_Disabled) { - profile = "DisabledTextProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "231 253"; - extent = "74 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Music Volume:"; - maxLength = "255"; - }; - new ShellSliderCtrl(OP_MusicVolumeSlider) { - profile = "ShellSliderProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "241 268"; - extent = "170 24"; - minExtent = "12 24"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "value"; - altCommand = "updateMusicVolume();"; - helpTag = "0"; - range = "0.000000 1.000000"; - ticks = "1000"; - value = "0.859649"; - usePlusMinus = "1"; - }; - }; - new ShellFieldCtrl(OP_VoicePane) { - profile = "ShellFieldProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "138 42"; - extent = "437 346"; - minExtent = "16 18"; - visible = "0"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; + new GuiTextCtrl() { + profile = "ShellTextRightProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "10 16"; + extent = "72 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "3D Provider:"; + maxLength = "255"; + }; + new ShellPopupMenu(OP_AudioProviderMenu) { + profile = "ShellPopupProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "79 7"; + extent = "268 36"; + minExtent = "49 36"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Select Provider"; + maxLength = "255"; + maxPopupHeight = "200"; + buttonBitmap = "gui/shll_pulldown"; + rolloverBarBitmap = "gui/shll_pulldownbar_rol"; + selectedBarBitmap = "gui/shll_pulldownbar_act"; + noButtonStyle = "0"; + }; + new ShellBitmapButton(OP_AudioResetProvider) { + profile = "ShellButtonProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "339 7"; + extent = "79 38"; + minExtent = "32 38"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "RESET"; + simpleStyle = "0"; + }; + new ShellToggleButton(OP_AudioEnvironmentTgl) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "249 42"; + extent = "160 30"; + minExtent = "26 27"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "$pref::Audio::environmentEnabled"; + helpTag = "0"; + text = "ENVIRONMENT ENABLED"; + maxLength = "255"; + }; + new GuiTextCtrl() { + profile = "ShellTextRightProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "10 46"; + extent = "72 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Speakers:"; + maxLength = "255"; + }; + new ShellPopupMenu(OP_AudioSpeakerMenu) { + profile = "ShellPopupProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "79 37"; + extent = "169 36"; + minExtent = "49 36"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Select Speaker"; + maxLength = "255"; + maxPopupHeight = "200"; + buttonBitmap = "gui/shll_pulldown"; + rolloverBarBitmap = "gui/shll_pulldownbar_rol"; + selectedBarBitmap = "gui/shll_pulldownbar_act"; + noButtonStyle = "0"; + }; + new GuiTextCtrl() { + profile = "ShellTextRightProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "11 97"; + extent = "72 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Frequency:"; + maxLength = "255"; + }; + new ShellPopupMenu(OP_AudioFrequencyMenu) { + profile = "ShellPopupProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "80 88"; + extent = "169 36"; + minExtent = "49 36"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Select Frequency"; + maxLength = "255"; + maxPopupHeight = "200"; + buttonBitmap = "gui/shll_pulldown"; + rolloverBarBitmap = "gui/shll_pulldownbar_rol"; + selectedBarBitmap = "gui/shll_pulldownbar_act"; + noButtonStyle = "0"; + }; + new GuiTextCtrl() { + profile = "ShellTextRightProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "11 127"; + extent = "72 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Bit Rate:"; + maxLength = "255"; + }; + new ShellPopupMenu(OP_AudioBitRateMenu) { + profile = "ShellPopupProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "80 118"; + extent = "100 36"; + minExtent = "49 36"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Select Bit Rate"; + maxLength = "255"; + maxPopupHeight = "200"; + buttonBitmap = "gui/shll_pulldown"; + rolloverBarBitmap = "gui/shll_pulldownbar_rol"; + selectedBarBitmap = "gui/shll_pulldownbar_act"; + noButtonStyle = "0"; + }; + new GuiTextCtrl() { + profile = "ShellTextRightProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "221 127"; + extent = "60 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Channels:"; + maxLength = "255"; + }; + new ShellPopupMenu(OP_AudioChannelsMenu) { + profile = "ShellPopupProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "278 118"; + extent = "100 36"; + minExtent = "49 36"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Select # Channels"; + maxLength = "255"; + maxPopupHeight = "200"; + buttonBitmap = "gui/shll_pulldown"; + rolloverBarBitmap = "gui/shll_pulldownbar_rol"; + selectedBarBitmap = "gui/shll_pulldownbar_act"; + noButtonStyle = "0"; + }; + new GuiTextCtrl() { + profile = "ShellTextProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "26 177"; + extent = "79 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Master Volume:"; + maxLength = "255"; + }; + new ShellSliderCtrl(OP_MasterVolumeSlider) { + profile = "ShellSliderProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "36 192"; + extent = "170 24"; + minExtent = "12 24"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "value"; + altCommand = "updateMasterVolume();"; + helpTag = "0"; + range = "0.000000 1.000000"; + ticks = "1000"; + value = "0.894737"; + usePlusMinus = "1"; + }; + new GuiTextCtrl() { + profile = "ShellTextProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "231 177"; + extent = "79 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Effects Volume:"; + maxLength = "255"; + }; + new ShellSliderCtrl(OP_EffectsVolumeSlider) { + profile = "ShellSliderProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "241 192"; + extent = "170 24"; + minExtent = "12 24"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "value"; + helpTag = "0"; + range = "0.000000 1.000000"; + ticks = "1000"; + value = "1"; + usePlusMinus = "1"; + }; + new GuiTextCtrl() { + profile = "ShellTextProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "26 215"; + extent = "60 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Gui Volume:"; + maxLength = "255"; + }; + new ShellSliderCtrl(OP_GuiVolumeSlider) { + profile = "ShellSliderProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "36 230"; + extent = "170 24"; + minExtent = "12 24"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "value"; + altCommand = "updateGuiVolume();"; + helpTag = "0"; + range = "0.000000 1.000000"; + ticks = "1000"; + value = "0.692982"; + usePlusMinus = "1"; + }; + new GuiTextCtrl() { + profile = "ShellTextProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "231 215"; + extent = "97 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Voice Bind Volume:"; + maxLength = "255"; + }; + new ShellSliderCtrl(OP_VoiceBindVolumeSlider) { + profile = "ShellSliderProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "241 230"; + extent = "170 24"; + minExtent = "12 24"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "value"; + helpTag = "0"; + range = "0.000000 1.000000"; + ticks = "1000"; + value = "0.8"; + usePlusMinus = "1"; + }; + new ShellToggleButton(OP_MusicTgl) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "31 266"; + extent = "170 30"; + minExtent = "26 27"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "$pref::Audio::musicEnabled"; + helpTag = "0"; + text = "MP3 MUSIC"; + maxLength = "255"; + }; + new GuiTextCtrl(OP_MusicVolumeLabel) { + profile = "ShellTextProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "231 257"; + extent = "74 22"; + minExtent = "8 8"; + visible = "0"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Music Volume:"; + maxLength = "255"; + }; + new GuiTextCtrl(OP_MusicVolumeLabel_Disabled) { + profile = "DisabledTextProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "231 253"; + extent = "74 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Music Volume:"; + maxLength = "255"; + }; + new ShellSliderCtrl(OP_MusicVolumeSlider) { + profile = "ShellSliderProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "241 268"; + extent = "170 24"; + minExtent = "12 24"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "value"; + altCommand = "updateMusicVolume();"; + helpTag = "0"; + range = "0.000000 1.000000"; + ticks = "1000"; + value = "0.859649"; + usePlusMinus = "1"; + }; + }; + new ShellFieldCtrl(OP_VoicePane) { + profile = "ShellFieldProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "138 42"; + extent = "437 346"; + minExtent = "16 18"; + visible = "0"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; - new ShellToggleButton(OP_MicrophoneEnabledTgl) { - profile = "ShellRadioProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "31 13"; - extent = "170 30"; - minExtent = "26 27"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "$pref::Audio::enableVoiceCapture"; - helpTag = "0"; - text = "MICROPHONE ENABLED"; - maxLength = "255"; - }; - new ShellBitmapButton(OP_RecordTestBtn) { - profile = "ShellButtonProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "232 8"; - extent = "173 38"; - minExtent = "32 38"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - command = "alxCaptureStart(true);"; - helpTag = "0"; - text = "TEST RECORD"; - simpleStyle = "0"; - }; - new GuiTextCtrl(OP_MicVolumeLabel) { - profile = "ShellTextProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "28 43"; - extent = "102 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Microphone Volume:"; - maxLength = "255"; - }; - new GuiTextCtrl(OP_MicVolumeLabel_Disabled) { - profile = "DisabledTextProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "28 43"; - extent = "102 22"; - minExtent = "8 8"; - visible = "0"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Microphone Volume:"; - maxLength = "255"; - }; - new ShellSliderCtrl(OP_MicrophoneVolumeSlider) { - profile = "ShellSliderProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "38 58"; - extent = "170 24"; - minExtent = "12 24"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "value"; - helpTag = "0"; - range = "0.000000 1.000000"; - ticks = "1000"; - value = "1"; - usePlusMinus = "1"; - }; - new GuiTextCtrl(OP_InputBoostLabel) { - profile = "ShellTextProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "231 43"; - extent = "123 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Microphone Input Boost:"; - maxLength = "255"; - }; - new GuiTextCtrl(OP_InputBoostLabel_Disabled) { - profile = "DisabledTextProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "231 43"; - extent = "123 22"; - minExtent = "8 8"; - visible = "0"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Microphone Input Boost:"; - maxLength = "255"; - }; - new GuiTextCtrl(OP_InputBoostPercentTxt) { - profile = "ShellTextCenterProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "271 61"; - extent = "110 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "100%"; - maxLength = "255"; - }; - new ShellSliderCtrl(OP_InputBoostSlider) { - profile = "ShellSliderProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "241 58"; - extent = "170 24"; - minExtent = "12 24"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "value"; - altCommand = "updateInputBoost();"; - helpTag = "0"; - range = "1.000000 5.000000"; - ticks = "5000"; - value = "3.59649"; - usePlusMinus = "1"; - }; - new GuiTextCtrl(OP_VoiceListenLabel) { - profile = "ShellTextRightProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "46 96"; - extent = "140 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Voice Listen Codec(s):"; - maxLength = "255"; - }; - new ShellPopupMenu(OP_VoiceListenMenu) { - profile = "ShellPopupProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "183 87"; - extent = "129 36"; - minExtent = "49 36"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Select Quality"; - maxLength = "255"; - maxPopupHeight = "200"; - buttonBitmap = "gui/shll_pulldown"; - rolloverBarBitmap = "gui/shll_pulldownbar_rol"; - selectedBarBitmap = "gui/shll_pulldownbar_act"; - noButtonStyle = "0"; - }; - new GuiTextCtrl(OP_VoiceSendLabel) { - profile = "ShellTextRightProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "46 126"; - extent = "140 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Voice Send Codec:"; - maxLength = "255"; - }; - new ShellPopupMenu(OP_VoiceSendMenu) { - profile = "ShellPopupProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "183 117"; - extent = "129 36"; - minExtent = "49 36"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Select Quality"; - maxLength = "255"; - maxPopupHeight = "200"; - buttonBitmap = "gui/shll_pulldown"; - rolloverBarBitmap = "gui/shll_pulldownbar_rol"; - selectedBarBitmap = "gui/shll_pulldownbar_act"; - noButtonStyle = "0"; - }; - new GuiTextCtrl(OP_VoiceListenLabel_Disabled) { - profile = "DisabledTextRightProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "46 96"; - extent = "140 22"; - minExtent = "8 8"; - visible = "0"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Voice Listen Quality:"; - maxLength = "255"; - }; - new GuiTextCtrl(OP_VoiceSendLabel_Disabled) { - profile = "DisabledTextRightProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "46 126"; - extent = "140 22"; - minExtent = "8 8"; - visible = "0"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Voice Send Quality:"; - maxLength = "255"; - }; - new GuiMLTextCtrl(OP_VoiceCodecInfo) { - profile = "GuiDefaultProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "25 159"; - extent = "395 140"; - minExtent = "8 140"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - lineSpacing = "2"; - allowColorChars = "0"; - maxChars = "-1"; - deniedSound = "InputDeniedSound"; - }; - }; - new ShellFieldCtrl(OP_ControlsPane) { - profile = "ShellFieldProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "138 42"; - extent = "437 346"; - minExtent = "16 18"; - visible = "0"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - group = "Main"; + new ShellToggleButton(OP_MicrophoneEnabledTgl) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "31 13"; + extent = "170 30"; + minExtent = "26 27"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "$pref::Audio::enableVoiceCapture"; + helpTag = "0"; + text = "MICROPHONE ENABLED"; + maxLength = "255"; + }; + new ShellBitmapButton(OP_RecordTestBtn) { + profile = "ShellButtonProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "232 8"; + extent = "173 38"; + minExtent = "32 38"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + command = "alxCaptureStart(true);"; + helpTag = "0"; + text = "TEST RECORD"; + simpleStyle = "0"; + }; + new GuiTextCtrl(OP_MicVolumeLabel) { + profile = "ShellTextProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "28 43"; + extent = "102 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Microphone Volume:"; + maxLength = "255"; + }; + new GuiTextCtrl(OP_MicVolumeLabel_Disabled) { + profile = "DisabledTextProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "28 43"; + extent = "102 22"; + minExtent = "8 8"; + visible = "0"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Microphone Volume:"; + maxLength = "255"; + }; + new ShellSliderCtrl(OP_MicrophoneVolumeSlider) { + profile = "ShellSliderProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "38 58"; + extent = "170 24"; + minExtent = "12 24"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "value"; + helpTag = "0"; + range = "0.000000 1.000000"; + ticks = "1000"; + value = "1"; + usePlusMinus = "1"; + }; + new GuiTextCtrl(OP_InputBoostLabel) { + profile = "ShellTextProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "231 43"; + extent = "123 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Microphone Input Boost:"; + maxLength = "255"; + }; + new GuiTextCtrl(OP_InputBoostLabel_Disabled) { + profile = "DisabledTextProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "231 43"; + extent = "123 22"; + minExtent = "8 8"; + visible = "0"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Microphone Input Boost:"; + maxLength = "255"; + }; + new GuiTextCtrl(OP_InputBoostPercentTxt) { + profile = "ShellTextCenterProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "271 61"; + extent = "110 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "100%"; + maxLength = "255"; + }; + new ShellSliderCtrl(OP_InputBoostSlider) { + profile = "ShellSliderProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "241 58"; + extent = "170 24"; + minExtent = "12 24"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "value"; + altCommand = "updateInputBoost();"; + helpTag = "0"; + range = "1.000000 5.000000"; + ticks = "5000"; + value = "3.59649"; + usePlusMinus = "1"; + }; + new GuiTextCtrl(OP_VoiceListenLabel) { + profile = "ShellTextRightProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "46 96"; + extent = "140 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Voice Listen Codec(s):"; + maxLength = "255"; + }; + new ShellPopupMenu(OP_VoiceListenMenu) { + profile = "ShellPopupProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "183 87"; + extent = "129 36"; + minExtent = "49 36"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Select Quality"; + maxLength = "255"; + maxPopupHeight = "200"; + buttonBitmap = "gui/shll_pulldown"; + rolloverBarBitmap = "gui/shll_pulldownbar_rol"; + selectedBarBitmap = "gui/shll_pulldownbar_act"; + noButtonStyle = "0"; + }; + new GuiTextCtrl(OP_VoiceSendLabel) { + profile = "ShellTextRightProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "46 126"; + extent = "140 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Voice Send Codec:"; + maxLength = "255"; + }; + new ShellPopupMenu(OP_VoiceSendMenu) { + profile = "ShellPopupProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "183 117"; + extent = "129 36"; + minExtent = "49 36"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Select Quality"; + maxLength = "255"; + maxPopupHeight = "200"; + buttonBitmap = "gui/shll_pulldown"; + rolloverBarBitmap = "gui/shll_pulldownbar_rol"; + selectedBarBitmap = "gui/shll_pulldownbar_act"; + noButtonStyle = "0"; + }; + new GuiTextCtrl(OP_VoiceListenLabel_Disabled) { + profile = "DisabledTextRightProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "46 96"; + extent = "140 22"; + minExtent = "8 8"; + visible = "0"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Voice Listen Quality:"; + maxLength = "255"; + }; + new GuiTextCtrl(OP_VoiceSendLabel_Disabled) { + profile = "DisabledTextRightProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "46 126"; + extent = "140 22"; + minExtent = "8 8"; + visible = "0"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Voice Send Quality:"; + maxLength = "255"; + }; + new GuiMLTextCtrl(OP_VoiceCodecInfo) { + profile = "GuiDefaultProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "25 159"; + extent = "395 140"; + minExtent = "8 140"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + lineSpacing = "2"; + allowColorChars = "0"; + maxChars = "-1"; + deniedSound = "InputDeniedSound"; + }; + }; + new ShellFieldCtrl(OP_ControlsPane) { + profile = "ShellFieldProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "138 42"; + extent = "437 346"; + minExtent = "16 18"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + group = "Main"; - new ShellScrollCtrl() { - profile = "NewScrollCtrlProfile"; - horizSizing = "right"; - vertSizing = "height"; - position = "2 31"; - extent = "290 283"; - minExtent = "24 52"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - willFirstRespond = "1"; - hScrollBar = "alwaysOff"; - vScrollBar = "alwaysOn"; - constantThumbHeight = "0"; - defaultLineHeight = "15"; - childMargin = "0 2"; - fieldBase = "gui/shll_field"; + new ShellScrollCtrl() { + profile = "NewScrollCtrlProfile"; + horizSizing = "right"; + vertSizing = "height"; + position = "2 31"; + extent = "290 283"; + minExtent = "24 52"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + willFirstRespond = "1"; + hScrollBar = "alwaysOff"; + vScrollBar = "alwaysOn"; + constantThumbHeight = "0"; + defaultLineHeight = "15"; + childMargin = "0 2"; + fieldBase = "gui/shll_field"; - new GuiScrollContentCtrl() { - profile = "GuiDefaultProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "4 6"; - extent = "266 271"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; + new GuiScrollContentCtrl() { + profile = "GuiDefaultProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "4 6"; + extent = "266 271"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; - new ShellTextList(OP_RemapList) { - profile = "ShellTextArrayProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "0 0"; - extent = "266 8"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - altCommand = "OP_RemapList.doRemap();"; - helpTag = "0"; - enumerate = "0"; - resizeCell = "1"; - columns = "2 150"; - fitParentWidth = "1"; - clipColumnText = "0"; - }; - }; - }; - new ShellBitmapButton() { - profile = "ShellButtonProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "292 8"; - extent = "140 38"; - minExtent = "32 38"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - command = "restoreDefaultMappings();"; - helpTag = "0"; - text = "RESTORE DEFAULTS"; - simpleStyle = "0"; - }; - new ShellBitmapButton() { - profile = "ShellButtonProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "292 38"; - extent = "140 38"; - minExtent = "32 38"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - command = "ShellGetLoadFilename( \"LOAD CONTROL CONFIG\", \"prefs/*.cs\", \"isMapFile\", \"loadMapFile\" );"; - helpTag = "0"; - text = "LOAD"; - simpleStyle = "0"; - }; - new ShellBitmapButton() { - profile = "ShellButtonProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "292 68"; - extent = "140 38"; - minExtent = "32 38"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - command = "ShellGetSaveFilename( \"SAVE CONTROL CONFIG\", \"prefs/*.cs\", \"isMapFile\", \"saveMapFile\", $pref::Input::ActiveConfig );"; - helpTag = "0"; - text = "SAVE AS"; - simpleStyle = "0"; - }; - new ShellToggleButton(OP_MouseTgl) { - profile = "ShellRadioProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "296 116"; - extent = "126 30"; - minExtent = "26 27"; - visible = "0"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "pref::Input::MouseEnabled"; - helpTag = "0"; - text = "DINPUT MOUSE"; - maxLength = "255"; - }; - new ShellBitmapButton(OP_ConfigureMouseBtn) { - profile = "ShellButtonProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "292 146"; - extent = "140 38"; - minExtent = "32 38"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - command = "Canvas.pushDialog(MouseConfigDlg);"; - helpTag = "0"; - text = "CONFIGURE MOUSE"; - simpleStyle = "0"; - }; - new ShellToggleButton(OP_JoystickTgl) { - profile = "ShellRadioProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "296 194"; - extent = "126 30"; - minExtent = "26 27"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "ENABLE JOYSTICK"; - maxLength = "255"; - }; - new ShellBitmapButton(OP_ConfigureJoystickBtn) { - profile = "ShellButtonProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "292 224"; - extent = "140 38"; - minExtent = "32 38"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - command = "Canvas.pushDialog(JoystickConfigDlg);"; - helpTag = "0"; - text = "CONFIGURE JOYSTICK"; - simpleStyle = "0"; - }; - new GuiTextCtrl() { - profile = "ShellTextRightProfile"; - horizSizing = "right"; - vertSizing = "top"; - position = "32 317"; - extent = "124 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Toggle Console Key:"; - maxLength = "255"; - }; - new ShellFieldCtrl() { - profile = "ShellFieldProfile"; - horizSizing = "right"; - vertSizing = "top"; - position = "161 316"; - extent = "128 23"; - minExtent = "16 18"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; + new ShellTextList(OP_RemapList) { + profile = "ShellTextArrayProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "0 0"; + extent = "266 8"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + altCommand = "OP_RemapList.doRemap();"; + helpTag = "0"; + enumerate = "0"; + resizeCell = "1"; + columns = "2 150"; + fitParentWidth = "1"; + clipColumnText = "0"; + }; + }; + }; + new ShellBitmapButton() { + profile = "ShellButtonProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "292 8"; + extent = "140 38"; + minExtent = "32 38"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + command = "restoreDefaultMappings();"; + helpTag = "0"; + text = "RESTORE DEFAULTS"; + simpleStyle = "0"; + }; + new ShellBitmapButton() { + profile = "ShellButtonProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "292 38"; + extent = "140 38"; + minExtent = "32 38"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + command = "ShellGetLoadFilename( \"LOAD CONTROL CONFIG\", \"prefs/*.cs\", \"isMapFile\", \"loadMapFile\" );"; + helpTag = "0"; + text = "LOAD"; + simpleStyle = "0"; + }; + new ShellBitmapButton() { + profile = "ShellButtonProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "292 68"; + extent = "140 38"; + minExtent = "32 38"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + command = "ShellGetSaveFilename( \"SAVE CONTROL CONFIG\", \"prefs/*.cs\", \"isMapFile\", \"saveMapFile\", $pref::Input::ActiveConfig );"; + helpTag = "0"; + text = "SAVE AS"; + simpleStyle = "0"; + }; + new ShellToggleButton(OP_MouseTgl) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "296 116"; + extent = "126 30"; + minExtent = "26 27"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "$pref::Input::MouseEnabled"; + helpTag = "0"; + text = "DINPUT MOUSE"; + maxLength = "255"; + }; + new ShellBitmapButton(OP_ConfigureMouseBtn) { + profile = "ShellButtonProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "292 146"; + extent = "140 38"; + minExtent = "32 38"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + command = "Canvas.pushDialog(MouseConfigDlg);"; + helpTag = "0"; + text = "CONFIGURE MOUSE"; + simpleStyle = "0"; + }; + new ShellToggleButton(OP_JoystickTgl) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "296 194"; + extent = "126 30"; + minExtent = "26 27"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "ENABLE JOYSTICK"; + maxLength = "255"; + }; + new ShellBitmapButton(OP_ConfigureJoystickBtn) { + profile = "ShellButtonProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "292 224"; + extent = "140 38"; + minExtent = "32 38"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + command = "Canvas.pushDialog(JoystickConfigDlg);"; + helpTag = "0"; + text = "CONFIGURE JOYSTICK"; + simpleStyle = "0"; + }; + new GuiTextCtrl() { + profile = "ShellTextRightProfile"; + horizSizing = "right"; + vertSizing = "top"; + position = "32 317"; + extent = "124 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Toggle Console Key:"; + maxLength = "255"; + }; + new ShellFieldCtrl() { + profile = "ShellFieldProfile"; + horizSizing = "right"; + vertSizing = "top"; + position = "161 316"; + extent = "128 23"; + minExtent = "16 18"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; - new GuiButtonCtrl(OP_ConsoleKeyBtn) { - profile = "ShellActiveTextProfile"; - horizSizing = "width"; - vertSizing = "height"; - position = "3 3"; - extent = "122 17"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - command = "OP_ConsoleKeyBtn.doRemap();"; - helpTag = "0"; - text = "grave"; - }; - }; - new GuiTextCtrl() { - profile = "ShellTextRightProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "22 9"; - extent = "100 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Control Group:"; - maxLength = "255"; - }; - new ShellPopupMenu(OP_ControlGroupMenu) { - profile = "ShellPopupProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "118 0"; - extent = "180 36"; - minExtent = "49 36"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Select Control Group"; - maxLength = "255"; - maxPopupHeight = "200"; - buttonBitmap = "gui/shll_pulldown"; - rolloverBarBitmap = "gui/shll_pulldownbar_rol"; - selectedBarBitmap = "gui/shll_pulldownbar_act"; - noButtonStyle = "0"; - }; - }; - new ShellFieldCtrl(OP_NetworkPane) { - profile = "ShellFieldProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "138 42"; - extent = "437 346"; - minExtent = "16 18"; - visible = "0"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; + new GuiButtonCtrl(OP_ConsoleKeyBtn) { + profile = "ShellActiveTextProfile"; + horizSizing = "width"; + vertSizing = "height"; + position = "3 3"; + extent = "122 17"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + command = "OP_ConsoleKeyBtn.doRemap();"; + helpTag = "0"; + text = "grave"; + }; + }; + new GuiTextCtrl() { + profile = "ShellTextRightProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "22 9"; + extent = "100 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Control Group:"; + maxLength = "255"; + }; + new ShellPopupMenu(OP_ControlGroupMenu) { + profile = "ShellPopupProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "118 0"; + extent = "180 36"; + minExtent = "49 36"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Select Control Group"; + maxLength = "255"; + maxPopupHeight = "200"; + buttonBitmap = "gui/shll_pulldown"; + rolloverBarBitmap = "gui/shll_pulldownbar_rol"; + selectedBarBitmap = "gui/shll_pulldownbar_act"; + noButtonStyle = "0"; + }; + }; + new ShellFieldCtrl(OP_NetworkPane) { + profile = "ShellFieldProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "138 42"; + extent = "437 346"; + minExtent = "16 18"; + visible = "0"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; - new GuiTextCtrl() { - profile = "ShellTextRightProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "9 16"; - extent = "60 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Presets:"; - maxLength = "255"; - }; - new ShellBitmapButton() { - profile = "ShellButtonProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "68 8"; - extent = "110 38"; - minExtent = "32 38"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - command = "OP_NetworkPane.applyPresets( \"modem1\" );"; - helpTag = "0"; - text = "28.8 MODEM"; - simpleStyle = "0"; - }; - new ShellBitmapButton() { - profile = "ShellButtonProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "170 8"; - extent = "110 38"; - minExtent = "32 38"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - command = "OP_NetworkPane.applyPresets( \"modem2\" );"; - helpTag = "0"; - text = "56K MODEM"; - simpleStyle = "0"; - }; - new ShellBitmapButton() { - profile = "ShellButtonProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "272 8"; - extent = "110 38"; - minExtent = "32 38"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - command = "OP_NetworkPane.applyPresets( \"lan\" );"; - helpTag = "0"; - text = "DSL/LAN"; - simpleStyle = "0"; - }; - new GuiTextCtrl() { - profile = "ShellTextProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "26 52"; - extent = "65 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Packet Rate:"; - maxLength = "255"; - }; - new ShellSliderCtrl(OP_PacketRateSlider) { - profile = "ShellSliderProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "36 67"; - extent = "170 24"; - minExtent = "12 24"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "value"; - helpTag = "0"; - range = "2.000000 32.000000"; - ticks = "31"; - value = "20"; - usePlusMinus = "1"; - }; - new GuiTextCtrl() { - profile = "ShellTextProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "231 52"; - extent = "62 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Packet Size:"; - maxLength = "255"; - }; - new ShellSliderCtrl(OP_PacketSizeSlider) { - profile = "ShellSliderProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "241 67"; - extent = "170 24"; - minExtent = "12 24"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "value"; - helpTag = "0"; - range = "100.000000 450.000000"; - ticks = "36"; - value = "350"; - usePlusMinus = "1"; - }; - new GuiTextCtrl() { - profile = "ShellTextProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "26 90"; - extent = "99 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Client Update Rate:"; - maxLength = "255"; - }; - new ShellSliderCtrl(OP_UpdateRateSlider) { - profile = "ShellSliderProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "36 105"; - extent = "170 24"; - minExtent = "12 24"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "value"; - helpTag = "0"; - range = "8.000000 32.000000"; - ticks = "25"; - value = "32"; - usePlusMinus = "1"; - }; - new GuiTextCtrl(OP_MasterServerTxt) { - profile = "ShellTextRightProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "11 153"; - extent = "200 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Display on Master Server:"; - maxLength = "255"; - }; - new ShellPopupMenu(OP_MasterServerMenu) { - profile = "ShellPopupProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "208 144"; - extent = "180 36"; - minExtent = "49 36"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Select Display Option"; - maxLength = "255"; - maxPopupHeight = "200"; - buttonBitmap = "gui/shll_pulldown"; - rolloverBarBitmap = "gui/shll_pulldownbar_rol"; - selectedBarBitmap = "gui/shll_pulldownbar_act"; - noButtonStyle = "0"; - }; - new GuiTextCtrl() { - profile = "ShellTextRightProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "67 191"; - extent = "144 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Server Location:"; - maxLength = "255"; - }; - new ShellPopupMenu(OP_RegionMenu) { - profile = "ShellPopupProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "208 182"; - extent = "180 36"; - minExtent = "49 36"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Select Region"; - maxLength = "255"; - maxPopupHeight = "200"; - buttonBitmap = "gui/shll_pulldown"; - rolloverBarBitmap = "gui/shll_pulldownbar_rol"; - selectedBarBitmap = "gui/shll_pulldownbar_act"; - noButtonStyle = "0"; - }; - new ShellToggleButton(OP_CheckEmailTgl) { - profile = "ShellRadioProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "123 233"; - extent = "190 30"; - minExtent = "26 27"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "$pref::Net::CheckEmail"; - helpTag = "0"; - text = "CHECK EMAIL WHILE PLAYING"; - maxLength = "255"; - }; - new ShellToggleButton(OP_ChatDisconnectTgl) { - profile = "ShellRadioProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "123 261"; - extent = "190 30"; - minExtent = "26 27"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "$pref::Net::DisconnectChat"; - helpTag = "0"; - text = "DISCONNECT FROM CHAT"; - maxLength = "255"; - }; - }; - new ShellFieldCtrl(OP_GamePane) { - profile = "ShellFieldProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "138 42"; - extent = "437 346"; - minExtent = "16 18"; - visible = "0"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; + new GuiTextCtrl() { + profile = "ShellTextRightProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "9 16"; + extent = "60 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Presets:"; + maxLength = "255"; + }; + new ShellPopupMenu(OP_NetworkPresetsMenu) { + profile = "ShellPopupProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "73 8"; + extent = "151 36"; + minExtent = "49 36"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Select Preset"; + maxLength = "255"; + maxPopupHeight = "200"; + buttonBitmap = "gui/shll_pulldown"; + rolloverBarBitmap = "gui/shll_pulldownbar_rol"; + selectedBarBitmap = "gui/shll_pulldownbar_act"; + noButtonStyle = "0"; + }; + new GuiTextCtrl() { + profile = "ShellTextProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "26 52"; + extent = "65 22"; + minExtent = "8 8"; + visible = "0"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Packet Rate:"; + maxLength = "255"; + }; + new ShellSliderCtrl(OP_PacketRateSlider) { + profile = "ShellSliderProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "36 67"; + extent = "170 24"; + minExtent = "12 24"; + visible = "0"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "value"; + helpTag = "0"; + range = "2.000000 32.000000"; + ticks = "31"; + value = "8.31579"; + usePlusMinus = "1"; + }; + new GuiTextCtrl() { + profile = "ShellTextProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "231 52"; + extent = "62 22"; + minExtent = "8 8"; + visible = "0"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Packet Size:"; + maxLength = "255"; + }; + new ShellSliderCtrl(OP_PacketSizeSlider) { + profile = "ShellSliderProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "241 67"; + extent = "170 24"; + minExtent = "12 24"; + visible = "0"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "value"; + helpTag = "0"; + range = "100.000000 450.000000"; + ticks = "36"; + value = "350"; + usePlusMinus = "1"; + }; + new GuiTextCtrl() { + profile = "ShellTextProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "26 47"; + extent = "99 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Client Update Rate:"; + maxLength = "255"; + }; + new ShellSliderCtrl(OP_UpdateRateSlider) { + profile = "ShellSliderProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "36 62"; + extent = "170 24"; + minExtent = "12 24"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "value"; + helpTag = "0"; + range = "8.000000 32.000000"; + ticks = "25"; + value = "32"; + usePlusMinus = "1"; + command = "updateNetworkSettings();"; + }; + new GuiTextCtrl(OP_MasterServerTxt) { + profile = "ShellTextRightProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "11 222"; + extent = "200 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Display on Master Server:"; + maxLength = "255"; + }; + new ShellPopupMenu(OP_MasterServerMenu) { + profile = "ShellPopupProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "208 214"; + extent = "180 36"; + minExtent = "49 36"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Select Display Option"; + maxLength = "255"; + maxPopupHeight = "200"; + buttonBitmap = "gui/shll_pulldown"; + rolloverBarBitmap = "gui/shll_pulldownbar_rol"; + selectedBarBitmap = "gui/shll_pulldownbar_act"; + noButtonStyle = "0"; + }; + new GuiTextCtrl() { + profile = "ShellTextRightProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "67 253"; + extent = "144 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Server Location:"; + maxLength = "255"; + }; + new ShellPopupMenu(OP_RegionMenu) { + profile = "ShellPopupProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "208 244"; + extent = "180 36"; + minExtent = "49 36"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Select Region"; + maxLength = "255"; + maxPopupHeight = "200"; + buttonBitmap = "gui/shll_pulldown"; + rolloverBarBitmap = "gui/shll_pulldownbar_rol"; + selectedBarBitmap = "gui/shll_pulldownbar_act"; + noButtonStyle = "0"; + }; + new ShellToggleButton(OP_CheckEmailTgl) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "123 283"; + extent = "190 30"; + minExtent = "26 27"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "$pref::Net::CheckEmail"; + helpTag = "0"; + text = "CHECK EMAIL WHILE PLAYING"; + maxLength = "255"; + }; + new ShellToggleButton(OP_ChatDisconnectTgl) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "123 311"; + extent = "190 30"; + minExtent = "26 27"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "$pref::Net::DisconnectChat"; + helpTag = "0"; + text = "DISCONNECT FROM CHAT"; + maxLength = "255"; + }; + new ShellFieldCtrl() { + profile = "ShellFieldProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "183 100"; + extent = "227 103"; + minExtent = "16 18"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; - new GuiTextCtrl() { - profile = "ShellTextProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "26 8"; - extent = "65 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Zoom Speed:"; - maxLength = "255"; - }; - new ShellSliderCtrl(OP_ZoomSpeedSlider) { - profile = "ShellSliderProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "36 23"; - extent = "170 24"; - minExtent = "12 24"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "value"; - helpTag = "0"; - range = "0.000000 500.000000"; - ticks = "501"; - value = "500"; - usePlusMinus = "1"; - }; - new ShellBitmapButton(OP_EditChatMenuBtn) { - profile = "ShellButtonProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "237 11"; - extent = "173 38"; - minExtent = "32 38"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - command = "Canvas.popDialog( OptionsDlg ); Canvas.pushDialog(EditChatMenuGui);"; - helpTag = "0"; - text = "EDIT CHAT MENU"; - simpleStyle = "0"; - }; - new ShellToggleButton() { - profile = "ShellRadioProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "31 64"; - extent = "170 30"; - minExtent = "26 27"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "$pref::toggleVehicleView"; - helpTag = "0"; - text = "3RD PERSON VEHICLE"; - maxLength = "255"; - }; - new ShellToggleButton() { - profile = "ShellRadioProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "236 64"; - extent = "170 30"; - minExtent = "26 27"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "$pref::SkipIntro"; - helpTag = "0"; - text = "SKIP INTRO"; - maxLength = "255"; - }; - new ShellToggleButton() { - profile = "ShellRadioProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "31 94"; - extent = "170 30"; - minExtent = "26 27"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "$pref::Vehicle::InvertYAxis"; - helpTag = "0"; - text = "INVERT VEHICLE Y-AXIS"; - maxLength = "255"; - }; - new ShellToggleButton(OP_ForceFeedbackTgl) { - profile = "ShellRadioProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "236 94"; - extent = "170 30"; - minExtent = "26 27"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "$Pref::useImmersion"; - command = "toggleImmersion();"; - helpTag = "0"; - text = "ENABLE FORCE FEEDBACK"; - maxLength = "255"; - }; - new ShellToggleButton() { - profile = "ShellRadioProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "31 124"; - extent = "170 30"; - minExtent = "26 27"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "$pref::enableBadWordFilter"; - helpTag = "0"; - text = "ENABLE BAD WORD FILTER"; - maxLength = "255"; - }; - new ShellToggleButton() { - profile = "ShellRadioProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "236 124"; - extent = "170 30"; - minExtent = "26 27"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - variable = "$pref::usePrefSkins"; - helpTag = "0"; - text = "SHOW PERSONAL SKINS"; - maxLength = "255"; - }; - new GuiTextCtrl(OP_LaunchScreenTxt) { - profile = "ShellTextRightProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "79 173"; - extent = "100 22"; - minExtent = "8 8"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Launch Screen:"; - maxLength = "255"; - }; - new ShellPopupMenu(OP_LaunchScreenMenu) { - profile = "ShellPopupProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "176 164"; - extent = "180 36"; - minExtent = "49 36"; - visible = "1"; - hideCursor = "0"; - bypassHideCursor = "0"; - helpTag = "0"; - text = "Select Screen"; - maxLength = "255"; - maxPopupHeight = "200"; - buttonBitmap = "gui/shll_pulldown"; - rolloverBarBitmap = "gui/shll_pulldownbar_rol"; - selectedBarBitmap = "gui/shll_pulldownbar_act"; - noButtonStyle = "0"; - }; - }; - }; + new HudNetDisplay(OP_NetworkDisplayHud) { + profile = "GuiDefaultProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "2 1"; + extent = "223 101"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + fillColor = "0.250000 0.250000 0.250000 0.250000"; + frameColor = "0.000000 1.000000 0.000000 1.000000"; + opacity = "1"; + historySize = "100"; + updatePeriod = "50"; + infoCallback = "1"; + }; + }; + new ShellFieldCtrl(OP_NetworkDisplayTextFrame) { + profile = "ShellFieldProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "25 100"; + extent = "149 103"; + minExtent = "16 18"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + }; + }; + new ShellFieldCtrl(OP_GamePane) { + profile = "ShellFieldProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "138 42"; + extent = "437 346"; + minExtent = "16 18"; + visible = "0"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + + new GuiTextCtrl() { + profile = "ShellTextProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "26 8"; + extent = "65 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Zoom Speed:"; + maxLength = "255"; + }; + new ShellSliderCtrl(OP_ZoomSpeedSlider) { + profile = "ShellSliderProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "36 23"; + extent = "170 24"; + minExtent = "12 24"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "value"; + helpTag = "0"; + range = "0.000000 500.000000"; + ticks = "501"; + value = "500"; + usePlusMinus = "1"; + }; + new ShellBitmapButton(OP_EditChatMenuBtn) { + profile = "ShellButtonProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "237 11"; + extent = "173 38"; + minExtent = "32 38"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + command = "Canvas.popDialog( OptionsDlg ); Canvas.pushDialog(EditChatMenuGui);"; + helpTag = "0"; + text = "EDIT CHAT MENU"; + simpleStyle = "0"; + }; + new ShellToggleButton() { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "31 64"; + extent = "170 30"; + minExtent = "26 27"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "$pref::toggleVehicleView"; + helpTag = "0"; + text = "3RD PERSON VEHICLE"; + maxLength = "255"; + }; + new ShellToggleButton() { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "236 64"; + extent = "170 30"; + minExtent = "26 27"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "$pref::SkipIntro"; + helpTag = "0"; + text = "SKIP INTRO"; + maxLength = "255"; + }; + new ShellToggleButton() { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "31 94"; + extent = "170 30"; + minExtent = "26 27"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "$pref::Vehicle::InvertYAxis"; + helpTag = "0"; + text = "INVERT VEHICLE Y-AXIS"; + maxLength = "255"; + }; + new ShellToggleButton(OP_ForceFeedbackTgl) { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "236 94"; + extent = "170 30"; + minExtent = "26 27"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "$Pref::useImmersion"; + command = "toggleImmersion();"; + helpTag = "0"; + text = "ENABLE FORCE FEEDBACK"; + maxLength = "255"; + }; + new ShellToggleButton() { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "31 124"; + extent = "170 30"; + minExtent = "26 27"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "$pref::enableBadWordFilter"; + helpTag = "0"; + text = "ENABLE BAD WORD FILTER"; + maxLength = "255"; + }; + new ShellToggleButton() { + profile = "ShellRadioProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "236 124"; + extent = "170 30"; + minExtent = "26 27"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "$pref::usePrefSkins"; + helpTag = "0"; + text = "SHOW PERSONAL SKINS"; + maxLength = "255"; + }; + new GuiTextCtrl(OP_LaunchScreenTxt) { + profile = "ShellTextRightProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "79 173"; + extent = "100 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Launch Screen:"; + maxLength = "255"; + }; + new ShellPopupMenu(OP_LaunchScreenMenu) { + profile = "ShellPopupProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "176 164"; + extent = "180 36"; + minExtent = "49 36"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Select Screen"; + maxLength = "255"; + maxPopupHeight = "200"; + buttonBitmap = "gui/shll_pulldown"; + rolloverBarBitmap = "gui/shll_pulldownbar_rol"; + selectedBarBitmap = "gui/shll_pulldownbar_act"; + noButtonStyle = "0"; + }; + }; + }; }; + //--- OBJECT WRITE END --- diff --git a/base/gui/PlayGui.gui b/base/gui/PlayGui.gui index 2b4d04e..cab720e 100644 --- a/base/gui/PlayGui.gui +++ b/base/gui/PlayGui.gui @@ -9,7 +9,7 @@ new GameTSCtrl(PlayGui) { visible = "1"; setFirstResponder = "1"; modal = "1"; - hideCursor = "1"; + hideCursor = "1"; helpTag = "0"; beaconBaseTextureName = "gui/beacon_base"; beaconTargetTextureName = "gui/crosshairs"; @@ -199,20 +199,156 @@ new GameTSCtrl(PlayGui) { autoResize = "0"; subRegion = "0 2 65 15"; }; - - - new HudBitmapCtrl(lagHudIndicator) { - profile = "GuiButtonProfile"; + + new ShellFieldCtrl(NetGraphHudFrame) { + profile = "GuiChatBackProfile"; horizSizing = "left"; vertSizing = "bottom"; - position = "570 38"; - extent = "35 32"; + position = "266 8"; + extent = "176 50"; + minExtent = "8 8"; visible = "0"; - frameColor = "0 1 0 1"; - opacity = "0.8"; - bitmap = "gui/hud_disconnect.png"; + + new HudNetDisplay(NetGraphHud) { + profile = "HudScoreProfile"; + horizSizing = "left"; + vertSizing = "bottom"; + position = "1 1"; + extent = "174 48"; + minExtent = "8 8"; + visible = "1"; + }; }; + new GuiControl(NetBarHudFrame) { + profile = "GuiDefaultProfile"; + horizSizing = "left"; + vertSizing = "bottom"; + position = "290 0"; + extent = "129 68"; + minExtent = "8 8"; + visible = "0"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + + new HudNetDisplay(NetBarHud) { + profile = "GuiDefaultProfile"; + horizSizing = "left"; + vertSizing = "bottom"; + position = "1 1"; + extent = "174 48"; + minExtent = "8 8"; + visible = "1"; + infoCallback = "1"; + renderGraph = false; + historySize = 2; + }; + + new ShellFieldCtrl() { + profile = "ShellFieldProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "6 27"; + extent = "120 18"; + minExtent = "16 18"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + + new HudBarBaseCtrl(NetBarHudSendBar) { + profile = "GuiDefaultProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "0 0"; + extent = "120 18"; + minExtent = "120 18"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + fillColor = "0.000000 0.800000 0.000000 1.000000"; + frameColor = "0.000000 1.000000 0.000000 1.000000"; + opacity = "0.6"; + autoCenter = "0"; + autoResize = "0"; + flipVertical = "0"; + flipHorizontal = "0"; + subRegion = "2 2 116 15"; + displayMounted = "0"; + pulseRate = "500"; + pulseThreshold = "0.3"; + verticalFill = "0"; + }; + }; + new ShellFieldCtrl() { + profile = "ShellFieldProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "6 46"; + extent = "120 18"; + minExtent = "16 18"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + + new HudBarBaseCtrl(NetBarHudReceiveBar) { + profile = "GuiDefaultProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "0 0"; + extent = "120 18"; + minExtent = "120 18"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + fillColor = "0.000000 0.800000 0.000000 1.000000"; + frameColor = "0.000000 1.000000 0.000000 1.000000"; + opacity = "0.6"; + autoCenter = "0"; + autoResize = "0"; + flipVertical = "0"; + flipHorizontal = "0"; + subRegion = "2 2 116 15"; + displayMounted = "0"; + pulseRate = "500"; + pulseThreshold = "0.3"; + verticalFill = "0"; + }; + }; + new GuiTextCtrl(NetBarHudPingText) { + profile = "ShellTextProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "9 9"; + extent = "36 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "0ms"; + maxLength = "255"; + }; + new GuiTextCtrl(NetBarHudPacketLossText) { + profile = "ShellTextRightProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "76 9"; + extent = "48 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "0%"; + maxLength = "255"; + }; + }; + new GuiControl(retCenterHud) { profile = "GuiDefaultProfile"; horizSizing = "center"; @@ -405,13 +541,13 @@ new GameTSCtrl(PlayGui) { markerImageNames[2] = "small_diamond"; // assigned task markerImageNames[3] = "small_cross"; // client waypoint markerImageNames[4] = "small_circle"; // target - - missileMarker1 = "gui/RET_missile_marker"; - missileMarker2 = "gui/RET_missile_marker_red"; - missileFlash1 = "gui/RET_missile_horizflash_red"; - missileFlash2 = "gui/RET_missile_vertflash_red"; + + missileMarker1 = "gui/RET_missile_marker"; + missileMarker2 = "gui/RET_missile_marker_red"; + missileFlash1 = "gui/RET_missile_horizflash_red"; + missileFlash2 = "gui/RET_missile_vertflash_red"; - LOSMarkerUpdate = 250; // amount of time in ms that markers get LOS updates. Turn this down to get more updates or up to get less. + LOSMarkerUpdate = 250; // amount of time in ms that markers get LOS updates. Turn this down to get more updates or up to get less. }; new GuiControl(dashboardHud) { diff --git a/base/gui/RemapDlg.gui b/base/gui/RemapDlg.gui index c0010cc..6a640f4 100644 --- a/base/gui/RemapDlg.gui +++ b/base/gui/RemapDlg.gui @@ -7,6 +7,8 @@ new GuiControl(RemapDlg) { extent = "640 480"; minExtent = "8 8"; visible = "1"; + hideCursor = "1"; + bypassHideCursor = "0"; helpTag = "0"; new ShellPaneCtrl(RemapFrame) { diff --git a/base/gui/ServerInfoDlg.gui b/base/gui/ServerInfoDlg.gui index f9b42e1..ff8e527 100644 --- a/base/gui/ServerInfoDlg.gui +++ b/base/gui/ServerInfoDlg.gui @@ -88,7 +88,7 @@ new GuiControl(ServerInfoDlg) { }; new ShellScrollCtrl(SI_ContentScroll) { profile = "NewScrollCtrlProfile"; - horizSizing = "right"; + horizSizing = "width"; vertSizing = "bottom"; position = "0 100"; extent = "336 162"; @@ -105,20 +105,20 @@ new GuiControl(ServerInfoDlg) { new GuiScrollContentCtrl() { profile = "GuiDefaultProfile"; - horizSizing = "right"; + horizSizing = "width"; vertSizing = "bottom"; position = "7 7"; - extent = "322 174"; + extent = "306 174"; minExtent = "8 8"; visible = "1"; helpTag = "0"; new GuiMLTextCtrl(SI_ContentWindow) { profile = "InfoWindowProfile"; - horizSizing = "right"; + horizSizing = "width"; vertSizing = "bottom"; position = "0 0"; - extent = "271 52"; + extent = "306 52"; minExtent = "24 52"; visible = "1"; helpTag = "0"; diff --git a/base/gui/guiProfiles.cs b/base/gui/guiProfiles.cs index cc701b4..096d00e 100644 --- a/base/gui/guiProfiles.cs +++ b/base/gui/guiProfiles.cs @@ -71,7 +71,7 @@ new GuiCursor(ResizeDownCursor) new GuiCursor(GrabCursor) { hotSpot = "9 13"; - bitmapName = "gui/CUR_Grab.png"; + bitmapName = "gui/CUR_Grab"; }; //-------------------------------------------------------------------------- @@ -463,7 +463,7 @@ new GuiControlProfile ("ShellServerBrowserProfile") fontColorHL = "6 245 215"; fontColorNA = "128 128 128"; fontColorSEL = "25 68 56"; - fontColors[4] = "20 197 93"; // Mod base color + fontColors[4] = "20 167 93"; // Mod base color fontColors[5] = "40 217 113"; // Mod rollover color fontColors[6] = "5 60 30"; // Mod selected color fontColors[7] = "108 108 108"; // Differing build base color @@ -1071,7 +1071,7 @@ new GuiControlProfile ("GuiTextBGWhiteRightProfile") new GuiControlProfile ("GuiHelpLineProfile") { borderColor = "231 101 26"; - bitmap = "gui/hud_dot.png"; + bitmap = "gui/hud_dot"; }; new GuiControlProfile ("GuiTextObjHudCenterProfile") diff --git a/base/input.log b/base/input.log index 82e6fd1..c52a935 100644 --- a/base/input.log +++ b/base/input.log @@ -1,4 +1,4 @@ -Input log opened at Fri Jun 8 23:22:20 2001 +Input log opened at Tue Jul 3 14:37:21 2001 Operating System: WinNT version 5.0 diff --git a/base/missions/Tombstone.mis b/base/missions/Tombstone.mis index d56712f..20b47df 100644 --- a/base/missions/Tombstone.mis +++ b/base/missions/Tombstone.mis @@ -85,6 +85,27 @@ new SimGroup(MissionGroup) { cloudSpeed0 = "0.000050 0.000050"; }; new SimGroup(ObserverDropPoints) { + new Camera(ODP1) { + position = "211.873 -381.834 217.636"; + rotation = "0.999673 -0.00146427 0.025526 6.5684"; + scale = "1 1 1"; + dataBlock = "Observer"; + lockCount = "1"; + }; + new Camera(ODP2) { + position = "-28.7603 -76.9109 85.8217"; + rotation = "0.527807 -0.0636426 0.846977 16.2049"; + scale = "1 1 1"; + dataBlock = "Observer"; + lockCount = "1"; + }; + new Camera(ODP3) { + position = "-470.718 251.278 227.398"; + rotation = "0.201232 -0.0969256 0.974736 52.5921"; + scale = "1 1 1"; + dataBlock = "Observer"; + lockCount = "1"; + }; }; new SimGroup(Environmental) { diff --git a/base/prefs/French Config.cs b/base/prefs/French Config.cs index 4e97415..25b080d 100644 --- a/base/prefs/French Config.cs +++ b/base/prefs/French Config.cs @@ -93,4 +93,5 @@ moveMap.bind(mouse0, "yaxis", pitch); moveMap.bind(mouse0, "button0", mouseFire); moveMap.bind(mouse0, "button1", mouseJet); moveMap.bind(mouse0, "zaxis", cycleWeaponAxis); -GlobalActionMap.bind(keyboard, "super2", toggleConsole); +if (!isDemo()) + GlobalActionMap.bind(keyboard, "super2", toggleConsole); diff --git a/base/prefs/German config.cs b/base/prefs/German config.cs index 4eeb627..ede5758 100644 --- a/base/prefs/German config.cs +++ b/base/prefs/German config.cs @@ -94,4 +94,5 @@ moveMap.bind(mouse0, "yaxis", pitch); moveMap.bind(mouse0, "button0", mouseFire); moveMap.bind(mouse0, "button1", mouseJet); moveMap.bind(mouse0, "zaxis", cycleWeaponAxis); -GlobalActionMap.bind(keyboard, "^", toggleConsole); +if (!isDemo()) + GlobalActionMap.bind(keyboard, "^", toggleConsole); diff --git a/base/prefs/Italian Config.cs b/base/prefs/Italian Config.cs index be80d9b..fd1a8b2 100644 --- a/base/prefs/Italian Config.cs +++ b/base/prefs/Italian Config.cs @@ -94,4 +94,5 @@ moveMap.bind(mouse0, "yaxis", pitch); moveMap.bind(mouse0, "button0", mouseFire); moveMap.bind(mouse0, "button1", mouseJet); moveMap.bind(mouse0, "zaxis", cycleWeaponAxis); -GlobalActionMap.bind(keyboard, "backslash", toggleConsole); +if (!isDemo()) + GlobalActionMap.bind(keyboard, "backslash", toggleConsole); diff --git a/base/prefs/Spanish Config.cs b/base/prefs/Spanish Config.cs index 9be7767..8bc3f61 100644 --- a/base/prefs/Spanish Config.cs +++ b/base/prefs/Spanish Config.cs @@ -93,4 +93,5 @@ moveMap.bind(mouse0, "yaxis", pitch); moveMap.bind(mouse0, "button0", mouseFire); moveMap.bind(mouse0, "button1", mouseJet); moveMap.bind(mouse0, "zaxis", cycleWeaponAxis); -GlobalActionMap.bind(keyboard, "º", toggleConsole); +if (!isDemo()) + GlobalActionMap.bind(keyboard, "º", toggleConsole); diff --git a/base/prefs/WASDConfig.cs b/base/prefs/WASDConfig.cs index f088ac0..f203812 100644 --- a/base/prefs/WASDConfig.cs +++ b/base/prefs/WASDConfig.cs @@ -102,4 +102,5 @@ observerMap.bind(keyboard, "space", jump); observerMap.bind(keyboard, "e", moveup); observerMap.bind(keyboard, "c", movedown); observerMap.bind(mouse0, "button1", mouseJet); -GlobalActionMap.bind(keyboard, "grave", toggleConsole); +if (!isDemo()) + GlobalActionMap.bind(keyboard, "grave", toggleConsole); diff --git a/base/scripts/CTFGame.cs b/base/scripts/CTFGame.cs index 2602f13..19b8819 100644 --- a/base/scripts/CTFGame.cs +++ b/base/scripts/CTFGame.cs @@ -146,6 +146,10 @@ function CTFGame::missionLoadDone(%game) // remove MissionGroup.clearFlagWaypoints(); + + //reset some globals, just in case... + $dontScoreTimer[1] = false; + $dontScoreTimer[2] = false; } function CTFGame::playerTouchFlag(%game, %player, %flag) @@ -212,6 +216,7 @@ function CTFGame::playerTouchEnemyFlag(%game, %player, %flag) } %flag.hide(true); + %flag.startFade(0, 0, false); %flag.isHome = false; if(%flag.stand) %flag.stand.getDataBlock().onFlagTaken(%flag.stand);//animate, if exterior stand @@ -675,7 +680,10 @@ function CTFGame::awardScoreFlagTouch(%game, %cl, %flag) return; $dontScoreTimer[%team] = true; - schedule(%game.TOUCH_DELAY_MS, 0, eval, "$dontScoreTimer["@%team@"] = false;"); + //tinman - needed to remove all game calls to "eval" for the PURE server... + %game.schedule(%game.TOUCH_DELAY_MS, resetDontScoreTimer, %team); + //schedule(%game.TOUCH_DELAY_MS, 0, eval, "$dontScoreTimer["@%team@"] = false;"); + //schedule(%game.TOUCH_DELAY_MS, 0, eval, "$dontScoreTimer["@%team@"] = false;"); $TeamScore[%team] += %game.SCORE_PER_TEAM_FLAG_TOUCH; messageAll('MsgTeamScoreIs', "", %team, $TeamScore[%team]); @@ -689,6 +697,11 @@ function CTFGame::awardScoreFlagTouch(%game, %cl, %flag) %game.checkScoreLimit(%team); } +function CTFGame::resetDontScoreTimer(%game, %team) +{ + $dontScoreTimer[%team] = false; +} + function CTFGame::checkScoreLimit(%game, %team) { %scoreLimit = MissionGroup.CTF_scoreLimit * %game.SCORE_PER_TEAM_FLAG_CAP; @@ -848,6 +861,9 @@ function CTFGame::vStationOnRepaired(%game, %obj, %objName) function CTFGame::enterMissionArea(%game, %playerData, %player) { + if(%player.getState() $= "Dead") + return; + %player.client.outOfBounds = false; messageClient(%player.client, 'EnterMissionArea', '\c1You are back in the mission area.'); logEcho(%player.client.nameBase@" (pl "@%player@"/cl "@%player.client@") entered mission area"); @@ -862,6 +878,9 @@ function CTFGame::enterMissionArea(%game, %playerData, %player) function CTFGame::leaveMissionArea(%game, %playerData, %player) { + if(%player.getState() $= "Dead") + return; + // maybe we'll do this just in case %player.client.outOfBounds = true; // if the player is holding a flag, strip it and throw it back into the mission area @@ -925,3 +944,61 @@ function CTFGame::applyConcussion(%game, %player) %game.dropFlag( %player ); } +function CTFGame::vehicleDestroyed(%game, %vehicle, %destroyer) +{ + //vehicle name + %data = %vehicle.getDataBlock(); + //%vehicleType = getTaggedString(%data.targetNameTag) SPC getTaggedString(%data.targetTypeTag); + %vehicleType = getTaggedString(%data.targetTypeTag); + if(%vehicleType !$= "MPB") + %vehicleType = strlwr(%vehicleType); + %pref = (%vehicleType $= "Assault Tank") ? "an" : "a"; + + %enemyTeam = ( %destroyer.team == 1 ) ? 2 : 1; + + //what destroyed this vehicle + if(%destroyer.client) + { + //it was a player, or his mine, satchel, whatever... + %destroyer = %destroyer.client; + } + else if(%destroyer.getClassName() $= "Turret") + { + if(%destroyer.getControllingClient()) + { + //manned turret + %destroyer = %destroyer.getControllingClient(); + } + else + { + %destroyerName = "A turret"; + } + } + else if(%destroyer.getDataBlock().catagory $= "Vehicles") + { + // Vehicle vs vehicle kill! + if(%name $= "BomberFlyer" || %name $= "AssaultVehicle") + %gunnerNode = 1; + else + %gunnerNode = 0; + + if(%destroyer.getMountNodeObject(%gunnerNode)) + %destroyer = %destroyer.getMountNodeObject(gunnerNode).client; + } + else // Is there anything else we care about? + return; + + + if(%destroyerName $= "") + %destroyerName = %destroyer.name; + + if(%vehicle.team == %destroyer.team) // team kill + messageAll( 'msgVehicleTeamDestroy', '\c0%1 TEAMKILLED %3 %2!', %destroyerName, %vehicleType, %pref); + + else // legit kill + { + messageTeamExcept(%destroyer, 'msgVehicleDestroy', '\c0%1 destroyed an enemy %2.', %destroyerName, %vehicleType); + messageTeam(%enemyTeam, 'msgVehicleDestroy', '\c0%1 destroyed your team\'s %2.', %destroyerName, %vehicleType); + messageClient(%destroyer, 'msgVehicleDestroy', '\c0You destroyed an enemy %1.', %vehicleType); + } +} \ No newline at end of file diff --git a/base/scripts/ChatGui.cs b/base/scripts/ChatGui.cs index ca63518..5c22da2 100644 --- a/base/scripts/ChatGui.cs +++ b/base/scripts/ChatGui.cs @@ -245,25 +245,42 @@ function ChatGuiMessageVector::urlClickCallback(%this,%type,%url,%content) JoinGame(%content); case "warrior": LaunchBrowser(%url,"Warrior"); + default: + return; } } //------------------------------------------------------------------------------ function ChatSendText() { - if ($IRCClient::people.getObject(0).flags & $PERSON_AWAY) - IRCClient::away(""); - else - { - if ($IRCClient::awaytimeout) - cancel($IRCClient::awaytimeout); - $IRCClient::awaytimeout = schedule($AWAY_TIMEOUT,0,"ChatAway_Timeout"); - } - if ($IRCClient::currentChannel.private) - IRCClient::send2(ChatMessageEntry.getValue(),$IRCClient::currentChannel.getName()); - else - IRCClient::send2(ChatMessageEntry.getValue(),""); - ChatMessageEntry.setValue(""); + TextCheck2(ChatMessageEntry.getValue(),ChatMessageEntry); + if(ChatMessageEntry.textCheck) + { + for(%x=0;%x -1 ) + FilterEditGameType.setSelected( %idx ); + FilterEditMissionType.sort( true, 1 ); + %idx = FilterEditMissionType.findText( FilterEditMissionType.getText() ); + if ( %idx > -1 ) + FilterEditMissionType.setSelected( %idx ); } //------------------------------------------------------------------------------ diff --git a/base/scripts/DebriefGui.cs b/base/scripts/DebriefGui.cs index 5f677aa..f5d1aa8 100644 --- a/base/scripts/DebriefGui.cs +++ b/base/scripts/DebriefGui.cs @@ -90,8 +90,7 @@ function debriefDisconnect() //------------------------------------------------------------------------------ function debriefContinue() { - Canvas.setContent( LoadingGui ); - Canvas.repaint(); + checkGotLoadInfo(); } //------------------------------------------------------------------------------ diff --git a/base/scripts/EditChatMenuGui.cs b/base/scripts/EditChatMenuGui.cs index 19ae96a..e417934 100644 --- a/base/scripts/EditChatMenuGui.cs +++ b/base/scripts/EditChatMenuGui.cs @@ -383,7 +383,7 @@ function EditChatCommandDlg::onWake( %this ) if ( isObject( $ChatTable[%i] ) ) EditChatCommandList.add( $ChatTable[%i].name, %i ); } - EditChatCommandList.sort(); + EditChatCommandList.sort( true ); // Select the current command: if ( isObject( $ChatTable[$ECI::command] ) ) diff --git a/base/scripts/GameGui.cs b/base/scripts/GameGui.cs index 8bee7d6..ad95740 100644 --- a/base/scripts/GameGui.cs +++ b/base/scripts/GameGui.cs @@ -18,7 +18,7 @@ function GameGui::onWake( %this ) { Canvas.pushDialog( LaunchToolbarDlg ); - if ( isDemo() || $PlayingOnline ) + if ( isDemo() || isDemoServer() || $PlayingOnline ) GM_Frame.setTitle( "GAME" ); else GM_Frame.setTitle( "LAN GAME" ); @@ -26,15 +26,23 @@ function GameGui::onWake( %this ) // This is essentially an "isInitialized" flag... if ( GM_TabView.tabCount() == 0 ) { - GM_TabView.addTab( 1, "JOIN" ); - if ( !isDemo() ) + if ( isDemo() ) + { + GM_TabView.addTab( 1, "JOIN" ); + %this.pane = "Join"; + } + else if ( isDemoServer() ) + { + GM_TabView.addTab( 2, "HOST" ); + %this.pane = "Host"; + } + else { + GM_TabView.addTab( 1, "JOIN" ); GM_TabView.addTab( 2, "HOST" ); GM_TabView.addTab( 3, "WARRIOR SETUP", 1 ); queryMasterGameTypes(); } - else - %this.pane = "Join"; } switch$ ( %this.pane ) @@ -130,7 +138,10 @@ function GM_JoinPane::onActivate( %this ) BrowserMap.delete(); } new ActionMap( BrowserMap ); - BrowserMap.bindCmd( keyboard, insert, "GMJ_Browser.insertIPAddress();", "" ); + if ( !isDemo() ) + BrowserMap.bindCmd( keyboard, insert, "GMJ_Browser.insertIPAddress();", "" ); + BrowserMap.bindCmd( keyboard, "ctrl f", "Canvas.pushDialog( FindServerDlg );", "" ); + BrowserMap.bindCmd( keyboard, F3, "GMJ_Browser.findNextServer();", "" ); BrowserMap.push(); GM_VersionText.setVisible( !isDemo() ); @@ -142,8 +153,11 @@ function GM_JoinPane::onActivate( %this ) //------------------------------------------------------------------------------ function GM_JoinPane::onDeactivate( %this ) { - BrowserMap.pop(); - BrowserMap.delete(); + if ( isObject( BrowserMap ) ) + { + BrowserMap.pop(); + BrowserMap.delete(); + } GM_VersionText.setVisible( false ); @@ -172,9 +186,12 @@ $BrowserColumnCount++; $BrowserColumnName[5] = "Mission Name"; $BrowserColumnRange[5] = "25 300"; $BrowserColumnCount++; -$BrowserColumnName[6] = "Rules Set"; -$BrowserColumnRange[6] = "25 300"; -$BrowserColumnCount++; +if ( !isDemo() ) +{ + $BrowserColumnName[6] = "Rules Set"; + $BrowserColumnRange[6] = "25 300"; + $BrowserColumnCount++; +} $BrowserColumnName[7] = "# Players (Bots)"; $BrowserColumnRange[7] = "25 150"; $BrowserColumnCount++; @@ -488,10 +505,37 @@ function EnterIPDlg::onDone( %this ) %address = "IP:" @ %address; if ( strpos( %address, ":", 3 ) == -1 ) %address = %address @ ":28000"; - - error( ">> address = \"" @ %address @ "\" <<" ); + + echo( "Starting ping to server " @ %address @ "..." ); pushServerAddress( %address ); - GMJ_Browser.selectRowByAddress( %address ); + GMJ_Browser.selectRowByAddress( %address, true ); +} + +//------------------------------------------------------------------------------ +function FindServerDlg::onWake( %this ) +{ + FS_SearchPattern.validate(); + FS_SearchPattern.selectAll(); +} + +//------------------------------------------------------------------------------ +function FindServerDlg::onGo( %this ) +{ + %pattern = FS_SearchPattern.getValue(); + if ( %pattern !$= "" ) + { + Canvas.popDialog( FindServerDlg ); + if ( !GMJ_Browser.findServer( %pattern ) ) + MessageBoxOK( "NOT FOUND", "No servers with \"" @ %pattern @ "\" in their name were found." ); + } + else + alxPlay( InputDeniedSound, 0, 0, 0 ); +} + +//------------------------------------------------------------------------------ +function FS_SearchPattern::validate( %this ) +{ + FS_GoBtn.setActive( %this.getValue() !$= "" ); } //------------------------------------------------------------------------------ @@ -558,7 +602,7 @@ function ServerInfoDlg::update( %this ) %temp = getRecord( %info, 5 ); if ( %temp !$= "" ) %infoText = %infoText NL "" @ %this.headerStyle @ "MAP NAME:" TAB %temp @ ""; - %temp = getRecord( %info, 6 ); + %temp = getRecords( %info, 6, 10 ); if ( %temp !$= "" ) %infoText = %infoText NL "" @ %this.headerStyle @ "SERVER INFO:" TAB %temp @ ""; @@ -607,22 +651,22 @@ function SI_ContentWindow::fill( %this, %content ) %record++; if ( %teamCount > 1 ) { - %string = "" @ ServerInfoDlg.headerStyle @ "TEAMS" TAB "SCORE"; + %string = "" @ ServerInfoDlg.headerStyle @ "TEAMSSCORE"; for ( %i = 0; %i < %teamCount; %i++ ) { %teamEntry = getRecord( %content, %record ); - %string = %string NL "\t" @ getField( %teamEntry, 0 ) @ "" TAB getField( %teamEntry, 1 ); + %string = %string NL "" SPC getField( %teamEntry, 0 ) @ "" SPC getField( %teamEntry, 1 ); %record++; } %playerCount = getRecord( %content, %record ); %record++; - %string = %string NL "\n" @ ServerInfoDlg.headerStyle @ "PLAYERS" TAB "TEAM" TAB "SCORE"; + %string = %string NL "\n" @ ServerInfoDlg.headerStyle @ "PLAYERSTEAMSCORE"; for ( %i = 0; %i < %playerCount; %i++ ) { %playerEntry = getRecord( %content, %record ); - %string = %string NL "\t" @ getField( %playerEntry, 0 ) @ "" - TAB "" @ getField( %playerEntry, 1 ) @ "" TAB getField( %playerEntry, 2 ); + %string = %string NL "" SPC getField( %playerEntry, 0 ) @ "" + SPC getField( %playerEntry, 1 ) @ "" SPC getField( %playerEntry, 2 ) @ ""; %record++; } } @@ -631,11 +675,11 @@ function SI_ContentWindow::fill( %this, %content ) %record++; %playerCount = getRecord( %content, %record ); %record++; - %string = "" @ ServerInfoDlg.headerStyle @ "PLAYERS" TAB "SCORE"; + %string = "" @ ServerInfoDlg.headerStyle @ "PLAYERSSCORE"; for ( %i = 0; %i < %playerCount; %i++ ) { %playerEntry = getRecord( %content, %record ); - %string = %string NL "\t" @ getField( %playerEntry, 0 ) @ "" TAB getField( %playerEntry, 2 ); + %string = %string NL "" SPC getField( %playerEntry, 0 ) @ "" SPC getField( %playerEntry, 2 ); %record++; } } @@ -689,6 +733,7 @@ function JoinGame(%address) %playerSkin = getField( %playerPref, 2 ); %playerVoice = getField( %playerPref, 3 ); %playerVoicePitch = getField( %playerPref, 4 ); + LoadingGui.gotLoadInfo = ""; connect( %address, $JoinGamePassword, %playerName, %playerRaceGender, %playerSkin, %playerVoice, %playerVoicePitch ); } @@ -758,6 +803,7 @@ function buildMissionTypePopup( %popup ) %popup.clear(); for( %type = 0; %type < $HostTypeCount; %type++ ) %popup.add( $HostTypeDisplayName[%type], %type ); + %popup.sort( true ); } //------------------------------------------------------------------------------ @@ -994,8 +1040,8 @@ function StartHostedGame() if ( $Host::Dedicated ) { MessageBoxYesNo( "WARNING", - "You are about to launch a dedicated server and leave Tribes 2. Do you want to continue?", - "tryToLaunchDedicatedServer();" ); + "You are about to launch a dedicated server and quit Tribes 2. Do you want to continue?", + "tryToLaunchDedicatedServer(" @ $Host::PureServer @ ");" ); return; } @@ -1023,10 +1069,10 @@ function StartHostedGame() } //------------------------------------------------------------------------------ -function tryToLaunchDedicatedServer() +function tryToLaunchDedicatedServer( %pure ) { %numBots = $Host::BotsEnabled ? $Host::BotCount : 0; - if ( launchDedicatedServer( $Host::MissionType, $Host::Map, %numBots ) ) + if ( launchDedicatedServer( $Host::MissionType, $Host::Map, %numBots, %pure ) ) quit(); else { @@ -1162,6 +1208,7 @@ function AdvancedHostDlg::onWake( %this ) // Set all of the controls to the current pref states: AH_HostPort.setText( $Host::Port ); AH_DedicatedTgl.setValue( $Host::Dedicated ); + AH_DedicatedTgl.onAction(); AH_TournamentTgl.setValue( $Host::TournamentMode ); AH_AdminVoteTgl.setValue( $Host::allowAdminPlayerVotes ); AH_AllowSmurfTgl.setValue( !$Host::NoSmurfs ); @@ -1180,6 +1227,8 @@ function AdvancedHostDlg::accept( %this ) // Apply all of the changes: $Host::Port = AH_HostPort.getValue(); $Host::Dedicated = AH_DedicatedTgl.getValue(); + if ( $Host::Dedicated ) + $Host::PureServer = AH_PureServerTgl.getValue(); $Host::TournamentMode = AH_TournamentTgl.getValue(); $Host::allowAdminPlayerVotes = AH_AdminVoteTgl.getValue(); $Host::NoSmurfs = !AH_AllowSmurfTgl.getValue(); @@ -1197,6 +1246,21 @@ function AdvancedHostDlg::accept( %this ) Canvas.popDialog( AdvancedHostDlg ); } +//------------------------------------------------------------------------------ +function AH_DedicatedTgl::onAction( %this ) +{ + if ( %this.getValue() ) + { + AH_PureServerTgl.setValue( $Host::PureServer ); + AH_PureServerTgl.setActive( true ); + } + else + { + AH_PureServerTgl.setValue( false ); + AH_PureServerTgl.setActive( false ); + } +} + //------------------------------------------------------------------------------ function AH_VotePassText::update( %this ) { @@ -1522,6 +1586,8 @@ function GMW_SkinPopup::fillList( %this, %raceGender ) %count++; } } + + %this.sort( true ); } //------------------------------------------------------------------------------ diff --git a/base/scripts/HuntersGame.cs b/base/scripts/HuntersGame.cs index a7e03a2..33a9068 100644 --- a/base/scripts/HuntersGame.cs +++ b/base/scripts/HuntersGame.cs @@ -84,10 +84,16 @@ function HuntersGame::initGameVars(%game) %game.teamMode = false; - %game.greedMode = $Host::HuntersGreedMode; + if (!isDemo() && !isDemoServer()) + %game.greedMode = $Host::HuntersGreedMode; + else + %game.greedMode = false; %game.greedMinFlags = 8; //min number of flags you must have before you can cap - %game.hoardMode = $Host::HuntersHoardMode; + if (!isDemo() && !isDemoServer()) + %game.hoardMode = $Host::HuntersHoardMode; + else + %game.hoardMode = false; %game.HoardStartTime = 5; //time left in the game at which hoard mode will start %game.HoardDuration = 3; //duration of the hoard period %game.HoardEndTime = %game.HoardStartTime - %game.HoardDuration; @@ -607,7 +613,7 @@ function HuntersGame::playerTouchFlag(%game, %player, %flag) if (!%game.teamMode && !%client.couldSetRecord) { %numFlags = %client.flagCount - 1; - if (%numFlags > 10 && %numFlags > $HuntersRecords::Count[$currentMission]) + if (%numFlags > 10 && %numFlags > $Host::HuntersRecords::Count[$currentMission]) { //see if we have at least 4 non-AI players %humanCount = 0; @@ -941,7 +947,7 @@ function Nexus::onCollision(%data, %obj, %colObj) } //see if it's a record - if (%numToScore > 10 && %numToScore > $HuntersRecords::Count[$currentMission]) + if (%numToScore > 10 && %numToScore > $Host::HuntersRecords::Count[$currentMission]) { //see if we have at least 4 non-AI players %humanCount = 0; @@ -957,15 +963,15 @@ function Nexus::onCollision(%data, %obj, %colObj) if (%humanCount >= Game.numHumansForRecord) { - $HuntersRecords::Count[$currentMission] = %numToScore; - $HuntersRecords::Name[$currentMission] = getTaggedString(%client.name); + $Host::HuntersRecords::Count[$currentMission] = %numToScore; + $Host::HuntersRecords::Name[$currentMission] = getTaggedString(%client.name); //send a message to everyone messageAllExcept(%client, -1, 'MsgHuntPlayerSetRecord', '\c2%1 set the record for this mission with a return of %2 flags!~wfx/misc/flag_return.wav', %client.name, %numToScore); messageClient(%client, 'MsgHuntYouSetRecord', '\c2You set the record for this mission with a return of %1 flags!~wfx/misc/flag_return.wav', %numToScore); //update the records file... - export( "$HuntersRecords::*", "prefs/HuntersRecords.cs", false ); + export( "$Host::HuntersRecords::*", "prefs/HuntersRecords.cs", false ); //once the record has been set, reset everyone's tag for (%i = 0; %i < %count; %i++) @@ -1050,30 +1056,33 @@ function HuntersGame::sendGameVoteMenu( %game, %client, %key ) // First send the common options: DefaultGame::sendGameVoteMenu( %game, %client, %key ); - if(!%client.isAdmin) + if (!isDemo() && !isDemoServer()) { - // Now send the Hunters-specific options: - if ( %game.greedMode ) - messageClient( %client, 'MsgVoteItem', "", %key, 'VoteGreedMode', 'disable greed mode', 'Vote Disable GREED Mode' ); - else - messageClient( %client, 'MsgVoteItem', "", %key, 'VoteGreedMode', 'enable greed mode', 'Vote Enable GREED Mode' ); + if(!%client.isAdmin) + { + // Now send the Hunters-specific options: + if ( %game.greedMode ) + messageClient( %client, 'MsgVoteItem', "", %key, 'VoteGreedMode', 'disable greed mode', 'Vote Disable GREED Mode' ); + else + messageClient( %client, 'MsgVoteItem', "", %key, 'VoteGreedMode', 'enable greed mode', 'Vote Enable GREED Mode' ); - if ( %game.HoardMode ) - messageClient( %client, 'MsgVoteItem', "", %key, 'VoteHoardMode', 'disable hoard mode', 'Vote Disable HOARD Mode' ); + if ( %game.HoardMode ) + messageClient( %client, 'MsgVoteItem', "", %key, 'VoteHoardMode', 'disable hoard mode', 'Vote Disable HOARD Mode' ); + else + messageClient( %client, 'MsgVoteItem', "", %key, 'VoteHoardMode', 'enable hoard mode', 'Vote Enable HOARD Mode' ); + } else - messageClient( %client, 'MsgVoteItem', "", %key, 'VoteHoardMode', 'enable hoard mode', 'Vote Enable HOARD Mode' ); - } - else - { - if ( %game.greedMode ) - messageClient( %client, 'MsgVoteItem', "", %key, 'VoteGreedMode', 'disable greed mode', 'Disable GREED Mode' ); - else - messageClient( %client, 'MsgVoteItem', "", %key, 'VoteGreedMode', 'enable greed mode', 'Enable GREED Mode' ); + { + if ( %game.greedMode ) + messageClient( %client, 'MsgVoteItem', "", %key, 'VoteGreedMode', 'disable greed mode', 'Disable GREED Mode' ); + else + messageClient( %client, 'MsgVoteItem', "", %key, 'VoteGreedMode', 'enable greed mode', 'Enable GREED Mode' ); - if ( %game.HoardMode ) - messageClient( %client, 'MsgVoteItem', "", %key, 'VoteHoardMode', 'disable hoard mode', 'Disable HOARD Mode' ); - else - messageClient( %client, 'MsgVoteItem', "", %key, 'VoteHoardMode', 'enable hoard mode', 'Enable HOARD Mode' ); + if ( %game.HoardMode ) + messageClient( %client, 'MsgVoteItem', "", %key, 'VoteHoardMode', 'disable hoard mode', 'Disable HOARD Mode' ); + else + messageClient( %client, 'MsgVoteItem', "", %key, 'VoteHoardMode', 'enable hoard mode', 'Enable HOARD Mode' ); + } } } } @@ -1421,6 +1430,9 @@ function HuntersGame::dropFlag(%game, %player) function HuntersGame::enterMissionArea(%game, %playerData, %player) { + if(%player.getState() $= "Dead") + return; + %client = %player.client; %client.outOfBounds = false; cancel(%client.oobSched); @@ -1431,6 +1443,9 @@ function HuntersGame::enterMissionArea(%game, %playerData, %player) function HuntersGame::leaveMissionArea(%game, %playerData, %player) { + if(%player.getState() $= "Dead") + return; + // strip flags and throw them back into the mission area %client = %player.client; %client.outOfBounds = true; @@ -1671,14 +1686,14 @@ function HuntersGame::sendDebriefing( %game, %client ) if ( %game.highestFlagReturnName !$= "" ) messageClient( %client, 'MsgDebriefResult', "", '%1 had the highest return count with %2 flags!', %game.highestFlagReturnName, %game.highestFlagReturnCount ); - if ( $HuntersRecords::Count[$currentMission] !$= "" && $HuntersRecords::Name[$currentMission] !$= "" ) - messageClient( %client, 'MsgDebriefResult', "", '%1 holds the record with a return count of %2 flags!', $HuntersRecords::Name[$currentMission], $HuntersRecords::Count[$currentMission] ); + if ( $Host::HuntersRecords::Count[$currentMission] !$= "" && $Host::HuntersRecords::Name[$currentMission] !$= "" ) + messageClient( %client, 'MsgDebriefResult', "", '%1 holds the record with a return count of %2 flags!', $Host::HuntersRecords::Name[$currentMission], $Host::HuntersRecords::Count[$currentMission] ); if ( %game.greedFlagName !$= "" ) messageClient( %client, 'MsgDebriefResult', "", '%1 gets the honorary greed award for dropping %2 flags!', %game.greedFlagName, %game.greedFlagCount ); // Player scores: - messageClient( %client, 'MsgDebriefAddLine', "", 'PLAYER\tSCORE\tKILLS' ); + messageClient( %client, 'MsgDebriefAddLine', "", 'PLAYERSCOREKILLS' ); %count = $TeamRank[0, count]; for ( %i = 0; %i < %count; %i++ ) { @@ -1691,7 +1706,7 @@ function HuntersGame::sendDebriefing( %game, %client ) %kills = 0; else %kills = %cl.kills; - messageClient( %client, 'MsgDebriefAddLine', "", '\t%1\t%2\t%3', %cl.name, %score, %kills ); + messageClient( %client, 'MsgDebriefAddLine', "", ' %1 %2 %3', %cl.name, %score, %kills ); } // Show observers: @@ -1704,12 +1719,12 @@ function HuntersGame::sendDebriefing( %game, %client ) { if ( !%header ) { - messageClient( %client, 'MsgDebriefAddLine', "", '\nOBSERVERS\tSCORE' ); + messageClient( %client, 'MsgDebriefAddLine', "", '\nOBSERVERSSCORE' ); %header = true; } %score = %cl.score $= "" ? 0 : %cl.score; - messageClient( %client, 'MsgDebriefAddLine', "", '\t%1\t%2', %cl.name, %score ); + messageClient( %client, 'MsgDebriefAddLine', "", ' %1 %2', %cl.name, %score ); } } } diff --git a/base/scripts/LaunchLanGui.cs b/base/scripts/LaunchLanGui.cs index b3398be..48034c3 100644 --- a/base/scripts/LaunchLanGui.cs +++ b/base/scripts/LaunchLanGui.cs @@ -33,6 +33,11 @@ function OnlineLogIn() queryMasterGameTypes(); // Start the Email checking... EmailGui.checkSchedule = schedule( 5000, 0, CheckEmail, true ); + + // Load the player database... + %guid = getField( WONGetAuthInfo(), 3 ); + if ( %guid > 0 ) + loadPlayerDatabase( "prefs/pyrdb" @ %guid ); Canvas.setContent(LaunchGui); } @@ -62,7 +67,10 @@ function LaunchToolbarMenu::onSelect(%this, %id, %text) case 9: // Quit IRCClient::quit(); LaunchTabView.closeAllTabs(); - quit(); + if (!isDemo()) + quit(); + else + Canvas.setContent(DemoEndGui); //case 10: // Log Off // LaunchTabView.closeAllTabs(); // PlayOffline(); @@ -88,10 +96,10 @@ function LaunchToolbarDlg::onWake(%this) LaunchToolbarMenu.add( 1, "TRAINING" ); LaunchToolbarMenu.add( 0, "GAME" ); LaunchToolbarMenu.add( 2, "NEWS" ); - //LaunchToolbarMenu.add( 3, "FORUMS" ); - //LaunchToolbarMenu.add( 4, "EMAIL" ); - //LaunchToolbarMenu.add( 5, "CHAT" ); - //LaunchToolbarMenu.add( 6, "BROWSER" ); + } + else if ( isDemoServer() ) + { + LaunchToolbarMenu.add( 0, "GAME" ); } else if ( $PlayingOnline ) { @@ -156,6 +164,11 @@ function OpenLaunchTabs( %gotoWarriorSetup ) LaunchTabView.addLaunchTab( "BROWSER", "", true ); %launchGui = GameGui; } + else if ( isDemoServer() ) + { + LaunchTabView.addLaunchTab( "GAME", GameGui ); + %launchGui = GameGui; + } else if ( $PlayingOnline ) { LaunchTabView.addLaunchTab( "GAME", GameGui ); @@ -205,9 +218,12 @@ function LaunchTabView::onSelect( %this, %id, %text ) // Ignore the ID - it can't be trusted. %tab = %this.getSelectedTab(); - Canvas.setContent( %this.gui[%tab] ); - %this.gui[%tab].setKey( %this.key[%tab] ); - %this.lastTab = %tab; + if ( isObject( %this.gui[%tab] ) ) + { + Canvas.setContent( %this.gui[%tab] ); + %this.gui[%tab].setKey( %this.key[%tab] ); + %this.lastTab = %tab; + } } //-------------------------------------------------------- @@ -286,7 +302,8 @@ function LaunchTabView::closeAllTabs( %this ) %tabCount = %this.tabCount(); for ( %i = 0; %i < %tabCount; %i++ ) { - %this.gui[%i].onClose( %this.key[%i] ); + if ( isObject( %this.gui[%i] ) ) + %this.gui[%i].onClose( %this.key[%i] ); %this.gui[%i] = ""; %this.key[%i] = ""; } @@ -311,7 +328,7 @@ function LaunchGui::onWake(%this) if ( !$FirstLaunch ) LaunchTabView.viewLastTab(); - if ( !isDemo() ) + if ( !isDemo() && !isDemoServer() ) checkNamesAndAliases(); else OpenLaunchTabs(); diff --git a/base/scripts/LobbyGui.cs b/base/scripts/LobbyGui.cs index c13cbe3..9c01094 100644 --- a/base/scripts/LobbyGui.cs +++ b/base/scripts/LobbyGui.cs @@ -342,8 +342,6 @@ function togglePlayerMute(%client) function togglePlayerVoiceCom( %playerRep ) { commandToServer( 'ListenTo', %playerRep.clientId, !%playerRep.voiceEnabled, true ); - //if ( !%playerRep.isSmurf ) - // update client pref } //------------------------------------------------------------------------------ diff --git a/base/scripts/OptionsDlg.cs b/base/scripts/OptionsDlg.cs index 038bb43..76760a9 100644 --- a/base/scripts/OptionsDlg.cs +++ b/base/scripts/OptionsDlg.cs @@ -14,45 +14,49 @@ function OptionsDlg::onWake( %this ) $enableDirectInput = "1"; activateDirectInput(); - OP_VideoPane.setVisible( false ); - OP_GraphicsPane.setVisible( false ); - OP_TexturesPane.setVisible( false ); - OP_SoundPane.setVisible( false ); - OP_VoicePane.setVisible( false ); - OP_ControlsPane.setVisible( false ); - OP_NetworkPane.setVisible( false ); - OP_GamePane.setVisible( false ); + OP_VideoPane.setVisible( false ); + OP_GraphicsPane.setVisible( false ); + OP_TexturesPane.setVisible( false ); + OP_SoundPane.setVisible( false ); + OP_VoicePane.setVisible( false ); + OP_ControlsPane.setVisible( false ); + OP_NetworkPane.setVisible( false ); + OP_GamePane.setVisible( false ); - OP_VideoTab.setValue( false ); - OP_GraphicsTab.setValue( false ); - OP_TexturesTab.setValue( false ); - OP_SoundTab.setValue( false ); - OP_VoiceTab.setValue( false ); - OP_ControlsTab.setValue( false ); - OP_NetworkTab.setValue( false ); - OP_GameTab.setValue( false ); + OP_VideoTab.setValue( false ); + OP_GraphicsTab.setValue( false ); + OP_TexturesTab.setValue( false ); + OP_SoundTab.setValue( false ); + OP_VoiceTab.setValue( false ); + OP_ControlsTab.setValue( false ); + OP_NetworkTab.setValue( false ); + OP_GameTab.setValue( false ); - // Initialize the Video Pane controls: - // First the Video Driver menu: - %buffer = getDisplayDeviceList(); - %count = getFieldCount( %buffer ); - for ( %i = 0; %i < %count; %i++ ) - OP_VideoDriverMenu.add( getField( %buffer, %i ), %i ); + // Initialize the Video Pane controls: + // First the Video Driver menu: + %buffer = getDisplayDeviceList(); + %count = getFieldCount( %buffer ); + for ( %i = 0; %i < %count; %i++ ) + OP_VideoDriverMenu.add( getField( %buffer, %i ), %i ); - // Select the current device: - OP_FullScreenTgl.setValue( $pref::Video::fullScreen ); + // Select the current device: + OP_FullScreenTgl.setValue( $pref::Video::fullScreen ); - %selId = OP_VideoDriverMenu.findText( $pref::Video::displayDevice ); - if ( %selId == -1 ) - %selId = 0; // How did THAT happen? - OP_VideoDriverMenu.setSelected( %selId ); - OP_VideoDriverMenu.onSelect( %selId, "" ); - OP_FullScreenTgl.onAction(); + %selId = OP_VideoDriverMenu.findText( $pref::Video::displayDevice ); + if ( %selId == -1 ) + %selId = 0; // How did THAT happen? + OP_VideoDriverMenu.setSelected( %selId ); + OP_VideoDriverMenu.onSelect( %selId, "" ); + OP_FullScreenTgl.onAction(); - OP_ApplyBtn.setActive( false ); + OP_ApplyBtn.setActive( false ); - // Initialize the Graphics Options controls: - OptionsDlg::deviceDependent( %this ); + // Initialize the Graphics Options controls: + OptionsDlg::deviceDependent( %this ); + + // Radeon cards don't switch color depth good until they release their beta drivers which fix this problem. + if( $RadeonRenderer == true ) + OP_BPPMenu.setActive( false ); OP_GammaSlider.setValue( $pref::OpenGL::gammaCorrection ); OP_TerrainSlider.setValue( $max_screenerror - $pref::Terrain::screenError ); @@ -77,19 +81,19 @@ function OptionsDlg::onWake( %this ) OP_PlayerRenderMenu.setSelected( %selId ); OP_VertexLightTgl.setValue( $pref::Interior::VertexLighting ); - // Initialize the Textures Options controls: - OP_TerrainTexSlider.setValue( 6 - $pref::Terrain::texDetail ); + // Initialize the Textures Options controls: + OP_TerrainTexSlider.setValue( 6 - $pref::Terrain::texDetail ); - // We're using the noDrawArraysAlpha variable here because we've already - // gone gold (hard to add a new profiling variable). But the Voodoo2/3/3500 - // cards that have the 256x256 texture limitation (in OpenGL) also have the - // noDrawArraysAlpha hack on...so that works out nice + // We're using the noDrawArraysAlpha variable here because we've already + // gone gold (hard to add a new profiling variable). But the Voodoo2/3/3500 + // cards that have the 256x256 texture limitation (in OpenGL) also have the + // noDrawArraysAlpha hack on...so that works out nice %mipRange = $pref::OpenGL::noDrawArraysAlpha ? 4.0 : 5.0; - OP_ShapeTexSlider.setValue( (5 - $pref::OpenGL::mipReduction) / %mipRange ); + OP_ShapeTexSlider.setValue( (5 - $pref::OpenGL::mipReduction) / %mipRange ); OP_BuildingTexSlider.setValue( (5 - $pref::OpenGL::interiorMipReduction) / %mipRange ); OP_SkyTexSlider.setValue( (5 - $pref::OpenGL::skyMipReduction) / %mipRange ); - // Initialize the Sound Options controls: + // Initialize the Sound Options controls: // provider menu %count = alxGetContexti(ALC_PROVIDER_COUNT); for(%i = 0; %i < %count; %i++) @@ -107,7 +111,7 @@ function OptionsDlg::onWake( %this ) OP_AudioSpeakerMenu.add(alxGetContextstr(ALC_SPEAKER_NAME, %i), %i); %selId = alxGetContexti(ALC_SPEAKER); OP_AudioSpeakerMenu.setSelected(%selId); - OP_AudioSpeakerMenu.onSelect(%selId, ""); + OP_AudioSpeakerMenu.onSelect(%selId, ""); OP_AudioFrequencyMenu.init(); OP_AudioBitRateMenu.init(); @@ -135,7 +139,7 @@ function OptionsDlg::onWake( %this ) OP_MusicTgl.onAction(); OP_MusicVolumeSlider.setValue( $pref::Audio::musicVolume ); - // Initialize the Voice Settings controls: + // Initialize the Voice Settings controls: OP_MicrophoneEnabledTgl.onAction(); OP_MicrophoneVolumeSlider.setValue( $pref::Audio::voiceVolume ); OP_InputBoostSlider.setValue( $pref::Audio::captureGainScale ); @@ -144,7 +148,7 @@ function OptionsDlg::onWake( %this ) OP_VoiceCodecInfo.init(); updateInputBoost(); - // Initialize the Control Options controls: + // Initialize the Control Options controls: OP_ControlGroupMenu.init(); // JOYSTICK SUPPORT WILL BE RE-ENABLED IN THE PATCH @@ -162,7 +166,10 @@ function OptionsDlg::onWake( %this ) OP_ConfigureJoystickBtn.setActive( false ); } - // Initialize the Network Options controls: + // Initialize the Network Options controls: + OP_NetworkDisplayHud.init(); + if( !OP_NetworkPresetsMenu.size() ) + OP_NetworkPresetsMenu.init(); OP_PacketRateSlider.setValue( $pref::Net::PacketRateToClient ); OP_PacketSizeSlider.setValue( $pref::Net::PacketSize ); OP_UpdateRateSlider.setValue( $pref::Net::PacketRateToServer ); @@ -176,7 +183,7 @@ function OptionsDlg::onWake( %this ) OP_RegionMenu.init(); OP_RegionMenu.setSelected( $pref::Net::RegionMask ); - // Initialize the Game Options controls: + // Initialize the Game Options controls: OP_ZoomSpeedSlider.setValue( 500 - $pref::Player::zoomSpeed ); OP_LaunchScreenMenu.init(); @@ -198,7 +205,7 @@ function OptionsDlg::onWake( %this ) OP_LaunchScreenMenu.setVisible( false ); } - %this.setPane( %this.pane ); + %this.setPane( %this.pane ); } //------------------------------------------------------------------------------ @@ -215,7 +222,7 @@ function OptionsDlg::deviceDependent( %this ) OP_VSyncTgl.setActive( false ); } - OP_TexQualityMenu.init(); + OP_TexQualityMenu.init(); if ( $pref::OpenGL::forcePalettedTexture ) { $pref::OpenGL::force16bittexture = false; @@ -227,7 +234,7 @@ function OptionsDlg::deviceDependent( %this ) %selId = 3; OP_TexQualityMenu.setSelected( %selId ); - OP_CompressMenu.init(); + OP_CompressMenu.init(); if ( $TextureCompressionSupported && !$pref::OpenGL::disableARBTextureCompression ) { OP_CompressLabel.setVisible( true ); @@ -259,7 +266,7 @@ function OptionsDlg::deviceDependent( %this ) OP_IntTexturedFogTgl.setActive( false ); } - OP_AnisotropySlider.setValue( $pref::OpenGL::anisotropy ); + OP_AnisotropySlider.setValue( $pref::OpenGL::anisotropy ); OP_AnisotropySlider.setActive( $AnisotropySupported ); if ( $AnisotropySupported ) { @@ -272,8 +279,8 @@ function OptionsDlg::deviceDependent( %this ) OP_AnisotropyLabel.setVisible( false ); } - OP_EnvMapTgl.setValue($pref::environmentMaps); - OP_EnvMapTgl.setActive($pref::OpenGL::allowTexGen); + OP_EnvMapTgl.setValue($pref::environmentMaps); + OP_EnvMapTgl.setActive($pref::OpenGL::allowTexGen); } //------------------------------------------------------------------------------ @@ -282,11 +289,12 @@ function OptionsDlg::onSleep( %this ) $enableDirectInput = "0"; deactivateDirectInput(); - OP_VideoDriverMenu.clear(); - OP_ResMenu.clear(); - OP_BPPMenu.clear(); + OP_VideoDriverMenu.clear(); + OP_ResMenu.clear(); + OP_BPPMenu.clear(); OP_AudioProviderMenu.clear(); OP_AudioSpeakerMenu.clear(); + OP_NetworkDisplayHud.uninit(); if ( %this.resetAudio ) { @@ -308,7 +316,7 @@ function OptionsDlg::onSleep( %this ) @ "Do you wish to continue?", "OptionsDlg.saveSettings();", "returnFromSettings();" ); else - %this.saveSettings(); + %this.saveSettings(); } //------------------------------------------------------------------------------ @@ -317,12 +325,12 @@ function isTextureFlushRequired() if ( $pref::Interior::VertexLighting != OP_VertexLightTgl.getValue() ) return( true ); - // We're using the noDrawArraysAlpha variable here because we've already - // gone gold (hard to add a new profiling variable). But the Voodoo2/3/3500 - // cards that have the 256x256 texture limitation (in OpenGL) also have the - // noDrawArraysAlpha hack on...so that works out nice + // We're using the noDrawArraysAlpha variable here because we've already + // gone gold (hard to add a new profiling variable). But the Voodoo2/3/3500 + // cards that have the 256x256 texture limitation (in OpenGL) also have the + // noDrawArraysAlpha hack on...so that works out nice %mipRange = $pref::OpenGL::noDrawArraysAlpha ? 4 : 5; - if ( $pref::OpenGL::mipReduction != 5 - mFloor( OP_ShapeTexSlider.getValue() * %mipRange ) ) + if ( $pref::OpenGL::mipReduction != 5 - mFloor( OP_ShapeTexSlider.getValue() * %mipRange ) ) return( true ); if ( $pref::OpenGL::interiorMipReduction != 5 - mFloor( OP_BuildingTexSlider.getValue() * %mipRange ) ) @@ -376,9 +384,9 @@ function isTextureFlushRequired() //------------------------------------------------------------------------------ function returnFromSettings() { - // to unpause singlePlayerGame when returning from options + // to unpause singlePlayerGame when returning from options if ( isObject( Game ) ) - Game.OptionsDlgSleep(); + Game.OptionsDlgSleep(); } //------------------------------------------------------------------------------ @@ -444,33 +452,33 @@ function OptionsDlg::saveSettings( %this ) $pref::Terrain::texDetail = 6 - mFloor( OP_TerrainTexSlider.getValue() ); // We're using the noDrawArraysAlpha variable here because we've already - // gone gold (hard to add a new profiling variable). But the Voodoo2/3/3500 - // cards that have the 256x256 texture limitation (in OpenGL) also have the - // noDrawArraysAlpha hack on...so that works out nice + // gone gold (hard to add a new profiling variable). But the Voodoo2/3/3500 + // cards that have the 256x256 texture limitation (in OpenGL) also have the + // noDrawArraysAlpha hack on...so that works out nice %mipRange = $pref::OpenGL::noDrawArraysAlpha ? 4 : 5; - %temp = 5 - mFloor( OP_ShapeTexSlider.getValue() * %mipRange ); + %temp = 5 - mFloor( OP_ShapeTexSlider.getValue() * %mipRange ); if ( $pref::OpenGL::mipReduction != %temp ) { - $pref::OpenGL::mipReduction = %temp; - setOpenGLMipReduction( $pref::OpenGL::mipReduction ); - %flushTextures = true; + $pref::OpenGL::mipReduction = %temp; + setOpenGLMipReduction( $pref::OpenGL::mipReduction ); + %flushTextures = true; } %temp = 5 - mFloor( OP_BuildingTexSlider.getValue() * %mipRange ); if ( $pref::OpenGL::interiorMipReduction != %temp ) { - $pref::OpenGL::interiorMipReduction = %temp; - setOpenGLInteriorMipReduction( $pref::OpenGL::interiorMipReduction ); - %flushTextures = true; + $pref::OpenGL::interiorMipReduction = %temp; + setOpenGLInteriorMipReduction( $pref::OpenGL::interiorMipReduction ); + %flushTextures = true; } %temp = 5 - mFloor( OP_SkyTexSlider.getValue() * %mipRange ); if ( $pref::OpenGL::skyMipReduction != %temp ) { - $pref::OpenGL::skyMipReduction = %temp; - setOpenGLSkyMipReduction( $pref::OpenGL::skyMipReduction ); - %flushTextures = true; + $pref::OpenGL::skyMipReduction = %temp; + setOpenGLSkyMipReduction( $pref::OpenGL::skyMipReduction ); + %flushTextures = true; } if ( $TextureCompressionSupported && !$pref::OpenGL::disableARBTextureCompression ) @@ -579,21 +587,7 @@ function OptionsDlg::saveSettings( %this ) } } - $pref::Net::PacketRateToClient = mFloor( OP_PacketRateSlider.getValue() ); - $pref::Net::PacketSize = mFloor( OP_PacketSizeSlider.getValue() ); - $pref::Net::PacketRateToServer = mFloor( OP_UpdateRateSlider.getValue() ); - // check the max rate: - if ( isObject( ServerConnection ) ) - ServerConnection.checkMaxRate(); - if ( isObject( ClientGroup ) ) - { - %count = ClientGroup.getCount(); - for ( %i = 0; %i < %count; %i++ ) - { - %cl = ClientGroup.getObject( %i ); - %cl.checkMaxRate(); - } - } + updateNetworkSettings(); $pref::Player::zoomSpeed = 500 - mFloor( OP_ZoomSpeedSlider.getValue() ); setZoomSpeed( $pref::Player::zoomSpeed ); @@ -603,8 +597,8 @@ function OptionsDlg::saveSettings( %this ) export( "$pref::*", "prefs/ClientPrefs.cs", false ); saveActiveMapFile(); - if ( %flushTextures ) - { + if ( %flushTextures ) + { // Give the Options Dialog a chance to go away: OptionsDlg.schedule( 0, doTextureFlush ); } @@ -627,214 +621,214 @@ function OptionsDlg::setPane( %this, %pane ) if((%this.pane $= "Sound") && !$missionRunning) MusicPlayer.stop(); - if ( %this.pane !$= "None" ) - { - %paneCtrl = "OP_" @ %this.pane @ "Pane"; - %paneCtrl.setVisible( false ); + if ( %this.pane !$= "None" ) + { + %paneCtrl = "OP_" @ %this.pane @ "Pane"; + %paneCtrl.setVisible( false ); - %tabCtrl = "OP_" @ %this.pane @ "Tab"; - %tabCtrl.setValue( false ); - } - - %paneCtrl = "OP_" @ %pane @ "Pane"; - %paneCtrl.setVisible( true ); - - %tabCtrl = "OP_" @ %pane @ "Tab"; - %tabCtrl.setValue( true ); - - %this.pane = %pane; + %tabCtrl = "OP_" @ %this.pane @ "Tab"; + %tabCtrl.setValue( false ); + } + + %paneCtrl = "OP_" @ %pane @ "Pane"; + %paneCtrl.setVisible( true ); + + %tabCtrl = "OP_" @ %pane @ "Tab"; + %tabCtrl.setValue( true ); + + %this.pane = %pane; } //------------------------------------------------------------------------------ function OptionsDlg::applyGraphicChanges( %this ) { - %newDriver = OP_VideoDriverMenu.getText(); - %newRes = OP_ResMenu.getText(); - %newBpp = OP_BPPMenu.getText(); - %newFullScreen = OP_FullScreenTgl.getValue(); + %newDriver = OP_VideoDriverMenu.getText(); + %newRes = OP_ResMenu.getText(); + %newBpp = OP_BPPMenu.getText(); + %newFullScreen = OP_FullScreenTgl.getValue(); - if ( %newDriver !$= $pref::Video::displayDevice ) - { - setDisplayDevice( %newDriver, firstWord( %newRes ), getWord( %newRes, 1 ), %newBpp, %newFullScreen ); - OptionsDlg::deviceDependent( %this ); - } - else - setScreenMode( firstWord( %newRes ), getWord( %newRes, 1 ), %newBpp, %newFullScreen ); + if ( %newDriver !$= $pref::Video::displayDevice ) + { + setDisplayDevice( %newDriver, firstWord( %newRes ), getWord( %newRes, 1 ), %newBpp, %newFullScreen ); + OptionsDlg::deviceDependent( %this ); + } + else + setScreenMode( firstWord( %newRes ), getWord( %newRes, 1 ), %newBpp, %newFullScreen ); - OP_ApplyBtn.updateState(); + OP_ApplyBtn.updateState(); } //------------------------------------------------------------------------------ function OP_VideoDriverMenu::onSelect( %this, %id, %text ) { - // Attempt to keep the same res and bpp settings: - if ( OP_ResMenu.size() > 0 ) - %prevRes = OP_ResMenu.getText(); - else - %prevRes = getWords( $pref::Video::resolution, 0, 1 ); + // Attempt to keep the same res and bpp settings: + if ( OP_ResMenu.size() > 0 ) + %prevRes = OP_ResMenu.getText(); + else + %prevRes = getWords( $pref::Video::resolution, 0, 1 ); - // Check if this device is full-screen only: - if ( isDeviceFullScreenOnly( %this.getText() ) ) - { - OP_FullScreenTgl.setValue( true ); - OP_FullScreenTgl.setActive( false ); - OP_FullScreenTgl.onAction(); - } - else - OP_FullScreenTgl.setActive( true ); + // Check if this device is full-screen only: + if ( isDeviceFullScreenOnly( %this.getText() ) ) + { + OP_FullScreenTgl.setValue( true ); + OP_FullScreenTgl.setActive( false ); + OP_FullScreenTgl.onAction(); + } + else + OP_FullScreenTgl.setActive( true ); - if ( OP_FullScreenTgl.getValue() ) - { - if ( OP_BPPMenu.size() > 0 ) - %prevBPP = OP_BPPMenu.getText(); - else - %prevBPP = getWord( $pref::Video::resolution, 2 ); - } + if ( OP_FullScreenTgl.getValue() ) + { + if ( OP_BPPMenu.size() > 0 ) + %prevBPP = OP_BPPMenu.getText(); + else + %prevBPP = getWord( $pref::Video::resolution, 2 ); + } - // Fill the resolution and bit depth lists: - OP_ResMenu.init( %this.getText(), OP_FullScreenTgl.getValue() ); - OP_BPPMenu.init( %this.getText() ); + // Fill the resolution and bit depth lists: + OP_ResMenu.init( %this.getText(), OP_FullScreenTgl.getValue() ); + OP_BPPMenu.init( %this.getText() ); - // Try to select the previous settings: - %selId = OP_ResMenu.findText( %prevRes ); - if ( %selId == -1 ) - %selId = 0; - OP_ResMenu.setSelected( %selId ); + // Try to select the previous settings: + %selId = OP_ResMenu.findText( %prevRes ); + if ( %selId == -1 ) + %selId = 0; + OP_ResMenu.setSelected( %selId ); - if ( OP_FullScreenTgl.getValue() ) - { - %selId = OP_BPPMenu.findText( %prevBPP ); - if ( %selId == -1 ) - %selId = 0; - OP_BPPMenu.setSelected( %selId ); - OP_BPPMenu.setText( OP_BPPMenu.getTextById( %selId ) ); - } - else - OP_BPPMenu.setText( "Default" ); + if ( OP_FullScreenTgl.getValue() ) + { + %selId = OP_BPPMenu.findText( %prevBPP ); + if ( %selId == -1 ) + %selId = 0; + OP_BPPMenu.setSelected( %selId ); + OP_BPPMenu.setText( OP_BPPMenu.getTextById( %selId ) ); + } + else + OP_BPPMenu.setText( "Default" ); - OP_ApplyBtn.updateState(); + OP_ApplyBtn.updateState(); } //------------------------------------------------------------------------------ function OP_ResMenu::init( %this, %device, %fullScreen ) { - %this.clear(); - %resList = getResolutionList( %device ); - %resCount = getFieldCount( %resList ); - %deskRes = getDesktopResolution(); + %this.clear(); + %resList = getResolutionList( %device ); + %resCount = getFieldCount( %resList ); + %deskRes = getDesktopResolution(); %count = 0; - for ( %i = 0; %i < %resCount; %i++ ) - { - %res = getWords( getField( %resList, %i ), 0, 1 ); + for ( %i = 0; %i < %resCount; %i++ ) + { + %res = getWords( getField( %resList, %i ), 0, 1 ); - if ( !%fullScreen ) - { - if ( firstWord( %res ) >= firstWord( %deskRes ) ) - continue; - if ( getWord( %res, 1 ) >= getWord( %deskRes, 1 ) ) - continue; - } - - // Only add to list if it isn't there already: - if ( %this.findText( %res ) == -1 ) + if ( !%fullScreen ) { - %this.add( %res, %count ); + if ( firstWord( %res ) >= firstWord( %deskRes ) ) + continue; + if ( getWord( %res, 1 ) >= getWord( %deskRes, 1 ) ) + continue; + } + + // Only add to list if it isn't there already: + if ( %this.findText( %res ) == -1 ) + { + %this.add( %res, %count ); %count++; } - } + } } //------------------------------------------------------------------------------ function OP_ResMenu::onSelect( %this, %id, %text ) { - OP_ApplyBtn.updateState(); + OP_ApplyBtn.updateState(); } //------------------------------------------------------------------------------ function OP_BPPMenu::init( %this, %device ) { - %this.clear(); + %this.clear(); - if ( %device $= "Voodoo2" ) - %this.add( "16", 0 ); - else - { - %resList = getResolutionList( %device ); - %resCount = getFieldCount( %resList ); + if ( %device $= "Voodoo2" ) + %this.add( "16", 0 ); + else + { + %resList = getResolutionList( %device ); + %resCount = getFieldCount( %resList ); %count = 0; - for ( %i = 0; %i < %resCount; %i++ ) - { - %bpp = getWord( getField( %resList, %i ), 2 ); + for ( %i = 0; %i < %resCount; %i++ ) + { + %bpp = getWord( getField( %resList, %i ), 2 ); - // Only add to list if it isn't there already: - if ( %this.findText( %bpp ) == -1 ) + // Only add to list if it isn't there already: + if ( %this.findText( %bpp ) == -1 ) { - %this.add( %bpp, %count ); + %this.add( %bpp, %count ); %count++; } - } - } + } + } } //------------------------------------------------------------------------------ function OP_BPPMenu::onSelect( %this, %id, %text ) { - OP_ApplyBtn.updateState(); + OP_ApplyBtn.updateState(); } //------------------------------------------------------------------------------ function OP_FullScreenTgl::onAction( %this ) { - // Attempt to maintain current settings: - %selId = OP_ResMenu.getSelected(); - if ( %selId == -1 ) - %selId = 0; - %prevRes = OP_ResMenu.getTextById( %selId ); + // Attempt to maintain current settings: + %selId = OP_ResMenu.getSelected(); + if ( %selId == -1 ) + %selId = 0; + %prevRes = OP_ResMenu.getTextById( %selId ); - OP_ResMenu.init( OP_VideoDriverMenu.getText(), %this.getValue() ); + OP_ResMenu.init( OP_VideoDriverMenu.getText(), %this.getValue() ); - %selId = OP_ResMenu.findText( %prevRes ); - if ( %selId == -1 ) - %selId = 0; - OP_ResMenu.setSelected( %selId ); + %selId = OP_ResMenu.findText( %prevRes ); + if ( %selId == -1 ) + %selId = 0; + OP_ResMenu.setSelected( %selId ); - if ( %this.getValue() ) - { - %selId = OP_BPPMenu.findText( getWord( $pref::Video::resolution, 2 ) ); - if ( %selId == - 1 ) - %selId = 0; - OP_BPPMenu.setSelected( %selId ); - OP_BPPMenu.setText( OP_BPPMenu.getTextById( %selId ) ); - OP_BPPMenu.setActive( true ); - } - else - { - OP_BPPMenu.setText( "Default" ); - OP_BPPMenu.setActive( false ); - } + if ( %this.getValue() ) + { + %selId = OP_BPPMenu.findText( getWord( $pref::Video::resolution, 2 ) ); + if ( %selId == - 1 ) + %selId = 0; + OP_BPPMenu.setSelected( %selId ); + OP_BPPMenu.setText( OP_BPPMenu.getTextById( %selId ) ); + OP_BPPMenu.setActive( true ); + } + else + { + OP_BPPMenu.setText( "Default" ); + OP_BPPMenu.setActive( false ); + } - OP_ApplyBtn.updateState(); + OP_ApplyBtn.updateState(); } //------------------------------------------------------------------------------ function OP_ApplyBtn::updateState( %this ) { - %active = false; + %active = false; - if ( OP_VideoDriverMenu.getText() !$= $pref::Video::displayDevice ) - %active = true; - else if ( OP_ResMenu.getText() !$= getWords( $pref::Video::resolution, 0, 1 ) ) - %active = true; - else if ( OP_FullScreenTgl.getValue() != $pref::Video::fullScreen ) - %active = true; - else if ( OP_FullScreenTgl.getValue() ) - { - if ( OP_BPPMenu.getText() !$= getWord( $pref::Video::resolution, 2 ) ) - %active = true; - } + if ( OP_VideoDriverMenu.getText() !$= $pref::Video::displayDevice ) + %active = true; + else if ( OP_ResMenu.getText() !$= getWords( $pref::Video::resolution, 0, 1 ) ) + %active = true; + else if ( OP_FullScreenTgl.getValue() != $pref::Video::fullScreen ) + %active = true; + else if ( OP_FullScreenTgl.getValue() ) + { + if ( OP_BPPMenu.getText() !$= getWord( $pref::Video::resolution, 2 ) ) + %active = true; + } - %this.setActive( %active ); + %this.setActive( %active ); } //------------------------------------------------------------------------------ @@ -1169,41 +1163,53 @@ function OP_VoiceListenMenu::init( %this ) { %this.clear(); %this.add( "", 0 ); - %this.add( ".v12", 1 ); - %this.add( ".v12 - .v24", 3 ); - %this.add( ".v12 - .v29", 7 ); + if ( $platform !$= "linux" ) { + %this.add( ".v12", 1 ); + %this.add( ".v12 - .v24", 3 ); + %this.add( ".v12 - .v29", 7 ); + } + if ( $platform $= "linux" ) { + %this.add( "GSM" , 8 ); + } switch ( $pref::Audio::decodingMask ) { - case 0 or 3 or 7: + case 0 or 3 or 7 or 8: %this.setSelected( $pref::Audio::decodingMask ); default: %this.setSelected( 1 ); } - - if ( $platform $= "linux" ) { - %this.setActive(false); - } } //------------------------------------------------------------------------------ function OP_VoiceSendMenu::init( %this ) { %this.clear(); - %this.add( ".v12", 0 ); - %this.add( ".v24", 1 ); - %this.add( ".v29", 2 ); + if ( $platform !$= "linux" ) { + %this.add( ".v12", 0 ); + %this.add( ".v24", 1 ); + %this.add( ".v29", 2 ); + } + if ( $platform $= "linux" ) { + %this.add( "GSM", 3 ); + } %this.setSelected($pref::Audio::encodingLevel); - - if ( $platform $= "linux" ) { - %this.setActive(false); - } } function OP_VoiceCodecInfo::init( %this ) { %headerStyle = ""; + if ( $platform $= "linux" ) { + %displayText = "" @ %headerStyle @ "Voice Codec Information:" NL + "\n" @ + " GSM: fixed bitrate codec (6.6 kbits/sec linux only)" NL + "\n" @ + "" @ + "Setting your codec levels too high can have adverse" @ + " affects on network performance." @ + ""; + } else { %displayText = "" @ %headerStyle @ "Voice Codec Information:" NL "\n" @ " .v12: variable bitrate codec (~1.2 kbits/sec win only)" NL @@ -1214,6 +1220,7 @@ function OP_VoiceCodecInfo::init( %this ) "Setting your codec levels too high can have adverse" @ " affects on network performance." @ ""; + } %this.setText(%displayText); %this.setActive(false); @@ -1571,6 +1578,9 @@ $RemapCount++; $RemapName[$RemapCount] = "Chat Page Down"; $RemapCmd[$RemapCount] = "pageMessageHudDown"; $RemapCount++; +$RemapName[$RemapCount] = "Toggle Net Meter"; +$RemapCmd[$RemapCount] = "toggleNetDisplayHud"; +$RemapCount++; $ObsRemapCount = 0; $ObsRemapName[$ObsRemapCount] = "Move Up"; @@ -1686,36 +1696,36 @@ function saveMapFile( %filename ) //------------------------------------------------------------------------------ function getMapDisplayName( %device, %action ) { - if ( %device $= "keyboard" ) - return( %action ); - else if ( strstr( %device, "mouse" ) != -1 ) - { - // Substitute "mouse" for "button" in the action string: - %pos = strstr( %action, "button" ); - if ( %pos != -1 ) - { - %mods = getSubStr( %action, 0, %pos ); - %object = getSubStr( %action, %pos, 1000 ); - %instance = getSubStr( %object, strlen( "button" ), 1000 ); - return( %mods @ "mouse" @ ( %instance + 1 ) ); - } - else - error( "Mouse input object other than button passed to getDisplayMapName!" ); - } - else if ( strstr( %device, "joystick" ) != -1 ) - { - // Substitute "joystick" for "button" in the action string: - %pos = strstr( %action, "button" ); - if ( %pos != -1 ) - { - %mods = getSubStr( %action, 0, %pos ); - %object = getSubStr( %action, %pos, 1000 ); - %instance = getSubStr( %object, strlen( "button" ), 1000 ); - return( %mods @ "joystick" @ ( %instance + 1 ) ); - } - else - { - %pos = strstr( %action, "pov" ); + if ( %device $= "keyboard" ) + return( %action ); + else if ( strstr( %device, "mouse" ) != -1 ) + { + // Substitute "mouse" for "button" in the action string: + %pos = strstr( %action, "button" ); + if ( %pos != -1 ) + { + %mods = getSubStr( %action, 0, %pos ); + %object = getSubStr( %action, %pos, 1000 ); + %instance = getSubStr( %object, strlen( "button" ), 1000 ); + return( %mods @ "mouse" @ ( %instance + 1 ) ); + } + else + error( "Mouse input object other than button passed to getDisplayMapName!" ); + } + else if ( strstr( %device, "joystick" ) != -1 ) + { + // Substitute "joystick" for "button" in the action string: + %pos = strstr( %action, "button" ); + if ( %pos != -1 ) + { + %mods = getSubStr( %action, 0, %pos ); + %object = getSubStr( %action, %pos, 1000 ); + %instance = getSubStr( %object, strlen( "button" ), 1000 ); + return( %mods @ "joystick" @ ( %instance + 1 ) ); + } + else + { + %pos = strstr( %action, "pov" ); if ( %pos != -1 ) { %wordCount = getWordCount( %action ); @@ -1738,9 +1748,9 @@ function getMapDisplayName( %device, %action ) else error( "Unsupported Joystick input object passed to getDisplayMapName!" ); } - } - - return( "??" ); + } + + return( "??" ); } //------------------------------------------------------------------------------ @@ -1759,15 +1769,15 @@ function buildFullMapString( %index ) %cmd = $RemapCmd[%index]; } - %temp = %actionMap.getBinding( %cmd ); + %temp = %actionMap.getBinding( %cmd ); %device = getField( %temp, 0 ); %object = getField( %temp, 1 ); if ( %device !$= "" && %object !$= "" ) - %mapString = getMapDisplayName( %device, %object ); + %mapString = getMapDisplayName( %device, %object ); else %mapString = ""; - return( %name TAB %mapString ); + return( %name TAB %mapString ); } //------------------------------------------------------------------------------ @@ -1797,12 +1807,12 @@ function OP_RemapList::fillList( %this ) default: %count = $RemapCount; } - %this.clear(); + %this.clear(); for ( %i = 0; %i < %count; %i++ ) %this.addRow( %i, buildFullMapString( %i ) ); // Set the console key: - %bind = GlobalActionMap.getBinding( "toggleConsole" ); + %bind = GlobalActionMap.getBinding( "toggleConsole" ); OP_ConsoleKeyBtn.setValue( getField( %bind, 1 ) ); } @@ -1825,40 +1835,35 @@ function OP_RemapList::onDeleteKey( %this, %rowId ) //------------------------------------------------------------------------------ function OP_RemapList::doRemap( %this ) { - %selId = %this.getSelectedId(); + %selId = %this.getSelectedId(); switch$ ( OP_ControlsPane.group ) { case "Observer": %name = $ObsRemapName[%selId]; default: %name = $RemapName[%selId]; } - RemapFrame.setTitle( "REMAP \"" @ %name @ "\"" ); + RemapFrame.setTitle( "REMAP \"" @ %name @ "\"" ); RemapInputCtrl.mode = "move"; - RemapInputCtrl.index = %selId; - Canvas.pushDialog( RemapDlg ); + RemapInputCtrl.index = %selId; + Canvas.pushDialog( RemapDlg ); } //------------------------------------------------------------------------------ function OP_ConsoleKeyBtn::doRemap( %this ) { - RemapFrame.setTitle( "Remap \"Toggle Console\"" ); + RemapFrame.setTitle( "REMAP \"Toggle Console\"" ); RemapInputCtrl.mode = "consoleKey"; - RemapInputCtrl.index = 0; - Canvas.pushDialog( RemapDlg ); + RemapInputCtrl.index = 0; + Canvas.pushDialog( RemapDlg ); } //------------------------------------------------------------------------------ function RemapDlg::onWake( %this ) { if ( RemapInputCtrl.mode $= "consoleKey" ) - RemapText.setText( "Press a key to assign it to this action" NL "or Esc to cancel..." ); + RemapText.setText( "Press a key to assign it to this action" NL "or Esc to cancel..." ); else - RemapText.setText( "Press a key or button to assign it to this action" NL "or Esc to cancel..." ); -} - -//------------------------------------------------------------------------------ -function RemapDlg::onSleep( %this ) -{ + RemapText.setText( "Press a key or button to assign it to this action" NL "or Esc to cancel..." ); } //------------------------------------------------------------------------------ @@ -1873,35 +1878,35 @@ function findRemapCmdIndex( %command ) return( %i ); } default: - for ( %i = 0; %i < $RemapCount; %i++ ) - { - if ( %command $= $RemapCmd[%i] ) - return( %i ); - } + for ( %i = 0; %i < $RemapCount; %i++ ) + { + if ( %command $= $RemapCmd[%i] ) + return( %i ); + } } - return( -1 ); + return( -1 ); } //------------------------------------------------------------------------------ function clearMapping( %actionMap, %cmd ) { - %fullMapString = %actionMap.getBinding( %cmd ); - %mapCount = getRecordCount( %fullMapString ); - for ( %i = 0; %i < %mapCount; %i++ ) - { - %temp = getRecord( %fullMapString, %i ); - %actionMap.unbind( getField( %temp, 0 ), getField( %temp, 1 ) ); - } + %fullMapString = %actionMap.getBinding( %cmd ); + %mapCount = getRecordCount( %fullMapString ); + for ( %i = 0; %i < %mapCount; %i++ ) + { + %temp = getRecord( %fullMapString, %i ); + %actionMap.unbind( getField( %temp, 0 ), getField( %temp, 1 ) ); + } } //------------------------------------------------------------------------------ function redoMapping( %actionMap, %device, %action, %cmd, %oldIndex, %newIndex ) { - //%actionMap.bind( %device, %action, $RemapCmd[%newIndex] ); - %actionMap.bind( %device, %action, %cmd ); - OP_RemapList.setRowById( %oldIndex, buildFullMapString( %oldIndex ) ); - OP_RemapList.setRowById( %newIndex, buildFullMapString( %newIndex ) ); + //%actionMap.bind( %device, %action, $RemapCmd[%newIndex] ); + %actionMap.bind( %device, %action, %cmd ); + OP_RemapList.setRowById( %oldIndex, buildFullMapString( %oldIndex ) ); + OP_RemapList.setRowById( %newIndex, buildFullMapString( %newIndex ) ); } //------------------------------------------------------------------------------ @@ -1910,26 +1915,26 @@ function redoConsoleMapping( %action, %oldIndex ) moveMap.unbind( "keyboard", %action ); GlobalActionMap.bind( "keyboard", %action, "toggleConsole" ); OP_ConsoleKeyBtn.setValue( %action ); - OP_RemapList.setRowById( %oldIndex, buildFullMapString( %oldIndex ) ); + OP_RemapList.setRowById( %oldIndex, buildFullMapString( %oldIndex ) ); } //------------------------------------------------------------------------------ function RemapInputCtrl::onInputEvent( %this, %device, %action ) { - //error( "** onInputEvent called - device = " @ %device @ ", action = " @ %action @ " **" ); - Canvas.popDialog( RemapDlg ); + //error( "** onInputEvent called - device = " @ %device @ ", action = " @ %action @ " **" ); + Canvas.popDialog( RemapDlg ); - // Test for the reserved keystrokes: - if ( %device $= "keyboard" ) - { + // Test for the reserved keystrokes: + if ( %device $= "keyboard" ) + { // Cancel... if ( %action $= "escape" ) { // Do nothing... - return; + return; } - } - + } + if ( %this.mode $= "consoleKey" ) { if ( %device !$= "keyboard" ) @@ -1980,22 +1985,22 @@ function RemapInputCtrl::onInputEvent( %this, %device, %action ) %name = $RemapName[%this.index]; } - // First check to see if the given action is already mapped: - %prevMap = %actionMap.getCommand( %device, %action ); + // First check to see if the given action is already mapped: + %prevMap = %actionMap.getCommand( %device, %action ); if ( %prevMap !$= %cmd ) { - if ( %prevMap $= "" ) - { + if ( %prevMap $= "" ) + { %actionMap.bind( %device, %action, %cmd ); - OP_RemapList.setRowById( %this.index, buildFullMapString( %this.index ) ); - } - else - { + OP_RemapList.setRowById( %this.index, buildFullMapString( %this.index ) ); + } + else + { %mapName = getMapDisplayName( %device, %action ); - %prevMapIndex = findRemapCmdIndex( %prevMap ); - if ( %prevMapIndex == -1 ) - MessageBoxOK( "REMAP FAILED", "\"" @ %mapName @ "\" is already bound to a non-remappable command!" ); - else + %prevMapIndex = findRemapCmdIndex( %prevMap ); + if ( %prevMapIndex == -1 ) + MessageBoxOK( "REMAP FAILED", "\"" @ %mapName @ "\" is already bound to a non-remappable command!" ); + else { switch$ ( OP_ControlsPane.group ) { @@ -2005,13 +2010,13 @@ function RemapInputCtrl::onInputEvent( %this, %device, %action ) %prevCmdName = $RemapName[%prevMapIndex]; } - MessageBoxYesNo( "WARNING", - "\"" @ %mapName @ "\" is already bound to \"" - @ %prevCmdName @ "\"!\nDo you want to undo this mapping?", - "redoMapping(" @ %actionMap @ ", " @ %device @ ", \"" @ %action @ "\", \"" @ %cmd @ "\", " @ %prevMapIndex @ ", " @ %this.index @ ");", "" ); + MessageBoxYesNo( "WARNING", + "\"" @ %mapName @ "\" is already bound to \"" + @ %prevCmdName @ "\"!\nDo you want to undo this mapping?", + "redoMapping(" @ %actionMap @ ", " @ %device @ ", \"" @ %action @ "\", \"" @ %cmd @ "\", " @ %prevMapIndex @ ", " @ %this.index @ ");", "" ); } - return; - } + return; + } } } } @@ -2031,9 +2036,9 @@ function OP_JoystickTgl::onAction( %this ) //------------------------------------------------------------------------------ function MouseConfigDlg::onWake( %this ) { - MouseXSlider.setValue( moveMap.getScale( mouse, xaxis ) / 2 ); - MouseYSlider.setValue( moveMap.getScale( mouse, yaxis ) / 2 ); - InvertMouseTgl.setValue( moveMap.isInverted( mouse, yaxis ) ); + MouseXSlider.setValue( moveMap.getScale( mouse, xaxis ) / 2 ); + MouseYSlider.setValue( moveMap.getScale( mouse, yaxis ) / 2 ); + InvertMouseTgl.setValue( moveMap.isInverted( mouse, yaxis ) ); MouseZActionMenu.clear(); MouseZActionMenu.add( "Nothing", 1 ); @@ -2056,11 +2061,11 @@ function MouseConfigDlg::onWake( %this ) //------------------------------------------------------------------------------ function MouseConfigDlg::onOK( %this ) { - %xSens = MouseXSlider.getValue() * 2; - %ySens = MouseYSlider.getValue() * 2; - moveMap.bind( mouse, xaxis, "S", %xSens, "yaw" ); + %xSens = MouseXSlider.getValue() * 2; + %ySens = MouseYSlider.getValue() * 2; + moveMap.bind( mouse, xaxis, "S", %xSens, "yaw" ); %yFlags = InvertMouseTgl.getValue() ? "SI" : "S"; - moveMap.bind( mouse, yaxis, %yFlags, %ySens, "pitch" ); + moveMap.bind( mouse, yaxis, %yFlags, %ySens, "pitch" ); switch ( MouseZActionMenu.getSelected() ) { @@ -2145,16 +2150,16 @@ function JoystickConfigDlg::onWake( %this ) if ( %tabName !$= "" ) { $JoyAxisTab[$JoyAxisCount] = new ShellTabButton() { - profile = "ShellTabProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "29" SPC ( 52 + ( %i * 30 ) ); - extent = "100 38"; - minExtent = "48 38"; - visible = "1"; - command = "JoystickConfigDlg.setPane(" @ %i @ ");"; - helpTag = "0"; - text = %tabName; + profile = "ShellTabProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "29" SPC ( 52 + ( %i * 30 ) ); + extent = "100 38"; + minExtent = "48 38"; + visible = "1"; + command = "JoystickConfigDlg.setPane(" @ %i @ ");"; + helpTag = "0"; + text = %tabName; type = %tabType; }; @@ -2284,18 +2289,18 @@ function bindJoystickAxis( %axisIndex, %cmdIndex ) } %sens = JoyAxisSlider.getValue() * 100; - %delta = DeadZoneSlider.getValue() * %sens; + %delta = DeadZoneSlider.getValue() * %sens; %flags = "S"; if ( InvertJoyAxisTgl.getValue() ) %flags = %flags @ "I"; if ( JoyAxisRelativeTgl.getValue() ) %flags = %flags @ "L"; - if ( %delta > 0 ) + if ( %delta > 0 ) { %deadZone = "-" @ %delta SPC %delta; moveMap.bind( "joystick", %axis, %flags @ "D", %deadZone, %sens, %cmd ); } - else + else moveMap.bind( "joystick", %axis, %flags, %sens, %cmd ); } @@ -2303,30 +2308,185 @@ function bindJoystickAxis( %axisIndex, %cmdIndex ) //------------------------------------------------------------------------------ // Network Settings: // -function OP_NetworkPane::applyPresets( %this, %which ) + +function updateNetworkSettings() { - switch$ ( %which ) + $pref::Net::PacketRateToClient = mFloor( OP_PacketRateSlider.getValue() ); + $pref::Net::PacketSize = mFloor( OP_PacketSizeSlider.getValue() ); + $pref::Net::PacketRateToServer = mFloor( OP_UpdateRateSlider.getValue() ); + + // check the max rate: + if ( isObject( ServerConnection ) ) + ServerConnection.checkMaxRate(); + if ( isObject( ClientGroup ) ) { - case "modem1": - OP_PacketRateSlider.setValue( 10 ); - OP_UpdateRateSlider.setValue( 32 ); - OP_PacketSizeSlider.setValue( 200 ); - - case "modem2": - OP_PacketRateSlider.setValue( 12 ); - OP_UpdateRateSlider.setValue( 32 ); - OP_PacketSizeSlider.setValue( 240 ); - - case "lan": - OP_PacketRateSlider.setValue( 20 ); - OP_UpdateRateSlider.setValue( 32 ); - OP_PacketSizeSlider.setValue( 350 ); - - default: - error( "Invalid parameter passed to OP_NetworkPane::applyPresets!" ); + %count = ClientGroup.getCount(); + for ( %i = 0; %i < %count; %i++ ) + { + %cl = ClientGroup.getObject( %i ); + %cl.checkMaxRate(); + } } } +function OP_NetworkDisplayHud::init(%this) +{ + %this.getPrefs(); + + %this.textHeight = 14; + %this.textOffset = 2; + + if(!%this.infoCallback) + { + %this.textProfile = 0; + return; + } + + // profile for the text fields + %this.textProfile = new GuiControlProfile() + { + fontType = $ShellButtonFont; + fontSize = $ShellButtonFontSize; + autoSizeWidth = true; + autoSizeHeight = true; + fontColors[6] = "128 128 128"; + }; + + %yOffset = %this.textOffset; + + for(%i = 0; %i < 6; %i++) + { + // set the text color + %this.textProfile.fontColors[%i] = %this.fieldColors[%i]; + + // create the text field + %this.textField[%i] = new GuiTextCtrl() + { + profile = %this.textProfile; + horizSizing = "right"; + vertSizing = "bottom"; + position = "20 " @ %yOffset; + extent = "190 " @ %this.textHeight; + visible = "1"; + }; + + // create the toggle field + %this.toggleField[%i] = new GuiTextCtrl() + { + profile = ShellActiveTextProfile; + horizSizing = "right"; + vertSizing = "bottom"; + position = "5 " @ %yOffset; + extent = "15 " @ %this.textHeight; + visible = "1"; + }; + + // create a mouse object + %this.mouseField[%i] = new GuiMouseEventCtrl(NetworkDisplayMouseCtrl) + { + profile = GuiDefaultProfile; + horizSizing = "right"; + vertSizing = "bottom"; + position = "10 " @ %yOffset; + extent = "200 " @ %this.textHeight; + visible = "1"; + fieldIndex = %i; + }; + + OP_NetworkDisplayTextFrame.add(%this.textField[%i]); + OP_NetworkDisplayTextFrame.add(%this.toggleField[%i]); + OP_NetworkDisplayTextFrame.add(%this.mouseField[%i]); + + %yOffset += (%this.textHeight + %this.textOffset); + } + %this.infoUpdate(0, 0, 0, 0, 0, 0); +} + +function NetworkDisplayMouseCtrl::onMouseDown(%this) +{ + %b = OP_NetworkDisplayHud.renderField[%this.fieldIndex]; + OP_NetworkDisplayHud.renderField[%this.fieldIndex] = !%b; + OP_NetworkDisplayHud.updateToggles(); +} + +function OP_NetworkDisplayHud::uninit(%this) +{ + if(!%this.infoCallback) + return; + + if(isObject(%this.textProfile)) + %this.textProfile.delete(); + + for(%i = 0; %i < 6; %i++) + { + if(isObject(%this.textField[%i])) + %this.textField[%i].delete(); + + if(isObject(%this.toggleField[%i])) + %this.toggleField[%i].delete(); + + if(isObject(%this.mouseField[%i])) + %this.mouseField[%i].delete(); + } +} + +function OP_NetworkDisplayHud::updateToggles(%this) +{ + // update the toggles + $pref::Net::graphFields = 0; + + for(%i = 0; %i < 6; %i++) + { + $pref::Net::graphFields |= %this.renderField[%i] << %i; + %this.toggleField[%i].setText(%this.renderField[%i] ? "+" : "-"); + } +} + +function OP_NetworkDisplayHud::infoUpdate(%this, %ping, %packetLoss, %sendPackets, %sendBytes, %receivePackets, %receiveBytes) +{ + %this.updateToggles(); + + // set the text + %this.textField[0].setText("\c0Ping: " @ mFormatFloat(%ping, "%4.0f") @ "ms"); + %this.textField[1].setText("\c1Packet Loss: " @ mFormatFloat(%packetLoss, "%3.0f") @ "%"); + %this.textField[2].setText("\c2Send Packets: " @ mFormatFloat(%sendPackets, "%2.1f") @ "pps"); + %this.textField[3].setText("\c3Send Bytes: " @ mFormatFloat(%sendBytes, "%5.0f") @ "bps"); + %this.textField[4].setText("\c4Receive Packets: " @ mFormatFloat(%receivePackets, "%2.1f") @ "pps"); + %this.textField[5].setText("\c5Receive Bytes: " @ mFormatFloat(%receiveBytes, "%5.0f") @ "bps"); +} + +// "" +// [1,32] [8,32] [100,450] +$NetworkPresetCount = 0; +$NetworkPreset[$NetworkPresetCount] = "28.8 Modem\t12\t16\t200"; $NetworkPresetCount++; +$NetworkPreset[$NetworkPresetCount] = "56K Modem\t16\t20\t240"; $NetworkPresetCount++; +$NetworkPreset[$NetworkPresetCount] = "DSL\t20\t24\t350"; $NetworkPresetCount++; +$NetworkPreset[$NetworkPresetCount] = "Cable\t24\t24\t400"; $NetworkPresetCount++; +$NetworkPreset[$NetworkPresetCount] = "T1/LAN\t32\t32\t450"; $NetworkPresetCount++; + +function OP_NetworkPresetsMenu::init( %this ) +{ + %this.clear(); + for(%i = 0; %i < $NetworkPresetCount; %i++) + %this.add( getField($NetworkPreset[%i], 0), %i); + + // don't update settings on init (only update when values change) + %this.updateSettings = false; + %this.setSelected($pref::Net::Preset); + %this.updateSettings = true; +} + +function OP_NetworkPresetsMenu::onSelect( %this, %id, %text ) +{ + OP_PacketRateSlider.setValue( getField($NetworkPreset[%id], 1) ); + OP_UpdateRateSlider.setValue( getField($NetworkPreset[%id], 2) ); + OP_PacketSizeSlider.setValue( getField($NetworkPreset[%id], 3) ); + + if(%this.updateSettings) + updateNetworkSettings(); + $pref::Net::Preset = %id; +} + //------------------------------------------------------------------------------ function OP_MasterServerMenu::init( %this ) { diff --git a/base/scripts/SiegeGame.cs b/base/scripts/SiegeGame.cs index da200ea..69b54f3 100644 --- a/base/scripts/SiegeGame.cs +++ b/base/scripts/SiegeGame.cs @@ -821,27 +821,27 @@ function SiegeGame::sendDebriefing( %game, %client ) if ( $teamScore[1] > 0 ) { %timeStr = %game.formatTime($teamScore[1], true); - messageClient( %client, 'MsgDebriefAddLine', "", '\t%1 captured the base in %2.', $TeamName[1], %timeStr); + messageClient( %client, 'MsgDebriefAddLine', "", ' %1 captured the base in %2.', $TeamName[1], %timeStr); } else - messageClient( %client, 'MsgDebriefAddLine', "", '\t%1 failed to capture the base.', $TeamName[1]); + messageClient( %client, 'MsgDebriefAddLine', "", ' %1 failed to capture the base.', $TeamName[1]); if ( $teamScore[2] > 0 ) { %timeStr = %game.formatTime($teamScore[2], true); - messageClient( %client, 'MsgDebriefAddLine', "", '\t%1 captured the base in %2.', $TeamName[2], %timeStr); + messageClient( %client, 'MsgDebriefAddLine', "", ' %1 captured the base in %2.', $TeamName[2], %timeStr); } else - messageClient( %client, 'MsgDebriefAddLine', "", '\t%1 failed to capture the base.', $TeamName[2]); + messageClient( %client, 'MsgDebriefAddLine', "", ' %1 failed to capture the base.', $TeamName[2]); // List out the team rosters: - messageClient( %client, 'MsgDebriefAddLine', "", '\n%1\t%2', $TeamName[1], $TeamName[2] ); + messageClient( %client, 'MsgDebriefAddLine', "", '\n%1%2', $TeamName[1], $TeamName[2] ); %max = $TeamRank[1, count] > $TeamRank[2, count] ? $TeamRank[1, count] : $TeamRank[2, count]; for ( %line = 0; %line < %max; %line++ ) { %plyr1 = $TeamRank[1, %line] $= "" ? "" : $TeamRank[1, %line].name; %plyr2 = $TeamRank[2, %line] $= "" ? "" : $TeamRank[2, %line].name; - messageClient( %client, 'MsgDebriefAddLine', "", '\t%1\t%2', %plyr1, %plyr2 ); + messageClient( %client, 'MsgDebriefAddLine', "", ' %1 %2', %plyr1, %plyr2 ); } // Show observers: @@ -854,11 +854,11 @@ function SiegeGame::sendDebriefing( %game, %client ) { if ( !%header ) { - messageClient( %client, 'MsgDebriefAddLine', "", '\nOBSERVERS' ); + messageClient( %client, 'MsgDebriefAddLine', "", '\nOBSERVERS' ); %header = true; } - messageClient( %client, 'MsgDebriefAddLine', "", '\t%1', %cl.name ); + messageClient( %client, 'MsgDebriefAddLine', "", ' %1', %cl.name ); } } } diff --git a/base/scripts/SinglePlayerGame.cs b/base/scripts/SinglePlayerGame.cs index 8f7078e..a97b7b2 100644 --- a/base/scripts/SinglePlayerGame.cs +++ b/base/scripts/SinglePlayerGame.cs @@ -552,6 +552,7 @@ function singlePlayerGame::gameOver(%game) //disable the AI system AISystemEnabled(false); + $AIDisableChatResponse = ""; game.deactivatePackages(); @@ -566,6 +567,7 @@ function singlePlayerGame::gameOver(%game) resetSinglePlayerGlobals(); + $currentMissionType = ""; DefaultGame::GameOver(%game); } diff --git a/base/scripts/Training1.cs b/base/scripts/Training1.cs index 6773de8..b101122 100644 --- a/base/scripts/Training1.cs +++ b/base/scripts/Training1.cs @@ -69,6 +69,21 @@ package Training1 { //------------------------------------------------------------------------------ +//scriptlet +//we have to jump through a lot of hoops to get those dead bodies in training1 +function deadArmor::onAdd(%this, %obj) +{ + %skin = (%obj.trainingSkin == 1 ? 'swolf' : 'beagle'); + //echo("skin = " SPC %skin); + createTarget(%obj, 'Dead Body', %skin, "", 'deadArmor', 0); +} + +function deadArmor::onRemove(%this, %obj) +{ + //echo("singleplayerGame -- deadArmor::onRemove"); + freeTarget(%obj.getTarget()); +} + function MP3Audio::play(%this) { //too bad...no mp3 in training @@ -524,6 +539,7 @@ function singlePlayerGame::playerSpawned(%game, %player) function singlePlayerGame::gameOver(%game) { //moveMap.bindCmd( keyboard, "backspace", "", game.returnBinding ); + $AIDisableChatResponse = ""; cancel($Training1Blackout); cancel($Training1HitGround); LightMaleHumanArmor.minImpactSpeed = 45; @@ -882,6 +898,7 @@ function beginTraining1Intro() //moveMap.bindCmd( keyboard, "backspace", "", "skipIntroCinematic();" ); //set the intro started bools + $AIDisableChatResponse = true; game.playedIntro = true; game.trainingIntro = true; @@ -967,6 +984,7 @@ function trainingIntroFlightEnd() { //put the player back in his body, give him control back, //a little dramatic flash, start the rest of the mission + $AIDisableChatResponse = ""; game.trainingIntro = false; $player.player.invincible = false; serverConnection.setBlackout(false, 5000); diff --git a/base/scripts/TrainingGui.cs b/base/scripts/TrainingGui.cs index d1fdd36..caf488f 100644 --- a/base/scripts/TrainingGui.cs +++ b/base/scripts/TrainingGui.cs @@ -158,7 +158,10 @@ function TrainingMissionList::onSelect( %this, %id, %text ) else error( "Failed to open Single Player mission file " @ %fileName @ "!" ); - %bmp = "gui/" @ %briefPic @ ".png"; + if (!isDemo() && !isDemoServer()) + %bmp = "gui/" @ %briefPic @ ".png"; + else + %bmp = "gui/" @ %briefPic @ ".bm8"; if ( isFile( "textures/" @ %bmp ) ) { TrainingPic.setBitmap( %bmp ); diff --git a/base/scripts/admin.cs b/base/scripts/admin.cs index 524ba24..3996c63 100644 --- a/base/scripts/admin.cs +++ b/base/scripts/admin.cs @@ -56,11 +56,9 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, % %actionMsg = $VoteMessage[ %typeName ]; if( !%client.canVote && !%isAdmin ) - { return; - } - if ( !%client.isAdmin || ( ( %arg1.isAdmin && ( %client != %arg1 ) ) ) ) + if ( !%isAdmin || ( ( %arg1.isAdmin && ( %client != %arg1 ) ) ) ) { %teamSpecific = false; %gender = (%client.sex $= "Male" ? 'he' : 'she'); @@ -71,7 +69,7 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, % //send a message to everyone about the vote... if ( %playerVote ) { - %teamSpecific = ( %typeName $= "VoteKickPlayer" ); + %teamSpecific = ( %typeName $= "VoteKickPlayer" ) && ( Game.numTeams > 1 ); %kickerIsObs = %client.team == 0; %kickeeIsObs = %arg1.team == 0; %sameTeam = %client.team == %arg1.team; @@ -98,8 +96,10 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, % } Game.kickClient = %arg1; + Game.kickClientName = %arg1.name; Game.kickGuid = %arg1.guid; Game.kickTeam = %arg1.team; + if(%teamSpecific) { for ( %idx = 0; %idx < ClientGroup.getCount(); %idx++ ) @@ -261,7 +261,22 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, % if(%arg1 != %client) { if(!%arg1.isSuperAdmin) - eval( "Game." @ %typeName @ "(true,\"" @ %arg1 @ "\",\"" @ %arg2 @ "\",\"" @ %arg3 @ "\",\"" @ %arg4 @ "\");" ); + { + // Set up kick/ban values: + if ( %typeName $= "VoteBanPlayer" || %typeName $= "VoteKickPlayer" ) + { + Game.kickClient = %arg1; + Game.kickClientName = %arg1.name; + Game.kickGuid = %arg1.guid; + Game.kickTeam = %arg1.team; + } + + //Tinman - PURE servers can't call "eval" + if (!isPureServer()) + eval( "Game." @ %typeName @ "(true,\"" @ %arg1 @ "\",\"" @ %arg2 @ "\",\"" @ %arg3 @ "\",\"" @ %arg4 @ "\");" ); + else + Game.evalVote(%typeName, true, %arg1, %arg2, %arg3, %arg4); + } else messageClient(%client, '', '\c2You can not %1 %2, %3 is a Super Admin!', %actionMsg, %arg1.name, %gender); } @@ -323,7 +338,11 @@ function calcVotes(%typeName, %arg1, %arg2, %arg3, %arg4) Game.totalVotesNone++; } } - eval( "Game." @ %typeName @ "(false,\"" @ %arg1 @ "\",\"" @ %arg2 @ "\",\"" @ %arg3 @ "\",\"" @ %arg4 @ "\");" ); + //Tinman - PURE servers can't call "eval" + if (!isPureServer()) + eval( "Game." @ %typeName @ "(false,\"" @ %arg1 @ "\",\"" @ %arg2 @ "\",\"" @ %arg3 @ "\",\"" @ %arg4 @ "\");" ); + else + Game.evalVote(%typeName, false, %arg1, %arg2, %arg3, %arg4); Game.scheduleVote = ""; Game.kickClient = ""; clearVotes(); diff --git a/base/scripts/aiChat.cs b/base/scripts/aiChat.cs index 7376817..d0103cd 100644 --- a/base/scripts/aiChat.cs +++ b/base/scripts/aiChat.cs @@ -405,6 +405,10 @@ function AIRespondToEvent(%client, %eventTag, %targetClient) //record the event time $EventTagTimeArray[%eventTag] = getSimTime(); + //abort if AI chat has been disabled + if ($AIDisableChatResponse) + return; + %clientPos = %client.player.getWorldBoxCenter(); switch$ (%eventTag) { diff --git a/base/shapes/bioderm_heavy.cs b/base/scripts/bioderm_heavy.cs similarity index 100% rename from base/shapes/bioderm_heavy.cs rename to base/scripts/bioderm_heavy.cs diff --git a/base/shapes/bioderm_light.cs b/base/scripts/bioderm_light.cs similarity index 100% rename from base/shapes/bioderm_light.cs rename to base/scripts/bioderm_light.cs diff --git a/base/shapes/bioderm_medium.cs b/base/scripts/bioderm_medium.cs similarity index 100% rename from base/shapes/bioderm_medium.cs rename to base/scripts/bioderm_medium.cs diff --git a/base/scripts/camera.cs b/base/scripts/camera.cs index 8bed495..a039d8e 100644 --- a/base/scripts/camera.cs +++ b/base/scripts/camera.cs @@ -6,6 +6,17 @@ datablock CameraData(Observer) firstPersonOnly = true; }; +datablock CameraData(CommanderCamera) +{ + mode = "observerStatic"; + firstPersonOnly = true; +}; + +function CommanderCamera::onTrigger( %data, %obj, %trigger, %state ) +{ + // no need to do anything here. +} + function Observer::onTrigger(%data,%obj,%trigger,%state) { // state = 0 means that a trigger key was released @@ -28,6 +39,9 @@ function Observer::onTrigger(%data,%obj,%trigger,%state) switch$ (%obj.mode) { case "justJoined": + if ( isDemoServer() ) + clearCenterPrint( %client ); + //press FIRE if (%trigger == 0) { @@ -163,6 +177,8 @@ function Observer::onTrigger(%data,%obj,%trigger,%state) serverCmdObserveClient(%client, %client.observeFlyClient); else serverCmdObserveClient(%client, -1); + + observerFollowUpdate( %client, %client.observeClient, false ); displayObserverHud(%client, %client.observeClient); messageClient(%client.observeClient, 'Observer', '\c1%1 is now observing you.', %client.name); } @@ -212,6 +228,10 @@ function Observer::onTrigger(%data,%obj,%trigger,%state) serverCmdObserveClient(%client, %client.observeFlyClient); else serverCmdObserveClient(%client, -1); + + // update the observer list for this client + observerFollowUpdate( %client, %client.observeClient, false ); + displayObserverHud(%client, %client.observeClient); messageClient(%client.observeClient, 'Observer', '\c1%1 is now observing you.', %client.name); } @@ -225,11 +245,28 @@ function Observer::onTrigger(%data,%obj,%trigger,%state) %prevObsClient = %client.observeClient; if (%nextClient > 0 && %nextClient != %client.observeClient) { + // update the observer list for this client + observerFollowUpdate( %client, %nextClient, true ); + //set the new object %transform = %nextClient.player.getTransform(); - %obj.setOrbitMode(%nextClient.player, %transform, 0.5, 4.5, 4.5); - %client.observeClient = %nextClient; - + if( !%nextClient.isMounted() ) + { + %obj.setOrbitMode(%nextClient.player, %transform, 0.5, 4.5, 4.5); + %client.observeClient = %nextClient; + } + else + { + %mount = %nextClient.player.getObjectMount(); + if( %mount.getDataBlock().observeParameters $= "" ) + %params = %transform; + else + %params = %mount.getDataBlock().observeParameters; + + %obj.setOrbitMode(%mount, %mount.getTransform(), getWord( %params, 0 ), getWord( %params, 1 ), getWord( %params, 2 )); + %client.observeClient = %nextClient; + } + //send the message(s) displayObserverHud(%client, %nextClient); messageClient(%nextClient, 'Observer', '\c1%1 is now observing you.', %client.name); @@ -244,10 +281,27 @@ function Observer::onTrigger(%data,%obj,%trigger,%state) %prevObsClient = %client.observeClient; if (%prevClient > 0 && %prevClient != %client.observeClient) { + // update the observer list for this client + observerFollowUpdate( %client, %prevClient, true ); + //set the new object %transform = %prevClient.player.getTransform(); - %obj.setOrbitMode(%prevClient.player, %transform, 0.5, 4.5, 4.5); - %client.observeClient = %prevClient; + if( !%prevClient.isMounted() ) + { + %obj.setOrbitMode(%prevClient.player, %transform, 0.5, 4.5, 4.5); + %client.observeClient = %prevClient; + } + else + { + %mount = %prevClient.player.getObjectMount(); + if( %mount.getDataBlock().observeParameters $= "" ) + %params = %transform; + else + %params = %mount.getDataBlock().observeParameters; + + %obj.setOrbitMode(%mount, %mount.getTransform(), getWord( %params, 0 ), getWord( %params, 1 ), getWord( %params, 2 )); + %client.observeClient = %prevClient; + } //send the message(s) displayObserverHud(%client, %prevClient); @@ -259,6 +313,9 @@ function Observer::onTrigger(%data,%obj,%trigger,%state) //press JUMP else if (%trigger == 2) { + // update the observer list for this client + observerFollowUpdate( %client, -1, false ); + //toggle back to observer fly mode %obj.mode = "observerFly"; %obj.setFlyMode(); @@ -309,7 +366,7 @@ function Observer::setMode(%data, %obj, %mode, %targetObj) case "pre-game": commandToClient(%client, 'setHudMode', 'Observer'); - %obj.setOrbitMode( %targetObj, %targetObj.getWorldBoxCenter() @ " 0.5 0.5 0.5 1", 0.5, 4.5, 4.5, true); + %obj.setOrbitMode( %targetObj, %targetObj.getTransform(), 0.5, 4.5, 4.5); case "observerFly": // Free-flying observer camera @@ -328,7 +385,19 @@ function Observer::setMode(%data, %obj, %mode, %targetObj) case "observerFollow": // Observer attached to a moving object (assume player for now...) %transform = %targetObj.getTransform(); - %obj.setOrbitMode(%targetObj, %transform, 0.5, 4.5, 4.5); + + if( !%targetObj.isMounted() ) + %obj.setOrbitMode(%targetObj, %transform, 0.5, 4.5, 4.5); + else + { + %mount = %targetObj.getObjectMount(); + if( %mount.getDataBlock().observeParameters $= "" ) + %params = %transform; + else + %params = %mount.getDataBlock().observeParameters; + + %obj.setOrbitMode(%mount, %mount.getTransform(), getWord( %params, 0 ), getWord( %params, 1 ), getWord( %params, 2 )); + } case "observerTimeout": commandToClient(%client, 'setHudMode', 'Observer'); @@ -518,6 +587,67 @@ function serverCmdObserveClient(%client, %target) %client.observeClient = %target; } +function observerFollowUpdate( %client, %nextClient, %cycle ) +{ + %Oclient = %client.observeClient; + if( %Oclient $= "" ) + return; + + // changed to observer fly... + if( %nextClient == -1 ) + { + // find us in their observer list and remove, then reshuffle the list... + for( %i = 0; %i < %Oclient.observeCount; %i++ ) + { + if( %Oclient.observers[%i] == %client ) + { + %Oclient.observeCount--; + %Oclient.observers[%i] = %Oclient.observers[%Oclient.observeCount]; + %Oclient.observers[%Oclient.observeCount] = ""; + break; + } + } + return; // were done.. + } + + // changed from observer fly to observer follow... + if( !%cycle && %nextClient != -1 ) + { + // if nobody is observing this guy, initialize their observer count... + if( %nextClient.observeCount $= "" ) + %nextClient.observeCount = 0; + + // add us to their list of observers... + %nextClient.observers[%nextClient.observeCount] = %client; + %nextClient.observeCount++; + return; // were done. + } + + if( %nextClient != -1 ) + { + // cycling to the next client... + for( %i = 0; %i < %Oclient.observeCount; %i++ ) + { + // first remove us from our prev client's list... + if( %Oclient.observers[%i] == %client ) + { + %Oclient.observeCount--; + %Oclient.observers[%i] = %Oclient.observers[%Oclient.observeCount]; + %Oclient.observers[%Oclient.observeCount] = ""; + break; // screw you guys, i'm goin home! + } + } + + // if nobody is observing this guy, initialize their observer count... + if( %nextClient.observeCount $= "" ) + %nextClient.observeCount = 0; + + // now add us to the new clients list... + %nextClient.observeCount++; + %nextClient.observers[%nextClient.observeCount - 1] = %client; + } +} + function updateObserverFlyHud(%client) { //just in case there are two threads going... diff --git a/base/scripts/chatMenuHud.cs b/base/scripts/chatMenuHud.cs index 67f6172..176ad24 100644 --- a/base/scripts/chatMenuHud.cs +++ b/base/scripts/chatMenuHud.cs @@ -18,7 +18,7 @@ exec( "scripts/cannedChatItems.cs" ); new SimSet( ChatMenuList ); // Store all of the chat menu maps here so that we can delete them later: function activateChatMenu( %filename ) { - if ( isFile( %filename ) ) + if ( isFile( %filename ) || isFile( %filename @ ".dso" ) ) { // Clear the old chat menu: ChatMenuList.clear(); @@ -201,10 +201,8 @@ function serverCmdCannedChat( %client, %command, %fromAI ) return; } - // Build the message string: %chatItem = $ChatTable[%cmdId]; - //%wavFile = "voice/" @ %client.voice @ "/" @ %chatItem.audioFile @ ".wav"; - + //if there is text if (%chatItem.text !$= "" || !%chatItem.play3D) { @@ -217,10 +215,10 @@ function serverCmdCannedChat( %client, %command, %fromAI ) } //if no text, see if the audio is to be played in 3D... - else if (%chatItem.play3D) + else if ( %chatItem.play3D && %client.player ) playTargetAudio(%client.target, addTaggedString(%chatItem.audioFile), AudioClosest3d, true); - if( %chatItem.animation !$= "" ) + if ( %chatItem.animation !$= "" ) serverCmdPlayAnim(%client, %chatItem.animation); // Let the AI respond to the canned chat messages (from humans only) diff --git a/base/scripts/client.cs b/base/scripts/client.cs index 392ce67..5066ad2 100644 --- a/base/scripts/client.cs +++ b/base/scripts/client.cs @@ -199,6 +199,24 @@ function toggleCursorControl() if ( $platform $= "linux" ) GlobalActionMap.bindCmd(keyboard, "ctrl g", "", "toggleCursorControl();"); +function toggleNetDisplayHud(%val) +{ + if(%val) + { + if(NetGraphHudFrame.isVisible()) + { + NetGraphHudFrame.setVisible(false); + NetBarHudFrame.setVisible(true); + } + else if(NetBarHudFrame.isVisible()) + { + NetBarHudFrame.setVisible(false); + } + else + NetGraphHudFrame.setVisible(true); + } +} + function PlayGui::onWake(%this) { // Make sure the shell hum is off: @@ -221,6 +239,9 @@ function PlayGui::onWake(%this) // hack city - these controls are floating around and need to be clamped schedule(0, 0, "refreshCenterTextCtrl"); schedule(0, 0, "refreshBottomTextCtrl"); + + // update the network graph prefs + NetGraphHud.getPrefs(); } function refreshBottomTextCtrl() @@ -311,7 +332,9 @@ function onConnectionToServerTimedOut() function onConnectionToServerLost( %msg ) { DisconnectedCleanup(); - MessageBoxOK( "DISCONNECT", "Your connection to the server was lost." NL %msg); + if ( %msg $= "" ) + %msg = "Your connection to the server was lost."; + MessageBoxOK( "DISCONNECTED", %msg ); } // Client voting functions: @@ -347,11 +370,57 @@ function ClientCmdVoteSubmitted(%type) } // End client voting functions. +//-------------------------------------------------------------------------- +// Player pref functions: +function getPlayerPrefs( %player ) +{ + %voiceMuted = false; + if ( $PlayingOnline ) + { + if ( !%player.isSmurf ) + { + %record = queryPlayerDatabase( %player.guid ); + if ( %record !$= "" ) + { + if ( firstWord( %record ) == 1 ) + { + %player.chatMuted = true; + commandToServer( 'TogglePlayerMute', %player.clientId ); + } + + %voiceMuted = getWord( %record, 1 ) == 1; + } + } + else + %voiceMuted = true; // For now, automatically mute smurfs + } + + commandToServer( 'ListenTo', %player.clientId, !%voiceMuted, false ); +} + +//-------------------------------------------------------------------------- +function handlePlayerMuted( %msgType, %msgString, %name, %client, %mute ) +{ + if ( isObject( $PlayerList[%client] ) ) + { + $PlayerList[%client].chatMuted = %mute; + if ( $PlayingOnline && !$PlayerList[%client].isSmurf && $PlayerList[%client].guid > 0 ) + setPlayerTextMuted( $PlayerList[%client].guid, %mute ); + } +} + +//-------------------------------------------------------------------------- function clientCmdEndBomberSight() { PlayGui.remove($bombSightHud); } +function clientCmdRemoveReticle() +{ + reticleHud.setBitmap(""); + reticleFrameHud.setVisible(false); +} + function clientCmdSetBeaconNames(%target, %marker, %vehicle) { setBeaconNames(%target, %marker, %vehicle); @@ -469,6 +538,103 @@ function clientCmdToggleDashHud(%val) dashboardHud.setVisible(%val); } +function addEnergyGauge( %vehType ) +{ + switch$ (%vehType) + { + case "Assault" or "Bomber": + dashboardHud.nrgBar = new HudBitmapCtrl(vEnergyFrame) { + profile = "GuiDashBoxProfile"; + horizSizing = "right"; + vertSizing = "top"; + position = "160 80"; + extent = "118 19"; + minExtent = "8 8"; + visible = "1"; + bitmap = "gui/hud_veh_new_dashpiece_5"; + opacity = "0.8"; + + new HudEnergy(vEnergyBar) { + profile = "GuiDefaultProfile"; + horizSizing = "right"; + vertSizing = "top"; + position = "0 0"; + extent = "118 19"; + minExtent = "8 8"; + visible = "1"; + fillColor = "0.353000 0.373000 0.933000 0.800000"; + frameColor = "0.000000 1.000000 0.000000 1.000000"; + autoCenter = "0"; + autoResize = "0"; + displayMounted = true; + bitmap = "gui/hud_veh_new_dashpiece_5"; + verticalFill = false; + subRegion = "4 5 98 5"; + pulseRate = "500"; + pulseThreshold = "0.3"; + //modColor = "1.000000 0.500000 0.000000 1.000000"; + }; + + new HudCapacitor(vCapBar) { + profile = "GuiDefaultProfile"; + horizSizing = "right"; + vertSizing = "top"; + position = "0 8"; + extent = "118 8"; + minExtent = "8 8"; + visible = "1"; + fillColor = "1.000 0.729 0.301 0.800000"; + frameColor = "0.000000 1.000000 0.000000 1.000000"; + autoCenter = "0"; + autoResize = "0"; + displayMounted = true; + bitmap = "gui/hud_veh_new_dashpiece_5"; + verticalFill = false; + subRegion = "4 5 98 5"; + pulseRate = "500"; + pulseThreshold = "0.3"; + //modColor = "1.000000 0.500000 0.000000 1.000000"; + }; + }; + dashboardHud.add(dashboardHud.nrgBar); + + default: + dashboardHud.nrgBar = new HudBitmapCtrl(vEnergyFrame) { + profile = "GuiDashBoxProfile"; + horizSizing = "right"; + vertSizing = "top"; + position = "160 80"; + extent = "118 19"; + minExtent = "8 8"; + visible = "1"; + bitmap = "gui/hud_veh_new_dashpiece_5"; + opacity = "0.8"; + + new HudEnergy(vEnergyBar) { + profile = "GuiDefaultProfile"; + horizSizing = "right"; + vertSizing = "top"; + position = "0 0"; + extent = "118 19"; + minExtent = "8 8"; + visible = "1"; + fillColor = "0.353000 0.373000 0.933000 0.800000"; + frameColor = "0.000000 1.000000 0.000000 1.000000"; + autoCenter = "0"; + autoResize = "0"; + displayMounted = true; + bitmap = "gui/hud_veh_new_dashpiece_5"; + verticalFill = false; + subRegion = "4 5 98 10"; + pulseRate = "500"; + pulseThreshold = "0.3"; + //modColor = "1.000000 0.500000 0.000000 1.000000"; + }; + }; + dashboardHud.add(dashboardHud.nrgBar); + } +} + function clientCmdShowVehicleGauges(%vehType, %node) { //if(!((%vehType $= "Bomber" || %vehType $= "Assault") && %node > 0)) @@ -483,7 +649,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) extent = "176 108"; minExtent = "8 8"; visible = "1"; - bitmap = "gui/hud_veh_new_dash.png"; + bitmap = "gui/hud_veh_new_dash"; opacity = "0.8"; }; dashboardHud.add(dashboardHud.diagram); @@ -501,39 +667,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) }; dashboardHud.add(dashboardHud.vehDiagram); - dashboardHud.nrgBar = new HudBitmapCtrl(vEnergyFrame) { - profile = "GuiDashBoxProfile"; - horizSizing = "right"; - vertSizing = "top"; - position = "160 80"; - extent = "118 19"; - minExtent = "8 8"; - visible = "1"; - bitmap = "gui/hud_veh_new_dashpiece_5.png"; - opacity = "0.8"; - - new HudEnergy(vEnergyBar) { - profile = "GuiDefaultProfile"; - horizSizing = "right"; - vertSizing = "top"; - position = "0 0"; - extent = "118 19"; - minExtent = "8 8"; - visible = "1"; - fillColor = "0.353000 0.373000 0.933000 0.800000"; - frameColor = "0.000000 1.000000 0.000000 1.000000"; - autoCenter = "0"; - autoResize = "0"; - displayMounted = true; - bitmap = "gui/hud_veh_new_dashpiece_5.png"; - verticalFill = false; - subRegion = "4 5 98 10"; - pulseRate = "500"; - pulseThreshold = "0.3"; - //modColor = "1.000000 0.500000 0.000000 1.000000"; - }; - }; - dashboardHud.add(dashboardHud.nrgBar); + addEnergyGauge( %vehType ); dashboardHud.dmgBar = new HudBitmapCtrl(vDamageFrame) { profile = "GuiDashBoxProfile"; @@ -543,7 +677,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) extent = "118 19"; minExtent = "8 8"; visible = "1"; - bitmap = "gui/hud_veh_new_dashpiece_4.png"; + bitmap = "gui/hud_veh_new_dashpiece_4"; opacity = "0.8"; new HudDamage(vDamageBar) { @@ -556,7 +690,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) visible = "1"; fillColor = "0.000000 1.0000 0.000000 0.800000"; frameColor = "0.000000 1.000000 0.000000 0.000000"; - bitmap = "gui/hud_veh_new_dashpiece_4.png"; + bitmap = "gui/hud_veh_new_dashpiece_4"; verticalFill = false; displayMounted = true; opacity = "0.8"; @@ -605,7 +739,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) switch$ (%vehType) { case "Shrike" : - vOverheadHud.setBitmap("gui/hud_veh_icon_shrike.png"); + vOverheadHud.setBitmap("gui/hud_veh_icon_shrike"); // add altitude box for flying vehicles dashboardHud.altBox = new HudBitmapCtrl(vAltitudeBox) { profile = "GuiDashBoxProfile"; @@ -614,7 +748,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) position = "371 56"; extent = "68 22"; minExtent = "8 8"; - bitmap = "gui/hud_veh_new_dashpiece_1.png"; + bitmap = "gui/hud_veh_new_dashpiece_1"; visible = "1"; opacity = "0.8"; @@ -658,7 +792,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) position = "0 0"; extent = "82 40"; minExtent = "8 8"; - bitmap = "gui/hud_veh_new_dashpiece_2.png"; + bitmap = "gui/hud_veh_new_dashpiece_2"; visible = "1"; opacity = "0.8"; @@ -669,7 +803,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) position = "28 6"; extent = "25 25"; minExtent = "8 8"; - bitmap = "gui/hud_blaster.png"; + bitmap = "gui/hud_blaster"; visible = "1"; opacity = "0.8"; }; @@ -677,7 +811,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) }; dashboardHud.add(dashboardHud.weapon); // change to shrike reticle - reticleHud.setBitmap("gui/hud_ret_shrike.png"); + reticleHud.setBitmap("gui/hud_ret_shrike"); reticleFrameHud.setVisible(false); case "Bomber" : @@ -701,7 +835,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) extent = "80 44"; minExtent = "8 8"; visible = "1"; - bitmap = "gui/hud_veh_new_hilite_left.png"; + bitmap = "gui/hud_veh_new_hilite_left"; opacity = "0.3"; }; new HudBitmapCtrl(vWeap2Hilite) { @@ -712,7 +846,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) extent = "80 44"; minExtent = "8 8"; visible = "0"; - bitmap = "gui/hud_veh_new_hilite_right.png"; + bitmap = "gui/hud_veh_new_hilite_right"; opacity = "0.3"; }; new HudBitmapCtrl(vWeap3Hilite) { @@ -723,7 +857,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) extent = "40 44"; minExtent = "8 8"; visible = "0"; - bitmap = "gui/hud_veh_new_hilite_middle.png"; + bitmap = "gui/hud_veh_new_hilite_middle"; opacity = "0.3"; }; @@ -735,7 +869,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) extent = "200 40"; minExtent = "8 8"; visible = "1"; - bitmap = "gui/hud_veh_new_bombardier_dash.png"; + bitmap = "gui/hud_veh_new_bombardier_dash"; opacity = "1.0"; new HudBitmapCtrl(vWeaponOne) { @@ -746,7 +880,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) extent = "25 25"; minExtent = "8 8"; visible = "1"; - bitmap = "gui/hud_blaster.png"; + bitmap = "gui/hud_blaster"; }; new HudBitmapCtrl(vWeaponTwo) { @@ -757,7 +891,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) extent = "25 25"; minExtent = "8 8"; visible = "1"; - bitmap = "gui/hud_targetlaser.png"; + bitmap = "gui/hud_targetlaser"; }; new HudBitmapCtrl(vWeaponThree) { @@ -768,7 +902,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) extent = "25 25"; minExtent = "8 8"; visible = "1"; - bitmap = "gui/hud_veh_bomb.png"; + bitmap = "gui/hud_veh_bomb"; }; }; }; @@ -783,7 +917,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) minExtent = "8 8"; visible = "1"; flipVertical = true; - bitmap = "gui/hud_veh_new_dashpiece_5.png"; + bitmap = "gui/hud_veh_new_dashpiece_5"; opacity = "0.8"; new HudEnergy(vEnergyBar) { @@ -799,9 +933,29 @@ function clientCmdShowVehicleGauges(%vehType, %node) autoCenter = "0"; autoResize = "0"; displayMounted = true; - bitmap = "gui/hud_veh_new_dashpiece_5.png"; + bitmap = "gui/hud_veh_new_dashpiece_5"; verticalFill = false; - subRegion = "4 5 98 10"; + subRegion = "4 5 98 5"; + pulseRate = "500"; + pulseThreshold = "0.3"; + //modColor = "1.000000 0.500000 0.000000 1.000000"; + }; + new HudCapacitor(vCapBar) { + profile = "GuiDefaultProfile"; + horizSizing = "right"; + vertSizing = "top"; + position = "0 8"; + extent = "118 8"; + minExtent = "8 8"; + visible = "1"; + fillColor = "1.000 0.729 0.301 0.800000"; + frameColor = "0.000000 1.000000 0.000000 1.000000"; + autoCenter = "0"; + autoResize = "0"; + displayMounted = true; + bitmap = "gui/hud_veh_new_dashpiece_5"; + verticalFill = false; + subRegion = "4 5 98 5"; pulseRate = "500"; pulseThreshold = "0.3"; //modColor = "1.000000 0.500000 0.000000 1.000000"; @@ -818,7 +972,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) minExtent = "8 8"; visible = "1"; flipVertical = true; - bitmap = "gui/hud_veh_new_dashpiece_4.png"; + bitmap = "gui/hud_veh_new_dashpiece_4"; opacity = "0.8"; new HudDamage(vDamageBar) { @@ -831,7 +985,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) visible = "1"; fillColor = "0.000000 1.0000 0.000000 0.800000"; frameColor = "0.000000 1.000000 0.000000 0.000000"; - bitmap = "gui/hud_veh_new_dashpiece_4.png"; + bitmap = "gui/hud_veh_new_dashpiece_4"; verticalFill = false; displayMounted = true; opacity = "0.8"; @@ -843,13 +997,13 @@ function clientCmdShowVehicleGauges(%vehType, %node) }; dashboardHud.add(dashboardHud.dmgBar); $numVWeapons = 3; - reticleHud.setBitmap("gui/hud_ret_shrike.png"); + reticleHud.setBitmap("gui/hud_ret_shrike"); reticleFrameHud.setVisible(false); } else if(%node == 0) { // pilot dashboard hud - vOverheadHud.setBitmap("gui/hud_veh_icon_bomber.png"); + vOverheadHud.setBitmap("gui/hud_veh_icon_bomber"); // add altitude box for flying vehicles dashboardHud.altBox = new HudBitmapCtrl(vAltitudeBox) { profile = "GuiDashBoxProfile"; @@ -858,7 +1012,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) position = "371 56"; extent = "68 22"; minExtent = "8 8"; - bitmap = "gui/hud_veh_new_dashpiece_1.png"; + bitmap = "gui/hud_veh_new_dashpiece_1"; visible = "1"; opacity = "0.8"; @@ -897,7 +1051,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) extent = "128 128"; minExtent = "8 8"; visible = "1"; - bitmap = "gui/hud_veh_icon_bomber.png"; + bitmap = "gui/hud_veh_icon_bomber"; opacity = "1.0"; }; dashboardHud.add(dashboardHud.vehDiagram); @@ -910,7 +1064,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) extent = "118 19"; minExtent = "8 8"; visible = "1"; - bitmap = "gui/hud_veh_new_dashpiece_5.png"; + bitmap = "gui/hud_veh_new_dashpiece_5"; flipVertical = true; opacity = "0.8"; @@ -927,7 +1081,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) autoCenter = "0"; autoResize = "0"; displayMounted = true; - bitmap = "gui/hud_veh_new_dashpiece_5.png"; + bitmap = "gui/hud_veh_new_dashpiece_5"; verticalFill = false; subRegion = "4 5 98 10"; pulseRate = "500"; @@ -944,7 +1098,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) extent = "118 19"; minExtent = "8 8"; visible = "1"; - bitmap = "gui/hud_veh_new_dashpiece_4.png"; + bitmap = "gui/hud_veh_new_dashpiece_4"; flipVertical = true; opacity = "0.8"; @@ -958,7 +1112,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) visible = "1"; fillColor = "0.000000 1.0000 0.000000 0.800000"; frameColor = "0.000000 1.000000 0.000000 0.000000"; - bitmap = "gui/hud_veh_new_dashpiece_4.png"; + bitmap = "gui/hud_veh_new_dashpiece_4"; verticalFill = false; displayMounted = true; opacity = "0.8"; @@ -989,7 +1143,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) extent = "10 10"; minExtent = "3 3"; visible = "0"; - bitmap = "gui/hud_veh_seatdot.png"; + bitmap = "gui/hud_veh_seatdot"; }; new GuiBitmapCtrl(vPassenger1Slot) { profile = "GuiDashBoxProfile"; @@ -999,7 +1153,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) extent = "10 10"; minExtent = "3 3"; visible = "0"; - bitmap = "gui/hud_veh_seatdot.png"; + bitmap = "gui/hud_veh_seatdot"; }; new GuiBitmapCtrl(vPassenger2Slot) { profile = "GuiDashBoxProfile"; @@ -1009,7 +1163,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) extent = "10 10"; minExtent = "3 3"; visible = "0"; - bitmap = "gui/hud_veh_seatdot.png"; + bitmap = "gui/hud_veh_seatdot"; }; }; vOverheadHud.add(vOverheadHud.passengerHud); @@ -1017,7 +1171,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) case "HAPC" : if(%node == 0) { - vOverheadHud.setBitmap("gui/hud_veh_icon_hapc.png"); + vOverheadHud.setBitmap("gui/hud_veh_icon_hapc"); // add altitude box for flying vehicles dashboardHud.altBox = new HudBitmapCtrl(vAltitudeBox) { profile = "GuiDashBoxProfile"; @@ -1026,7 +1180,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) position = "371 56"; extent = "68 22"; minExtent = "8 8"; - bitmap = "gui/hud_veh_new_dashpiece_1.png"; + bitmap = "gui/hud_veh_new_dashpiece_1"; visible = "1"; opacity = "0.8"; @@ -1067,7 +1221,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) extent = "128 128"; minExtent = "8 8"; visible = "1"; - bitmap = "gui/hud_veh_icon_hapc.png"; + bitmap = "gui/hud_veh_icon_hapc"; opacity = "1.0"; }; dashboardHud.add(dashboardHud.vehDiagram); @@ -1080,7 +1234,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) extent = "118 19"; minExtent = "8 8"; visible = "1"; - bitmap = "gui/hud_veh_new_dashpiece_5.png"; + bitmap = "gui/hud_veh_new_dashpiece_5"; flipVertical = true; opacity = "0.8"; @@ -1097,7 +1251,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) autoCenter = "0"; autoResize = "0"; displayMounted = true; - bitmap = "gui/hud_veh_new_dashpiece_5.png"; + bitmap = "gui/hud_veh_new_dashpiece_5"; verticalFill = false; subRegion = "4 5 98 10"; pulseRate = "500"; @@ -1114,7 +1268,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) extent = "118 19"; minExtent = "8 8"; visible = "1"; - bitmap = "gui/hud_veh_new_dashpiece_4.png"; + bitmap = "gui/hud_veh_new_dashpiece_4"; flipVertical = true; opacity = "0.8"; @@ -1128,7 +1282,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) visible = "1"; fillColor = "0.000000 1.0000 0.000000 0.800000"; frameColor = "0.000000 1.000000 0.000000 0.000000"; - bitmap = "gui/hud_veh_new_dashpiece_4.png"; + bitmap = "gui/hud_veh_new_dashpiece_4"; verticalFill = false; displayMounted = true; opacity = "0.8"; @@ -1162,7 +1316,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) visible = "0"; setFirstResponder = "0"; modal = "1"; - bitmap = "gui/hud_veh_seatdot.png"; + bitmap = "gui/hud_veh_seatdot"; wrap = "0"; }; new GuiBitmapCtrl(vPassenger1Slot) { @@ -1175,7 +1329,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) visible = "0"; setFirstResponder = "0"; modal = "1"; - bitmap = "gui/hud_veh_seatdot.png"; + bitmap = "gui/hud_veh_seatdot"; wrap = "0"; }; new GuiBitmapCtrl(vPassenger2Slot) { @@ -1188,7 +1342,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) visible = "0"; setFirstResponder = "0"; modal = "1"; - bitmap = "gui/hud_veh_seatdot.png"; + bitmap = "gui/hud_veh_seatdot"; wrap = "0"; }; new GuiBitmapCtrl(vPassenger3Slot) { @@ -1201,7 +1355,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) visible = "0"; setFirstResponder = "0"; modal = "1"; - bitmap = "gui/hud_veh_seatdot.png"; + bitmap = "gui/hud_veh_seatdot"; wrap = "0"; }; new GuiBitmapCtrl(vPassenger4Slot) { @@ -1214,7 +1368,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) visible = "0"; setFirstResponder = "0"; modal = "1"; - bitmap = "gui/hud_veh_seatdot.png"; + bitmap = "gui/hud_veh_seatdot"; wrap = "0"; }; new GuiBitmapCtrl(vPassenger5Slot) { @@ -1227,7 +1381,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) visible = "0"; setFirstResponder = "0"; modal = "1"; - bitmap = "gui/hud_veh_seatdot.png"; + bitmap = "gui/hud_veh_seatdot"; wrap = "0"; }; }; @@ -1254,7 +1408,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) extent = "80 44"; minExtent = "8 8"; visible = "1"; - bitmap = "gui/hud_veh_new_hilite_left.png"; + bitmap = "gui/hud_veh_new_hilite_left"; opacity = "0.4"; }; new HudBitmapCtrl(vWeap2Hilite) { @@ -1265,7 +1419,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) extent = "80 44"; minExtent = "8 8"; visible = "0"; - bitmap = "gui/hud_veh_new_hilite_right.png"; + bitmap = "gui/hud_veh_new_hilite_right"; opacity = "0.4"; }; @@ -1277,7 +1431,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) extent = "152 36"; minExtent = "8 8"; visible = "1"; - bitmap = "gui/hud_veh_new_tankgunner_dash.png"; + bitmap = "gui/hud_veh_new_tankgunner_dash"; opacity = "0.8"; new HudBitmapCtrl(vWeaponOne) { @@ -1288,7 +1442,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) extent = "25 25"; minExtent = "8 8"; visible = "1"; - bitmap = "gui/hud_chaingun.png"; + bitmap = "gui/hud_chaingun"; }; new HudBitmapCtrl(vWeaponTwo) { @@ -1299,7 +1453,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) extent = "25 25"; minExtent = "8 8"; visible = "1"; - bitmap = "gui/hud_mortor.png"; + bitmap = "gui/hud_mortor"; }; }; }; @@ -1314,7 +1468,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) minExtent = "8 8"; visible = "1"; flipVertical = true; - bitmap = "gui/hud_veh_new_dashpiece_5.png"; + bitmap = "gui/hud_veh_new_dashpiece_5"; opacity = "0.8"; new HudEnergy(vEnergyBar) { @@ -1330,9 +1484,29 @@ function clientCmdShowVehicleGauges(%vehType, %node) autoCenter = "0"; autoResize = "0"; displayMounted = true; - bitmap = "gui/hud_veh_new_dashpiece_5.png"; + bitmap = "gui/hud_veh_new_dashpiece_5"; verticalFill = false; - subRegion = "4 5 98 10"; + subRegion = "4 5 98 5"; + pulseRate = "500"; + pulseThreshold = "0.3"; + //modColor = "1.000000 0.500000 0.000000 1.000000"; + }; + new HudCapacitor(vCapBar) { + profile = "GuiDefaultProfile"; + horizSizing = "right"; + vertSizing = "top"; + position = "0 8"; + extent = "118 8"; + minExtent = "8 8"; + visible = "1"; + fillColor = "1.000 0.729 0.301 0.800000"; + frameColor = "0.000000 1.000000 0.000000 1.000000"; + autoCenter = "0"; + autoResize = "0"; + displayMounted = true; + bitmap = "gui/hud_veh_new_dashpiece_5"; + verticalFill = false; + subRegion = "4 5 98 5"; pulseRate = "500"; pulseThreshold = "0.3"; //modColor = "1.000000 0.500000 0.000000 1.000000"; @@ -1349,7 +1523,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) minExtent = "8 8"; visible = "1"; flipVertical = true; - bitmap = "gui/hud_veh_new_dashpiece_4.png"; + bitmap = "gui/hud_veh_new_dashpiece_4"; opacity = "0.8"; new HudDamage(vDamageBar) { @@ -1362,7 +1536,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) visible = "1"; fillColor = "0.000000 1.0000 0.000000 0.800000"; frameColor = "0.000000 1.000000 0.000000 0.000000"; - bitmap = "gui/hud_veh_new_dashpiece_4.png"; + bitmap = "gui/hud_veh_new_dashpiece_4"; verticalFill = false; displayMounted = true; opacity = "0.8"; @@ -1376,13 +1550,13 @@ function clientCmdShowVehicleGauges(%vehType, %node) $numVWeapons = 2; // add tank chaingun reticle - reticleHud.setBitmap("gui/hud_ret_tankchaingun.png"); + reticleHud.setBitmap("gui/hud_ret_tankchaingun"); reticleFrameHud.setVisible(false); } else { // node 0 == driver - vOverheadHud.setBitmap("gui/hud_veh_icon_assault.png"); + vOverheadHud.setBitmap("gui/hud_veh_icon_assault"); // passenger slot "dots" vOverheadHud.passengerHud = new GuiControl(vPassengerHud) { profile = "GuiDashBoxProfile"; @@ -1401,7 +1575,7 @@ function clientCmdShowVehicleGauges(%vehType, %node) extent = "10 10"; minExtent = "3 3"; visible = "0"; - bitmap = "gui/hud_veh_seatdot.png"; + bitmap = "gui/hud_veh_seatdot"; }; new GuiBitmapCtrl(vPassenger1Slot) { profile = "GuiDashBoxProfile"; @@ -1411,17 +1585,17 @@ function clientCmdShowVehicleGauges(%vehType, %node) extent = "10 10"; minExtent = "3 3"; visible = "0"; - bitmap = "gui/hud_veh_seatdot.png"; + bitmap = "gui/hud_veh_seatdot"; }; }; vOverheadHud.add(vOverheadHud.passengerHud); } case "Hoverbike" : - vOverheadHud.setBitmap("gui/hud_veh_icon_hoverbike.png"); + vOverheadHud.setBitmap("gui/hud_veh_icon_hoverbike"); case "MPB" : - vOverheadHud.setBitmap("gui/hud_veh_icon_mpb.png"); + vOverheadHud.setBitmap("gui/hud_veh_icon_mpb"); } if(%node == 0) @@ -1519,6 +1693,7 @@ addMessageCallback( 'msgDeploySensorGrn', clientDeploySensorGrn ); addMessageCallback( 'msgDeploySensorOff', clientDeploySensorOff ); addMessageCallback( 'msgPackIconOff', clientPackIconOff ); addMessageCallback( 'MsgForceObserver', HandleForceObserver ); +addMessageCallback( 'MsgPlayerMuted', handlePlayerMuted ); function HandleForceObserver( %msgType, %msgString ) { @@ -1528,13 +1703,11 @@ function HandleForceObserver( %msgType, %msgString ) function handleIveBeenBanned(%msgType, %msgString) { DisconnectedCleanup(); - MessageBoxOk( "DISCONNECT", "You have been banned from this server.", "Disconnect();"); } function handleIveBeenKicked(%msgType, %msgString) { DisconnectedCleanup(); - MessageBoxOk( "DISCONNECT", "You have been kicked out of the game.", "Disconnect();"); } function clientDeploySensorRed() @@ -1776,34 +1949,6 @@ function ClientReceivedDataBlock(%index, %total) Canvas.repaint(); } -function GameConnection::setLagIcon(%conn, %state) -{ - if(%conn.getAddress() $= "Local") - return; - - if (%state $= "true") - $showLagIcon = true; - else - $showLagIcon = false; - - //if both icons are not visible, then don't do anything... (probably the F2 score or inv screen is up...) - if (!clockHud.isVisible() && !lagHudIndicator.isVisible()) - return; - - if (%state $= "true") - { - clockHud.setVisible(false); - lagHudIndicator.setVisible(true); - } - else - { - clockHud.setVisible(true); - lagHudIndicator.setVisible(false); - } - - sensorHud.update(); -} - function GameConnection::onTargetLocked( %con, %state ) { if( %state $= "true" ) diff --git a/base/scripts/clientAudio.cs b/base/scripts/clientAudio.cs index 147c5f9..742d6c2 100644 --- a/base/scripts/clientAudio.cs +++ b/base/scripts/clientAudio.cs @@ -93,14 +93,16 @@ function initAudio() // cap the codec levels if( $platform $= "linux" ) { - $pref::Audio::encodingLevel = -1; - $pref::Audio::decodingMask = 0; + if( $pref::Audio::encodingLevel != 3) + $pref::Audio::encodingLevel = 3; + $pref::Audio::decodingMask &= 8; + } + else + { + if( $pref::Audio::encodingLevel > 2) + $pref::Audio::encodingLevel = 2; + $pref::Audio::decodingMask &= 7; } - - if( $pref::Audio::encodingLevel > 2) - $pref::Audio::encodingLevel = 2; - - $pref::Audio::decodingMask &= 7; } if($Audio::initialized) @@ -429,3 +431,4 @@ new AudioProfile(ObjectiveCompleted) description = "AudioGui"; preload = true; }; + diff --git a/base/scripts/clientDefaults.cs b/base/scripts/clientDefaults.cs index 8124541..1e95684 100644 --- a/base/scripts/clientDefaults.cs +++ b/base/scripts/clientDefaults.cs @@ -11,8 +11,8 @@ $pref::Audio::channels = 2; $pref::Audio::enableVoiceCapture = 1; $pref::Audio::voiceChannels = 1; if ( $platform $= "linux" ) { - $pref::Audio::encodingLevel = -1; - $pref::Audio::decodingMask = 0; + $pref::Audio::encodingLevel = 3; + $pref::Audio::decodingMask = 8; } else { $pref::Audio::encodingLevel = 0; $pref::Audio::decodingMask = 1; @@ -102,6 +102,7 @@ $pref::Lobby::Column4 = 50; $pref::Lobby::Column5 = 50; $pref::Lobby::SortColumnKey = 3; $pref::Lobby::SortInc = 0; +$pref::Net::graphFields = 43; $pref::Net::simPacketLoss = 0; $pref::Net::simPing = 0; $pref::Net::DisplayOnMaster = "Always"; @@ -109,6 +110,10 @@ $pref::Net::RegionMask = 2; $pref::Net::CheckEmail = 0; $pref::Net::DisconnectChat = 0; $pref::Net::LagThreshold = 400; +$pref::Net::Preset = 1; +$pref::Net::PacketRateToClient = 16; +$pref::Net::PacketSize = 240; +$pref::Net::PacketRateToServer = 20; $pref::News::PostWindowPos = "85 39"; $pref::News::PostWindowExtent = "470 396"; $pref::Player::Count = 0; @@ -139,6 +144,7 @@ $pref::ServerBrowser::SortInc = 1; $pref::ServerBrowser::InfoWindowOpen = 0; $pref::ServerBrowser::InfoWindowPos = "145 105"; $pref::ServerBrowser::InfoWindowExtent = "350 270"; +$pref::ServerBrowser::IgnoreCase = "1"; $pref::Shell::lastBackground = 0; $pref::Terrain::DynamicLights = 1; $pref::toggleVehicleView = 0; @@ -151,6 +157,8 @@ $pref::Topics::SortInc = 0; $pref::Video::displayDevice = "OpenGL"; $pref::chatHudLength = 1; $pref::useImmersion = 1; +if ( isDemo() ) + $pref::Video::fullScreen = 1; $pref::Video::allowOpenGL = 1; $pref::Video::allowD3D = 1; $pref::Video::preferOpenGL = 1; diff --git a/base/scripts/controlDefaults.cs b/base/scripts/controlDefaults.cs index c8b1076..940739a 100644 --- a/base/scripts/controlDefaults.cs +++ b/base/scripts/controlDefaults.cs @@ -54,6 +54,10 @@ function escapeFromGame() function toggleEditor(%make) { + //editor should not be available in the demo version + if (isDemo()) + return; + if(%make) { if(Canvas.getContent() == Editor.getId()) @@ -997,6 +1001,9 @@ moveMap.bind( keyboard, "backspace", fnDeclineTask ); moveMap.bind( keyboard, "shift c", fnTaskCompleted ); moveMap.bind( keyboard, "shift x", fnResetTaskList ); +// misc: +moveMap.bind( keyboard, "ctrl n", toggleNetDisplayHud ); + //------------------------------------------------------------------------------ // VOTING FUNCTIONS: function voteYes( %val ) @@ -1026,6 +1033,7 @@ observerMap.bind( keyboard, space, jump ); observerMap.bind( mouse, button0, mouseFire ); observerMap.bind( mouse, button1, mouseJet ); + /////////////////////// // Vehicle Keys /////////////////////// @@ -1126,6 +1134,7 @@ function clientCmdSetDefaultVehicleKeys(%inVehicle) passengerKeys.bindCmd( keyboard, escape, "", "escapeFromGame();" ); passengerKeys.copyBind( moveMap, toggleHelpGui ); passengerKeys.copyBind( moveMap, toggleScoreScreen ); + passengerKeys.copyBind( moveMap, toggleNetDisplayHud ); // Bind the weapon keys as well: passengerKeys.copyBind( moveMap, nextWeapon ); diff --git a/base/scripts/creditsGui.cs b/base/scripts/creditsGui.cs index b765d66..4c6673b 100644 --- a/base/scripts/creditsGui.cs +++ b/base/scripts/creditsGui.cs @@ -33,22 +33,38 @@ function CreditsGui::onWake(%this) CreditsActionMap.bindCmd(keyboard, escape, "cancelCredits();", ""); CreditsActionMap.bindCmd(mouse, button0, "$CreditsPaused = true;", "$CreditsPaused = false;"); CreditsActionMap.bindCmd(mouse, button1, "$CreditsSpeedUp = true;", "$CreditsSpeedUp = false;"); - CreditsActionMap.bindCmd(mouse, button2, "creditsNextPic();", ""); + if (!isDemo()) + CreditsActionMap.bindCmd(mouse, button2, "creditsNextPic();", ""); } CreditsActionMap.push(); //build the ML text ctrl... exec("scripts/creditsText.cs"); - - $CreditsPicIndex = 1; - CREDITS_Pic.setBitmap("gui/Cred_" @ $CreditsPicIndex @ ".png"); + if (!isDemo() && !isDemoServer()) + { + $CreditsPicIndex = 1; + CREDITS_Pic.setBitmap("gui/Cred_" @ $CreditsPicIndex @ ".png"); + } + else + CREDITS_Pic.setBitmap("gui/Cred_1.bm8"); //music array - $CreditsMusic[0] = "badlands"; - $CreditsMusic[1] = "desert"; - $CreditsMusic[2] = "ice"; - $CreditsMusic[3] = "lush"; - $CreditsMusic[4] = "volcanic"; + if (!isDemo()) + { + $CreditsMusic[0] = "badlands"; + $CreditsMusic[1] = "desert"; + $CreditsMusic[2] = "ice"; + $CreditsMusic[3] = "lush"; + $CreditsMusic[4] = "volcanic"; + } + else + { + $CreditsMusic[0] = "lush"; + $CreditsMusic[1] = "desert"; + $CreditsMusic[2] = "desert"; + $CreditsMusic[3] = "lush"; + $CreditsMusic[4] = "desert"; + } //start the credits from the beginning $CreditsOffset = 0.0; @@ -64,7 +80,8 @@ function CreditsGui::onWake(%this) $CreditsScrollSchedule = schedule(3000, 0, scrollTheCredits); //start cycling the bitmaps - $CreditsSlideShow = schedule(5000, 0, creditsNextPic); + if (!isDemo()) + $CreditsSlideShow = schedule(5000, 0, creditsNextPic); //start some music %chooseTrack = mFloor(getRandom() * 4.99); @@ -107,6 +124,10 @@ function scrollTheCredits() function creditsNextPic() { + //no slide show in the demo... + if (isDemo()) + return; + cancel($CreditsSlideShow); if (!$CreditsPaused) { diff --git a/base/scripts/damageTypes.cs b/base/scripts/damageTypes.cs index 09da1a4..503184b 100644 --- a/base/scripts/damageTypes.cs +++ b/base/scripts/damageTypes.cs @@ -40,6 +40,8 @@ $DamageType::SatchelCharge = 31; $DamageType::MPBMissile = 32; $DamageType::Lightning = 33; $DamageType::VehicleSpawn = 34; +$DamageType::ForceFieldPowerup = 35; +$DamageType::Crash = 36; // DMM -- added so MPBs that blow up under water get a message $DamageType::Water = 97; @@ -86,6 +88,8 @@ $DamageTypeText[30] = "tank mortar"; $DamageTypeText[31] = "satchel charge"; $DamageTypeText[32] = "MPB missile"; $DamageTypeText[33] = "lighting"; +$DamageTypeText[35] = "ForceField"; +$DamageTypeText[36] = "Crash"; $DamageTypeText[98] = "nexus camping"; $DamageTypeText[99] = "suicide"; @@ -616,99 +620,99 @@ datablock SimDataBlock(StaticShapeDamageProfile) datablock SimDataBlock(LightPlayerDamageProfile) { - damageScale[$DamageType::Blaster] = 1.3; - damageScale[$DamageType::Bullet] = 1.2; - damageScale[$DamageType::ELF] = 0.75; - damageScale[$DamageType::ShockLance] = 1.0; - damageScale[$DamageType::Laser] = 1.12; - damageScale[$DamageType::ShrikeBlaster] = 1.0; - damageScale[$DamageType::BellyTurret] = 1.0; - damageScale[$DamageType::AATurret] = 0.7; - damageScale[$DamageType::IndoorDepTurret] = 1.3; - damageScale[$DamageType::OutdoorDepTurret] = 1.3; - damageScale[$DamageType::SentryTurret] = 1.0; - damageScale[$DamageType::Disc] = 1.0; - damageScale[$DamageType::Grenade] = 1.2; - damageScale[$DamageType::Mine] = 1.2; - damageScale[$DamageType::Missile] = 1.0; - damageScale[$DamageType::Mortar] = 1.3; - damageScale[$DamageType::Plasma] = 1.0; - damageScale[$DamageType::BomberBombs] = 3.0; - damageScale[$DamageType::TankChaingun] = 1.0; - damageScale[$DamageType::TankMortar] = 1.0; - damageScale[$DamageType::MissileTurret] = 1.0; - damageScale[$DamageType::MortarTurret] = 1.3; - damageScale[$DamageType::PlasmaTurret] = 1.0; - damageScale[$DamageType::SatchelCharge] = 3.0; - damageScale[$DamageType::Default] = 1.0; - damageScale[$DamageType::Impact] = 1.2; - damageScale[$DamageType::Ground] = 1.0; - damageScale[$DamageType::Explosion] = 1.2; - damageScale[$DamageType::Lightning] = 1.0; + damageScale[$DamageType::Blaster] = 1.3; + damageScale[$DamageType::Bullet] = 1.2; + damageScale[$DamageType::ELF] = 0.75; + damageScale[$DamageType::ShockLance] = 1.0; + damageScale[$DamageType::Laser] = 1.12; + damageScale[$DamageType::ShrikeBlaster] = 1.10; + damageScale[$DamageType::BellyTurret] = 1.0; + damageScale[$DamageType::AATurret] = 0.7; + damageScale[$DamageType::IndoorDepTurret] = 1.3; + damageScale[$DamageType::OutdoorDepTurret] = 1.3; + damageScale[$DamageType::SentryTurret] = 1.0; + damageScale[$DamageType::Disc] = 1.0; + damageScale[$DamageType::Grenade] = 1.2; + damageScale[$DamageType::Mine] = 1.2; + damageScale[$DamageType::Missile] = 1.0; + damageScale[$DamageType::Mortar] = 1.3; + damageScale[$DamageType::Plasma] = 1.0; + damageScale[$DamageType::BomberBombs] = 3.0; + damageScale[$DamageType::TankChaingun] = 1.7; + damageScale[$DamageType::TankMortar] = 1.0; + damageScale[$DamageType::MissileTurret] = 1.0; + damageScale[$DamageType::MortarTurret] = 1.3; + damageScale[$DamageType::PlasmaTurret] = 1.0; + damageScale[$DamageType::SatchelCharge] = 3.0; + damageScale[$DamageType::Default] = 1.0; + damageScale[$DamageType::Impact] = 1.2; + damageScale[$DamageType::Ground] = 1.0; + damageScale[$DamageType::Explosion] = 1.2; + damageScale[$DamageType::Lightning] = 1.0; }; datablock SimDataBlock(MediumPlayerDamageProfile) { - damageScale[$DamageType::Blaster] = 1.0; - damageScale[$DamageType::Bullet] = 1.0; - damageScale[$DamageType::ELF] = 0.75; - damageScale[$DamageType::ShockLance] = 1.0; - damageScale[$DamageType::Laser] = 1.1; - damageScale[$DamageType::ShrikeBlaster] = 1.0; - damageScale[$DamageType::BellyTurret] = 1.0; - damageScale[$DamageType::AATurret] = 0.7; - damageScale[$DamageType::IndoorDepTurret] = 1.0; - damageScale[$DamageType::OutdoorDepTurret] = 1.0; - damageScale[$DamageType::SentryTurret] = 1.0; - damageScale[$DamageType::Disc] = 1.0; - damageScale[$DamageType::Grenade] = 1.0; - damageScale[$DamageType::Mine] = 1.0; - damageScale[$DamageType::Missile] = 1.0; - damageScale[$DamageType::Mortar] = 1.0; - damageScale[$DamageType::Plasma] = 0.6; - damageScale[$DamageType::BomberBombs] = 3.0; - damageScale[$DamageType::TankChaingun] = 1.0; - damageScale[$DamageType::TankMortar] = 1.0; - damageScale[$DamageType::MissileTurret] = 1.0; - damageScale[$DamageType::MortarTurret] = 1.0; - damageScale[$DamageType::PlasmaTurret] = 1.0; - damageScale[$DamageType::SatchelCharge] = 3.0; - damageScale[$DamageType::Default] = 1.0; - damageScale[$DamageType::Impact] = 1.0; - damageScale[$DamageType::Ground] = 1.0; - damageScale[$DamageType::Explosion] = 1.0; - damageScale[$DamageType::Lightning] = 1.2; + damageScale[$DamageType::Blaster] = 1.0; + damageScale[$DamageType::Bullet] = 1.0; + damageScale[$DamageType::ELF] = 0.75; + damageScale[$DamageType::ShockLance] = 1.0; + damageScale[$DamageType::Laser] = 1.1; + damageScale[$DamageType::ShrikeBlaster] = 1.0; + damageScale[$DamageType::BellyTurret] = 1.0; + damageScale[$DamageType::AATurret] = 0.7; + damageScale[$DamageType::IndoorDepTurret] = 1.0; + damageScale[$DamageType::OutdoorDepTurret] = 1.0; + damageScale[$DamageType::SentryTurret] = 1.0; + damageScale[$DamageType::Disc] = 0.8; + damageScale[$DamageType::Grenade] = 1.0; + damageScale[$DamageType::Mine] = 1.0; + damageScale[$DamageType::Missile] = 0.8; + damageScale[$DamageType::Mortar] = 1.0; + damageScale[$DamageType::Plasma] = 0.65; + damageScale[$DamageType::BomberBombs] = 3.0; + damageScale[$DamageType::TankChaingun] = 1.5; + damageScale[$DamageType::TankMortar] = 0.85; + damageScale[$DamageType::MissileTurret] = 0.8; + damageScale[$DamageType::MortarTurret] = 1.0; + damageScale[$DamageType::PlasmaTurret] = 0.65; + damageScale[$DamageType::SatchelCharge] = 3.0; + damageScale[$DamageType::Default] = 1.0; + damageScale[$DamageType::Impact] = 1.0; + damageScale[$DamageType::Ground] = 1.0; + damageScale[$DamageType::Explosion] = 1.0; + damageScale[$DamageType::Lightning] = 1.2; }; datablock SimDataBlock(HeavyPlayerDamageProfile) { - damageScale[$DamageType::Blaster] = 0.7; - damageScale[$DamageType::Bullet] = 0.6; - damageScale[$DamageType::ELF] = 0.75; - damageScale[$DamageType::ShockLance] = 1.0; - damageScale[$DamageType::Laser] = 0.67; - damageScale[$DamageType::ShrikeBlaster] = 1.0; - damageScale[$DamageType::BellyTurret] = 1.0; - damageScale[$DamageType::AATurret] = 0.7; - damageScale[$DamageType::IndoorDepTurret] = 0.7; - damageScale[$DamageType::OutdoorDepTurret] = 0.7; - damageScale[$DamageType::SentryTurret] = 1.0; - damageScale[$DamageType::Disc] = 0.6; - damageScale[$DamageType::Grenade] = 0.8; - damageScale[$DamageType::Mine] = 0.8; - damageScale[$DamageType::Missile] = 0.6; - damageScale[$DamageType::Mortar] = 0.7; - damageScale[$DamageType::Plasma] = 0.4; - damageScale[$DamageType::BomberBombs] = 3.0; - damageScale[$DamageType::TankChaingun] = 1.0; - damageScale[$DamageType::TankMortar] = 0.7; - damageScale[$DamageType::MissileTurret] = 1.0; - damageScale[$DamageType::MortarTurret] = 1.0; - damageScale[$DamageType::PlasmaTurret] = 1.0; - damageScale[$DamageType::SatchelCharge] = 3.0; - damageScale[$DamageType::Default] = 1.0; - damageScale[$DamageType::Impact] = 0.8; - damageScale[$DamageType::Ground] = 1.0; - damageScale[$DamageType::Explosion] = 0.6; - damageScale[$DamageType::Lightning] = 1.4; + damageScale[$DamageType::Blaster] = 0.7; + damageScale[$DamageType::Bullet] = 0.6; + damageScale[$DamageType::ELF] = 0.75; + damageScale[$DamageType::ShockLance] = 1.0; + damageScale[$DamageType::Laser] = 0.67; + damageScale[$DamageType::ShrikeBlaster] = 0.8; + damageScale[$DamageType::BellyTurret] = 0.8; + damageScale[$DamageType::AATurret] = 0.6; + damageScale[$DamageType::IndoorDepTurret] = 0.7; + damageScale[$DamageType::OutdoorDepTurret] = 0.7; + damageScale[$DamageType::SentryTurret] = 1.0; + damageScale[$DamageType::Disc] = 0.6; + damageScale[$DamageType::Grenade] = 0.8; + damageScale[$DamageType::Mine] = 0.8; + damageScale[$DamageType::Missile] = 0.6; + damageScale[$DamageType::Mortar] = 0.7; + damageScale[$DamageType::Plasma] = 0.4; + damageScale[$DamageType::BomberBombs] = 3.0; + damageScale[$DamageType::TankChaingun] = 1.3; + damageScale[$DamageType::TankMortar] = 0.7; + damageScale[$DamageType::MissileTurret] = 0.6; + damageScale[$DamageType::MortarTurret] = 0.6; + damageScale[$DamageType::PlasmaTurret] = 0.4; + damageScale[$DamageType::SatchelCharge] = 3.0; + damageScale[$DamageType::Default] = 1.0; + damageScale[$DamageType::Impact] = 0.8; + damageScale[$DamageType::Ground] = 1.0; + damageScale[$DamageType::Explosion] = 0.6; + damageScale[$DamageType::Lightning] = 1.4; }; diff --git a/base/scripts/deathMessages.cs b/base/scripts/deathMessages.cs index 70757bd..91936b6 100644 --- a/base/scripts/deathMessages.cs +++ b/base/scripts/deathMessages.cs @@ -39,6 +39,9 @@ $DeathMessageSuicide[4] = '\c0%1 self-destructs in a fit of ennui.'; $DeathMessageVehPadCount = 1; $DeathMessageVehPad[0] = '\c0%1 got caught in a vehicle\'s spawn field.'; +$DeathMessageFFPowerupCount = 1; +$DeathMessageFFPowerup[0] = '\c0%1 got caught up in a forcefield during power up.'; + $DeathMessageRogueMineCount = 1; $DeathMessageRogueMine[$DamageType::Mine, 0] = '\c0%1 is all mine.'; @@ -348,9 +351,9 @@ $DeathMessageCTurretKill[$DamageType::TankChainGun, 0] = '\c0%1 enjoys the rich, $DeathMessageCTurretKill[$DamageType::TankChainGun, 1] = '\c0%4\'s tank chaingun plays sweet music all over %1.'; $DeathMessageCTurretKill[$DamageType::TankChainGun, 2] = '\c0%1 receives a stellar exit wound from %4\'s tank slug.'; -$DeathMessageCTurretKill[$DamageType::TankMortars, 0] = '\c0Whoops! %1 + %4\'s tank mortar = Dead %1.'; -$DeathMessageCTurretKill[$DamageType::TankMortars, 1] = '\c0%1 learns the happy explosion dance from %4\'s tank mortar.'; -$DeathMessageCTurretKill[$DamageType::TankMortars, 2] = '\c0%4\'s tank mortar has a blast with %1.'; +$DeathMessageCTurretKill[$DamageType::TankMortar, 0] = '\c0Whoops! %1 + %4\'s tank mortar = Dead %1.'; +$DeathMessageCTurretKill[$DamageType::TankMortar, 1] = '\c0%1 learns the happy explosion dance from %4\'s tank mortar.'; +$DeathMessageCTurretKill[$DamageType::TankMortar, 2] = '\c0%4\'s tank mortar has a blast with %1.'; $DeathMessageCTurretKill[$DamageType::ShrikeBlaster, 0] = '\c0%1 dines on a Shrike blaster sandwich, courtesy of %4.'; $DeathMessageCTurretKill[$DamageType::ShrikeBlaster, 1] = '\c0The blaster of %4\'s Shrike turns %1 into finely shredded meat.'; diff --git a/base/scripts/defaultGame.cs b/base/scripts/defaultGame.cs index 746418e..18874c8 100644 --- a/base/scripts/defaultGame.cs +++ b/base/scripts/defaultGame.cs @@ -320,6 +320,7 @@ function DefaultGame::pickObserverSpawn(%game, %client, %next) { %group = nameToID("MissionGroup/ObserverDropPoints"); %count = %group.getCount(); + if(!%count || %group == -1) { echo("no observer spawn points found"); @@ -413,13 +414,14 @@ function DefaultGame::pickPlayerSpawn(%game, %client, %respawn) //------------------------------------------------------------ function DefaultGame::createPlayer(%game, %client, %spawnLoc, %respawn) { + // do not allow a new player if there is one (not destroyed) on this client + if(isObject(%client.player) && (%client.player.getState() !$= "Dead")) + return; + // clients and cameras can exist in team 0, but players should not if(%client.team == 0) error("Players should not be added to team0!"); - if( %client.player > 0 ) - error( "Attempting to create an angus ghost!" ); - // defaultplayerarmor is in 'players.cs' if(%spawnLoc == -1) %spawnLoc = "0 0 300 1 0 0 0"; @@ -574,6 +576,8 @@ function DefaultGame::gameOver( %game ) %client.endMission(); messageClient( %client, 'MsgClearDebrief', "" ); %game.sendDebriefing( %client ); + if(%client.player.isBomber) + commandToClient(%client, 'endBomberSight'); //clear the score hud... messageClient( %client, 'SetScoreHudHeader', "", "" ); @@ -600,7 +604,7 @@ function DefaultGame::sendDebriefing( %game, %client ) // Player scores: %count = $TeamRank[0, count]; - messageClient( %client, 'MsgDebriefAddLine', "", 'PLAYER\tSCORE\tKILLS' ); + messageClient( %client, 'MsgDebriefAddLine', "", 'PLAYERSCOREKILLS' ); for ( %i = 0; %i < %count; %i++ ) { %cl = $TeamRank[0, %i]; @@ -612,7 +616,7 @@ function DefaultGame::sendDebriefing( %game, %client ) %kills = 0; else %kills = %cl.kills; - messageClient( %client, 'MsgDebriefAddLine', "", '\t%1\t%2\t%3', %cl.name, %score, %kills ); + messageClient( %client, 'MsgDebriefAddLine', "", ' %1 %2 %3', %cl.name, %score, %kills ); } } else @@ -643,18 +647,18 @@ function DefaultGame::sendDebriefing( %game, %client ) messageClient( %client, 'MsgDebriefResult', "", 'The mission ended in a tie.' ); // Team scores: - messageClient( %client, 'MsgDebriefAddLine', "", 'TEAM\tSCORE' ); + messageClient( %client, 'MsgDebriefAddLine', "", 'TEAMSCORE' ); for ( %team = 1; %team - 1 < %game.numTeams; %team++ ) { if ( $TeamScore[%team] $= "" ) %score = 0; else %score = $TeamScore[%team]; - messageClient( %client, 'MsgDebriefAddLine', "", '\t%1\t%2', $TeamName[%team], %score ); + messageClient( %client, 'MsgDebriefAddLine', "", ' %1 %2', $TeamName[%team], %score ); } // Player scores: - messageClient( %client, 'MsgDebriefAddLine', "", '\nPLAYER\tTEAM\tSCORE\tKILLS' ); + messageClient( %client, 'MsgDebriefAddLine', "", '\nPLAYERTEAMSCOREKILLS' ); for ( %team = 1; %team - 1 < %game.numTeams; %team++ ) %count[%team] = 0; @@ -676,7 +680,7 @@ function DefaultGame::sendDebriefing( %game, %client ) %cl = $TeamRank[%highTeam, %count[%highTeam]]; %score = %cl.score $= "" ? 0 : %cl.score; %kills = %cl.kills $= "" ? 0 : %cl.kills; - messageClient( %client, 'MsgDebriefAddLine', "", '\t%1\t%2\t%3\t%4', %cl.name, $TeamName[%cl.team], %score, %kills ); + messageClient( %client, 'MsgDebriefAddLine', "", ' %1 %2 %3 %4', %cl.name, $TeamName[%cl.team], %score, %kills ); %count[%highTeam]++; %notDone = false; @@ -703,20 +707,17 @@ function DefaultGame::sendDebriefing( %game, %client ) if (!%printedHeader) { %printedHeader = true; - messageClient(%client, 'MsgDebriefAddLine', "", '\nOBSERVERS\tSCORE'); + messageClient(%client, 'MsgDebriefAddLine', "", '\nOBSERVERSSCORE'); } //print out the client %score = %cl.score $= "" ? 0 : %cl.score; - messageClient( %client, 'MsgDebriefAddLine', "", '\t%1\t%2', %cl.name, %score); + messageClient( %client, 'MsgDebriefAddLine', "", ' %1 %2', %cl.name, %score); } } } //------------------------------------------------------------ -// jff: 'numDeathMsgLines' is set in 'message.cs' which seems to conflict with this -$numDeathMsgs = 2; - function DefaultGame::clearDeployableMaxes(%game) { for(%i = 0; %i <= %game.numTeams; %i++) @@ -877,7 +878,6 @@ function DefaultGame::onClientKilled(%game, %clVictim, %clKiller, %damageType, % playDeathAnimation(%plVictim, %damageLocation, %damageType); playDeathCry(%plVictim); - //%ridx = mFloor(getRandom() * ($numDeathMsgs - 0.01)); %victimName = %clVictim.name; %game.displayDeathMessages(%clVictim, %clKiller, %damageType, %implement); @@ -1038,7 +1038,7 @@ function DefaultGame::forceObserver( %game, %client, %reason ) if( !%adminForce ) messageAllExcept(%client, -1, 'MsgClientJoinTeam', '\c2%1 has become an observer.', %client.name, $teamName[0], %client, 0 ); else - messageAllExcept(%client, -1, 'MsgClientJoinTeam', '\c2The admin has forced %1 to become an observer.', %client.name, 0 ); + messageAllExcept(%client, -1, 'MsgClientJoinTeam', '\c2The admin has forced %1 to become an observer.', %client.name, $teamName[0], %client, 0 ); updateCanListenState( %client ); @@ -1070,11 +1070,20 @@ function DefaultGame::displayDeathMessages(%game, %clVictim, %clKiller, %damageT { messageAll('msgVehicleSpawnKill', $DeathMessageVehPad[mFloor(getRandom() * $DeathMessageVehPadCount)], %victimName, %victimGender, %victimPoss, %killerName, %killerGender, %killerPoss, %damageType); logEcho(%clVictim.nameBase@" (pl "@%clVictim.player@"/cl "@%clVictim@") killed by vehicle spawn"); + } + else if(%damageType == $DamageType::ForceFieldPowerup) + { + messageAll('msgVehicleSpawnKill', $DeathMessageFFPowerup[mFloor(getRandom() * $DeathMessageFFPowerupCount)], %victimName, %victimGender, %victimPoss, %killerName, %killerGender, %killerPoss, %damageType); + logEcho(%clVictim.nameBase@" (pl "@%clVictim.player@"/cl "@%clVictim@") killed by Force Field Powerup"); + } + else if(%damageType == $DamageType::Crash) + { + messageAll('msgVehicleCrash', $DeathMessageVehicleCrash[%damageType, mFloor(getRandom() * $DeathMessageVehicleCrashCount)], %victimName, %victimGender, %victimPoss, %killerName, %killerGender, %killerPoss, %damageType); + logEcho(%clVictim.nameBase@" (pl "@%clVictim.player@"/cl "@%clVictim@") crashes a vehicle."); } else if(%damageType == $DamageType::Impact) // run down by vehicle { - %controller = %implement.getControllingClient(); - if(%controller > 0) + if( ( %controller = %implement.getControllingClient() ) > 0) { %killerGender = (%controller.sex $= "Male" ? 'him' : 'her'); %killerPoss = (%controller.sex $= "Male" ? 'his' : 'her'); @@ -1162,7 +1171,7 @@ function DefaultGame::displayDeathMessages(%game, %clVictim, %clKiller, %damageT messageAll('msgLightningKill', $DeathMessageLightning[mFloor(getRandom() * $DeathMessageLightningCount)], %victimName, %victimGender, %victimPoss, %killerName, %killerGender, %killerPoss, %damageType); logEcho(%clVictim.nameBase@" (pl "@%clVictim.player@"/cl "@%clVictim@") killed by lightning"); } - else if ( %damageType == $DamageType::Mine && !isObject(%implement) ) + else if ( %damageType == $DamageType::Mine && !isObject(%clKiller) ) { error("Mine kill w/o source"); messageAll('MsgRogueMineKill', $DeathMessageRogueMine[%damageType, mFloor(getRandom() * $DeathMessageRogueMineCount)], %victimName, %victimGender, %victimPoss, %killerName, %killerGender, %killerPoss, %damageType); @@ -1497,6 +1506,7 @@ function DefaultGame::clientMissionDropReady(%game, %client) if( %client.camera.mode $= "observerFly" || %client.camera.mode $= "justJoined") { %observer = true; + %client.observerStartTime = getSimTime(); commandToClient(%client, 'setHudMode', 'Observer'); %client.setControlObject( %client.camera ); //displayObserverHud( %client, 0 ); @@ -1527,7 +1537,24 @@ function DefaultGame::clientMissionDropReady(%game, %client) // set all players into obs mode. setting the control object will handle further procedures... %client.camera.getDataBlock().setMode( %client.camera, "ObserverFly" ); commandToClient(%client, 'setHudMode', 'Observer'); - %client.setControlObject( %client.camera ); + %client.setControlObject( %client.camera ); + messageAll( 'MsgClientJoinTeam', "",%client.name, $teamName[0], %client, 0 ); + %client.team = 0; + + if( !$MatchStarted && !$CountdownStarted) + { + if($TeamDamage) + %damMess = "ENABLED"; + else + %damMess = "DISABLED"; + + if(%game.numTeams > 1) + BottomPrint(%client, "Server is Running in Tournament Mode.\nPick a Team\nTeam Damage is " @ %damMess, 0, 3 ); + } + else + { + BottomPrint( %client, "\nServer is Running in Tournament Mode", 0, 3 ); + } } //make sure the objective HUD indicates your team on top and in green... @@ -1537,6 +1564,15 @@ function DefaultGame::clientMissionDropReady(%game, %client) // were ready to go. %client.matchStartReady = true; echo("Client" SPC %client SPC "is ready."); + + if ( isDemoServer() ) + { + if ( %client.demoJustJoined ) + { + %client.demoJustJoined = false; + centerPrint( %client, "Welcome to the Tribes 2 Demo." NL "You have been assigned the name \"" @ %client.nameBase @ "\"." NL "Press FIRE to join the game.", 0, 3 ); + } + } } function DefaultGame::sendClientTeamList(%game, %client) @@ -1561,10 +1597,10 @@ function DefaultGame::setupClientHuds(%game, %client) for(%i =0; %i<$InventoryHudCount; %i++) %client.setInventoryHudBitmap($InventoryHudData[%i, slot], $InventoryHudData[%i, itemDataName], $InventoryHudData[%i, bitmapName]); - %client.setWeaponsHudBackGroundBmp("gui/hud_new_panel.png"); - %client.setWeaponsHudHighLightBmp("gui/hud_new_weaponselect.png"); - %client.setWeaponsHudInfiniteAmmoBmp("gui/hud_infinity.png"); - %client.setInventoryHudBackGroundBmp("gui/hud_new_panel.png"); + %client.setWeaponsHudBackGroundBmp("gui/hud_new_panel"); + %client.setWeaponsHudHighLightBmp("gui/hud_new_weaponselect"); + %client.setWeaponsHudInfiniteAmmoBmp("gui/hud_infinity"); + %client.setInventoryHudBackGroundBmp("gui/hud_new_panel"); // tell the client if we are protecting statics (so no health bar will be displayed) commandToClient(%client, 'protectingStaticObjects', %game.allowsProtectedStatics()); @@ -2311,12 +2347,18 @@ function DefaultGame::ShapeThrowWeapon(%game, %this) function DefaultGame::leaveMissionArea(%game, %playerData, %player) { + if(%player.getState() $= "Dead") + return; + %player.client.outOfBounds = true; messageClient(%player.client, 'LeaveMissionArea', '\c1You left the mission area.~wfx/misc/warning_beep.wav'); } function DefaultGame::enterMissionArea(%game, %playerData, %player) { + if(%player.getState() $= "Dead") + return; + %player.client.outOfBounds = false; messageClient(%player.client, 'EnterMissionArea', '\c1You are back in the mission area.'); } @@ -2408,6 +2450,7 @@ function DefaultGame::sendGamePlayerPopupMenu( %game, %client, %targetClient, %k } } + // Admin only options on players: else if ( %isAdmin && !isDemo() && !isDemoServer()) { @@ -2428,6 +2471,7 @@ function DefaultGame::sendGamePlayerPopupMenu( %game, %client, %targetClient, %k } } + if ( %isTargetSelf || %outrankTarget ) { if ( %game.numTeams > 1 ) @@ -2586,6 +2630,46 @@ function DefaultGame::sendTimeLimitList( %game, %client, %key ) //------------------------------------------------------------------------------ // all global votes here +// this function was created to remove the call to "eval", which is non-functional in PURE servers... +function DefaultGame::evalVote(%game, %typeName, %admin, %arg1, %arg2, %arg3, %arg4) +{ + switch$ (%typeName) + { + case "voteChangeMission": + %game.voteChangeMission(%admin, %arg1, %arg2, %arg3, %arg4); + + case "voteTeamDamage": + %game.voteTeamDamage(%admin, %arg1, %arg2, %arg3, %arg4); + + case "voteTournamentMode": + %game.voteTournamentMode(%admin, %arg1, %arg2, %arg3, %arg4); + + case "voteMatchStart": + %game.voteMatchStart(%admin, %arg1, %arg2, %arg3, %arg4); + + case "voteFFAMode": + %game.voteFFAMode(%admin, %arg1, %arg2, %arg3, %arg4); + + case "voteChangeTimeLimit": + %game.voteChangeTimeLimit(%admin, %arg1, %arg2, %arg3, %arg4); + + case "voteResetServer": + %game.voteResetServer(%admin, %arg1, %arg2, %arg3, %arg4); + + case "voteKickPlayer": + %game.voteKickPlayer(%admin, %arg1, %arg2, %arg3, %arg4); + + case "voteAdminPlayer": + %game.voteAdminPlayer(%admin, %arg1, %arg2, %arg3, %arg4); + + case "voteGreedMode": + %game.voteGreedMode(%admin, %arg1, %arg2, %arg3, %arg4); + + case "voteHoardMode": + %game.voteHoardMode(%admin, %arg1, %arg2, %arg3, %arg4); + } +} + function DefaultGame::voteChangeMission(%game, %admin, %missionDisplayName, %typeDisplayName, %missionId, %missionTypeId) { %mission = $HostMissionFile[%missionId]; @@ -2860,8 +2944,7 @@ function DefaultGame::voteResetServer( %game, %admin, %client ) function DefaultGame::voteKickPlayer(%game, %admin, %client) { %cause = ""; - %name = %client.nameBase; - + if(%admin) { kick(%client, %admin, %client.guid ); @@ -2873,7 +2956,7 @@ function DefaultGame::voteKickPlayer(%game, %admin, %client) %totalVotes = %game.votesFor[%game.kickTeam] + %game.votesAgainst[%game.kickTeam]; if(%totalVotes > 0 && (%game.votesFor[%game.kickTeam] / %totalVotes) > ($Host::VotePasspercent / 100)) { - kick(%client, %admin, Game.kickGuid); + kick(%client, %admin, %game.kickGuid); %cause = "(vote)"; } else @@ -2882,9 +2965,10 @@ function DefaultGame::voteKickPlayer(%game, %admin, %client) %game.kickTeam = ""; %game.kickGuid = ""; + %game.kickClientName = ""; if(%cause !$= "") - logEcho(%name@" (cl "@%client@") kicked "@%cause); + logEcho(%name@" (cl " @ %game.kickClient @ ") kicked " @ %cause); } //------------------------------------------------------------------------------ diff --git a/base/scripts/deployables.cs b/base/scripts/deployables.cs index 1626ce0..6bf5793 100644 --- a/base/scripts/deployables.cs +++ b/base/scripts/deployables.cs @@ -33,10 +33,10 @@ $NotDeployableReason::NoInteriorFound = 7; $NotDeployableReason::TurretTooClose = 8; $NotDeployableReason::TurretSaturation = 9; $NotDeployableReason::SurfaceTooNarrow = 10; -$NotDeployableReason::InventoryTooClose = 11; +$NotDeployableReason::InventoryTooClose = 11; -$MinDeployableDistance = 0.5; -$MaxDeployableDistance = 4.0; //meters from body +$MinDeployableDistance = 2.5; +$MaxDeployableDistance = 5.0; //meters from body // -------------------------------------------- @@ -159,6 +159,12 @@ datablock ShapeBaseImageData(InventoryDeployableImage) isLarge = true; maxDepSlope = 30; deploySound = StationDeploySound; + + flatMinDeployDis = 1.0; + flatMaxDeployDis = 5.0; + + minDeployDis = 2.5; + maxDeployDis = 5.0; }; datablock ItemData(InventoryDeployable) @@ -241,6 +247,9 @@ datablock ShapeBaseImageData(MotionSensorDeployableImage) deploySound = MotionSensorDeploySound; emap = true; heatSignature = 1; + + minDeployDis = 0.5; + maxDeployDis = 5.0; //meters from body }; datablock ItemData(MotionSensorDeployable) @@ -323,6 +332,9 @@ datablock ShapeBaseImageData(PulseSensorDeployableImage) maxDepSlope = 40; emap = true; heatSignature = 0; + + minDeployDis = 0.5; + maxDeployDis = 5.0; //meters from body }; datablock ItemData(PulseSensorDeployable) @@ -373,6 +385,9 @@ datablock ShapeBaseImageData(TurretOutdoorDeployableImage) maxDepSlope = 40; deploySound = TurretDeploySound; + + minDeployDis = 0.5; + maxDeployDis = 5.0; //meters from body }; datablock ItemData(TurretOutdoorDeployable) @@ -417,6 +432,9 @@ datablock ShapeBaseImageData(TurretIndoorDeployableImage) maxDepSlope = 360; deploySound = TurretDeploySound; + + minDeployDis = 0.5; + maxDeployDis = 5.0; //meters from body }; datablock ItemData(TurretIndoorDeployable) @@ -521,7 +539,7 @@ function ShapeBaseImageData::testMaxDeployed(%item, %plyr) //------------------------------------------------- function ShapeBaseImageData::testNoSurfaceInRange(%item, %plyr) { - return ! Deployables::searchView(%plyr, $MaxDeployableDistance, $TypeMasks::TerrainObjectType | $TypeMasks::InteriorObjectType); + return ! Deployables::searchView(%plyr, $MaxDeployDistance, $TypeMasks::TerrainObjectType | $TypeMasks::InteriorObjectType); } //------------------------------------------------- @@ -536,7 +554,7 @@ function ShapeBaseImageData::testSlopeTooGreat(%item) //------------------------------------------------- function ShapeBaseImageData::testSelfTooClose(%item, %plyr) { - InitContainerRadiusSearch(%item.surfacePt, $MinDeployableDistance, $TypeMasks::PlayerObjectType); + InitContainerRadiusSearch(%item.surfacePt, $MinDeployDistance, $TypeMasks::PlayerObjectType); return containerSearchNext() == %plyr; } @@ -544,12 +562,14 @@ function ShapeBaseImageData::testSelfTooClose(%item, %plyr) //------------------------------------------------- function ShapeBaseImageData::testObjectTooClose(%item) { - return !ContainerBoxEmpty ( + InitContainerRadiusSearch( %item.surfacePt, $MinDeployDistance, $TypeMasks::VehicleObjectType | $TypeMasks::MoveableObjectType | $TypeMasks::StaticShapeObjectType | $TypeMasks::StaticTSObjectType | $TypeMasks::ForceFieldObjectType | $TypeMasks::ItemObjectType | - $TypeMasks::PlayerObjectType | $TypeMasks::TurretObjectType, - %item.surfacePt, $MinDeployableDistance); + $TypeMasks::PlayerObjectType | $TypeMasks::TurretObjectType); + + %test = containerSearchNext(); + return %test; } @@ -741,9 +761,11 @@ function ShapeBaseImageData::testInvalidDeployConditions(%item, %plyr, %slot) { cancel(%plyr.deployCheckThread); %disqualified = $NotDeployableReason::None; //default + $MaxDeployDistance = %item.maxDeployDis; + $MinDeployDistance = %item.minDeployDis; %surface = Deployables::searchView(%plyr, - $MaxDeployableDistance, + $MaxDeployDistance, ($TypeMasks::TerrainObjectType | $TypeMasks::InteriorObjectType)); if (%surface) @@ -764,7 +786,7 @@ function ShapeBaseImageData::testInvalidDeployConditions(%item, %plyr, %slot) } else { - if (%surfacePt $= posFromRaycast(%searchResult)) + if(checkPositions(%surfacePT, posFromRaycast(%searchResult))) { %item.surface = %surface; %item.surfacePt = %surfacePt; @@ -776,33 +798,53 @@ function ShapeBaseImageData::testInvalidDeployConditions(%item, %plyr, %slot) %disqualified = $NotDeployableReason::ObjectTooClose; } } + if(!getTerrainAngle(%surfaceNrm) && %item.flatMaxDeployDis !$= "") + { + $MaxDeployDistance = %item.flatMaxDeployDis; + $MinDeployDistance = %item.flatMinDeployDis; + } } - if (%item.testMaxDeployed(%plyr)) + { %disqualified = $NotDeployableReason::MaxDeployed; + } else if (%item.testNoSurfaceInRange(%plyr)) + { %disqualified = $NotDeployableReason::NoSurfaceFound; + } else if (%item.testNoTerrainFound(%surface)) + { %disqualified = $NotDeployableReason::NoTerrainFound; + } else if (%item.testNoInteriorFound()) + { %disqualified = $NotDeployableReason::NoInteriorFound; + } else if (%item.testSlopeTooGreat(%surface, %surfaceNrm)) + { %disqualified = $NotDeployableReason::SlopeTooGreat; + } else if (%item.testSelfTooClose(%plyr, %surfacePt)) + { %disqualified = $NotDeployableReason::SelfTooClose; + } else if (%item.testObjectTooClose(%surfacePt)) { %disqualified = $NotDeployableReason::ObjectTooClose; } else if (%item.testTurretTooClose(%plyr)) + { %disqualified = $NotDeployableReason::TurretTooClose; + } else if (%item.testInventoryTooClose(%plyr)) { %disqualified = $NotDeployableReason::InventoryTooClose; } else if (%item.testTurretSaturation()) + { %disqualified = $NotDeployableReason::TurretSaturation; + } else if (%disqualified == $NotDeployableReason::None) { // Test that there are no objstructing objects that this object @@ -810,10 +852,14 @@ function ShapeBaseImageData::testInvalidDeployConditions(%item, %plyr, %slot) // %rot = %item.getInitialRotation(%plyr); if(%item.deployed.className $= "DeployedTurret") + { %xform = %item.deployed.getDeployTransform(%item.surfacePt, %item.surfaceNrm); + } else + { %xform = %surfacePt SPC %rot; - + } + if (!%item.deployed.checkDeployPos(%xform)) { %disqualified = $NotDeployableReason::ObjectTooClose; @@ -834,12 +880,26 @@ function ShapeBaseImageData::testInvalidDeployConditions(%item, %plyr, %slot) if (%plyr.client.deployPack == true) %item.attemptDeploy(%plyr, %slot, %disqualified); else - %plyr.deployCheckThread = %item.schedule(50, "testInvalidDeployConditions", %plyr, %slot); //update checks every 50 milliseconds + { + %plyr.deployCheckThread = %item.schedule(25, "testInvalidDeployConditions", %plyr, %slot); //update checks every 50 milliseconds + } } else deactivateDeploySensor(%plyr); } +function checkPositions(%pos1, %pos2) +{ + %passed = true; + if((mFloor(getWord(%pos1, 0)) - mFloor(getWord(%pos2,0)))) + %passed = false; + if((mFloor(getWord(%pos1, 1)) - mFloor(getWord(%pos2,1)))) + %passed = false; + if((mFloor(getWord(%pos1, 2)) - mFloor(getWord(%pos2,2)))) + %passed = false; + return %passed; +} + function ShapeBaseImageData::attemptDeploy(%item, %plyr, %slot, %disqualified) { deactivateDeploySensor(%plyr); @@ -1228,7 +1288,8 @@ function DeployedMotionSensor::onDestroyed(%this, %obj, %prevState) //-------------------------------------------------------------------------- function PulseSensorDeployableImage::onActivate(%data, %obj, %slot) { - %data.testInvalidDeployConditions(%obj, %slot); + Parent::onActivate( %data, %obj, %slot ); + //%data.testInvalidDeployConditions(%obj, %slot); } function DeployedPulseSensor::onDestroyed(%this, %obj, %prevState) diff --git a/base/scripts/forceField.cs b/base/scripts/forceField.cs index 94fce53..d19de0f 100644 --- a/base/scripts/forceField.cs +++ b/base/scripts/forceField.cs @@ -168,12 +168,45 @@ function ForceFieldBareData::gainPower(%data, %obj) } if(%ffp > 0) { %ffp.activate(); + if( %data.getName() $= "defaultForceFieldBare" ) + { + killAllPlayersWithinZone( %data, %obj ); + } + else if( %data.getName() $= "defaultTeamSlowFieldBare" ) + { + %team = %obj.team; + killAllPlayersWithinZone( %data, %obj, %team ); + } } } //else // error("No PZones group to search!"); } +function killAllPlayersWithinZone( %data, %obj, %team ) +{ + for( %c = 0; %c < ClientGroup.getCount(); %c++ ) + { + %client = ClientGroup.getObject(%c); + if( isObject( %client.player ) ) + { + if( %forceField = %client.player.isInForceField() )// isInForceField() will return the id of the ff or zero + { + if( %forceField == %obj ) + { + if( %team !$= "" && %team == %client.team ) + return; + else + { + %client.player.blowup(); // chunkOrama! + %client.player.scriptkill($DamageType::ForceFieldPowerup); + } + } + } + } + } +} + function ForceFieldBareData::losePower(%data, %obj) { Parent::losePower(%data, %obj); diff --git a/base/shapes/heavy_male.cs b/base/scripts/heavy_male.cs similarity index 100% rename from base/shapes/heavy_male.cs rename to base/scripts/heavy_male.cs diff --git a/base/scripts/hud.cs b/base/scripts/hud.cs index c32cd2a..9049167 100644 --- a/base/scripts/hud.cs +++ b/base/scripts/hud.cs @@ -94,14 +94,6 @@ function GameConnection::sensorJammed(%this, %jam) function SensorHud::update(%this) { - // dont change anything if lag is up - if(lagHudIndicator.isVisible()) - { - %this.setVisible(false); - sensorHudBack.setVisible(false); - return; - } - if(!%this.ping && !%this.jam) { %this.setVisible(false); @@ -123,7 +115,6 @@ function clientCmdResetHud() { deploySensor.setVisible(false); controlObjectText.setVisible(false); - lagHudIndicator.setVisible(false); sensorHud.jam = false; sensorHud.ping = false; @@ -142,16 +133,16 @@ function clientCmdSyncHudClock(%time) } //-------------------------------------------------------------------------- -$vehicleReticle[AssaultVehicle, 1, bitmap] = "gui/hud_ret_tankchaingun.png"; +$vehicleReticle[AssaultVehicle, 1, bitmap] = "gui/hud_ret_tankchaingun"; $vehicleReticle[AssaultVehicle, 1, frame] = true; -$vehicleReticle[AssaultVehicle, 2, bitmap] = "gui/hud_ret_tankmortar.png"; +$vehicleReticle[AssaultVehicle, 2, bitmap] = "gui/hud_ret_tankmortar"; $vehicleReticle[AssaultVehicle, 2, frame] = true; -$vehicleReticle[BomberFlyer, 1, bitmap] = "gui/hud_ret_shrike.png"; +$vehicleReticle[BomberFlyer, 1, bitmap] = "gui/hud_ret_shrike"; $vehicleReticle[BomberFlyer, 1, frame] = false; $vehicleReticle[BomberFlyer, 2, bitmap] = ""; $vehicleReticle[BomberFlyer, 2, frame] = false; -$vehicleReticle[BomberFlyer, 3, bitmap] = "gui/hud_ret_targlaser.png"; +$vehicleReticle[BomberFlyer, 3, bitmap] = "gui/hud_ret_targlaser"; $vehicleReticle[BomberFlyer, 3, frame] = false; function GameConnection::setVWeaponsHudActive(%client, %slot) @@ -298,44 +289,44 @@ function clientCmdSetWeaponsHudActive(%slot) switch$($WeaponNames[%slot]) { case "Blaster": - reticleHud.setBitmap("gui/ret_blaster.png"); + reticleHud.setBitmap("gui/ret_blaster"); reticleFrameHud.setVisible(true); case "Plasma": - reticleHud.setBitmap("gui/ret_plasma.png"); + reticleHud.setBitmap("gui/ret_plasma"); reticleFrameHud.setVisible(true); case "Chaingun": - reticleHud.setBitmap("gui/ret_chaingun.png"); + reticleHud.setBitmap("gui/ret_chaingun"); reticleFrameHud.setVisible(true); case "Disc": - reticleHud.setBitmap("gui/ret_disc.png"); + reticleHud.setBitmap("gui/ret_disc"); reticleFrameHud.setVisible(true); case "GrenadeLauncher": - reticleHud.setBitmap("gui/ret_grenade.png"); + reticleHud.setBitmap("gui/ret_grenade"); reticleFrameHud.setVisible(true); case "SniperRifle": - reticleHud.setBitmap("gui/hud_ret_sniper.png"); + reticleHud.setBitmap("gui/hud_ret_sniper"); reticleFrameHud.setVisible(false); case "ELFGun": - reticleHud.setBitmap("gui/ret_elf.png"); + reticleHud.setBitmap("gui/ret_elf"); reticleFrameHud.setVisible(true); case "Mortar": - reticleHud.setBitmap("gui/ret_mortor.png"); + reticleHud.setBitmap("gui/ret_mortor"); reticleFrameHud.setVisible(true); case "MissileLauncher": - reticleHud.setBitmap("gui/ret_missile.png"); + reticleHud.setBitmap("gui/ret_missile"); reticleFrameHud.setVisible(true); case "ShockLance": - reticleHud.setBitmap("gui/hud_ret_shocklance.png"); + reticleHud.setBitmap("gui/hud_ret_shocklance"); reticleFrameHud.setVisible(false); case "TargetingLaser": - reticleHud.setBitmap("gui/hud_ret_targlaser.png"); + reticleHud.setBitmap("gui/hud_ret_targlaser"); reticleFrameHud.setVisible(false); } } function clientCmdSetRepairReticle() { - reticleHud.setBitmap("gui/ret_chaingun.png"); + reticleHud.setBitmap("gui/ret_chaingun"); reticleFrameHud.setVisible(true); } @@ -413,41 +404,41 @@ function clientCmdSetAmmoHudCount(%amount) //---------------------------------------------------------------------------- $BackpackHudData[0, itemDataName] = "AmmoPack"; -$BackpackHudData[0, bitmapName] = "gui/hud_new_packammo.png"; +$BackpackHudData[0, bitmapName] = "gui/hud_new_packammo"; $BackpackHudData[1, itemDataName] = "CloakingPack"; -$BackpackHudData[1, bitmapName] = "gui/hud_new_packcloak.png"; +$BackpackHudData[1, bitmapName] = "gui/hud_new_packcloak"; $BackpackHudData[2, itemDataName] = "EnergyPack"; -$BackpackHudData[2, bitmapName] = "gui/hud_new_packenergy.png"; +$BackpackHudData[2, bitmapName] = "gui/hud_new_packenergy"; $BackpackHudData[3, itemDataName] = "RepairPack"; -$BackpackHudData[3, bitmapName] = "gui/hud_new_packrepair.png"; +$BackpackHudData[3, bitmapName] = "gui/hud_new_packrepair"; $BackpackHudData[4, itemDataName] = "SatchelCharge"; -$BackpackHudData[4, bitmapName] = "gui/hud_new_packsatchel.png"; +$BackpackHudData[4, bitmapName] = "gui/hud_new_packsatchel"; $BackpackHudData[5, itemDataName] = "ShieldPack"; -$BackpackHudData[5, bitmapName] = "gui/hud_new_packshield.png"; +$BackpackHudData[5, bitmapName] = "gui/hud_new_packshield"; $BackpackHudData[6, itemDataName] = "InventoryDeployable"; -$BackpackHudData[6, bitmapName] = "gui/hud_new_packinventory.png"; +$BackpackHudData[6, bitmapName] = "gui/hud_new_packinventory"; $BackpackHudData[7, itemDataName] = "MotionSensorDeployable"; -$BackpackHudData[7, bitmapName] = "gui/hud_new_packmotionsens.png"; +$BackpackHudData[7, bitmapName] = "gui/hud_new_packmotionsens"; $BackpackHudData[8, itemDataName] = "PulseSensorDeployable"; -$BackpackHudData[8, bitmapName] = "gui/hud_new_packradar.png"; +$BackpackHudData[8, bitmapName] = "gui/hud_new_packradar"; $BackpackHudData[9, itemDataName] = "TurretOutdoorDeployable"; -$BackpackHudData[9, bitmapName] = "gui/hud_new_packturretout.png"; +$BackpackHudData[9, bitmapName] = "gui/hud_new_packturretout"; $BackpackHudData[10, itemDataName] = "TurretIndoorDeployable"; -$BackpackHudData[10, bitmapName] = "gui/hud_new_packturretin.png"; +$BackpackHudData[10, bitmapName] = "gui/hud_new_packturretin"; $BackpackHudData[11, itemDataName] = "SensorJammerPack"; -$BackpackHudData[11, bitmapName] = "gui/hud_new_packsensjam.png"; +$BackpackHudData[11, bitmapName] = "gui/hud_new_packsensjam"; $BackpackHudData[12, itemDataName] = "AABarrelPack"; -$BackpackHudData[12, bitmapName] = "gui/hud_new_packturret.png"; +$BackpackHudData[12, bitmapName] = "gui/hud_new_packturret"; $BackpackHudData[13, itemDataName] = "FusionBarrelPack"; -$BackpackHudData[13, bitmapName] = "gui/hud_new_packturret.png"; +$BackpackHudData[13, bitmapName] = "gui/hud_new_packturret"; $BackpackHudData[14, itemDataName] = "MissileBarrelPack"; -$BackpackHudData[14, bitmapName] = "gui/hud_new_packturret.png"; +$BackpackHudData[14, bitmapName] = "gui/hud_new_packturret"; $BackpackHudData[15, itemDataName] = "PlasmaBarrelPack"; -$BackpackHudData[15, bitmapName] = "gui/hud_new_packturret.png"; +$BackpackHudData[15, bitmapName] = "gui/hud_new_packturret"; $BackpackHudData[16, itemDataName] = "ELFBarrelPack"; -$BackpackHudData[16, bitmapName] = "gui/hud_new_packturret.png"; +$BackpackHudData[16, bitmapName] = "gui/hud_new_packturret"; $BackpackHudData[17, itemDataName] = "MortarBarrelPack"; -$BackpackHudData[17, bitmapName] = "gui/hud_new_packturret.png"; +$BackpackHudData[17, bitmapName] = "gui/hud_new_packturret"; $BackpackHudCount = 18; @@ -493,35 +484,35 @@ function clientCmdUpdatePackText(%num) //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- -$InventoryHudData[0, bitmapName] = "gui/hud_handgren.png"; +$InventoryHudData[0, bitmapName] = "gui/hud_handgren"; $InventoryHudData[0, itemDataName] = Grenade; $InventoryHudData[0, ammoDataName] = Grenade; $InventoryHudData[0, slot] = 0; -$InventoryHudData[1, bitmapName] = "gui/hud_mine.png"; +$InventoryHudData[1, bitmapName] = "gui/hud_mine"; $InventoryHudData[1, itemDataName] = Mine; $InventoryHudData[1, ammoDataName] = Mine; $InventoryHudData[1, slot] = 1; -$InventoryHudData[2, bitmapName] = "gui/hud_medpack.png"; +$InventoryHudData[2, bitmapName] = "gui/hud_medpack"; $InventoryHudData[2, itemDataName] = RepairKit; $InventoryHudData[2, ammoDataName] = RepairKit; $InventoryHudData[2, slot] = 3; -$InventoryHudData[3, bitmapName] = "gui/hud_handgren.png"; +$InventoryHudData[3, bitmapName] = "gui/hud_handgren"; $InventoryHudData[3, itemDataName] = FlashGrenade; $InventoryHudData[3, ammoDataName] = FlashGrenade; $InventoryHudData[3, slot] = 0; -$InventoryHudData[4, bitmapName] = "gui/hud_handgren.png"; +$InventoryHudData[4, bitmapName] = "gui/hud_handgren"; $InventoryHudData[4, itemDataName] = ConcussionGrenade; $InventoryHudData[4, ammoDataName] = ConcussionGrenade; $InventoryHudData[4, slot] = 0; -$InventoryHudData[5, bitmapName] = "gui/hud_handgren.png"; +$InventoryHudData[5, bitmapName] = "gui/hud_handgren"; $InventoryHudData[5, itemDataName] = FlareGrenade; $InventoryHudData[5, ammoDataName] = FlareGrenade; $InventoryHudData[5, slot] = 0; -$InventoryHudData[6, bitmapName] = "gui/hud_handgren.png"; +$InventoryHudData[6, bitmapName] = "gui/hud_handgren"; $InventoryHudData[6, itemDataName] = CameraGrenade; $InventoryHudData[6, ammoDataName] = CameraGrenade; $InventoryHudData[6, slot] = 0; -$InventoryHudData[7, bitmapName] = "gui/hud_beacon.png"; +$InventoryHudData[7, bitmapName] = "gui/hud_beacon"; $InventoryHudData[7, itemDataName] = Beacon; $InventoryHudData[7, ammoDataName] = Beacon; $InventoryHudData[7, slot] = 2; @@ -941,6 +932,9 @@ function updateActionMaps() observerBlockMap.pop(); if ( isObject( observerMap ) ) observerMap.pop(); + if ( isObject( pickTeamMap ) ) + pickTeamMap.pop(); + //if (isObject(flyingCameraMove)) // flyingCameraMove.pop(); if (isObject(ControlActionMap)) @@ -977,7 +971,13 @@ function updateActionMaps() observerMap.copyBind( moveMap, mouseFire ); case "PickTeam": - // no mapping + //////////////////////// + // pickTeam Keys + ////////////////////// + if( !isObject( pickTeamMap ) ) + new ActionMap( pickTeamMap ); + pickTeamMap.copyBind( moveMap, toggleMessageHud ); + pickTeamMap.push(); //case 'Standard': default: @@ -994,8 +994,9 @@ function ClientCmdDisplayHuds() // only update action maps if playGui is current content %content = Canvas.getContent(); if(isObject(%content) && (%content.getName() $= "PlayGui")) + { updateActionMaps(); - + } ammoHud.setVisible(false); objectiveHud.setVisible(false); inventoryHud.setVisible(false); @@ -1005,7 +1006,6 @@ function ClientCmdDisplayHuds() HudClusterBack.setVisible(false); outerChatHud.setVisible(false); clockHud.setVisible(false); - lagHudIndicator.setVisible(false); controlObjectText.setVisible(false); clientCmdToggleDashHud(false); @@ -1017,10 +1017,7 @@ function ClientCmdDisplayHuds() retCenterHud.setVisible(true); HudClusterBack.setVisible(true); outerChatHud.setVisible(true); - if (!$showLagIcon) - clockHud.setVisible(true); - else - lagHudIndicator.setVisible(true); + clockHud.setVisible(true); case "Passenger": clientCmdShowVehicleGauges($HudModeType, $HudModeNode); @@ -1034,21 +1031,14 @@ function ClientCmdDisplayHuds() retCenterHud.setVisible(true); HudClusterBack.setVisible(true); outerChatHud.setVisible(true); - if (!$showLagIcon) - clockHud.setVisible(true); - else - lagHudIndicator.setVisible(true); - clientCmdSetWeaponsHudActive(0); + clockHud.setVisible(true); case "Object": ammoHud.setVisible(true); HudClusterBack.setVisible(true); outerChatHud.setVisible(true); controlObjectText.setVisible(true); - if (!$showLagIcon) - clockHud.setVisible(true); - else - lagHudIndicator.setVisible(true); + clockHud.setVisible(true); setControlObjectReticle($HudModeType); @@ -1056,10 +1046,7 @@ function ClientCmdDisplayHuds() objectiveHud.setVisible(true); HudClusterBack.setVisible(true); outerChatHud.setVisible(true); - if (!$showLagIcon) - clockHud.setVisible(true); - else - lagHudIndicator.setVisible(true); + clockHud.setVisible(true); case "PickTeam": ammoHud.setVisible(false); @@ -1069,7 +1056,7 @@ function ClientCmdDisplayHuds() weaponsHud.setVisible(false); retCenterHud.setVisible(false); HudClusterBack.setVisible(false); - outerChatHud.setVisible(false); + outerChatHud.setVisible(true); controlObjectText.setVisible(false); clockHud.setVisible(false); @@ -1084,10 +1071,7 @@ function ClientCmdDisplayHuds() retCenterHud.setVisible(true); HudClusterBack.setVisible(true); outerChatHud.setVisible(true); - if (!$showLagIcon) - clockHud.setVisible(true); - else - lagHudIndicator.setVisible(true); + clockHud.setVisible(true); if(voteHud.voting) mainVoteHud.setVisible(1); @@ -1108,19 +1092,7 @@ function clientcmdTogglePlayHuds(%val) retCenterHud.setVisible(%val); HudClusterBack.setVisible(%val); outerChatHud.setVisible(%val); - - if (%val) - { - if (!$showLagIcon) - clockHud.setVisible(true); - else - lagHudIndicator.setVisible(true); - } - else - { - clockHud.setVisible(false); - lagHudIndicator.setVisible(false); - } + clockHud.setVisible(%val); if(%val) { @@ -1756,4 +1728,20 @@ function testChatHud() $testCount++; messageAll( '', "This is test number " @ $testCount ); $tester = schedule( 50, 0, "testChatHud"); -} \ No newline at end of file +} + +//------------------------------------------------------------------------- +function HudNetDisplay::getPrefs(%this) +{ + for(%i = 0; %i < 6; %i++) + %this.renderField[%i] = ($pref::Net::graphFields >> %i) & 1; +} + +function NetBarHud::infoUpdate(%this, %ping, %packetLoss, %sendPackets, %sendBytes, %receivePackets, %receiveBytes) +{ + NetBarHudPingText.setText(mFormatFloat(%ping, "%4.0f") @ "ms"); + NetBarHudPacketLossText.setText(mFormatFloat(%packetLoss, "%3.0f") @ "%"); + + NetBarHudSendBar.value = %sendPackets / $pref::Net::PacketRateToServer; + NetBarHudReceiveBar.value = %receivePackets / $pref::Net::PacketRateToClient; +} diff --git a/base/scripts/inventory.cs b/base/scripts/inventory.cs index b3bc968..6115e96 100644 --- a/base/scripts/inventory.cs +++ b/base/scripts/inventory.cs @@ -92,7 +92,7 @@ function serverCmdEndThrowCount(%client, %data) return; // throwStrength will be how many seconds the key was held - %throwStrength = (getSimTime() - %client.player.throwStart) / 300; + %throwStrength = (getSimTime() - %client.player.throwStart) / 150; // trim the time to fit between 0.5 and 1.5 if(%throwStrength > 1.5) %throwStrength = 1.5; @@ -126,6 +126,13 @@ function ShapeBase::throwPack(%this) function ShapeBase::throw(%this,%data) { if (%this.inv[%data.getName()] > 0) { + + // save off the ammo count on this item + if( %this.getInventory( %data ) < $AmmoIncrement[%data.getName()] ) + %data.ammoStore = %this.getInventory( %data ); + else + %data.ammoStore = $AmmoIncrement[%data.getName()]; + // Throw item first... %this.throwItem(%data); if($AmmoIncrement[%data.getName()] !$= "") @@ -183,6 +190,7 @@ function ShapeBase::pickup(%this,%obj,%amount) { %data = %obj.getDatablock(); %delta = %this.incInventory(%data,%amount); + if (%delta) %data.onPickup(%obj,%this,%delta); return %delta; @@ -357,6 +365,8 @@ function ShapeBase::throwItem(%this,%data) dataBlock = %data; rotation = "0 0 1 " @ (getRandom() * 360); }; + + %item.ammoStore = %data.ammoStore; MissionCleanup.add(%item); %this.throwObject(%item); } diff --git a/base/scripts/inventoryHud.cs b/base/scripts/inventoryHud.cs index 3272b2c..3cb7c80 100644 --- a/base/scripts/inventoryHud.cs +++ b/base/scripts/inventoryHud.cs @@ -505,12 +505,19 @@ function buyFavorites(%client) %newArmor = %client.player.getDataBlock(); %client.player.setDamageLevel(%curDmgPct * %newArmor.maxDamage); - + %weaponCount = 0; + // weapons for(%i = 0; %i < getFieldCount( %client.weaponIndex ); %i++) { %inv = $NameToInv[%client.favorites[getField( %client.weaponIndex, %i )]]; - %client.player.setInventory( %inv, 1 ); + + if( %inv !$= "" ) + { + %weaponCount++; + %client.player.setInventory( %inv, 1 ); + } + switch$ ( %inv ) { case Plasma: @@ -527,7 +534,7 @@ function buyFavorites(%client) %client.player.setInventory( ChaingunAmmo, 400 ); } } - %client.player.weaponCount = getFieldCount( %client.weaponIndex ); + %client.player.weaponCount = %weaponCount; // pack %pCh = $NameToInv[%client.favorites[%client.packIndex]]; diff --git a/base/scripts/item.cs b/base/scripts/item.cs index 4d1264d..8818e25 100644 --- a/base/scripts/item.cs +++ b/base/scripts/item.cs @@ -295,8 +295,7 @@ datablock ItemData(Flag) shapefile = "flag.dts"; mass = 55; elasticity = 0.2; - //friction = 0.6; - friction = 5.6; + friction = 0.6; pickupRadius = 3; pickUpName = "a flag"; computeCRC = true; @@ -382,8 +381,7 @@ datablock ItemData(HuntersFlag1) shapefile = "Huntersflag.dts"; mass = 75; elasticity = 0.2; - //friction = 0.6; - friction = 5.6; + friction = 0.6; pickupRadius = 3; isInvincible = true; pickUpName = "a flag"; @@ -617,7 +615,7 @@ function Beacon::onUse(%data, %obj) { // look for 3 meters along player's viewpoint for interior or terrain %searchRange = 3.0; - %mask = $TypeMasks::TerrainObjectType | $TypeMasks::InteriorObjectType | $TypeMasks::StaticShapeObjectType; + %mask = $TypeMasks::TerrainObjectType | $TypeMasks::InteriorObjectType | $TypeMasks::StaticShapeObjectType | $TypeMasks::ForceFieldObjectType; // get the eye vector and eye transform of the player %eyeVec = %obj.getEyeVector(); %eyeTrans = %obj.getEyeTransform(); @@ -641,7 +639,7 @@ function Beacon::onUse(%data, %obj) else { %searchObj = GetWord(%searchResult, 0); - if(%searchObj.getType() & $TypeMasks::StaticShapeObjectType) + if(%searchObj.getType() & ($TypeMasks::StaticShapeObjectType | $TypeMasks::ForceFieldObjectType) ) { // if there's already a beacon where player is aiming, switch its type // otherwise, player can't deploy a beacon there diff --git a/base/shapes/light_female.cs b/base/scripts/light_female.cs similarity index 100% rename from base/shapes/light_female.cs rename to base/scripts/light_female.cs diff --git a/base/shapes/light_male.cs b/base/scripts/light_male.cs similarity index 100% rename from base/shapes/light_male.cs rename to base/scripts/light_male.cs diff --git a/base/scripts/loadingGui.cs b/base/scripts/loadingGui.cs index e1ab1cc..031d99a 100644 --- a/base/scripts/loadingGui.cs +++ b/base/scripts/loadingGui.cs @@ -34,7 +34,7 @@ function LoadingGui::onSleep(%this) } %this.qLineCount = 0; - LOAD_MapPic.setBitmap( "gui/Loading.png" ); + LOAD_MapPic.setBitmap( "gui/Loading" ); LOAD_MapName.setText( "" ); LOAD_MapText.setText( "" ); LOAD_MissionType.setText( "" ); @@ -279,9 +279,12 @@ function handleLoadInfoMessage( %msgType, %msgString, %bitmapName, %mapName, %mi LobbyGui.objLine[%line] = ""; LobbyGui.objLineCount = 0; - %loadBmp = "gui/load_" @ %bitmapName @ ".png"; + if (!isDemo() && !isDemoServer()) + %loadBmp = "gui/load_" @ %bitmapName @ ".png"; + else + %loadBmp = "gui/load_" @ %bitmapName @ ".bm8"; if ( !isFile( "textures/" @ %loadBmp ) ) - %loadBmp = "gui/loading.png"; + %loadBmp = "gui/loading"; LOAD_MapPic.setBitmap( %loadBmp ); LOAD_MapName.setText( %mapName ); LOAD_MissionType.setText( %missionType ); @@ -338,5 +341,5 @@ function handleLoadRulesLineMessage( %msgType, %msgString, %line, %bulletStyle ) //------------------------------------------------------------------------------ function handleLoadInfoDoneMessage( %msgType, %msgString ) { - // TODO - make this signal the game that it's okay to go to the Loading screen now. + LoadingGui.gotLoadInfo = true; } \ No newline at end of file diff --git a/base/shapes/medium_female.cs b/base/scripts/medium_female.cs similarity index 100% rename from base/shapes/medium_female.cs rename to base/scripts/medium_female.cs diff --git a/base/shapes/medium_male.cs b/base/scripts/medium_male.cs similarity index 100% rename from base/shapes/medium_male.cs rename to base/scripts/medium_male.cs diff --git a/base/scripts/message.cs b/base/scripts/message.cs index 1b772de..f68ad05 100644 --- a/base/scripts/message.cs +++ b/base/scripts/message.cs @@ -1,6 +1,3 @@ -$numDeathMsgLines = 10; -$currentDeathMsgLine = 0; -$deathMsgTimeOut = 5 * 1000; $MaxMessageWavLength = 5200; function addMessageCallback(%msgType, %func) @@ -56,27 +53,6 @@ function defaultMessageCallback(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, % } else addMessageHudLine( %message ); - //else if (strstr(%message, "~x") != -1) - //{ - // %mess = getSubStr(%message, 2, 1000); - // addDeathMsgHudLine(%mess); - //} -} - -function getPlayerPrefs( %player ) -{ - // test against %player.guid - - // For now, mute smurfs and listen to real players: - commandToServer( 'ListenTo', %player.clientId, !%player.isSmurf, false ); - - // MES -- queryClientPlayerDatabase function call causes console error - - //if(queryClientPlayerDatabase(%player.guid, "muted")) - //{ - // %player.chatMuted = true; - // addMessageHudLine("Spamming punk \c3" @ %player.name @ "\cr joined and has been auto muted!"); - //} } //-------------------------------------------------------------------------- @@ -146,7 +122,10 @@ function handleClientNameChanged( %msgType, %msgString, %oldName, %newName, %cli { %player = $PlayerList[%clientId]; if( %player ) + { %player.name = detag( %newName ); + lobbyUpdatePlayer( %clientId ); + } } addMessageCallback("", defaultMessageCallback); @@ -421,192 +400,3 @@ function messageAllExcept(%client, %team, %msgtype, %msgString, %a1, %a2, %a3, % // } //} //##################################################### - -//modified defaultgame and added deathmessages.cs to handle this - EL -// addMessageCallback('MsgSuicide', suicideMessage); -// -// function suicideMessage(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10) -// { -// %victim = detag(%a1); -// %suicideMsg = %victim @ " hits CTRL-K. What a wimp!"; -// addDeathMsgHudLine(%suicideMsg); -// } - -//modified defaultgame and added deathmessages.cs to handle this - EL -// addMessageCallback('MsgSelfKill', selfKillMessage); -// -// function selfKillMessage(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10) -// { -// %victim = detag(%a1); -// %gender = detag(%a2); -// // gender will be HIM or HER -// %poss = detag(%a3); -// // poss will be HIS or HER (possessive) -// %damageType = detag(%a4); -// switch$ (%damageType) { -// case $DamageType::Plasma : -// %suicideMsg = %victim @ " gets a taste of " @ %poss @ " own plasma."; -// case $DamageType::Bullet : -// %suicideMsg = %victim @ " shoots " @ %gender @ "self in the foot."; -// case $DamageType::Disc : -// %suicideMsg = %victim @ " blasts " @ %gender @ "self with a disc."; -// case $DamageType::Grenade : -// %suicideMsg = %victim @ " eats " @ %poss @ " own grenade."; -// case $DamageType::Mortar : -// %suicideMsg = %victim @ " launches a mortar too close to home."; -// case $DamageType::Missile : -// %suicideMsg = %victim @ " blows " @ %gender @ "self up with a missile."; -// case $DamageType::Explosion : -// %suicideMsg = %victim @ " gets too close to an explosion."; -// case $DamageType::Ground : -// %suicideMsg = %victim @ " hits the ground hard."; -// default: -// %suicideMsg = %victim @ " kills " @ %gender @ "self."; -// } -// addDeathMsgHudLine(%suicideMsg); -// } - -//modified defaultgame and added deathmessages.cs to handle this - EL -// addMessageCallback('MsgPlayerTeamKill', playerTeamKillMessage); -// -// function playerTeamKillMessage(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10) -// { -// %victim = detag(%a1); -// %killer = detag(%a2); -// %killPoss = detag(%a3); -// %teamKillMsg = %killer @ " mows down " @ %killPoss @ " teammate " @ %victim @ "."; -// addDeathMsgHudLine(%teamKillMsg); -// } - -//modified defaultgame and added deathmessages.cs to handle this - EL -// addMessageCallback('MsgPlayerIsKilled', playerIsKilledMessage); -// -// function playerIsKilledMessage(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10) -// { -// %victim = detag(%a1); -// %killer = detag(%a2); -// %vicGen = detag(%a3); -// %vicPoss = detag(%a4); -// //%kilGen = detag(%a5); -// //%kilPoss = detag(%a6); -// // vicGen and kilGen will be HIM or HER -// // vicPoss and kilPoss will be HIS or HER -// %damType = detag(%a5); -// switch$ (%damType) { -// case $DamageType::Blaster : -// %dMsg = %killer @ " blasts the life out of " @ %victim @ "."; -// case $DamageType::Plasma : -// %dMsg = %killer @ " gives " @ %victim @ " a plasma transfusion."; -// case $DamageType::Bullet : -// %dMsg = %killer @ " gives " @ %victim @ " " @ %vicPoss @ " daily dose of lead."; -// case $DamageType::Disc : -// %dMsg = %killer @ " gives " @ %victim @ " a Stormhammer salute."; -// case $DamageType::Grenade : -// %dMsg = %killer @ " takes " @ %victim @ " out with a grenade."; -// case $DamageType::Laser : -// %dMsg = %killer @ " picks off " @ %victim @ " with a sniper shot."; -// case $DamageType::ELF : -// %dMsg = %killer @ " drains " @ %victim @ "\'s life force."; -// case $DamageType::Mortar : -// %dMsg = %killer @ " mortars " @ %victim @ " into oblivion."; -// case $DamageType::Missile : -// %dMsg = %killer @ "\'s missile catches up with " @ %victim @ "."; -// case $DamageType::ShockLance : -// %dMsg = %killer @ " assassinates " @ %victim @ "."; -// case $DamageType::Mine : -// %dMsg = %killer @ "\'s mine takes out " @ %victim @ "."; -// case $DamageType::Explosion : -// %dMsg = %killer @ " blows up " @ %victim @ "."; -// case $DamageType::Impact : -// %dMsg = %killer @ " runs over " @ %victim @ "."; -// case $DamageType::Turret : -// %dMsg = %killer @ "\'s turret kills " @ %victim @ "."; -// default: -// %dMsg = %victim @ " falls victim to " @ %killer @ "."; -// } -// addDeathMsgHudLine(%dMsg); -// } - -//function addDeathMsgHudLine(%msg) -//{ -// if(!isObject(deathMsgHud)){ -// %dmHudX = firstWord(getResolution()) - 245; -// %dmHudY = (getWord(objectiveHud.extent, 1) + getWord(objectiveHud.position, 1)) + 10; -// %dmhPos = %dmHudX @ " " @ %dmHudY; -// //error("y coords = " @ getWord(objectiveHud.extent, 1) @ " + " @ getWord(objectiveHud.position, 1) @ " + 10"); -// %dmHud = new GuiControl(deathMsgHud) { -// profile = "GuiDeathMsgHudProfile"; -// horizSizing = "left"; -// vertSizing = "bottom"; -// position = %dmhPos; -// extent = "240 170"; -// visible = "1"; -// modal = "0"; -// }; -// PlayGui.add(%dmHud); -// } -// %msgName = "deathMsg" @ $currentDeathMsgLine; -// if(nameToId(%msgName) > 0) -// %msgName.delete(); -// %msgYCoord = ($currentDeathMsgLine * 15); -// %msgCoords = "3 " @ %msgYCoord; -// // calculate how many lines the message will need to use -// %multiLine = false; -// if(strLen(%msg) > 52) { -// %multiLine = true; -// // find first space before character 52 and break the line there -// %lBr = -1; -// for(%i = 51; %i > 0; %i--) -// if(getSubStr(%msg, %i, 1) $= " ") { -// %lBr = %i; -// break; -// } -// if(%lBr > -1) { -// %msg1 = getSubStr(%msg, 0, %lBr); -// %msg2 = getSubStr(%msg, %lBr + 1, strLen(%msg)); -// //error("Message line 1: |" @ %msg1 @ "|"); -// //error("Message line 2: |" @ %msg2 @ "|"); -// } -// } -// else -// %msg1 = %msg; -// %addDeathMsg = new GuiTextCtrl(%msgName) { -// profile = "DeathMsgTextProfile"; -// horizSizing = "left"; -// vertSizing = "bottom"; -// position = %msgCoords; -// extent = "235 15"; -// minExtent = "8 8"; -// visible = "1"; -// helpTag = "0"; -// text = ""; -// }; -// deathMsgHud.add(%msgName); -// %msgName.setValue(%msg1); -// $currentDeathMsgLine++; -// %msgName.schedule($deathMsgTimeOut, "delete"); -// if(%multiLine) { -// %msgName2 = "deathMsg" @ ($currentDeathMsgLine + 1); -// if(nameToId(%msgName2) > 0) -// %msgName2.delete(); -// %msgYCoord = ($currentDeathMsgLine * 15); -// %msgCoords = "3 " @ %msgYCoord; -// %addDeathMsg2 = new GuiTextCtrl(%msgName2) { -// profile = "DeathMsgTextProfile"; -// horizSizing = "left"; -// vertSizing = "bottom"; -// position = %msgCoords; -// extent = "235 15"; -// minExtent = "8 8"; -// visible = "1"; -// helpTag = "0"; -// text = ""; -// }; -// deathMsgHud.add(%msgName2); -// %msgName2.setValue(%msg2); -// $currentDeathMsgLine++; -// %msgName2.schedule($deathMsgTimeOut, "delete"); -// } -// if($currentDeathMsgLine >= $numDeathMsgLines) -// $currentDeathMsgLine = 0; -//} \ No newline at end of file diff --git a/base/scripts/player.cs b/base/scripts/player.cs index 1613c63..81b9404 100644 --- a/base/scripts/player.cs +++ b/base/scripts/player.cs @@ -1,16 +1,16 @@ - //---------------------------------------------------------------------------- +//---------------------------------------------------------------------------- //---------------------------------------------------------------------------- $InvincibleTime = 6; // Load dts shapes and merge animations -exec("shapes/light_male.cs"); -exec("shapes/medium_male.cs"); -exec("shapes/heavy_male.cs"); -exec("shapes/light_female.cs"); -exec("shapes/medium_female.cs"); -exec("shapes/bioderm_light.cs"); -exec("shapes/bioderm_medium.cs"); -exec("shapes/bioderm_heavy.cs"); +exec("scripts/light_male.cs"); +exec("scripts/medium_male.cs"); +exec("scripts/heavy_male.cs"); +exec("scripts/light_female.cs"); +exec("scripts/medium_female.cs"); +exec("scripts/bioderm_light.cs"); +exec("scripts/bioderm_medium.cs"); +exec("scripts/bioderm_heavy.cs"); $CorpseTimeoutValue = 22 * 1000; @@ -954,7 +954,7 @@ datablock ParticleData(HumanArmorJetParticle) gravityCoefficient = 0; inheritedVelFactor = 0.2; constantAcceleration = 0.0; - lifetimeMS = 50; + lifetimeMS = 100; lifetimeVarianceMS = 0; textureName = "particleTest"; colors[0] = "0.32 0.47 0.47 1.0"; @@ -1175,8 +1175,8 @@ datablock PlayerData(LightMaleHumanArmor) : LightPlayerDamageProfile cmdIcon = CMDPlayerIcon; cmdMiniIconName = "commander/MiniIcons/com_player_grey"; - hudImageNameFriendly[0] = "gui/hud_playertriangle.png"; - hudImageNameEnemy[0] = "gui/hud_playertriangle_enemy.png"; + hudImageNameFriendly[0] = "gui/hud_playertriangle"; + hudImageNameEnemy[0] = "gui/hud_playertriangle_enemy"; hudRenderModulated[0] = true; hudImageNameFriendly[1] = "commander/MiniIcons/com_flag_grey"; @@ -1216,8 +1216,8 @@ datablock PlayerData(LightMaleHumanArmor) : LightPlayerDamageProfile energyPerDamagePoint = 75.0; // shield energy required to block one point of damage rechargeRate = 0.256; - jetForce = 28.2 * 90; - underwaterJetForce = 26.2 * 90 * 2.0; + jetForce = 27.51 * 90; + underwaterJetForce = 27.51 * 90 * 2.0; underwaterVertJetFactor = 1.5; jetEnergyDrain = 0.8; underwaterJetEnergyDrain = 0.5; @@ -1227,9 +1227,9 @@ datablock PlayerData(LightMaleHumanArmor) : LightPlayerDamageProfile runForce = 55.20 * 90; runEnergyDrain = 0; minRunEnergy = 0; - maxForwardSpeed = 15; - maxBackwardSpeed = 14; - maxSideSpeed = 14; + maxForwardSpeed = 14; + maxBackwardSpeed = 13; + maxSideSpeed = 13; maxUnderwaterForwardSpeed = 8.4; maxUnderwaterBackwardSpeed = 7.8; @@ -1440,8 +1440,8 @@ datablock PlayerData(MediumMaleHumanArmor) : MediumPlayerDamageProfile cmdIcon = CMDPlayerIcon; cmdMiniIconName = "commander/MiniIcons/com_player_grey"; - hudImageNameFriendly[0] = "gui/hud_playertriangle.png"; - hudImageNameEnemy[0] = "gui/hud_playertriangle_enemy.png"; + hudImageNameFriendly[0] = "gui/hud_playertriangle"; + hudImageNameEnemy[0] = "gui/hud_playertriangle_enemy"; hudRenderModulated[0] = true; hudImageNameFriendly[1] = "commander/MiniIcons/com_flag_grey"; @@ -1474,8 +1474,8 @@ datablock PlayerData(MediumMaleHumanArmor) : MediumPlayerDamageProfile energyPerDamagePoint = 75.0; // shield energy required to block one point of damage rechargeRate = 0.256; - jetForce = 27.06 * 130; - underwaterJetForce = 24.6 * 130 * 2.0; + jetForce = 25.83 * 130; + underwaterJetForce = 25.83 * 130 * 2.0; underwaterVertJetFactor = 1.5; jetEnergyDrain = 1.0; underwaterJetEnergyDrain = 0.5; @@ -1485,9 +1485,9 @@ datablock PlayerData(MediumMaleHumanArmor) : MediumPlayerDamageProfile runForce = 46 * 130; runEnergyDrain = 0; minRunEnergy = 0; - maxForwardSpeed = 12; - maxBackwardSpeed = 11; - maxSideSpeed = 11; + maxForwardSpeed = 11; + maxBackwardSpeed = 10; + maxSideSpeed = 10; maxUnderwaterForwardSpeed = 6.6; maxUnderwaterBackwardSpeed = 6; @@ -1696,8 +1696,8 @@ datablock PlayerData(HeavyMaleHumanArmor) : HeavyPlayerDamageProfile cmdIcon = CMDPlayerIcon; cmdMiniIconName = "commander/MiniIcons/com_player_grey"; - hudImageNameFriendly[0] = "gui/hud_playertriangle.png"; - hudImageNameEnemy[0] = "gui/hud_playertriangle_enemy.png"; + hudImageNameFriendly[0] = "gui/hud_playertriangle"; + hudImageNameEnemy[0] = "gui/hud_playertriangle_enemy"; hudRenderModulated[0] = true; hudImageNameFriendly[1] = "commander/MiniIcons/com_flag_grey"; @@ -1730,8 +1730,8 @@ datablock PlayerData(HeavyMaleHumanArmor) : HeavyPlayerDamageProfile energyPerDamagePoint = 75.0; // shield energy required to block one point of damage rechargeRate = 0.256; - jetForce = 23.54 * 180; - underwaterJetForce = 21.4 * 180 * 2.0; + jetForce = 22.47 * 180; + underwaterJetForce = 22.47 * 180 * 2.0; underwaterVertJetFactor = 1.5; jetEnergyDrain = 1.1; underwaterJetEnergyDrain = 0.55; @@ -1741,9 +1741,9 @@ datablock PlayerData(HeavyMaleHumanArmor) : HeavyPlayerDamageProfile runForce = 40.25 * 180; runEnergyDrain = 0; minRunEnergy = 0; - maxForwardSpeed = 7.5; - maxBackwardSpeed = 6; - maxSideSpeed = 6; + maxForwardSpeed = 6.5; + maxBackwardSpeed = 5; + maxSideSpeed = 5; maxUnderwaterForwardSpeed = 3.9; maxUnderwaterBackwardSpeed = 3; @@ -2073,8 +2073,12 @@ function Armor::onMount(%this,%obj,%vehicle,%node) // Node 0 is the pilot's pos. %obj.setTransform("0 0 0 0 0 1 0"); %obj.setActionThread(%vehicle.getDatablock().mountPose[%node],true,true); - %obj.lastWeapon = %obj.getMountedImage($WeaponSlot); - %obj.unmountImage($WeaponSlot); + + if(!%obj.inStation) + %obj.lastWeapon = (%obj.getMountedImage($WeaponSlot) == 0 ) ? "" : %obj.getMountedImage($WeaponSlot).getName().item; + + %obj.unmountImage($WeaponSlot); + if(!%obj.client.isAIControlled()) { %obj.setControlObject(%vehicle); @@ -2136,7 +2140,14 @@ function Armor::onUnmount( %this, %obj, %vehicle, %node ) if ( %node == 0 ) { commandToClient( %obj.client, 'VehicleDismount' ); - %obj.mountImage(%obj.lastWeapon, $WeaponSlot); + commandToClient(%obj.client, 'removeReticle'); + + if(%obj.inv[%obj.lastWeapon]) + %obj.use(%obj.lastWeapon); + + if(%obj.getMountedImage($WeaponSlot) == 0) + %obj.selectWeaponSlot( 0 ); + //Inform gunner position when pilot leaves... //if(%vehicle.getDataBlock().showPilotInfo !$= "") // if((%gunner = %vehicle.getMountNodeObject(1)) != 0) @@ -2172,7 +2183,7 @@ function Armor::onCollision(%this,%obj,%col,%forceVehicleNode) // player collided with a vehicle %node = -1; if (%forceVehicleNode !$= "" || (%className $= WheeledVehicleData || %className $= FlyingVehicleData || %className $= HoverVehicleData) && - %obj.mountVehicle && %obj.getState() $= "Move" && %col.mountable) { + %obj.mountVehicle && %obj.getState() $= "Move" && %col.mountable && !%obj.inStation && %col.getDamageState() !$= "Destroyed") { //if the player is an AI, he should snap to the mount points in node order, //to ensure they mount the turret before the passenger seat, regardless of where they collide... @@ -2206,7 +2217,12 @@ function Armor::onCollision(%this,%obj,%col,%forceVehicleNode) // check to see if attempting to enter a "sitting" node if(nodeIsSitting(%datablock, %node)) { // send the player a message -- can't sit here with large pack - messageClient(%obj.client, 'MsgCantSitHere', '\c2Pack too large, can\'t occupy this seat.~wfx/misc/misc.error.wav'); + if(!%obj.noSitMessage) + { + %obj.noSitMessage = true; + %obj.schedule(2000, "resetSitMessage"); + messageClient(%obj.client, 'MsgCantSitHere', '\c2Pack too large, can\'t occupy this seat.~wfx/misc/misc.error.wav'); + } return; } } @@ -2220,7 +2236,11 @@ function Armor::onCollision(%this,%obj,%col,%forceVehicleNode) else commandToClient(%obj.client,'SetPassengerVehicleKeys', true); - %col.lastWeapon = %col.getMountedImage($WeaponSlot); + if(!%obj.inStation) + %col.lastWeapon = ( %col.getMountedImage($WeaponSlot) == 0 ) ? "" : %col.getMountedImage($WeaponSlot).getName().item; + else + %col.lastWeapon = %obj.lastWeapon; + %col.mountObject(%obj,%node); %col.playAudio(0, MountVehicleSound); %obj.mVehicle = %col; @@ -2377,6 +2397,11 @@ function Armor::onCollision(%this,%obj,%col,%forceVehicleNode) } } +function Player::resetSitMessage(%obj) +{ + %obj.noSitMessage = false; +} + function Player::setInvincible(%this, %val) { %this.invincible = %val; @@ -2485,13 +2510,14 @@ function Armor::doDismount(%this, %obj, %forced) %obj.unmount(); if(%obj.mVehicle) %obj.mVehicle.getDataBlock().playerDismounted(%obj.mVehicle, %obj); + // bots don't change their control objects when in vehicles if(!%obj.client.isAIControlled()) { %vehicle = %obj.getControlObject(); %obj.setControlObject(0); } - + %obj.mountVehicle = false; %obj.schedule(4000, "setMountVehicle", true); @@ -2503,6 +2529,37 @@ function Armor::doDismount(%this, %obj, %forced) %obj.vehicleTurret = ""; } +function resetObserveFollow( %client, %dismount ) +{ + if( %dismount ) + { + if( !isObject( %client.player ) ) + return; + + for( %i = 0; %i < %client.observeCount; %i++ ) + { + %client.observers[%i].camera.setOrbitMode( %client.player, %client.player.getTransform(), 0.5, 4.5, 4.5); + } + } + else + { + if( !%client.player.isMounted() ) + return; + + // grab the vehicle... + %mount = %client.player.getObjectMount(); + if( %mount.getDataBlock().observeParameters $= "" ) + %params = %client.player.getTransform(); + else + %params = %mount.getDataBlock().observeParameters; + + for( %i = 0; %i < %client.observeCount; %i++ ) + { + %client.observers[%i].camera.setOrbitMode(%mount, %mount.getTransform(), getWord( %params, 0 ), getWord( %params, 1 ), getWord( %params, 2 )); + } + } +} + //---------------------------------------------------------------------------- @@ -2513,7 +2570,7 @@ function Player::scriptKill(%player, %damageType) %player.damage(0, %player.getPosition(), 10000, %damageType); } -function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %amount, %damageType, %momVec) +function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %amount, %damageType, %momVec, %mineSC) { //error("Armor::damageObject( "@%data@", "@%targetObject@", "@%sourceObject@", "@%position@", "@%amount@", "@%damageType@", "@%momVec@" )"); if(%targetObject.invincible || %targetObject.getState() $= "Dead") @@ -2546,7 +2603,10 @@ function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %am } %targetClient = %targetObject.getOwnerClient(); - %sourceClient = isObject(%sourceObject) ? %sourceObject.getOwnerClient() : 0; + if(isObject(%mineSC)) + %sourceClient = %mineSC; + else + %sourceClient = isObject(%sourceObject) ? %sourceObject.getOwnerClient() : 0; %targetTeam = %targetClient.team; diff --git a/base/scripts/projectiles.cs b/base/scripts/projectiles.cs index a87fbc4..276d88e 100644 --- a/base/scripts/projectiles.cs +++ b/base/scripts/projectiles.cs @@ -76,7 +76,15 @@ function ShapeBaseImageData::onFire(%data, %obj, %slot) } else %energy = %obj.getEnergyLevel(); - if(%energy < %data.minEnergy) + + if(%data.useCapacitor && %data.usesEnergy) + { + if( %useEnergyObj.turretObject.getCapacitorLevel() < %data.minEnergy ) + { + return; + } + } + else if(%energy < %data.minEnergy) return; } if(%data.projectileSpread) @@ -123,7 +131,14 @@ function ShapeBaseImageData::onFire(%data, %obj, %slot) if(%data.usesEnergy) { if(%data.useMountEnergy) - %useEnergyObj.setEnergyLevel(%energy - %data.fireEnergy); + { + if( %data.useCapacitor ) + { + %vehicle.turretObject.setCapacitorLevel( %vehicle.turretObject.getCapacitorLevel() - %data.fireEnergy ); + } + else + %useEnergyObj.setEnergyLevel(%energy - %data.fireEnergy); + } else %obj.setEnergyLevel(%energy - %data.fireEnergy); } @@ -374,11 +389,16 @@ function ELFProjectileData::zapTarget(%data, %projectile, %target, %targeter) { %oldERate = %target.getRechargeRate(); %target.teamDamageStateOnZap = $teamDamage; + %teammates = %target.client.team == %targeter.client.team; + + echo("targeter team: " @ %targeter.team ); + echo("target team: " @ %target.team ); - if(!%target.teamDamageStateOnZap && %target.team == %targeter.team) - %target.setRechargeRate(%oldERate); - else + if( %target.teamDamageStateOnZap || !%teammates ) %target.setRechargeRate(%oldERate - %data.drainEnergy); + else + %target.setRechargeRate(%oldERate); + %projectile.checkELFStatus(%data, %target, %targeter); } @@ -389,14 +409,15 @@ function ELFProjectileData::unzapTarget(%data, %projectile, %target, %targeter) %targeter.stopAudio($ELFFireSound); %target.zapSound = false; %targeter.zappingSound = false; + %teammates = %target.client.team == %targeter.client.team; - if(!%target.isDisabled()) + if(!%target.isDestroyed()) { %oldERate = %target.getRechargeRate(); - if(!%target.teamDamageStateOnZap && %target.team == %targeter.team) - %target.setRechargeRate(%oldERate); - else + if( %target.teamDamageStateOnZap || !%teammates ) %target.setRechargeRate(%oldERate + %data.drainEnergy); + else + %target.setRechargeRate(%oldERate); } } @@ -506,7 +527,13 @@ function RadiusExplosion(%explosionSource, %position, %radius, %damage, %impulse if (%coverage == 0) continue; - %amount = (1.0 - (%dist / %radius)) * %coverage * %damage; + //if ( $splashTest ) + %amount = (1.0 - ((%dist / %radius) * 0.75)) * %coverage * %damage; + //else + //%amount = (1.0 - (%dist / %radius)) * %coverage * %damage; + + //error( "damage: " @ %amount @ " at distance: " @ %dist @ " radius: " @ %radius @ " maxDamage: " @ %damage ); + %data = %targetObject.getDataBlock(); %className = %data.className; @@ -541,7 +568,7 @@ function RadiusExplosion(%explosionSource, %position, %radius, %damage, %impulse } if(%amount > 0) - %data.damageObject(%targetObject, %sourceObject, %position, %amount, %damageType, %momVec); + %data.damageObject(%targetObject, %sourceObject, %position, %amount, %damageType, %momVec, %explosionSource.theClient, %explosionSource); else if( %explosionSource.getDataBlock().getName() $= "ConcussionGrenadeThrown" && %data.getClassName() $= "PlayerData" ) { %data.applyConcussion( %dist, %radius, %sourceObject, %targetObject ); diff --git a/base/scripts/server.cs b/base/scripts/server.cs index 02df268..338fc05 100644 --- a/base/scripts/server.cs +++ b/base/scripts/server.cs @@ -63,12 +63,20 @@ function CreateServer(%mission, %missionType) exec("prefs/banlist.cs"); //automatically load any mission type that follows naming convention typeGame.name.cs - %search = "scripts/*Game.cs"; - - for(%file = findFirstFile(%search); %file !$= ""; %file = findNextFile(%search)) + if (!isDemo()) { - %type = fileBase(%file); // get the name of the script - exec("scripts/" @ %type @ ".cs"); + %search = "scripts/*Game.cs"; + for(%file = findFirstFile(%search); %file !$= ""; %file = findNextFile(%search)) + { + %type = fileBase(%file); // get the name of the script + exec("scripts/" @ %type @ ".cs"); + } + } + //the DEMO version only uses DefaultGame.cs and SinglePlayerGame.cs + else + { + exec("scripts/DefaultGame.cs"); + exec("scripts/SinglePlayerGame.cs"); } $missionSequence = 0; @@ -179,8 +187,10 @@ function DestroyServer() $missionRunning = false; allowConnections(false); stopHeartbeat(); - MissionGroup.delete(); - MissionCleanup.delete(); + if ( isObject( MissionGroup ) ) + MissionGroup.delete(); + if ( isObject( MissionCleanup ) ) + MissionCleanup.delete(); if(isObject(game)) { game.deactivatePackages(); @@ -221,6 +231,9 @@ function Disconnect() function DisconnectedCleanup() { + // Make sure we're not still waiting for the loading info: + cancelLoadInfoCheck(); + // clear the chat hud message vector HudMessageVector.clear(); if ( isObject( PlayerListGroup ) ) @@ -248,48 +261,76 @@ function DisconnectedCleanup() clearTextureHolds(); purgeResources(); - // Restart the email check: - if ( !EmailGui.checkingEmail && EmailGui.checkSchedule $= "" ) - CheckEmail( true ); + if ( $PlayingOnline ) + { + // Restart the email check: + if ( !EmailGui.checkingEmail && EmailGui.checkSchedule $= "" ) + CheckEmail( true ); - IRCClient::onLeaveGame(); + IRCClient::onLeaveGame(); + } } // we pass the guid as well, in case this guy leaves the server. function kick( %client, %admin, %guid ) -{ +{ if(%admin) - messageAll( 'MsgAdminForce', '\c2The Admin has kicked %1.', %client.name ); + messageAll( 'MsgAdminForce', '\c2The Admin has kicked %1.', Game.kickClientName ); else - messageAll( 'MsgVotePassed', '\c2%1 was kicked by vote.', %client.name ); + messageAll( 'MsgVotePassed', '\c2%1 was kicked by vote.', Game.kickClientName ); messageClient(%client, 'onClientKicked', ""); - messageAllExcept( %client, -1, 'MsgClientDrop', "", %client.name, %client ); - - if( %client.isAIControlled() ) - { + messageAllExcept( %client, -1, 'MsgClientDrop', "", Game.kickClientName, %client ); + + if( %client.isAIControlled() ) + { $HostGameBotCount--; - %client.drop(); - } - else - { - %count = ClientGroup.getCount(); - for( %i = 0; %i < %count; %i++ ) + %client.drop(); + } + else + { + if( $playingOnline ) // won games { - %cl = ClientGroup.getObject( %i ); - if( %cl.guid == %guid ) + %count = ClientGroup.getCount(); + %found = false; + for( %i = 0; %i < %count; %i++ ) // see if this guy is still here... { - // kill and delete this client - if( isObject( %cl.player ) ) - %cl.player.scriptKill(0); + %cl = ClientGroup.getObject( %i ); + if( %cl.guid == %guid ) + { + %found = true; + + // kill and delete this client, their done in this server. + if( isObject( %cl.player ) ) + %cl.player.scriptKill(0); - %cl.schedule(700, "delete"); - - BanList::add( %guid, "0", $Host::KickBanTime ); - Game.kickGuid = ""; - } + if ( isObject( %cl ) ) + { + %cl.setDisconnectReason( "You have been kicked out of the game." ); + %cl.schedule(700, "delete"); + } + + BanList::add( %guid, "0", $Host::KickBanTime ); + } + } + if( !%found ) + BanList::add( %guid, "0", $Host::KickBanTime ); // keep this guy out for a while since he left. } - } + else // lan games + { + // kill and delete this client + if( isObject( %client.player ) ) + %client.player.scriptKill(0); + + if ( isObject( %client ) ) + { + %client.setDisconnectReason( "You have been kicked out of the game." ); + %client.schedule(700, "delete"); + } + + BanList::add( 0, %client.getAddress(), $Host::KickBanTime ); + } + } } function ban( %client, %admin ) @@ -306,7 +347,11 @@ function ban( %client, %admin ) if( isObject(%client.player) ) %client.player.scriptKill(0); - %client.schedule(700, "delete"); + if ( isObject( %client ) ) + { + %client.setDisconnectReason( "You have been banned from this server." ); + %client.schedule(700, "delete"); + } BanList::add(%client.guid, %client.getAddress(), $Host::BanTime); } @@ -332,161 +377,256 @@ function getValidVoicePitch(%voice, %voicePitch) return 1.0; } +$DemoNameCount = 0; +function addDemoAlias( %name ) +{ + $DemoName[$DemoNameCount] = %name; + $DemoNameCount++; +} + +addDemoAlias( "Amateur" ); +addDemoAlias( "Bullseye" ); +addDemoAlias( "Casualty" ); +addDemoAlias( "Dogfood" ); +addDemoAlias( "Extinct" ); +addDemoAlias( "Fodder" ); +addDemoAlias( "Grunt" ); +addDemoAlias( "Helpless" ); +addDemoAlias( "Itchy" ); +addDemoAlias( "Joker" ); +addDemoAlias( "Kibble" ); +addDemoAlias( "Learner" ); +addDemoAlias( "Meat" ); +addDemoAlias( "Newbie" ); +addDemoAlias( "Owned" ); +addDemoAlias( "Poser" ); +addDemoAlias( "Quaker" ); +addDemoAlias( "Roadkill" ); +addDemoAlias( "Skid Mark" ); +addDemoAlias( "Easy Target" ); +addDemoAlias( "Underdog" ); +addDemoAlias( "Vegetable" ); +addDemoAlias( "Weakling" ); +addDemoAlias( "Flatline" ); +addDemoAlias( "Yo-yo" ); +addDemoAlias( "Zero" ); +addDemoAlias( "Apprentice" ); +addDemoAlias( "Bonehead" ); +addDemoAlias( "Clown" ); +addDemoAlias( "Dodo" ); +addDemoAlias( "Endangered" ); +addDemoAlias( "Feeble" ); + +function pickDemoName() +{ + // Pick a unique name if possible: + %idx = mFloor( getRandom() * $DemoNameCount ); + for ( %i = 0; %i < $DemoNameCount; %i++ ) + { + %name = $DemoName[mMod( %idx + %i, $DemoNameCount )]; + %isUnique = true; + %count = ClientGroup.getCount(); + for ( %ci = 0; %ci < %count; %ci++ ) + { + if ( strcmp( %name, detag( getTaggedString( ClientGroup.getObject( %ci ).name ) ) ) == 0 ) + { + %isUnique = false; + break; + } + } + + if ( %isUnique ) + break; + } + + // Append a number to make the alias unique: + if ( !%isUnique ) + { + %suffix = 1; + while ( !%isUnique ) + { + %nameTry = %name @ "." @ %suffix; + %isUnique = true; + + %count = ClientGroup.getCount(); + for ( %i = 0; %i < %count; %i++ ) + { + if ( strcmp( %nameTry, detag( getTaggedString( ClientGroup.getObject( %i ).name ) ) ) == 0 ) + { + %isUnique = false; + break; + } + } + + %suffix++; + } + + // Success! + %name = %nameTry; + } + + return( %name ); +} + function GameConnection::onConnect( %client, %name, %raceGender, %skin, %voice, %voicePitch ) { %client.setMissionCRC($missionCRC); sendLoadInfoToClient( %client ); //%client.setSimulatedNetParams(0.1, 30); - if ( isDemo() ) - { - %client.armor = "Light"; + if ( isDemoServer() ) + { + %client.armor = "Light"; %client.sex = "Male"; %client.race = "Human"; - %client.name = addTaggedString( "DemoGuy" ); - %client.nameBase = "DemoGuy"; - %client.voice = "Male1"; - %client.voiceTag = addtaggedString( "Male1" ); - } - else - { - // if hosting this server, set this client to superAdmin - if(%client.getAddress() $= "Local") - { - %client.isAdmin = true; - %client.isSuperAdmin = true; - } - - // Get the client's unique id: - %authInfo = %client.getAuthInfo(); - %client.guid = getField( %authInfo, 3 ); - - // check admin and super admin list, and set status accordingly - if ( !%client.isSuperAdmin ) - { - if ( isOnSuperAdminList( %client ) ) - { - %client.isAdmin = true; - %client.isSuperAdmin = true; - } - else if( isOnAdminList( %client ) ) - { - %client.isAdmin = true; - } - } - - // Sex/Race defaults - switch$ ( %raceGender ) - { - case "Human Male": - %client.sex = "Male"; - %client.race = "Human"; - case "Human Female": - %client.sex = "Female"; - %client.race = "Human"; - case "Bioderm": - %client.sex = "Male"; - %client.race = "Bioderm"; - default: - error("Invalid race/gender combo passed: " @ %raceGender); - %client.sex = "Male"; - %client.race = "Human"; - } - %client.armor = "Light"; - - // Override the connect name if this server does not allow smurfs: - %realName = getField( %authInfo, 0 ); - if ( $PlayingOnline && $Host::NoSmurfs ) - %name = %realName; - - if ( strcmp( %name, %realName ) == 0 ) - { - %client.isSmurf = false; - - // Add the tribal tag: - %tag = getField( %authInfo, 1 ); - %append = getField( %authInfo, 2 ); - if ( %append ) - %name = "\cp\c6" @ %name @ "\c7" @ %tag @ "\co"; - else - %name = "\cp\c7" @ %tag @ "\c6" @ %name @ "\co"; - - %client.sendGuid = %client.guid; - } + %client.nameBase = pickDemoName(); + %client.name = addTaggedString( %client.nameBase ); + %client.voice = "Male1"; + %client.voiceTag = addTaggedString( "Male1" ); + if ( %client & 1 ) + %client.skin = addTaggedString( "swolf" ); else - { - %client.isSmurf = true; - %client.sendGuid = 0; - %name = stripTrailingSpaces( strToPlayerName( %name ) ); - if ( strlen( %name ) < 3 ) - %name = "Poser"; - - // Make sure the alias is unique: - %isUnique = true; - %count = ClientGroup.getCount(); - for ( %i = 0; %i < %count; %i++ ) - { - %test = ClientGroup.getObject( %i ); - %rawName = stripChars( detag( getTaggedString( %test.name ) ), "\cp\co\c6\c7\c8\c9" ); - if ( strcmp( %name, %rawName ) == 0 ) - { - %isUnique = false; - break; - } - } + %client.skin = addTaggedString( "beagle" ); + } + else + { + // if hosting this server, set this client to superAdmin + if(%client.getAddress() $= "Local") + { + %client.isAdmin = true; + %client.isSuperAdmin = true; + } - // Append a number to make the alias unique: - if ( !%isUnique ) - { - %suffix = 1; - while ( !%isUnique ) - { - %nameTry = %name @ "." @ %suffix; - %isUnique = true; + // Get the client's unique id: + %authInfo = %client.getAuthInfo(); + %client.guid = getField( %authInfo, 3 ); + + // check admin and super admin list, and set status accordingly + if ( !%client.isSuperAdmin ) + { + if ( isOnSuperAdminList( %client ) ) + { + %client.isAdmin = true; + %client.isSuperAdmin = true; + } + else if( isOnAdminList( %client ) ) + { + %client.isAdmin = true; + } + } + + // Sex/Race defaults + switch$ ( %raceGender ) + { + case "Human Male": + %client.sex = "Male"; + %client.race = "Human"; + case "Human Female": + %client.sex = "Female"; + %client.race = "Human"; + case "Bioderm": + %client.sex = "Male"; + %client.race = "Bioderm"; + default: + error("Invalid race/gender combo passed: " @ %raceGender); + %client.sex = "Male"; + %client.race = "Human"; + } + %client.armor = "Light"; - %count = ClientGroup.getCount(); - for ( %i = 0; %i < %count; %i++ ) - { - %test = ClientGroup.getObject( %i ); - %rawName = stripChars( detag( getTaggedString( %test.name ) ), "\cp\co\c6\c7\c8\c9" ); - if ( strcmp( %nameTry, %rawName ) == 0 ) - { - %isUnique = false; - break; - } - } + // Override the connect name if this server does not allow smurfs: + %realName = getField( %authInfo, 0 ); + if ( $PlayingOnline && $Host::NoSmurfs ) + %name = %realName; - %suffix++; - } + if ( strcmp( %name, %realName ) == 0 ) + { + %client.isSmurf = false; - // Success! - %name = %nameTry; - } + // Add the tribal tag: + %tag = getField( %authInfo, 1 ); + %append = getField( %authInfo, 2 ); + if ( %append ) + %name = "\cp\c6" @ %name @ "\c7" @ %tag @ "\co"; + else + %name = "\cp\c7" @ %tag @ "\c6" @ %name @ "\co"; - %smurfName = %name; - // Tag the name with the "smurf" color: - %name = "\cp\c8" @ %name @ "\co"; - } + %client.sendGuid = %client.guid; + } + else + { + %client.isSmurf = true; + %client.sendGuid = 0; + %name = stripTrailingSpaces( strToPlayerName( %name ) ); + if ( strlen( %name ) < 3 ) + %name = "Poser"; + + // Make sure the alias is unique: + %isUnique = true; + %count = ClientGroup.getCount(); + for ( %i = 0; %i < %count; %i++ ) + { + %test = ClientGroup.getObject( %i ); + %rawName = stripChars( detag( getTaggedString( %test.name ) ), "\cp\co\c6\c7\c8\c9" ); + if ( strcmp( %name, %rawName ) == 0 ) + { + %isUnique = false; + break; + } + } - %client.name = addTaggedString(%name); - if(%client.isSmurf) - %client.nameBase = %smurfName; - else - %client.nameBase = %realName; + // Append a number to make the alias unique: + if ( !%isUnique ) + { + %suffix = 1; + while ( !%isUnique ) + { + %nameTry = %name @ "." @ %suffix; + %isUnique = true; - // Make sure that the connecting client is not trying to use a bot skin: - %temp = detag( %skin ); - if ( %temp $= "basebot" || %temp $= "basebbot" ) - %client.skin = addTaggedString( "base" ); - else - %client.skin = addTaggedString( %skin ); + %count = ClientGroup.getCount(); + for ( %i = 0; %i < %count; %i++ ) + { + %test = ClientGroup.getObject( %i ); + %rawName = stripChars( detag( getTaggedString( %test.name ) ), "\cp\co\c6\c7\c8\c9" ); + if ( strcmp( %nameTry, %rawName ) == 0 ) + { + %isUnique = false; + break; + } + } - %client.voice = %voice; - %client.voiceTag = addtaggedString(%voice); - - //set the voice pitch based on a lookup table from their chosen voice - %client.voicePitch = getValidVoicePitch(%voice, %voicePitch); - } + %suffix++; + } + + // Success! + %name = %nameTry; + } + + %smurfName = %name; + // Tag the name with the "smurf" color: + %name = "\cp\c8" @ %name @ "\co"; + } + + %client.name = addTaggedString(%name); + if(%client.isSmurf) + %client.nameBase = %smurfName; + else + %client.nameBase = %realName; + + // Make sure that the connecting client is not trying to use a bot skin: + %temp = detag( %skin ); + if ( %temp $= "basebot" || %temp $= "basebbot" ) + %client.skin = addTaggedString( "base" ); + else + %client.skin = addTaggedString( %skin ); + + %client.voice = %voice; + %client.voiceTag = addtaggedString(%voice); + + //set the voice pitch based on a lookup table from their chosen voice + %client.voicePitch = getValidVoicePitch(%voice, %voicePitch); + } %client.justConnected = true; %client.isReady = false; @@ -567,6 +707,7 @@ function GameConnection::onConnect( %client, %name, %raceGender, %skin, %voice, if($missionRunning) %client.startMission(); $HostGamePlayerCount++; + %client.demoJustJoined = true; } function GameConnection::onDrop(%client, %reason) @@ -588,7 +729,7 @@ function GameConnection::onDrop(%client, %reason) $HostGamePlayerCount--; // reset the server if everyone has left the game - if( $HostGamePlayerCount - $HostGameBotCount == 0 && $Host::Dedicated) + if( $HostGamePlayerCount - $HostGameBotCount == 0 && $Host::Dedicated && !$resettingServer && !$LoadingMission ) schedule(0, 0, "resetServerDefaults"); } @@ -609,8 +750,12 @@ function dismountPlayers() function loadMission( %missionName, %missionType, %firstMission ) { + $LoadingMission = true; + disableCyclingConnections(true); if (!$pref::NoClearConsole) cls(); + if ( isObject( LoadingGui ) ) + LoadingGui.gotLoadInfo = ""; buildLoadInfo( %missionName, %missionType ); // reset all of these @@ -626,9 +771,7 @@ function loadMission( %missionName, %missionType, %firstMission ) { %client = ClientGroup.getObject( %cl ); if ( !%client.isAIControlled() ) - { sendLoadInfoToClient( %client ); - } } // allow load condition to exit out @@ -779,7 +922,8 @@ function loadMissionStage2() if( $LaunchMode $= "SpnBuild" ) buildNavigationGraph( "Spn" ); purgeResources(); - + disableCyclingConnections(false); + $LoadingMission = false; } @@ -974,23 +1118,8 @@ function serverSetClientTeamState( %client ) } } else - { - %client.camera.getDataBlock().setMode( %client.camera, "ObserverFly" ); - - if( !$MatchStarted && !$CountdownStarted) - { - if($TeamDamage) - %damMess = "ENABLED"; - else - %damMess = "DISABLED"; - - if(Game.numTeams > 1) - BottomPrint(%client, "Server is Running in Tournament Mode.\nPick a Team\nTeam Damage is " @ %damMess, 0, 3 ); - } - else - { - BottomPrint( %client, "\nServer is Running in Tournament Mode", 0, 3 ); - } + { + // don't need to do anything. MissionDrop will handle things from here. } } @@ -1022,7 +1151,6 @@ function HideHudHACK(%visible) hudClusterBack.setVisible(%visible); inventoryHud.setVisible(%visible); clockHUD.setVisible(%visible); - lagHudIndicator.setVisible(false); } function ServerPlay2D(%profile) @@ -1291,15 +1419,15 @@ function serverCmdClientAddToGame( %client, %targetClient ) } else { - %client.notReady = true; - %client.camera.getDataBlock().setMode( %client.camera, "pre-game", %client.player ); - %client.setControlObject( %client.camera ); + %targetClient.notReady = true; + %targetClient.camera.getDataBlock().setMode( %targetClient.camera, "pre-game", %targetClient.player ); + %targetClient.setControlObject( %targetClient.camera ); } if($Host::TournamentMode && !$CountdownStarted) { - %client.notReady = true; - centerprint( %client, "\nPress FIRE when ready.", 0, 3 ); + %targetClient.notReady = true; + centerprint( %targetClient, "\nPress FIRE when ready.", 0, 3 ); } } @@ -1323,10 +1451,6 @@ function serverCmdChangePlayersTeam( %clientRequesting, %client, %team) { if( isObject( Game ) && %client != Game.kickClient && %clientRequesting.isAdmin) { - // clear the pickteam menu - if( !$MatchStarted && $Host::TournamentMode && !$CountdownStarted && %client.camera.Mode $= "pickingTeam" ) - commandToClient( %client, 'processPickTeam' ); - serverCmdClientJoinTeam(%client, %team); if(!$MatchStarted) @@ -1372,12 +1496,12 @@ function serverCmdTogglePlayerMute(%client, %who) if (%client.muted[%who]) { %client.muted[%who] = false; - messageClient(%client, 'MsgPlayerUnmuted', '%1 has been unmuted.', %who.name); + messageClient(%client, 'MsgPlayerMuted', '%1 has been unmuted.', %who.name, %who, false); } else { %client.muted[%who] = true; - messageClient(%client, 'MsgPlayerMuted', '%1 has been muted.', %who.name); + messageClient(%client, 'MsgPlayerMuted', '%1 has been muted.', %who.name, %who, true); } } @@ -1874,18 +1998,38 @@ function CancelEndCountdown() function resetServerDefaults() { + $resettingServer = true; echo( "Resetting server defaults..." ); - allowConnections( false );// no connections when resetting the server - if( isObject( Game ) ) Game.gameOver(); - else - schedule( 500, 0, "resetServerDefaults" ); // Override server defaults with prefs: exec( "scripts/ServerDefaults.cs" ); - exec( "prefs/ServerPrefs.cs" ); + exec( $serverprefs ); + + //convert the team skin and name vars to tags... + %index = 0; + while ($Host::TeamSkin[%index] !$= "") + { + $TeamSkin[%index] = addTaggedString($Host::TeamSkin[%index]); + %index++; + } + + %index = 0; + while ($Host::TeamName[%index] !$= "") + { + $TeamName[%index] = addTaggedString($Host::TeamName[%index]); + %index++; + } + + // Get the hologram names from the prefs... + %index = 1; + while ( $Host::holoName[%index] !$= "" ) + { + $holoName[%index] = $Host::holoName[%index]; + %index++; + } // kick all bots... removeAllBots(); @@ -1894,20 +2038,19 @@ function resetServerDefaults() if( $Host::botsEnabled ) initGameBots( $Host::Map, $Host::MissionType ); - // load the mission + // load the missions loadMission( $Host::Map, $Host::MissionType ); - - // allow connections since were ready to go. - allowConnections( true ); + $resettingServer = false; + echo( "Server reset complete." ); } function removeAllBots() { while( ClientGroup.getCount() ) - { - %client = ClientGroup.getObject(0); - if(%client.isAIControlled()) - %client.drop(); + { + %client = ClientGroup.getObject(0); + if(%client.isAIControlled()) + %client.drop(); else %client.delete(); } diff --git a/base/scripts/serverAudio.cs b/base/scripts/serverAudio.cs index 7e85a00..c533572 100644 --- a/base/scripts/serverAudio.cs +++ b/base/scripts/serverAudio.cs @@ -23,6 +23,7 @@ datablock AudioDescription(ProjectileLooping3d) minDistance= 5.0; MaxDistance= 20.0; type = $EffectAudioType; + environmentLevel = 1.0; }; datablock AudioDescription(ClosestLooping3d) @@ -34,6 +35,7 @@ datablock AudioDescription(ClosestLooping3d) minDistance= 5.0; MaxDistance= 30.0; type = $EffectAudioType; + environmentLevel = 1.0; }; datablock AudioDescription(CloseLooping3d) @@ -45,6 +47,7 @@ datablock AudioDescription(CloseLooping3d) minDistance= 10.0; MaxDistance= 50.0; type = $EffectAudioType; + environmentLevel = 1.0; }; datablock AudioDescription(AudioDefaultLooping3d) @@ -56,6 +59,7 @@ datablock AudioDescription(AudioDefaultLooping3d) minDistance= 20.0; MaxDistance= 100.0; type = $EffectAudioType; + environmentLevel = 1.0; }; datablock AudioDescription(AudioClosest3d) @@ -67,6 +71,7 @@ datablock AudioDescription(AudioClosest3d) minDistance= 5.0; MaxDistance= 30.0; type = $EffectAudioType; + environmentLevel = 1.0; }; datablock AudioDescription(AudioClose3d) @@ -78,6 +83,7 @@ datablock AudioDescription(AudioClose3d) minDistance= 10.0; MaxDistance= 60.0; type = $EffectAudioType; + environmentLevel = 1.0; }; datablock AudioDescription(AudioDefault3d) @@ -89,6 +95,7 @@ datablock AudioDescription(AudioDefault3d) minDistance= 20.0; MaxDistance= 100.0; type = $EffectAudioType; + environmentLevel = 1.0; }; datablock AudioDescription(AudioExplosion3d) @@ -101,6 +108,7 @@ datablock AudioDescription(AudioExplosion3d) minDistance= 20.0; MaxDistance= 150.0; type = $EffectAudioType; + environmentLevel = 1.0; }; datablock AudioDescription(AudioBomb3d) @@ -113,6 +121,7 @@ datablock AudioDescription(AudioBomb3d) minDistance= 80.0; MaxDistance= 250.0; type = $EffectAudioType; + environmentLevel = 1.0; }; datablock AudioDescription(AudioBIGExplosion3d) @@ -125,6 +134,7 @@ datablock AudioDescription(AudioBIGExplosion3d) minDistance= 50.0; MaxDistance= 250.0; type = $EffectAudioType; + environmentLevel = 1.0; }; datablock AudioDescription(AudioLooping2D) @@ -134,6 +144,7 @@ datablock AudioDescription(AudioLooping2D) isLooping = true; is3D = false; type = $EffectAudioType; + environmentLevel = 1.0; }; datablock AudioDescription(Audio2D) @@ -143,6 +154,26 @@ datablock AudioDescription(Audio2D) isLooping = false; is3D = false; type = $EffectAudioType; + environmentLevel = 1.0; }; +// Audio Environment Settings --- Used for EAX and EAX2 sounds // + +datablock AudioEnvironment(Underwater) +{ + useRoom = true; + room = UNDERWATER; +}; + +datablock AudioEnvironment(BigRoom) +{ + useRoom = true; + room = CAVE; +}; + +datablock AudioEnvironment(SmallRoom) +{ + useRoom = true; + room = HALLWAY; +}; diff --git a/base/scripts/serverCommanderMap.cs b/base/scripts/serverCommanderMap.cs index f60c3a8..1f93d48 100644 --- a/base/scripts/serverCommanderMap.cs +++ b/base/scripts/serverCommanderMap.cs @@ -101,7 +101,10 @@ function serverCmdControlObject(%client, %targetId) //------------------------------------------------------------------------------ function resetControlObject(%client) { - if((%client.player != 0) && !%client.player.isDestroyed() && $MatchStarted) + if( isObject( %client.comCam ) ) + %client.comCam.delete(); + + if(isObject(%client.player) && !%client.player.isDestroyed() && $MatchStarted) %client.setControlObject(%client.player); else %client.setControlObject(%client.camera); @@ -111,14 +114,27 @@ function serverCmdResetControlObject(%client) { resetControlObject(%client); commandToClient(%client, 'ControlObjectReset'); + commandToClient(%client, 'RemoveReticle'); + + if(isObject(%client.player)) + { + %weapon = %client.player.getMountedImage($WeaponSlot); + %client.setWeaponsHudActive(%weapon.item); + } } function serverCmdAttachCommanderCamera(%client, %target) { + // dont allow observing until match has started + if(!$MatchStarted) + { + commandToClient(%client, 'CameraAttachResponse', false); + return; + } + %obj = getTargetObject(%target); if((%obj == -1) || (%target == -1)) { - resetControlObject(%client); commandToClient(%client, 'CameraAttachResponse', false); return; } @@ -129,7 +145,7 @@ function serverCmdAttachCommanderCamera(%client, %target) commandToClient(%client, 'CameraAttachResponse', false); return; } - + // can be observed? if(!%obj.getDataBlock() || !%obj.getDataBlock().canObserve) { @@ -157,8 +173,9 @@ function serverCmdAttachCommanderCamera(%client, %target) %player = %obj.player; if(%obj == %client) { - if((%player != 0) && !%player.isDestroyed()) + if(isObject(%player) && !%player.isDestroyed()) { + %client.setControlObject(%player); commandToClient(%client, 'CameraAttachResponse', true); return; @@ -168,7 +185,7 @@ function serverCmdAttachCommanderCamera(%client, %target) %obj = %player; } - if((%obj == 0) || %obj.isDestroyed()) + if(!isObject(%obj) || %obj.isDestroyed()) { commandToClient(%client, 'CameraAttachResponse', false); return; @@ -182,9 +199,22 @@ function serverCmdAttachCommanderCamera(%client, %target) // don't set the camera mode so that it does not interfere with spawning %transform = %obj.getTransform(); - %client.camera.setTransform(%transform); - %client.camera.setOrbitMode(%obj, %transform, %obsX, %obsY, %obsZ); - %client.setControlObject(%client.camera); + + // create a fresh camera to observe through... (could add to a list on + // the observed camera to be removed when that object dies/...) + if( !isObject( %client.comCam ) ) + { + %client.comCam = new Camera() + { + dataBlock = CommanderCamera; + }; + MissionCleanup.add(%client.comCam); + } + + %client.comCam.setTransform(%transform); + %client.comCam.setOrbitMode(%obj, %transform, %obsX, %obsY, %obsZ); + + %client.setControlObject(%client.comCam); commandToClient(%client, 'CameraAttachResponse', true); } diff --git a/base/scripts/serverDefaults.cs b/base/scripts/serverDefaults.cs index 77a9667..1c168b1 100644 --- a/base/scripts/serverDefaults.cs +++ b/base/scripts/serverDefaults.cs @@ -1,26 +1,26 @@ -$teamSkin[0] = 'blank'; -$teamSkin[1] = 'base'; -$teamSkin[2] = 'baseb'; -$teamSkin[3] = 'swolf'; -$teamSkin[4] = 'dsword'; -$teamSkin[5] = 'beagle'; -$teamSkin[6] = 'cotp'; +$Host::teamSkin[0] = "blank"; +$Host::teamSkin[1] = "base"; +$Host::teamSkin[2] = "baseb"; +$Host::teamSkin[3] = "swolf"; +$Host::teamSkin[4] = "dsword"; +$Host::teamSkin[5] = "beagle"; +$Host::teamSkin[6] = "cotp"; -$teamName[0] = 'Unassigned'; -$teamName[1] = 'Storm'; -$teamName[2] = 'Inferno'; -$teamName[3] = 'Star Wolf'; -$teamName[4] = 'Diamond Sword'; -$teamName[5] = 'Blood Eagle'; -$teamName[6] = 'Phoenix'; +$Host::teamName[0] = "Unassigned"; +$Host::teamName[1] = "Storm"; +$Host::teamName[2] = "Inferno"; +$Host::teamName[3] = "Star Wolf"; +$Host::teamName[4] = "Diamond Sword"; +$Host::teamName[5] = "Blood Eagle"; +$Host::teamName[6] = "Phoenix"; -$holoName[0] = ""; -$holoName[1] = "Storm"; -$holoName[2] = "Inferno"; -$holoName[3] = "Starwolf"; -$holoName[4] = "DSword"; -$holoName[5] = "BloodEagle"; -$holoName[6] = "Harbinger"; +$Host::holoName[0] = ""; +$Host::holoName[1] = "Storm"; +$Host::holoName[2] = "Inferno"; +$Host::holoName[3] = "Starwolf"; +$Host::holoName[4] = "DSword"; +$Host::holoName[5] = "BloodEagle"; +$Host::holoName[6] = "Harbinger"; $Host::AdminList = ""; // all players that will be automatically an admin upon joining server $Host::SuperAdminList = ""; // all players that will be automatically a super admin upon joining server @@ -29,9 +29,13 @@ $Host::Port = 28000; $Host::GameName = "Tribes 2 Server"; $Host::Password = ""; $Host::AdminPassword = ""; +$Host::PureServer = 1; $Host::Dedicated = 0; $Host::MissionType = "CTF"; -$Host::Map = "Katabatic"; +if (!isDemo()) + $Host::Map = "Katabatic"; +else + $Host::Map = "SlapDash"; $Host::MaxPlayers = 64; $Host::TimeLimit = 30; $Host::BotCount = 2; @@ -40,7 +44,7 @@ $Host::MinBotDifficulty = 0.5; $Host::MaxBotDifficulty = 0.75; $Host::Info = "This is a Tribes 2 Server."; $Host::NoSmurfs = 0; -$Host::VoteTime = 20; // amount of time before votes are calculated +$Host::VoteTime = 30; // amount of time before votes are calculated $Host::VotePassPercent = 60; // percent needed to pass a vote $Host::KickBanTime = 300; // specified in seconds $Host::BanTime = 1800; // specified in seconds @@ -56,7 +60,8 @@ $Host::TeamDamageOn = 0; $MasterServerAddress = "IP:198.74.40.152:28000"; // 0: .v12 (1.2 kbits/sec), 1: .v24 (2.4 kbits/sec), 2: .v29 (2.9kbits/sec) -$Audio::maxEncodingLevel = 2; +// 3: GSM (6.6 kbits/sec) +$Audio::maxEncodingLevel = 3; $Audio::maxVoiceChannels = 2; $Host::MapPlayerLimits["Abominable", "CnH"] = "-1 32"; diff --git a/base/scripts/staticShape.cs b/base/scripts/staticShape.cs index d4f41fb..20c42ca 100644 --- a/base/scripts/staticShape.cs +++ b/base/scripts/staticShape.cs @@ -769,9 +769,18 @@ function StaticShapeData::damageObject(%data, %targetObject, %sourceObject, %pos if(%sourceObject) { - %targetObject.lastDamagedBy = %sourceObject.client; - %targetObject.lastDamagedByTeam = %sourceObject.client.team; - %targetObject.damageTimeMS = GetSimTime(); + if(%sourceObject.client) + { + %targetObject.lastDamagedBy = %sourceObject.client; + %targetObject.lastDamagedByTeam = %sourceObject.client.team; + %targetObject.damageTimeMS = GetSimTime(); + } + else + { + %targetObject.lastDamagedBy = %sourceObject; + %targetObject.lastDamagedByTeam = %sourceObject.team; + %targetObject.damageTimeMS = GetSimTime(); + } } // Scale damage type & include shield calculations... @@ -786,17 +795,17 @@ function StaticShapeData::damageObject(%data, %targetObject, %sourceObject, %pos if (!$TeamDamage && !%targetObject.getDataBlock().deployedObject) { //see if the object is being shot by a friendly - %srcClient = %sourceObject.client; - if (isObject(%srcClient)) - { - if (isTargetFriendly(%targetObject.getTarget() , %srcClient.getSensorGroup())) - { - %curDamage = %targetObject.getDamageLevel(); - %availableDamage = %targetObject.getDataBlock().disabledLevel - %curDamage - 0.05; - if (%amount > %availableDamage) - %amount = %availableDamage; - } - } + if(%sourceObject.getDataBlock().catagory $= "Vehicles") + %attackerTeam = getVehicleAttackerTeam(%sourceObject); + else %attackerTeam = %sourceObject.team; + + if (isTargetFriendly(%targetObject.getTarget(), %attackerTeam)) + { + %curDamage = %targetObject.getDamageLevel(); + %availableDamage = %targetObject.getDataBlock().disabledLevel - %curDamage - 0.05; + if (%amount > %availableDamage) + %amount = %availableDamage; + } } // if there's still damage to apply @@ -804,6 +813,22 @@ function StaticShapeData::damageObject(%data, %targetObject, %sourceObject, %pos %targetObject.applyDamage(%amount); } +// little special casing for the above function +function getVehicleAttackerTeam(%vehicleId) +{ + %name = %vehicleId.getDataBlock().getName(); + if(%name $= "BomberFlyer" || %name $= "AssaultVehicle") + %gunner = %vehicleId.getMountNodeObject(1); + else + %gunner = %vehicleId.getMountNodeObject(0); + + if(%gunner) + return %gunner.team; + + return %vehicleId.team; +} + + function StaticShapeData::onDamage(%this,%obj) { // Set damage state based on current damage level diff --git a/base/scripts/turret.cs b/base/scripts/turret.cs index d33ed5b..3212218 100644 --- a/base/scripts/turret.cs +++ b/base/scripts/turret.cs @@ -232,40 +232,28 @@ function TurretData::selectTarget(%this, %turret) function TurretData::replaceCallback(%this, %turret, %engineer) { - // First, is the player in range? - %pos = %turret.getWorldBoxCenter(); - %engineerPos = %engineer.getWorldBoxCenter(); - %len = VectorLen(VectorSub(%pos, %engineerPos)); - - if (%len < 5) + // This is a valid replacement. First, let's see if the engineer + // still has the correct pack in place... + if (%engineer.getMountedImage($BackPackSlot) != 0) { - // This is a valid replacement. First, let's see if the engineer - // still has the correct pack in place... - if (%engineer.getMountedImage($BackPackSlot) != 0) + %barrel = %engineer.getMountedImage($BackPackSlot).turretBarrel; + if (%barrel !$= "") { - %barrel = %engineer.getMountedImage($BackPackSlot).turretBarrel; - if (%barrel !$= "") - { - // if there was a barrel there before, get rid of it - %turret.unmountImage(0); - // remove the turret barrel pack - %engineer.setInventory(%engineer.getMountedImage($BackPackSlot).item, 0); - // mount new barrel on base - %turret.mountImage(%barrel, 0, false); - } - else - { - // Player doesn't have the correct pack on... - } + // if there was a barrel there before, get rid of it + %turret.unmountImage(0); + // remove the turret barrel pack + %engineer.setInventory(%engineer.getMountedImage($BackPackSlot).item, 0); + // mount new barrel on base + %turret.mountImage(%barrel, 0, false); } else { - // Player doesn't have any pack on... + // Player doesn't have the correct pack on... } } else { - // Player is too far away to replace the barrel... + // Player doesn't have any pack on... } } diff --git a/base/scripts/turrets/ELFBarrelLarge.cs b/base/scripts/turrets/ELFBarrelLarge.cs index 097e6a8..78c2de7 100644 --- a/base/scripts/turrets/ELFBarrelLarge.cs +++ b/base/scripts/turrets/ELFBarrelLarge.cs @@ -74,6 +74,8 @@ datablock TurretImageData(ELFBarrelLarge) degPerSecPhi = 960; attackRadius = 75; + yawVariance = 30.0; // these will smooth out the elf tracking code. + pitchVariance = 30.0; // more or less just tolerances // State transiltions stateName[0] = "Activate"; diff --git a/base/scripts/vehicles/serverVehicleHud.cs b/base/scripts/vehicles/serverVehicleHud.cs index b39f992..01f0a3d 100644 --- a/base/scripts/vehicles/serverVehicleHud.cs +++ b/base/scripts/vehicles/serverVehicleHud.cs @@ -180,12 +180,21 @@ function createVehicle(%client, %station, %blockName, %team , %pos, %rot, %angle //------------------------------------------------------------------------------ function VehicleData::mountDriver(%data, %obj, %player) { - %player.startFade(1000, 0, true); - - %player.getDataBlock().schedule(1000,"onCollision",%player, %obj, 0); - %player.schedule(1500,"startFade",1000, 0, false); + if(isObject(%obj) && %obj.getDamageState() !$= "Destroyed") + { + %player.startFade(1000, 0, true); + schedule(1000, 0, "testVehicleForMount", %player, %obj); + %player.schedule(1500,"startFade",1000, 0, false); + } } +function testVehicleForMount(%player, %obj) +{ + if(isObject(%obj) && %obj.getDamageState() !$= "Destroyed") + %player.getDataBlock().onCollision(%player, %obj, 0); +} + + //------------------------------------------------------------------------------ function VehicleData::checkIfPlayersMounted(%data, %obj) { diff --git a/base/scripts/vehicles/vehicle.cs b/base/scripts/vehicles/vehicle.cs index 73f418d..fbba7a5 100644 --- a/base/scripts/vehicles/vehicle.cs +++ b/base/scripts/vehicles/vehicle.cs @@ -79,7 +79,8 @@ function VehicleData::onDamage(%this,%obj) function VehicleData::playerDismounted(%data, %obj, %player) { - //this function is declared to prevent console error msg spam... + if( %player.client.observeCount > 0 ) + resetObserveFollow( %player.client, true ); } function HoverVehicle::useCreateHeight() @@ -219,12 +220,20 @@ function VehicleData::onLeaveLiquid(%data, %obj, %type) function VehicleData::onDestroyed(%data, %obj, %prevState) { + if(%obj.lastDamagedBy) + { + %destroyer = %obj.lastDamagedBy; + game.vehicleDestroyed(%obj, %destroyer); + //error("vehicleDestroyed( "@ %obj @", "@ %destroyer @")"); + } + radiusVehicleExplosion(%data, %obj); if(%obj.turretObject) if(%obj.turretObject.getControllingClient()) %obj.turretObject.getDataBlock().playerDismount(%obj.turretObject); for(%i = 0; %i < %obj.getDatablock().numMountPoints; %i++) { + echo("damaging objects..."); if (%obj.getMountNodeObject(%i)) { %flingee = %obj.getMountNodeObject(%i); %flingee.getDataBlock().doDismount(%flingee, true); @@ -233,9 +242,12 @@ function VehicleData::onDestroyed(%data, %obj, %prevState) %zVel = (getRandom() * 100.0) + 50.0; %flingVel = %xVel @ " " @ %yVel @ " " @ %zVel; %flingee.applyImpulse(%flingee.getTransform(), %flingVel); - %flingee.damage(0, %obj.getPosition(), 0.4, $DamageType::Explosion); + echo("got player..." @ %flingee.getClassName()); + %flingee.damage(0, %obj.getPosition(), 0.4, $DamageType::Crash); } } + + %data.deleteAllMounted(%obj); %obj.schedule(2000, "delete"); } @@ -356,6 +368,7 @@ function BomberFlyer::onAdd(%this, %obj) %turret.mountImage(BomberBombPairImage, 5); %turret.mountImage(BomberTargetingImage, 6); %obj.turretObject = %turret; + %turret.setCapacitorRechargeRate( %turret.getDataBlock().capacitorRechargeRate ); %turret.vehicleMounted = %obj; //vehicle turrets should not auto fire at targets @@ -396,8 +409,9 @@ function AssaultVehicle::onAdd(%this, %obj) %obj.mountObject(%turret, 10); %turret.mountImage(AssaultPlasmaTurretBarrel, 2); %turret.mountImage(AssaultMortarTurretBarrel, 4); + %turret.setCapacitorRechargeRate( %turret.getDataBlock().capacitorRechargeRate ); %obj.turretObject = %turret; - + //vehicle turrets should not auto fire at targets %turret.setAutoFire(false); @@ -471,6 +485,7 @@ function BomberFlyer::deleteAllMounted(%data, %obj) %client.player.mountVehicle = false; %client.player.bomber = false; + %client.player.isBomber = false; } %turret.delete(); } @@ -522,6 +537,10 @@ function ScoutFlyer::playerMounted(%data, %obj, %player, %node) // scout flyer == SUV (single-user vehicle) commandToClient(%player.client, 'setHudMode', 'Pilot', "Shrike", %node); $numVWeapons = 1; + + // update observers who are following this guy... + if( %player.client.observeCount > 0 ) + resetObserveFollow( %player.client, false ); } //---------------------------- @@ -556,6 +575,7 @@ function BomberFlyer::playerMounted(%data, %obj, %player, %node) commandToClient(%player.client,'SetWeaponryVehicleKeys', true); commandToClient(%player.client, 'setHudMode', 'Pilot', "Bomber", %node); + %player.isBomber = true; } else { @@ -569,6 +589,10 @@ function BomberFlyer::playerMounted(%data, %obj, %player, %node) for(%i = 0; %i < %data.numMountPoints; %i++) if(%obj.getMountNodeObject(%i) > 0) commandToClient(%obj.getMountNodeObject(%i).client, 'checkPassengers', %passString); + + // update observers who are following this guy... + if( %player.client.observeCount > 0 ) + resetObserveFollow( %player.client, false ); } //---------------------------- @@ -592,6 +616,10 @@ function HAPCFlyer::playerMounted(%data, %obj, %player, %node) for(%i = 0; %i < %data.numMountPoints; %i++) if(%obj.getMountNodeObject(%i) > 0) commandToClient(%obj.getMountNodeObject(%i).client, 'checkPassengers', %passString); + + // update observers who are following this guy... + if( %player.client.observeCount > 0 ) + resetObserveFollow( %player.client, false ); } //---------------------------- @@ -602,6 +630,10 @@ function ScoutVehicle::playerMounted(%data, %obj, %player, %node) { // scout vehicle == SUV (single-user vehicle) commandToClient(%player.client, 'setHudMode', 'Pilot', "Hoverbike", %node); + + // update observers who are following this guy... + if( %player.client.observeCount > 0 ) + resetObserveFollow( %player.client, false ); } //---------------------------- @@ -613,7 +645,7 @@ function AssaultVehicle::playerMounted(%data, %obj, %player, %node) if(%node == 0) { // driver position // is there someone manning the turret? - %turreteer = %obj.getMountedNodeObject(1); + //%turreteer = %obj.getMountedNodeObject(1); commandToClient(%player.client, 'setHudMode', 'Pilot', "Assault", %node); } else if(%node == 1) @@ -639,6 +671,11 @@ function AssaultVehicle::playerMounted(%data, %obj, %player, %node) %obj.getMountNodeObject(10).selectedWeapon = 1; commandToClient(%player.client, 'setHudMode', 'Pilot', "Assault", %node); } + + // update observers who are following this guy... + if( %player.client.observeCount > 0 ) + resetObserveFollow( %player.client, false ); + // build a space-separated string representing passengers // 0 = no passenger; 1 = passenger (e.g. "1 0 ") %passString = buildPassengerString(%obj); @@ -673,9 +710,15 @@ function MobileBaseVehicle::playerMounted(%data, %obj, %player, %node) %obj.station.goingOut=false; %obj.station.notDeployed = 1; %obj.station.playAudio($DeploySound, MobileBaseStationUndeploySound); + + if((%turretClient = %obj.turret.getControllingClient()) !$= "") + { + CommandToServer( 'resetControlObject', %turretClient ); + } + %obj.turret.setThreadDir($DeployThread, false); %obj.turret.clearTarget(); - %obj.turret.setTarget(-1); + %obj.turret.setTargetObject(-1); %obj.turret.playAudio($DeploySound, MobileBaseTurretUndeploySound); %obj.shield.open(); @@ -690,6 +733,10 @@ function MobileBaseVehicle::playerMounted(%data, %obj, %player, %node) %obj.noEnemyControl = 0; } %obj.deployed = 0; + + // update observers who are following this guy... + if( %player.client.observeCount > 0 ) + resetObserveFollow( %player.client, false ); } function buildPassengerString(%vehicle) @@ -709,6 +756,7 @@ function buildPassengerString(%vehicle) function MobileBaseVehicle::playerDismounted(%data, %obj, %player) { %obj.schedule(500, "deployVehicle", %data, %player); + Parent::playerDismounted( %data, %obj, %player ); } function WheeledVehicle::deployVehicle(%obj, %data, %player) @@ -782,8 +830,9 @@ function MobileBaseVehicle::vehicleDeploy(%data, %obj, %player, %force) if(%deployMessage $= "" || %force) { if(%obj.turret.getTarget() == -1) + { %obj.turret.setTarget(%obj.turret.target); - + } %obj.turret.setThreadDir($DeployThread, true); %obj.turret.playThread($DeployThread,"deploy"); %obj.turret.playAudio($DeploySound, MobileBaseTurretDeploySound); @@ -866,9 +915,12 @@ function MobileInvStation::onEndSequence(%data, %obj, %thread) { %obj.notDeployed = 0; %obj.vehicle.fullyDeployed = 1; - %obj.vehicle.teleporter.setThreadDir($ActivateThread, TRUE); - %obj.vehicle.teleporter.playThread($ActivateThread,"activate"); - %obj.vehicle.teleporter.playAudio($ActivateSound, StationTeleportAcitvateSound); + if(isObject(%obj.vehicle.teleporter)) + { + %obj.vehicle.teleporter.setThreadDir($ActivateThread, TRUE); + %obj.vehicle.teleporter.playThread($ActivateThread,"activate"); + %obj.vehicle.teleporter.playAudio($ActivateSound, StationTeleportAcitvateSound); + } } Parent::onEndSequence(%data, %obj, %thread); } @@ -1076,7 +1128,12 @@ function findEmptySeat(%vehicle, %player, %forceNode) %message = '\c2Only Scout or Assault Armors can use that position.~wfx/misc/misc.error.wav'; } - messageClient(%player.client, 'MsgArmorCantMountVehicle', %message); + if(!%player.noSitMessage) + { + %player.noSitMessage = true; + %player.schedule(2000, "resetSitMessage"); + messageClient(%player.client, 'MsgArmorCantMountVehicle', %message); + } %node = -1; } return %node; @@ -1094,8 +1151,21 @@ function findFirstHeavyNode(%data) //* DAMAGE FUNCTIONS //************************************************************** -function VehicleData::damageObject(%data, %targetObject, %sourceObject, %position, %amount, %damageType, %momVec) +function VehicleData::damageObject(%data, %targetObject, %sourceObject, %position, %amount, %damageType, %momVec, %theClient, %proj) { + if(%proj !$= "") + { + if(%amount > 0 && %targetObject.lastDamageProj !$= %proj) + { + %targetObject.lastDamageProj = %proj; + %targetObject.lastDamageAmount = %amount; + } + else if(%targetObject.lastDamageAmount < %amount) + %amount = %amount - %targetObject.lastDamageAmount; + else + return; + } + // check for team damage %sourceClient = %sourceObject ? %sourceObject.getOwnerClient() : 0; %targetTeam = getTargetSensorGroup(%targetObject.getTarget()); @@ -1107,8 +1177,18 @@ function VehicleData::damageObject(%data, %targetObject, %sourceObject, %positio else %sourceTeam = %sourceObject ? getTargetSensorGroup(%sourceObject.getTarget()) : -1; - if(!$teamDamage && (%targetTeam == %sourceTeam) && %targetObject.getDamagePercent() > 0.5) - return; + // vehicles no longer obey team damage -JR +// if(!$teamDamage && (%targetTeam == %sourceTeam) && %targetObject.getDamagePercent() > 0.5) +// return; + //but we do want to track the destroyer + if(%sourceObject) + { + %targetObject.lastDamagedBy = %sourceObject; + %targetObject.lastDamageType = %damageType; + } + else + %targetObject.lastDamagedBy = 0; + // Scale damage type & include shield calculations... if (%data.isShielded) diff --git a/base/scripts/vehicles/vehicle_bomber.cs b/base/scripts/vehicles/vehicle_bomber.cs index ac82c7b..6870619 100644 --- a/base/scripts/vehicles/vehicle_bomber.cs +++ b/base/scripts/vehicles/vehicle_bomber.cs @@ -157,7 +157,7 @@ datablock FlyingVehicleData(BomberFlyer) : BomberDamageProfile maxSteeringAngle = 5; // Max radiens you can rotate the wheel. Smaller number is more maneuverable. horizontalSurfaceForce = 5; // Horizontal center "wing" (provides "bite" into the wind for climbing/diving and turning) verticalSurfaceForce = 8; // Vertical center "wing" (controls side slip. lower numbers make MORE slide.) - maneuveringForce = 4700; // Horizontal jets (W,S,D,A key thrust) + maneuveringForce = 4500; // Horizontal jets (W,S,D,A key thrust) steeringForce = 1100; // Steering jets (force applied when you move the mouse) steeringRollForce = 300; // Steering jets (how much you heel over when you turn) rollForce = 8; // Auto-roll (self-correction to right you after you roll/invert) @@ -165,10 +165,10 @@ datablock FlyingVehicleData(BomberFlyer) : BomberDamageProfile createHoverHeight = 3; // Height off the ground when created // Turbo Jet - jetForce = 3000; // Afterburner thrust (this is in addition to normal thrust) + jetForce = 2000; // Afterburner thrust (this is in addition to normal thrust) minJetEnergy = 40.0; // Afterburner can't be used if below this threshhold. jetEnergyDrain = 3.0; // Energy use of the afterburners (low number is less drain...can be fractional) - vertThrustMultiple = 2.0; + vertThrustMultiple = 3.0; dustEmitter = LargeVehicleLiftoffDustEmitter; triggerDustHeight = 4.0; @@ -327,31 +327,31 @@ datablock ExplosionData(BomberFusionBoltExplosion) datablock LinearFlareProjectileData(BomberFusionBolt) { - projectileShapeName = ""; - directDamage = 0.35; - directDamageType = $DamageType::BellyTurret; - hasDamageRadius = false; - explosion = BomberFusionBoltExplosion; - sound = BlasterProjectileSound; + projectileShapeName = ""; + directDamage = 0.35; + directDamageType = $DamageType::BellyTurret; + hasDamageRadius = false; + explosion = BomberFusionBoltExplosion; + sound = BlasterProjectileSound; - dryVelocity = 200.0; - wetVelocity = 200.0; - velInheritFactor = 1.0; - fizzleTimeMS = 2000; - lifetimeMS = 3000; - explodeOnDeath = false; - reflectOnWaterImpactAngle = 0.0; - explodeOnWaterImpact = true; - deflectionOnWaterImpact = 0.0; - fizzleUnderwaterMS = -1; + dryVelocity = 200.0; + wetVelocity = 200.0; + velInheritFactor = 1.0; + fizzleTimeMS = 2000; + lifetimeMS = 3000; + explodeOnDeath = false; + reflectOnWaterImpactAngle = 0.0; + explodeOnWaterImpact = true; + deflectionOnWaterImpact = 0.0; + fizzleUnderwaterMS = -1; - activateDelayMS = 100; + activateDelayMS = 100; - numFlares = 0; - size = 0.15; - flareColor = "0.7 0.3 1.0"; - flareModTexture = "flaremod"; - flareBaseTexture = "flarebase"; + numFlares = 0; + size = 0.15; + flareColor = "0.7 0.3 1.0"; + flareModTexture = "flaremod"; + flareBaseTexture = "flarebase"; }; //------------------------------------- @@ -360,119 +360,178 @@ datablock LinearFlareProjectileData(BomberFusionBolt) datablock TurretData(BomberTurret) : TurretDamageProfile { - className = VehicleTurret; - catagory = "Turrets"; - shapeFile = "turret_belly_base.dts"; - preload = true; + className = VehicleTurret; + catagory = "Turrets"; + shapeFile = "turret_belly_base.dts"; + preload = true; - mass = 1.0; // Not really relevant - repairRate = 0; - maxDamage = BomberFlyer.maxDamage; - destroyedLevel = BomberFlyer.destroyedLevel; + mass = 1.0; // Not really relevant + repairRate = 0; + maxDamage = BomberFlyer.maxDamage; + destroyedLevel = BomberFlyer.destroyedLevel; - thetaMin = 90; - thetaMax = 180; + thetaMin = 90; + thetaMax = 180; + + // capacitor + maxCapacitorEnergy = 250; + capacitorRechargeRate = 0.8; - inheritEnergyFromMount = true; - firstPersonOnly = true; - useEyePoint = true; - numWeapons = 3; + inheritEnergyFromMount = true; + firstPersonOnly = true; + useEyePoint = true; + numWeapons = 3; - targetNameTag = 'Thundersword Belly'; - targetTypeTag = 'Turret'; + targetNameTag = 'Thundersword Belly'; + targetTypeTag = 'Turret'; }; -datablock TurretImageData(BomberTurretBarrelPair) +datablock TurretImageData(BomberTurretBarrel) { - shapeFile = "turret_belly_barrell.dts"; - mountPoint = 0; + shapeFile = "turret_belly_barrell.dts"; + mountPoint = 0; - projectile = BomberFusionBolt; - projectileType = LinearFlareProjectile; + projectile = BomberFusionBolt; + projectileType = LinearFlareProjectile; - usesEnergy = true; - useMountEnergy = true; - fireEnergy = 6.25; - minEnergy = 25.0; + usesEnergy = true; + useCapacitor = true; + useMountEnergy = true; + fireEnergy = 16.0; + minEnergy = 16.0; // Turret parameters - activationMS = 1000; - deactivateDelayMS = 1500; - thinkTimeMS = 200; - degPerSecTheta = 360; - degPerSecPhi = 360; + activationMS = 1000; + deactivateDelayMS = 1500; + thinkTimeMS = 200; + degPerSecTheta = 360; + degPerSecPhi = 360; - attackRadius = 75; + attackRadius = 75; // State transitions - stateName[0] = "Activate"; - stateTransitionOnTimeout[0] = "WaitFire"; - stateTimeoutValue[0] = 0.5; - stateSequence[0] = "Activate"; - stateSound[0] = BomberTurretActivateSound; + stateName[0] = "Activate"; + stateTransitionOnTimeout[0] = "WaitFire1"; + stateTimeoutValue[0] = 0.5; + stateSequence[0] = "Activate"; + stateSound[0] = BomberTurretActivateSound; - stateName[1] = "WaitFire"; - stateTransitionOnTriggerDown[1] = "InitFire"; - stateTransitionOnNoAmmo[1] = "NoAmmo"; -// stateSound[1] = BomberTurretIdleSound; + stateName[1] = "WaitFire1"; + stateTransitionOnTriggerDown[1] = "Fire1"; + stateTransitionOnNoAmmo[1] = "NoAmmo1"; - stateName[2] = "InitFire"; - stateWaitForTimeout[2] = false; - stateTransitionOnTimeout[2] = "Fire"; - - stateName[3] = "Fire"; - stateTransitionOnTimeout[3] = "Reload"; - stateTimeoutValue[3] = 0.35; - stateFire[3] = true; - stateRecoil[3] = LightRecoil; - stateAllowImageChange[3] = false; - stateSequence[3] = "Fire"; - stateScript[3] = "onFire"; - stateSound[3] = BomberTurretFireSound; + stateName[2] = "Fire1"; + stateTransitionOnTimeout[2] = "Reload1"; + stateTimeoutValue[2] = 0.13; + stateFire[2] = true; + stateRecoil[2] = LightRecoil; + stateAllowImageChange[2] = false; + stateSequence[2] = "Fire"; + stateScript[2] = "onFire"; + stateSound[2] = BomberTurretFireSound; - stateName[4] = "Reload"; - stateTimeoutValue[4] = 0.05; - stateAllowImageChange[4] = false; - stateSequence[4] = "Reload"; - stateTransitionOnTimeout[4] = "WaitFire"; - stateTransitionOnNotLoaded[4] = "NoAmmo"; -// stateSound[4] = BomberTurretReloadSound; + stateName[3] = "Reload1"; + stateSequence[3] = "Reload"; + stateTimeoutValue[3] = 0.1; + stateAllowImageChange[3] = false; + stateTransitionOnTimeout[3] = "WaitFire2"; + stateTransitionOnNoAmmo[3] = "NoAmmo1"; - stateName[5] = "NoAmmo"; - stateTransitionOnAmmo[5] = "Reload"; - stateSequence[5] = "NoAmmo"; - stateTransitionOnTriggerDown[5] = "DryFire"; + stateName[4] = "NoAmmo1"; + stateTransitionOnAmmo[4] = "Reload1"; + stateSequence[4] = "NoAmmo"; + stateTransitionOnTriggerDown[4] = "DryFire1"; - stateName[6] = "DryFire"; - stateSound[6] = BomberTurretDryFireSound; - stateTimeoutValue[6] = 1.5; - stateTransitionOnTimeout[6] = "NoAmmo"; + stateName[5] = "DryFire1"; + stateSound[5] = BomberTurretDryFireSound; + stateTimeoutValue[5] = 0.5; + stateTransitionOnTimeout[5] = "NoAmmo1"; + stateName[6] = "WaitFire2"; + stateTransitionOnTriggerDown[6] = "Fire2"; + stateTransitionOnNoAmmo[6] = "NoAmmo"; + + stateName[7] = "Fire2"; + stateTransitionOnTimeout[7] = "Reload2"; + stateTimeoutValue[7] = 0.13; + stateScript[7] = "FirePair"; + + stateName[8] = "Reload2"; + stateSequence[8] = "Reload"; + stateTimeoutValue[8] = 0.1; + stateAllowImageChange[8] = false; + stateTransitionOnTimeout[8] = "WaitFire1"; + stateTransitionOnNoAmmo[8] = "NoAmmo2"; + + stateName[9] = "NoAmmo2"; + stateTransitionOnAmmo[9] = "Reload2"; + stateSequence[9] = "NoAmmo"; + stateTransitionOnTriggerDown[9] = "DryFire2"; + + stateName[10] = "DryFire2"; + stateSound[10] = BomberTurretDryFireSound; + stateTimeoutValue[10] = 0.5; + stateTransitionOnTimeout[10] = "NoAmmo2"; + }; -datablock TurretImageData(BomberTurretBarrel) : BomberTurretBarrelPair +datablock TurretImageData(BomberTurretBarrelPair) { - shapeFile = "turret_belly_barrelr.dts"; - mountPoint = 1; - stateScript[2] = "onTriggerDown"; - stateScript[4] = "onTriggerUp"; + shapeFile = "turret_belly_barrelr.dts"; + mountPoint = 1; + + projectile = BomberFusionBolt; + projectileType = LinearFlareProjectile; + + usesEnergy = true; + useCapacitor = true; + useMountEnergy = true; + fireEnergy = 16.0; + minEnergy = 16.0; + + // Turret parameters + activationMS = 1000; + deactivateDelayMS = 1500; + thinkTimeMS = 200; + degPerSecTheta = 360; + degPerSecPhi = 360; + + attackRadius = 75; + + stateName[0] = "WaitFire"; + stateTransitionOnTriggerDown[0] = "Fire"; + + stateName[1] = "Fire"; + stateTransitionOnTimeout[1] = "StopFire"; + stateTimeoutValue[1] = 0.13; + stateFire[1] = true; + stateRecoil[1] = LightRecoil; + stateAllowImageChange[1] = false; + stateSequence[1] = "Fire"; + stateScript[1] = "onFire"; + stateSound[1] = BomberTurretFireSound; + + stateName[2] = "StopFire"; + stateTimeoutValue[2] = 0.1; + stateTransitionOnTimeout[2] = "WaitFire"; + stateScript[2] = "stopFire"; }; datablock TurretImageData(AIAimingTurretBarrel) { - shapeFile = "turret_muzzlepoint.dts"; - mountPoint = 3; + shapeFile = "turret_muzzlepoint.dts"; + mountPoint = 3; - projectile = BomberFusionBolt; + projectile = BomberFusionBolt; // Turret parameters - activationMS = 1000; - deactivateDelayMS = 1500; - thinkTimeMS = 200; - degPerSecTheta = 500; - degPerSecPhi = 800; + activationMS = 1000; + deactivateDelayMS = 1500; + thinkTimeMS = 200; + degPerSecTheta = 500; + degPerSecPhi = 800; - attackRadius = 75; + attackRadius = 75; }; //------------------------------------- @@ -481,29 +540,29 @@ datablock TurretImageData(AIAimingTurretBarrel) datablock BombProjectileData(BomberBomb) { - projectileShapeName = "bomb.dts"; - emitterDelay = -1; - directDamage = 0.0; - hasDamageRadius = true; - indirectDamage = 1.1; - damageRadius = 30; - radiusDamageType = $DamageType::BomberBombs; - kickBackStrength = 2500; + projectileShapeName = "bomb.dts"; + emitterDelay = -1; + directDamage = 0.0; + hasDamageRadius = true; + indirectDamage = 1.1; + damageRadius = 30; + radiusDamageType = $DamageType::BomberBombs; + kickBackStrength = 2500; - explosion = "VehicleBombExplosion"; - velInheritFactor = 1.0; + explosion = "VehicleBombExplosion"; + velInheritFactor = 1.0; - grenadeElasticity = 0.25; - grenadeFriction = 0.4; - armingDelayMS = 2000; - muzzleVelocity = 0.1; - drag = 0.3; + grenadeElasticity = 0.25; + grenadeFriction = 0.4; + armingDelayMS = 2000; + muzzleVelocity = 0.1; + drag = 0.3; - minRotSpeed = "60.0 0.0 0.0"; - maxRotSpeed = "80.0 0.0 0.0"; - scale = "1.0 1.0 1.0"; + minRotSpeed = "60.0 0.0 0.0"; + maxRotSpeed = "80.0 0.0 0.0"; + scale = "1.0 1.0 1.0"; - sound = BomberBombProjectileSound; + sound = BomberBombProjectileSound; }; //------------------------------------- @@ -512,95 +571,134 @@ datablock BombProjectileData(BomberBomb) datablock ItemData(BombAmmo) { - className = Ammo; - catagory = "Ammo"; - shapeFile = "repair_kit.dts"; - mass = 1; - elasticity = 0.2; - friction = 0.6; - pickupRadius = 1; - computeCRC = true; + className = Ammo; + catagory = "Ammo"; + shapeFile = "repair_kit.dts"; + mass = 1; + elasticity = 0.2; + friction = 0.6; + pickupRadius = 1; + computeCRC = true; }; datablock StaticShapeData(DropBombs) { - catagory = "Turrets"; - shapeFile = "bombers_eye.dts"; - maxDamage = 1.0; - disabledLevel = 0.6; - destroyedLevel = 0.8; + catagory = "Turrets"; + shapeFile = "bombers_eye.dts"; + maxDamage = 1.0; + disabledLevel = 0.6; + destroyedLevel = 0.8; }; -datablock ShapeBaseImageData(BomberBombPairImage) +datablock TurretImageData(BomberBombImage) { - className = WeaponImage; - shapeFile = "turret_muzzlepoint.dts"; -// ammo = BombAmmo; - offset = "2 -4 -0.5"; - mountPoint = 10; + shapeFile = "turret_muzzlepoint.dts"; + offset = "2 -4 -0.5"; + mountPoint = 10; - projectile = BomberBomb; - projectileType = BombProjectile; - usesEnergy = true; - useMountEnergy = true; + projectile = BomberBomb; + projectileType = BombProjectile; + usesEnergy = true; + useMountEnergy = true; + useCapacitor = true; - fireEnergy = 37.50; - minEnergy = 37.50; + fireEnergy = 53.0; + minEnergy = 53.0; - stateName[0] = "Activate"; -// stateTransitionOnTimeout[0] = "ActivateReady"; - stateTransitionOnTimeout[0] = "WaitFire"; - stateTimeoutValue[0] = 0.5; - stateSequence[0] = "Activate"; -// stateSound[0] = MortarSwitchSound; - - stateName[1] = "ActivateReady"; - stateTransitionOnLoaded[1] = "WaitFire"; -// stateTransitionOnNoAmmo[1] = "NoAmmo"; - - stateName[2] = "WaitFire"; -// stateSound[2] = BomberBombIdleSound; - stateTransitionOnNoAmmo[2] = "NoAmmo"; - stateTransitionOnTriggerDown[2] = "InitFire"; - - stateName[3] = "InitFire"; - stateWaitForTimeout[3] = false; - stateTransitionOnTimeout[3] = "Fire"; - stateName[4] = "Fire"; - stateTransitionOnTimeout[4] = "Reload"; - stateTimeoutValue[4] = 0.35; - stateFire[4] = true; - stateRecoil[4] = LightRecoil; - stateAllowImageChange[4] = false; - stateScript[4] = "onFire"; - stateSound[4] = BomberBombFireSound; + stateName[0] = "Activate"; + stateTransitionOnTimeout[0] = "WaitFire1"; + stateTimeoutValue[0] = 0.5; + stateSequence[0] = "Activate"; - stateName[5] = "Reload"; - stateTransitionOnNoAmmo[5] = "NoAmmo"; - stateTransitionOnTimeout[5] = "WaitFire"; - stateTimeoutValue[5] = 0.5; - stateAllowImageChange[5] = false; - stateSequence[5] = "Reload"; -// stateSound[5] = BomberBombReloadSound; - - stateName[6] = "NoAmmo"; - stateTransitionOnAmmo[6] = "Reload"; - stateSequence[6] = "NoAmmo"; - stateTransitionOnTriggerDown[6] = "DryFire"; + stateName[1] = "WaitFire1"; + stateTransitionOnTriggerDown[1] = "Fire1"; + stateTransitionOnNoAmmo[1] = "NoAmmo1"; - stateName[7] = "DryFire"; - stateSound[7] = BomberBombDryFireSound; - stateTimeoutValue[7] = 1.5; - stateTransitionOnTimeout[7] = "NoAmmo"; + stateName[2] = "Fire1"; + stateTransitionOnTimeout[2] = "Reload1"; + stateTimeoutValue[2] = 0.32; + stateFire[2] = true; + stateAllowImageChange[2] = false; + stateSequence[2] = "Fire"; + stateScript[2] = "onFire"; + stateSound[2] = BomberBombFireSound; + + stateName[3] = "Reload1"; + stateSequence[3] = "Reload"; + stateTimeoutValue[3] = 0.1; + stateAllowImageChange[3] = false; + stateTransitionOnTimeout[3] = "WaitFire2"; + stateTransitionOnNoAmmo[3] = "NoAmmo1"; + + stateName[4] = "NoAmmo1"; + stateTransitionOnAmmo[4] = "Reload1"; + stateSequence[4] = "NoAmmo"; + stateTransitionOnTriggerDown[4] = "DryFire1"; + + stateName[5] = "DryFire1"; + stateSound[5] = BomberBombDryFireSound; + stateTimeoutValue[5] = 0.5; + stateTransitionOnTimeout[5] = "NoAmmo1"; + stateName[6] = "WaitFire2"; + stateTransitionOnTriggerDown[6] = "Fire2"; + stateTransitionOnNoAmmo[6] = "NoAmmo"; + + stateName[7] = "Fire2"; + stateTransitionOnTimeout[7] = "Reload2"; + stateTimeoutValue[7] = 0.32; + stateScript[7] = "FirePair"; + + stateName[8] = "Reload2"; + stateSequence[8] = "Reload"; + stateTimeoutValue[8] = 0.1; + stateAllowImageChange[8] = false; + stateTransitionOnTimeout[8] = "WaitFire1"; + stateTransitionOnNoAmmo[8] = "NoAmmo2"; + + stateName[9] = "NoAmmo2"; + stateTransitionOnAmmo[9] = "Reload2"; + stateSequence[9] = "NoAmmo"; + stateTransitionOnTriggerDown[9] = "DryFire2"; + + stateName[10] = "DryFire2"; + stateSound[10] = BomberBombDryFireSound; + stateTimeoutValue[10] = 0.5; + stateTransitionOnTimeout[10] = "NoAmmo2"; }; -datablock ShapeBaseImageData(BomberBombImage) : BomberBombPairImage +datablock TurretImageData(BomberBombPairImage) { - offset = "-2 -4 -0.5"; - stateScript[3] = "onTriggerDown"; - stateScript[5] = "onTriggerUp"; + shapeFile = "turret_muzzlepoint.dts"; + offset = "-2 -4 -0.5"; + mountPoint = 10; + + projectile = BomberBomb; + projectileType = BombProjectile; + usesEnergy = true; + useMountEnergy = true; + useCapacitor = true; + fireEnergy = 53.0; + minEnergy = 53.0; + + stateName[0] = "WaitFire"; + stateTransitionOnTriggerDown[0] = "Fire"; + + stateName[1] = "Fire"; + stateTransitionOnTimeout[1] = "StopFire"; + stateTimeoutValue[1] = 0.13; + stateFire[1] = true; + stateAllowImageChange[1] = false; + stateSequence[1] = "Fire"; + stateScript[1] = "onFire"; + stateSound[1] = BomberBombFireSound; + + stateName[2] = "StopFire"; + stateTimeoutValue[2] = 0.1; + stateTransitionOnTimeout[2] = "WaitFire"; + stateScript[2] = "stopFire"; + }; //************************************************************** @@ -620,35 +718,35 @@ datablock ParticleData(FusionExplosionParticle) lifetimeMS = 750; lifetimeVarianceMS = 150; textureName = "particleTest"; - colors[0] = "0.56 0.36 0.26 1.0"; - colors[1] = "0.56 0.36 0.26 0.0"; - sizes[0] = 1; - sizes[1] = 2; + colors[0] = "0.56 0.36 0.26 1.0"; + colors[1] = "0.56 0.36 0.26 0.0"; + sizes[0] = 1; + sizes[1] = 2; }; datablock ParticleEmitterData(FusionExplosionEmitter) { - ejectionPeriodMS = 7; - periodVarianceMS = 0; - ejectionVelocity = 12; - velocityVariance = 1.75; - ejectionOffset = 0.0; - thetaMin = 0; - thetaMax = 60; - phiReferenceVel = 0; - phiVariance = 360; - overrideAdvances = false; - particles = "FusionExplosionParticle"; + ejectionPeriodMS = 7; + periodVarianceMS = 0; + ejectionVelocity = 12; + velocityVariance = 1.75; + ejectionOffset = 0.0; + thetaMin = 0; + thetaMax = 60; + phiReferenceVel = 0; + phiVariance = 360; + overrideAdvances = false; + particles = "FusionExplosionParticle"; }; datablock ExplosionData(FusionBoltExplosion) { - explosionShape = "effect_plasma_explosion.dts"; - soundProfile = FusionExpSound; - particleEmitter = FusionExplosionEmitter; - particleDensity = 250; - particleRadius = 1.25; - faceViewer = true; + explosionShape = "effect_plasma_explosion.dts"; + soundProfile = FusionExpSound; + particleEmitter = FusionExplosionEmitter; + particleDensity = 250; + particleRadius = 1.25; + faceViewer = true; }; //-------------------------------------------------------------------------- @@ -659,14 +757,14 @@ datablock AudioProfile(BomberTargetingSwitchSound) { filename = "fx/weapons/generic_switch.wav"; description = AudioClosest3d; - preload = true; + preload = true; }; datablock AudioProfile(BomberTargetingPaintSound) { filename = "fx/weapons/targetinglaser_paint.wav"; description = CloseLooping3d; - preload = true; + preload = true; }; //-------------------------------------- @@ -704,50 +802,48 @@ datablock TargetProjectileData(BomberTargeter) //------------------------------------- datablock ShapeBaseImageData(BomberTargetingImage) { - className = WeaponImage; + className = WeaponImage; - shapeFile = "turret_muzzlepoint.dts"; - offset = "0 -0.04 -0.01"; - mountPoint = 2; + shapeFile = "turret_muzzlepoint.dts"; + offset = "0 -0.04 -0.01"; + mountPoint = 2; - projectile = BomberTargeter; - projectileType = TargetProjectile; - deleteLastProjectile = true; + projectile = BomberTargeter; + projectileType = TargetProjectile; + deleteLastProjectile = true; - usesEnergy = true; - minEnergy = 3; + usesEnergy = true; + minEnergy = 3; - stateName[0] = "Activate"; - stateSequence[0] = "Activate"; - stateSound[0] = BomberTargetingSwitchSound; - stateTimeoutValue[0] = 0.5; - stateTransitionOnTimeout[0] = "ActivateReady"; + stateName[0] = "Activate"; + stateSequence[0] = "Activate"; + stateSound[0] = BomberTargetingSwitchSound; + stateTimeoutValue[0] = 0.5; + stateTransitionOnTimeout[0] = "ActivateReady"; - stateName[1] = "ActivateReady"; - stateTransitionOnAmmo[1] = "Ready"; - stateTransitionOnNoAmmo[1] = "NoAmmo"; + stateName[1] = "ActivateReady"; + stateTransitionOnAmmo[1] = "Ready"; + stateTransitionOnNoAmmo[1] = "NoAmmo"; - stateName[2] = "Ready"; - stateTransitionOnNoAmmo[2] = "NoAmmo"; - stateTransitionOnTriggerDown[2] = "Fire"; + stateName[2] = "Ready"; + stateTransitionOnNoAmmo[2] = "NoAmmo"; + stateTransitionOnTriggerDown[2] = "Fire"; - stateName[3] = "Fire"; - stateEnergyDrain[3] = 3; - stateFire[3] = true; - stateAllowImageChange[3] = false; - stateScript[3] = "onFire"; - stateTransitionOnTriggerUp[3] = "Deconstruction"; - stateTransitionOnNoAmmo[3] = "Deconstruction"; - stateSound[3] = BomberTargetingPaintSound; + stateName[3] = "Fire"; + stateEnergyDrain[3] = 3; + stateFire[3] = true; + stateAllowImageChange[3] = false; + stateScript[3] = "onFire"; + stateTransitionOnTriggerUp[3] = "Deconstruction"; + stateTransitionOnNoAmmo[3] = "Deconstruction"; + stateSound[3] = BomberTargetingPaintSound; - stateName[4] = "NoAmmo"; - stateTransitionOnAmmo[4] = "Ready"; + stateName[4] = "NoAmmo"; + stateTransitionOnAmmo[4] = "Ready"; - stateName[5] = "Deconstruction"; -// Deconstruct is now being called from weapTurretCode.cs -// stateScript[5] = "deconstruct"; - stateTransitionOnTimeout[5] = "ActivateReady"; - stateTimeoutValue[5] = 0.05; + stateName[5] = "Deconstruction"; + stateTransitionOnTimeout[5] = "ActivateReady"; + stateTimeoutValue[5] = 0.05; }; function BomberTargetingImage::onFire(%data,%obj,%slot) @@ -801,4 +897,3 @@ datablock StaticShapeData(BomberBeacon) dynamicType = $TypeMasks::SensorObjectType; }; - diff --git a/base/scripts/vehicles/vehicle_havoc.cs b/base/scripts/vehicles/vehicle_havoc.cs index 7094b5c..6da7527 100644 --- a/base/scripts/vehicles/vehicle_havoc.cs +++ b/base/scripts/vehicles/vehicle_havoc.cs @@ -86,7 +86,7 @@ datablock FlyingVehicleData(HAPCFlyer) : HavocDamageProfile jetForce = 5000; minJetEnergy = 55; jetEnergyDrain = 3.6; - vertThrustMultiple = 2.0; + vertThrustMultiple = 3.0; dustEmitter = LargeVehicleLiftoffDustEmitter; diff --git a/base/scripts/vehicles/vehicle_mpb.cs b/base/scripts/vehicles/vehicle_mpb.cs index 111f7a0..2c9130d 100644 --- a/base/scripts/vehicles/vehicle_mpb.cs +++ b/base/scripts/vehicles/vehicle_mpb.cs @@ -183,7 +183,7 @@ datablock WheeledVehicleData(MobileBaseVehicle) : MPBDamageProfile isShielded = true; energyPerDamagePoint = 125; maxEnergy = 600; - jetForce = 2000; + jetForce = 2800; minJetEnergy = 60; jetEnergyDrain = 2.75; rechargeRate = 1.0; diff --git a/base/scripts/vehicles/vehicle_shrike.cs b/base/scripts/vehicles/vehicle_shrike.cs index f8c3e4b..dba4883 100644 --- a/base/scripts/vehicles/vehicle_shrike.cs +++ b/base/scripts/vehicles/vehicle_shrike.cs @@ -124,7 +124,7 @@ datablock FlyingVehicleData(ScoutFlyer) : ShrikeDamageProfile jetForce = 1750; // Afterburner thrust (this is in addition to normal thrust) minJetEnergy = 28; // Afterburner can't be used if below this threshhold. jetEnergyDrain = 2.8; // Energy use of the afterburners (low number is less drain...can be fractional) // Auto stabilize speed - vertThrustMultiple = 2.5; + vertThrustMultiple = 3.0; // Rigid body mass = 150; // Mass of the vehicle diff --git a/base/scripts/vehicles/vehicle_spec_fx.cs b/base/scripts/vehicles/vehicle_spec_fx.cs index df4a81e..2ecb632 100644 --- a/base/scripts/vehicles/vehicle_spec_fx.cs +++ b/base/scripts/vehicles/vehicle_spec_fx.cs @@ -951,8 +951,8 @@ datablock ParticleData(VehicleBombExplosionParticle) gravityCoefficient = 0.2; inheritedVelFactor = 0.2; constantAcceleration = 0.0; - lifetimeMS = 1050; - lifetimeVarianceMS = 250; + lifetimeMS = 900; + lifetimeVarianceMS = 225; textureName = "particleTest"; colors[0] = "0.56 0.36 0.26 1.0"; colors[1] = "0.56 0.36 0.26 0.0"; @@ -1016,7 +1016,7 @@ datablock ExplosionData(VehicleBombSubExplosion1) playSpeed = 1.5; sizes[0] = "1.5 1.5 1.5"; - sizes[1] = "2.0 2.0 2.0"; + sizes[1] = "3.0 3.0 3.0"; times[0] = 0.0; times[1] = 1.0; @@ -1031,10 +1031,10 @@ datablock ExplosionData(VehicleBombSubExplosion2) offset = 7.0; - playSpeed = 1.0; + playSpeed = 1.1; - sizes[0] = "3.0 3.0 3.0"; - sizes[1] = "4.0 4.0 4.0"; + sizes[0] = "5.0 5.0 5.0"; + sizes[1] = "8.0 8.0 8.0"; times[0] = 0.0; times[1] = 1.0; }; @@ -1048,11 +1048,11 @@ datablock ExplosionData(VehicleBombSubExplosion3) offset = 0.0; - playSpeed = 0.7; + playSpeed = 0.9; - sizes[0] = "3.0 3.0 3.0"; - sizes[1] = "7.0 7.0 7.0"; + sizes[0] = "7.0 7.0 7.0"; + sizes[1] = "10.0 10.0 10.0"; times[0] = 0.0; times[1] = 1.0; diff --git a/base/scripts/vehicles/vehicle_tank.cs b/base/scripts/vehicles/vehicle_tank.cs index edc98d9..9e8fa24 100644 --- a/base/scripts/vehicles/vehicle_tank.cs +++ b/base/scripts/vehicles/vehicle_tank.cs @@ -211,7 +211,7 @@ datablock HoverVehicleData(AssaultVehicle) : TankDamageProfile mainThrustForce = 50; reverseThrustForce = 40; strafeThrustForce = 40; - turboFactor = 1.25; + turboFactor = 1.7; brakingForce = 25; brakingActivationSpeed = 4; @@ -357,10 +357,14 @@ datablock TurretData(AssaultPlasmaTurret) : TurretDamageProfile mass = 1.0; // Not really relevant - maxEnergy = 1; - maxDamage = AssaultVehicle.maxDamage; - destroyedLevel = AssaultVehicle.destroyedLevel; - repairRate = 0; + maxEnergy = 1; + maxDamage = AssaultVehicle.maxDamage; + destroyedLevel = AssaultVehicle.destroyedLevel; + repairRate = 0; + + // capacitor + maxCapacitorEnergy = 250; + capacitorRechargeRate = 1.0; thetaMin = 0; thetaMax = 100; @@ -394,10 +398,11 @@ datablock TurretImageData(AssaultPlasmaTurretBarrel) projectileSpread = 12.0 / 1000.0; + useCapacitor = true; usesEnergy = true; useMountEnergy = true; - fireEnergy = 3.75; - minEnergy = 20.0; + fireEnergy = 7.5; + minEnergy = 15.0; // Turret parameters activationMS = 4000; @@ -408,65 +413,62 @@ datablock TurretImageData(AssaultPlasmaTurretBarrel) attackRadius = 75; // State transitions - stateName[0] = "Activate"; - stateTransitionOnNotLoaded[0] = "Dead"; - stateTransitionOnLoaded[0] = "ActivateReady"; - stateSound[0] = AssaultTurretActivateSound; + stateName[0] = "Activate"; + stateTransitionOnNotLoaded[0] = "Dead"; + stateTransitionOnLoaded[0] = "ActivateReady"; + stateSound[0] = AssaultTurretActivateSound; - stateName[1] = "ActivateReady"; - stateSequence[1] = "Activate"; - stateSound[1] = AssaultTurretActivateSound; - stateTimeoutValue[1] = 1; - stateTransitionOnTimeout[1] = "Ready"; - stateTransitionOnNotLoaded[1] = "Deactivate"; + stateName[1] = "ActivateReady"; + stateSequence[1] = "Activate"; + stateSound[1] = AssaultTurretActivateSound; + stateTimeoutValue[1] = 1; + stateTransitionOnTimeout[1] = "Ready"; + stateTransitionOnNotLoaded[1] = "Deactivate"; - stateName[2] = "Ready"; - stateTransitionOnNotLoaded[2] = "Deactivate"; - stateTransitionOnTriggerDown[2] = "Fire"; -// stateSound[2] = AssaultChaingunIdleSound; + stateName[2] = "Ready"; + stateTransitionOnNotLoaded[2] = "Deactivate"; + stateTransitionOnTriggerDown[2] = "Fire"; + stateTransitionOnNoAmmo[2] = "NoAmmo"; - stateName[3] = "Fire"; - stateSequence[3] = "Fire"; - stateSequenceRandomFlash[3] = true; - stateFire[3] = true; -// stateRecoil[3] = LightRecoil; - stateAllowImageChange[3] = false; - stateSound[3] = AssaultChaingunFireSound; - stateScript[3] = "onFire"; - stateTimeoutValue[3] = 0.15; - stateTransitionOnTimeout[3] = "Fire"; - stateTransitionOnTriggerUp[3] = "Reload"; - stateTransitionOnNoAmmo[3] = "Reload"; + stateName[3] = "Fire"; + stateSequence[3] = "Fire"; + stateSequenceRandomFlash[3] = true; + stateFire[3] = true; + stateAllowImageChange[3] = false; + stateSound[3] = AssaultChaingunFireSound; + stateScript[3] = "onFire"; + stateTimeoutValue[3] = 0.1; + stateTransitionOnTimeout[3] = "Fire"; + stateTransitionOnTriggerUp[3] = "Reload"; + stateTransitionOnNoAmmo[3] = "noAmmo"; - stateName[4] = "Reload"; - stateTimeoutValue[4] = 0.1; - stateAllowImageChange[4] = false; - stateSequence[4] = "Reload"; - stateTransitionOnTimeout[4] = "Ready"; - stateTransitionOnNotLoaded[4] = "Deactivate"; -// stateSound[4] = AssaultChaingunReloadSound; - - stateName[5] = "Deactivate"; - stateSequence[5] = "Activate"; - stateDirection[5] = false; - stateTimeoutValue[5] = 30; -// stateTransitionOnLoaded[5] = "ActivateReady"; -// stateTransitionOnTimeout[5] = "Dead"; - stateTransitionOnTimeout[5] = "ActivateReady"; + stateName[4] = "Reload"; + stateSequence[4] = "Reload"; + stateTimeoutValue[4] = 0.1; + stateAllowImageChange[4] = false; + stateTransitionOnTimeout[4] = "Ready"; + stateTransitionOnNoAmmo[4] = "NoAmmo"; + stateWaitForTimeout[4] = true; - stateName[6] = "Dead"; - stateTransitionOnLoaded[6] = "ActivateReady"; - stateTransitionOnTriggerDown[6] = "DryFire"; + stateName[5] = "Deactivate"; + stateSequence[5] = "Activate"; + stateDirection[5] = false; + stateTimeoutValue[5] = 30; + stateTransitionOnTimeout[5] = "ActivateReady"; - stateName[7] = "DryFire"; - stateSound[7] = AssaultChaingunDryFireSound; - stateTimeoutValue[7] = 0.5; - stateTransitionOnTimeout[7] = "NoAmmo"; + stateName[6] = "Dead"; + stateTransitionOnLoaded[6] = "ActivateReady"; + stateTransitionOnTriggerDown[6] = "DryFire"; - stateName[8] = "NoAmmo"; - stateTransitionOnAmmo[8] = "Reload"; - stateSequence[8] = "NoAmmo"; - stateTransitionOnTriggerDown[8] = "DryFire"; + stateName[7] = "DryFire"; + stateSound[7] = AssaultChaingunDryFireSound; + stateTimeoutValue[7] = 0.5; + stateTransitionOnTimeout[7] = "NoAmmo"; + + stateName[8] = "NoAmmo"; + stateTransitionOnAmmo[8] = "Reload"; + stateSequence[8] = "NoAmmo"; + stateTransitionOnTriggerDown[8] = "DryFire"; }; @@ -530,75 +532,73 @@ datablock TurretImageData(AssaultMortarTurretBarrel) usesEnergy = true; useMountEnergy = true; - fireEnergy = 50.00; - minEnergy = 50.00; + fireEnergy = 77.00; + minEnergy = 77.00; + useCapacitor = true; // Turret parameters - activationMS = 4000; - deactivateDelayMS = 1500; - thinkTimeMS = 200; - degPerSecTheta = 360; - degPerSecPhi = 360; - attackRadius = 75; + activationMS = 4000; + deactivateDelayMS = 1500; + thinkTimeMS = 200; + degPerSecTheta = 360; + degPerSecPhi = 360; + attackRadius = 75; // State transitions - stateName[0] = "Activate"; - stateTransitionOnNotLoaded[0] = "Dead"; - stateTransitionOnLoaded[0] = "ActivateReady"; - //stateSound[0] = AssaultTurretActivateSound; + stateName[0] = "Activate"; + stateTransitionOnNotLoaded[0] = "Dead"; + stateTransitionOnLoaded[0] = "ActivateReady"; - stateName[1] = "ActivateReady"; - stateSequence[1] = "Activate"; - stateSound[1] = AssaultTurretActivateSound; - stateTimeoutValue[1] = 1; - stateTransitionOnTimeout[1] = "Ready"; - stateTransitionOnNotLoaded[1] = "Deactivate"; + stateName[1] = "ActivateReady"; + stateSequence[1] = "Activate"; + stateSound[1] = AssaultTurretActivateSound; + stateTimeoutValue[1] = 1.0; + stateTransitionOnTimeout[1] = "Ready"; + stateTransitionOnNotLoaded[1] = "Deactivate"; - stateName[2] = "Ready"; - stateTransitionOnNotLoaded[2] = "Deactivate"; - stateTransitionOnNoAmmo[2] = "NoAmmo"; - stateTransitionOnTriggerDown[2] = "Fire"; -// stateSound[2] = AssaultMortarIdleSound; + stateName[2] = "Ready"; + stateTransitionOnNotLoaded[2] = "Deactivate"; + stateTransitionOnNoAmmo[2] = "NoAmmo"; + stateTransitionOnTriggerDown[2] = "Fire"; - stateName[3] = "Fire"; - stateTransitionOnTimeout[3] = "Reload"; - stateTimeoutValue[3] = 0.3; - stateFire[3] = true; - stateRecoil[3] = LightRecoil; - stateAllowImageChange[3] = false; - stateSequence[3] = "Fire"; - stateSound[3] = AssaultMortarFireSound; - stateScript[3] = "onFire"; + stateName[3] = "Fire"; + stateSequence[3] = "Fire"; + stateTransitionOnTimeout[3] = "Reload"; + stateTimeoutValue[3] = 1.0; + stateFire[3] = true; + stateRecoil[3] = LightRecoil; + stateAllowImageChange[3] = false; + stateSound[3] = AssaultMortarFireSound; + stateScript[3] = "onFire"; - stateName[4] = "Reload"; - stateTimeoutValue[4] = 1.5; - stateAllowImageChange[4] = false; - stateSequence[4] = "Reload"; - stateTransitionOnTimeout[4] = "Ready"; - stateTransitionOnNoAmmo[4] = "NoAmmo"; -// stateSound[4] = AssaultMortarReloadSound; -// stateTransitionOnNotLoaded[4] = "Deactivate"; + stateName[4] = "Reload"; + stateSequence[4] = "Reload"; + stateTimeoutValue[4] = 1.0; + stateAllowImageChange[4] = false; + stateTransitionOnTimeout[4] = "Ready"; + //stateTransitionOnNoAmmo[4] = "NoAmmo"; + stateWaitForTimeout[4] = true; - stateName[5] = "Deactivate"; - stateDirection[5] = false; - stateSequence[5] = "Activate"; - stateTimeoutValue[5] = 1; - stateTransitionOnLoaded[5] = "ActivateReady"; - stateTransitionOnTimeout[5] = "Dead"; + stateName[5] = "Deactivate"; + stateDirection[5] = false; + stateSequence[5] = "Activate"; + stateTimeoutValue[5] = 1.0; + stateTransitionOnLoaded[5] = "ActivateReady"; + stateTransitionOnTimeout[5] = "Dead"; - stateName[6] = "Dead"; - stateTransitionOnLoaded[6] = "ActivateReady"; - stateTransitionOnTriggerDown[6] = "DryFire"; + stateName[6] = "Dead"; + stateTransitionOnLoaded[6] = "ActivateReady"; + stateTransitionOnTriggerDown[6] = "DryFire"; - stateName[7] = "DryFire"; - stateSound[7] = AssaultMortarDryFireSound; - stateTimeoutValue[7] = 1.5; - stateTransitionOnTimeout[7] = "NoAmmo"; + stateName[7] = "DryFire"; + stateSound[7] = AssaultMortarDryFireSound; + stateTimeoutValue[7] = 1.0; + stateTransitionOnTimeout[7] = "NoAmmo"; - stateName[8] = "NoAmmo"; - stateTransitionOnAmmo[8] = "Reload"; - stateSequence[8] = "NoAmmo"; - stateTransitionOnTriggerDown[8] = "DryFire"; + stateName[8] = "NoAmmo"; + stateSequence[8] = "NoAmmo"; + stateTransitionOnAmmo[8] = "Reload"; + stateTransitionOnTriggerDown[8] = "DryFire"; }; datablock TurretImageData(AssaultTurretParam) @@ -609,6 +609,9 @@ datablock TurretImageData(AssaultTurretParam) projectile = AssaultChaingunBullet; projectileType = TracerProjectile; + useCapacitor = true; + usesEnergy = true; + // Turret parameters activationMS = 1000; deactivateDelayMS = 1500; diff --git a/base/scripts/voiceChat.cs b/base/scripts/voiceChat.cs index ee83cc0..54e3656 100644 --- a/base/scripts/voiceChat.cs +++ b/base/scripts/voiceChat.cs @@ -67,7 +67,7 @@ function addGreenVoiceLine(%client, %line) profile = "GuiDefaultProfile"; horizSizing = "right"; vertSizing = "bottom"; - bitmap = "gui/hud_chat_button_on.png"; + bitmap = "gui/hud_chat_button_on"; position = "0 0"; extent = "15 15"; visible = true; @@ -108,7 +108,7 @@ function addRedVoiceLine(%client, %line) profile = "GuiDefaultProfile"; horizSizing = "right"; vertSizing = "bottom"; - bitmap = "gui/hud_chat_button_off.png"; + bitmap = "gui/hud_chat_button_off"; position = "0 0"; extent = "15 15"; visible = true; @@ -232,7 +232,8 @@ function voiceCapStart() { case 0: %level = "Codec .v12"; case 1: %level = "Codec .v24"; - default: %level = "Codec .v29"; + case 2: %level = "Codec .v29"; + default: %level = "Codec GSM"; } addMessageHudLine("\c2System:\cr server has voice level capped at [\c1" @ %level @ "\cr]."); @@ -317,6 +318,8 @@ function handleVoiceEnableMessage( %msgType, %msgString, %enabled, %who ) { $PlayerList[%who].voiceEnabled = %enabled; lobbyUpdatePlayer( %who ); + if ( $PlayingOnline && !$PlayerList[%who].isSmurf && $PlayerList[%who].guid > 0 ) + setPlayerVoiceMuted( $PlayerList[%who].guid, !%enabled ); } } @@ -342,4 +345,4 @@ function handleListenStateMessage( %msgType, %msgString, %isListening, %who ) $PlayerList[%who].isListening = %isListening; lobbyUpdatePlayer( %who ); } -} \ No newline at end of file +} diff --git a/base/scripts/weapTurretCode.cs b/base/scripts/weapTurretCode.cs index eb6716e..8613b31 100644 --- a/base/scripts/weapTurretCode.cs +++ b/base/scripts/weapTurretCode.cs @@ -8,7 +8,7 @@ function Ammo::onCollision(%data, %obj, %col) { %ammoName = %data.getName(); %ammoStore = %col.inv[%ammoName]; - + // if player has ammo pack, increase max amount of ammo if(%col.getMountedImage($BackpackSlot) != 0) { @@ -22,7 +22,10 @@ function Ammo::onCollision(%data, %obj, %col) if(%col.inv[%ammoName] < %aMax) { - %col.incInventory(%ammoName, $AmmoIncrement[%ammoName]); + if( %obj.ammoStore $= "" ) + %obj.ammoStore = $AmmoIncrement[ %ammoName ]; + + %col.incInventory(%ammoName, %obj.ammoStore); serverPlay3D(ItemPickupSound, %col.getTransform()); %obj.respawn(); if (%col.client > 0) @@ -155,6 +158,9 @@ function ScoutFlyer::playerDismounted(%data, %obj, %player) %obj.setImageTrigger(2, false); %obj.setImageTrigger(3, false); setTargetSensorGroup(%obj.getTarget(), %obj.team); + + if( %player.client.observeCount > 0 ) + resetObserveFollow( %player.client, true ); } function ScoutChaingunImage::onFire(%data,%obj,%slot) @@ -235,11 +241,12 @@ function BomberTurret::onDamage(%data, %obj) %obj.lastDamageVal = %newDamageVal; } -function BomberTurret::damageObject(%this, %damageObj, %projectile, %amount, %damageType) +function BomberTurret::damageObject(%this, %targetObject, %sourceObject, %position, %amount, %damageType ,%vec, %client, %projectile) { //If vehicle turret is hit then apply damage to the vehicle - %vehicle = %damageObj.getObjectMount(); - %vehicle.getDataBlock().damageObject(%vehicle, %projectile, %amount, %damageType); + %vehicle = %targetObject.getObjectMount(); + if(%vehicle) + %vehicle.getDataBlock().damageObject(%vehicle, %sourceObject, %position, %amount, %damageType, %vec, %client, %projectile); } function VehicleTurret::onEndSequence(%data, %obj, %thread) @@ -315,6 +322,7 @@ function BomberTurret::playerDismount(%data, %obj) ShapeBaseImageData::deconstruct(%obj.getMountedImage(6), %obj); } %client = %obj.getControllingClient(); + %client.player.isBomber = false; commandToClient(%client, 'endBomberSight'); // %client.player.setControlObject(%client.player); %client.player.mountVehicle = false; @@ -345,14 +353,13 @@ function BomberBombPairImage::onUnmount(%this,%obj,%slot) { } -function BomberTurretBarrel::onTriggerDown(%this, %obj, %slot) +function BomberTurretBarrel::firePair(%this, %obj, %slot) { - %obj.turretBarrelSchedule = %obj.schedule(300, "setImageTrigger", 3, true); + %obj.setImageTrigger( 3, true); } -function BomberTurretBarrel::onTriggerUp(%this, %obj, %slot) +function BomberTurretBarrelPair::stopFire(%this, %obj, %slot) { - cancel(%obj.turretBarrelSchedule); %obj.setImageTrigger( 3, false); } @@ -366,15 +373,14 @@ function BomberTurretBarrel::onMount(%this, %obj, %slot) // %obj.setImageAmmo(%slot,true); } - -function BomberBombImage::onTriggerDown(%this, %obj, %slot) +function BomberBombImage::firePair(%this, %obj, %slot) { - %obj.schedule(500, "setImageTrigger", 5, true); + %obj.setImageTrigger( 5, true); } -function BomberBombImage::onTriggerUp(%this, %obj, %slot) +function BomberBombPairImage::stopFire(%this, %obj, %slot) { - %obj.schedule(600, "setImageTrigger", 5, false); + %obj.setImageTrigger( 5, false); } function BomberBombPairImage::onMount(%this, %obj, %slot) @@ -410,12 +416,12 @@ function MobileTurretBase::onDamage(%data, %obj) %obj.lastDamageVal = %newDamageVal; } -function MobileTurretBase::damageObject(%this, %targetObject, %sourceObject, %position, %amount, %damageType) +function MobileTurretBase::damageObject(%this, %targetObject, %sourceObject, %position, %amount, %damageType ,%vec, %client, %projectile) { //If vehicle turret is hit then apply damage to the vehicle %vehicle = %targetObject.getObjectMount(); if(%vehicle) - %vehicle.getDataBlock().damageObject(%vehicle, %sourceObject, %position, %amount, %damageType); + %vehicle.getDataBlock().damageObject(%vehicle, %sourceObject, %position, %amount, %damageType, %vec, %client, %projectile); } function MobileTurretBase::onEndSequence(%data, %obj, %thread) @@ -432,11 +438,12 @@ function AssaultPlasmaTurret::onDamage(%data, %obj) %obj.lastDamageVal = %newDamageVal; } -function AssaultPlasmaTurret::damageObject(%this, %damageObj, %projectile, %amount, %damageType) +function AssaultPlasmaTurret::damageObject(%this, %targetObject, %sourceObject, %position, %amount, %damageType ,%vec, %client, %projectile) { //If vehicle turret is hit then apply damage to the vehicle - %vehicle = %damageObj.getObjectMount(); - %vehicle.getDataBlock().damageObject(%vehicle, %projectile, %amount, %damageType); + %vehicle = %targetObject.getObjectMount(); + if(%vehicle) + %vehicle.getDataBlock().damageObject(%vehicle, %sourceObject, %position, %amount, %damageType, %vec, %client, %projectile); } function AssaultPlasmaTurret::onTrigger(%data, %obj, %trigger, %state) @@ -747,6 +754,7 @@ function MineDeployed::onThrow(%this, %mine, %thrower) %mine.damaged = 0; %mine.detonated = false; %mine.depCount = 0; + %mine.theClient = %thrower.client; schedule(1500, %mine, "deployMineCheck", %mine, %thrower); } @@ -881,7 +889,7 @@ function MineDeployed::damageObject(%data, %targetObject, %sourceObject, %positi function MineDeployed::onDestroyed(%data, %obj, %lastState) { %obj.boom = true; - %mineTeam = %obj.sourceObject.team; + %mineTeam = %obj.team; $TeamDeployedCount[%mineTeam, MineDeployed]--; // %noDamage is a boolean flag -- don't want to set off all other mines in // vicinity if there's a "mine overload", so apply no damage/impulse if true diff --git a/base/scripts/weapons.cs b/base/scripts/weapons.cs index 9925e7f..66e1e9a 100644 --- a/base/scripts/weapons.cs +++ b/base/scripts/weapons.cs @@ -1,40 +1,40 @@ $HandInvThrowTimeout = 0.8 * 1000; // 1/2 second between throwing grenades or mines -$WeaponsHudData[0, bitmapName] = "gui/hud_blaster.png"; +$WeaponsHudData[0, bitmapName] = "gui/hud_blaster"; $WeaponsHudData[0, itemDataName] = "Blaster"; //$WeaponsHudData[0, ammoDataName] = ""; -$WeaponsHudData[1, bitmapName] = "gui/hud_plasma.png"; +$WeaponsHudData[1, bitmapName] = "gui/hud_plasma"; $WeaponsHudData[1, itemDataName] = "Plasma"; $WeaponsHudData[1, ammoDataName] = "PlasmaAmmo"; -$WeaponsHudData[2, bitmapName] = "gui/hud_chaingun.png"; +$WeaponsHudData[2, bitmapName] = "gui/hud_chaingun"; $WeaponsHudData[2, itemDataName] = "Chaingun"; $WeaponsHudData[2, ammoDataName] = "ChaingunAmmo"; -$WeaponsHudData[3, bitmapName] = "gui/hud_disc.png"; +$WeaponsHudData[3, bitmapName] = "gui/hud_disc"; $WeaponsHudData[3, itemDataName] = "Disc"; $WeaponsHudData[3, ammoDataName] = "DiscAmmo"; -$WeaponsHudData[4, bitmapName] = "gui/hud_grenlaunch.png"; +$WeaponsHudData[4, bitmapName] = "gui/hud_grenlaunch"; $WeaponsHudData[4, itemDataName] = "GrenadeLauncher"; $WeaponsHudData[4, ammoDataName] = "GrenadeLauncherAmmo"; -$WeaponsHudData[5, bitmapName] = "gui/hud_sniper.png"; +$WeaponsHudData[5, bitmapName] = "gui/hud_sniper"; $WeaponsHudData[5, itemDataName] = "SniperRifle"; //$WeaponsHudData[5, ammoDataName] = ""; -$WeaponsHudData[6, bitmapName] = "gui/hud_elfgun.png"; +$WeaponsHudData[6, bitmapName] = "gui/hud_elfgun"; $WeaponsHudData[6, itemDataName] = "ELFGun"; //$WeaponsHudData[6, ammoDataName] = ""; -$WeaponsHudData[7, bitmapName] = "gui/hud_mortor.png"; +$WeaponsHudData[7, bitmapName] = "gui/hud_mortor"; $WeaponsHudData[7, itemDataName] = "Mortar"; $WeaponsHudData[7, ammoDataName] = "MortarAmmo"; -$WeaponsHudData[8, bitmapName] = "gui/hud_missiles.png"; +$WeaponsHudData[8, bitmapName] = "gui/hud_missiles"; $WeaponsHudData[8, itemDataName] = "MissileLauncher"; $WeaponsHudData[8, ammoDataName] = "MissileLauncherAmmo"; // WARNING!!! If you change the weapon index of the targeting laser, // you must change the HudWeaponInvBase::addWeapon function to test // for the new value! -$WeaponsHudData[9, bitmapName] = "gui/hud_targetlaser.png"; +$WeaponsHudData[9, bitmapName] = "gui/hud_targetlaser"; $WeaponsHudData[9, itemDataName] = "TargetingLaser"; //$WeaponsHudData[9, ammoDataName] = ""; // -$WeaponsHudData[10, bitmapName] = "gui/hud_shocklance.png"; +$WeaponsHudData[10, bitmapName] = "gui/hud_shocklance"; $WeaponsHudData[10, itemDataName] = "ShockLance"; //$WeaponsHudData[10, ammoDataName] = ""; @@ -123,6 +123,7 @@ function WeaponImage::onUnmount(%this,%obj,%slot) { %obj.client.setWeaponsHudActive(%this.item, 1); %obj.client.setAmmoHudCount(-1); + commandToClient(%obj.client,'removeReticle'); // try to avoid running around with sniper/missile arm thread and no weapon %obj.setArmThread(look); Parent::onUnmount(%this, %obj, %slot); @@ -141,7 +142,8 @@ function Ammo::onInventory(%this,%obj,%amount) } } ItemData::onInventory(%this,%obj,%amount); - if(%obj.getClassname() $= "Player") + // Uh, don't update the hud ammo counters if this is a corpse...that's bad. + if ( %obj.getClassname() $= "Player" && %obj.getState() !$= "Dead" ) { %obj.client.setWeaponsHudAmmo(%this.getName(), %amount); if(%obj.getMountedImage($WeaponSlot).ammo $= %this.getName()) @@ -153,7 +155,9 @@ function Weapon::onInventory(%this,%obj,%amount) { if(Game.weaponOnInventory(%this, %obj, %amount)) { - %obj.client.setWeaponsHudItem(%this.getName(), 0, 1); + // Do not update the hud if this object is a corpse: + if ( %obj.getState() !$= "Dead" ) + %obj.client.setWeaponsHudItem(%this.getName(), 0, 1); ItemData::onInventory(%this,%obj,%amount); // if a player threw a weapon (which means that player isn't currently // holding a weapon), set armthread to "no weapon" @@ -217,6 +221,7 @@ function HandInventory::onUse(%data, %obj) %thrownItem.sourceObject = %obj; + %thrownItem.team = %obj.team; %thrownItem.setTransform(%pos); %thrownItem.applyImpulse(%pos, %vec); diff --git a/base/scripts/weapons/disc.cs b/base/scripts/weapons/disc.cs index a6d9551..45323b3 100644 --- a/base/scripts/weapons/disc.cs +++ b/base/scripts/weapons/disc.cs @@ -186,6 +186,11 @@ datablock ExplosionData(DiscExplosion) camShakeAmp = "20.0 20.0 20.0"; camShakeDuration = 0.5; camShakeRadius = 10.0; + + sizes[0] = "1.0 1.0 1.0"; + sizes[1] = "1.0 1.0 1.0"; + times[0] = 0.0; + times[1] = 1.0; }; //-------------------------------------------------------------------------- diff --git a/base/scripts/weapons/plasma.cs b/base/scripts/weapons/plasma.cs index 3d1238c..ce57267 100644 --- a/base/scripts/weapons/plasma.cs +++ b/base/scripts/weapons/plasma.cs @@ -147,6 +147,10 @@ datablock ExplosionData(PlasmaBoltExplosion) particleRadius = 1.25; faceViewer = true; + sizes[0] = "1.0 1.0 1.0"; + sizes[1] = "1.0 1.0 1.0"; + times[0] = 0.0; + times[1] = 1.5; }; diff --git a/base/scripts/weapons/shockLance.cs b/base/scripts/weapons/shockLance.cs index c8134ee..1202dfb 100644 --- a/base/scripts/weapons/shockLance.cs +++ b/base/scripts/weapons/shockLance.cs @@ -280,9 +280,7 @@ datablock ShapeBaseImageData(ShockLanceImage) stateSound[4] = ShockLanceReloadSound; stateName[5] = "NoAmmo"; - stateTransitionOnAmmo[5] = "Reload"; - stateSequence[5] = "NoAmmo"; - stateTransitionOnTriggerDown[5] = "DryFire"; + stateTransitionOnAmmo[5] = "Ready"; stateName[6] = "DryFire"; stateSound[6] = ShockLanceDryFireSound; diff --git a/base/scripts/webbrowser.cs b/base/scripts/webbrowser.cs index cb845f6..2b50899 100644 --- a/base/scripts/webbrowser.cs +++ b/base/scripts/webbrowser.cs @@ -1,6 +1,8 @@ //==-- FUNCTIONS ------------------------------------------------------------- -//$strcheck = "14 : < > * ^ | ~ @ % & / \\ ` \""; -$strcheck = "6 < > : % \\ /"; +//$strcheck = "14 : < > * ^ | ~ @ % & / \\ ` \""; +//$strcheck = "13 : < > * ^ ~ @ % & / \\ ` \""; +$strcheck = "7\t<\t>\t:\t%\t\\\t/\t\""; +$strcheck2 = "5\t<\t>\t:\t%\t\\"; $playerGfx = "texticons/twb/twb_default.jpg"; $tribeGfx = "texticons/twb/twb_default.jpg"; @@ -24,71 +26,85 @@ function BrowserSearchDone() } } //----------------------------------------------------------------------------- +function TextCheck2(%text,%handler) +{ + %handler.textCheck = 0; + for(%i=1;%i -1) + { + %handler.textCheck=1; + break; + } + } +} +//----------------------------------------------------------------------------- function TextCheck(%text,%handler) { - %handler.textCheck = 0; - for(%i=1;%i -1) - { - %handler.textCheck=1; - break; - } - } + %handler.textCheck = 0; + for(%i=1;%i -1) + { + %handler.textCheck=1; + break; + } + } } //----------------------------------------------------------------------------- function BrowserStartSearch() { - if(trim($BrowserSearchField) $="" || trim($BrowserSearchField) $="_") - { - MessageBoxOK("NOTICE","Blank/Underline searches are not allowed, enter one or more characters of text and try again.","Search_EditField.makeFirstResponder(1);"); - } - else + if(trim($BrowserSearchField) $="" || trim($BrowserSearchField) $="_") + { + MessageBoxOK("NOTICE","Blank/Underline searches are not allowed, enter one or more characters of text and try again.","Search_EditField.makeFirstResponder(1);"); + } + else { - TextCheck($BrowserSearchField,BrowserSearchPane); - if(!BrowserSearchPane.textCheck) - { - BrowserSearchPane.key = LaunchGui.key++; - if(BrowserSearchPane.query==3) - BrowserSearchPane.state = "warriorSearch"; - else - BrowserSearchPane.state = "tribeSearch"; + TextCheck($BrowserSearchField,BrowserSearchPane); + if(!BrowserSearchPane.textCheck) + { + BrowserSearchPane.key = LaunchGui.key++; + if(BrowserSearchPane.query==3) + BrowserSearchPane.state = "warriorSearch"; + else + BrowserSearchPane.state = "tribeSearch"; - BrowserSearchMatchList.clear(); + BrowserSearchMatchList.clear(); canvas.SetCursor(ArrowWaitCursor); - if(isEventPending(TribeAndWarriorBrowserGui.eid)) - cancel(TribeAndWarriorBrowserGui.eid); + if(isEventPending(TribeAndWarriorBrowserGui.eid)) + cancel(TribeAndWarriorBrowserGui.eid); - TribeAndWarriorBrowserGui.eid = schedule(250,0,ExecuteSearch,0,BrowserSearchPane); - } - else - { - for(%x=0;%x 1) - { - TW_Admin.setVisible(1); - TL_Invites.setVisible(1); - } - else - { - TW_Admin.setVisible(0); - TL_Invites.setVisible(0); - } - } - else - { - TProfileHdr.playerName = getField(%line,0); - TProfileHdr.playerTag = getField(%line,1); - TProfileHdr.appending = getField(%line,2); - TProfileHdr.playerID = getField(%line,3); - TProfileHdr.registered = getField(%line,4); - TProfileHdr.onLine = getField(%line,5); - TprofileHdr.playerURL = getField(%line,6); - TProfileHdr.playerGFX = getField(%line,7); - TProfileHdr.twa = 0; - TProfileHdr.Desc = ""; + if(TProfileHdr.twa > 1) + { + TW_Admin.setVisible(1); + TL_Invites.setVisible(1); + } + else + { + TW_Admin.setVisible(0); + TL_Invites.setVisible(0); + } + } + else + { + TProfileHdr.playerName = getField(%line,0); + TProfileHdr.playerTag = getField(%line,1); + TProfileHdr.appending = getField(%line,2); + TProfileHdr.playerID = getField(%line,3); + TProfileHdr.registered = getField(%line,4); + TProfileHdr.onLine = getField(%line,5); + TprofileHdr.playerURL = getField(%line,6); + TProfileHdr.playerGFX = getField(%line,7); + TProfileHdr.twa = 0; + TProfileHdr.Desc = ""; - if(getField(getRecord(WonGetAuthInfo(),0),3)==getField(%line,3)) - TProfileHdr.twa = 1; + if(getField(getRecord(WonGetAuthInfo(),0),3)==getField(%line,3)) + TProfileHdr.twa = 1; for(%checkID=0;%checkID1)) - { - %callerPv = getField(getRecord(%ai,2+%i),4); - break; - } - } + // Get callers rank in members tribe + for(%i=0;%i1)) + { + %callerPv = getField(getRecord(%ai,2+%i),4); + break; + } + } - if(%callerPv > %pv) - %rnk = %callerPv; - else - %rnk = %pv; + if(%callerPv > %pv) + %rnk = %callerPv; + else + %rnk = %pv; - %owner.vPerm = %rnk; + %owner.vPerm = %rnk; - if(getField(getRecord(%ai,0),0) $= getField(twbTitle.getValue(),0)) //if the caller is the member to be edited - { - switch( %pv ) - { - case 0: - tb_onProbation.setValue(true); - case 1: - tb_tribeMember.setValue(true); - tb_tribeMember.setVisible(true); - case 2: - tb_tribeMember.setVisible(true); - tb_tribeAdmin.setVisible(true); - tb_tribeAdmin.setValue(true); - case 3: - tb_tribeMember.setVisible(true); - tb_tribeAdmin.setVisible(true); - tb_tribeController.setVisible(true); - tb_tribeController.setValue(true); - case 4: - tb_tribeMember.setVisible(true); - tb_tribeAdmin.setVisible(true); - tb_tribeController.setVisible(true); - tb_sysAdmin.setVisible(true); - tb_sysAdmin.setValue(true); - } - } - else - { - switch( %rnk ) - { - case 1: - tb_tribeMember.setVisible(true); - case 2: - tb_tribeMember.setVisible(true); - tb_tribeAdmin.setVisible(true); - case 3: - tb_tribeMember.setVisible(true); - tb_tribeAdmin.setVisible(true); - tb_tribeController.setVisible(true); - case 4: - tb_tribeMember.setVisible(true); - tb_tribeAdmin.setVisible(true); - tb_tribeController.setVisible(true); - tb_sysAdmin.setVisible(true); - } + if(getField(getRecord(%ai,0),0) $= getField(twbTitle.getValue(),0)) //if the caller is the member to be edited + { + switch( %pv ) + { + case 0: + tb_onProbation.setValue(true); + case 1: + tb_tribeMember.setValue(true); + tb_tribeMember.setVisible(true); + case 2: + tb_tribeMember.setVisible(true); + tb_tribeAdmin.setVisible(true); + tb_tribeAdmin.setValue(true); + case 3: + tb_tribeMember.setVisible(true); + tb_tribeAdmin.setVisible(true); + tb_tribeController.setVisible(true); + tb_tribeController.setValue(true); + case 4: + tb_tribeMember.setVisible(true); + tb_tribeAdmin.setVisible(true); + tb_tribeController.setVisible(true); + tb_sysAdmin.setVisible(true); + tb_sysAdmin.setValue(true); + } + } + else + { + switch( %rnk ) + { + case 1: + tb_tribeMember.setVisible(true); + case 2: + tb_tribeMember.setVisible(true); + tb_tribeAdmin.setVisible(true); + case 3: + tb_tribeMember.setVisible(true); + tb_tribeAdmin.setVisible(true); + tb_tribeController.setVisible(true); + case 4: + tb_tribeMember.setVisible(true); + tb_tribeAdmin.setVisible(true); + tb_tribeController.setVisible(true); + tb_sysAdmin.setVisible(true); + } - switch( %pv ) - { - case 0: - tb_onProbation.setValue(true); - case 1: - tb_tribeMember.setValue(true); - case 2: - tb_tribeAdmin.setValue(true); - case 3: - tb_tribeController.setValue(true); - case 4: - tb_sysAdmin.setValue(true); - } - } - Canvas.pushDialog(%owner); + switch( %pv ) + { + case 0: + tb_onProbation.setValue(true); + case 1: + tb_tribeMember.setValue(true); + case 2: + tb_tribeAdmin.setValue(true); + case 3: + tb_tribeController.setValue(true); + case 4: + tb_sysAdmin.setValue(true); + } + } + Canvas.pushDialog(%owner); } //----------------------------------------------------------------------------- function LinkLeaveTribe(%player,%handler) { - %handler.key = LaunchGui.key++; - %handler.state = "leaveTribe"; + %handler.key = LaunchGui.key++; + %handler.state = "leaveTribe"; canvas.SetCursor(ArrowWaitCursor); - %handler.leavingTribe = %player; - DatabaseQuery(24,%player,%handler,%handler.key); + %handler.leavingTribe = %player; + DatabaseQuery(24,%player,%handler,%handler.key); } //----------------------------------------------------------------------------- function LinkKickMember(%player, %tribe, %owner) { - %owner.warrior = %player; - %owner.tribe = %tribe; - TribePane.key = LaunchGui.key++; - TribePane.state = "kickPlayer"; + %owner.warrior = %player; + %owner.tribe = %tribe; + TribePane.key = LaunchGui.key++; + TribePane.state = "kickPlayer"; canvas.SetCursor(ArrowWaitCursor); - DatabaseQuery(19,%player TAB %tribe TAB 0,TribePane,TribePane.key); + DatabaseQuery(19,%player TAB %tribe TAB 0,TribePane,TribePane.key); } //----------------------------------------------------------------------------- function LinkMakePrimary(%action, %field, %owner) { - %owner.key = LaunchGui.key++; - %owner.state = %action; + %owner.key = LaunchGui.key++; + %owner.state = %action; canvas.SetCursor(ArrowWaitCursor); - DatabaseQuery(25,%field,%owner,%owner.key); + DatabaseQuery(25,%field,%owner,%owner.key); } //----------------------------------------------------------------------------- function LinkTribeToggle(%action, %field, %owner, %handler) { - TribePane.key = LaunchGui.key++; - TribePane.state = "toggleTribe" @ %action; + TribePane.key = LaunchGui.key++; + TribePane.state = "toggleTribe" @ %action; canvas.SetCursor(ArrowWaitCursor); - DatabaseQuery(20,%action TAB %field,TribePane,TribePane.key); + DatabaseQuery(20,%action TAB %field,TribePane,TribePane.key); } //----------------------------------------------------------------------------- function LinkInvitePlayer(%tribe, %player, %owner, %handler) { - %owner.key = LaunchGui.key++; - %owner.state = %handler; + %owner.key = LaunchGui.key++; + %owner.state = %handler; canvas.SetCursor(ArrowWaitCursor); - DatabaseQuery(27,%tribe TAB %player,%owner,%owner.key); + DatabaseQuery(27,%tribe TAB %player,%owner,%owner.key); } //----------------------------------------------------------------------------- function LinkTribeTag(%owner) { - Canvas.pushDialog(%owner); + Canvas.pushDialog(%owner); } //----------------------------------------------------------------------------- function LinkBrowser(%player , %tabtype) { - LaunchBrowser(%player , %tabtype); + LaunchBrowser(%player , %tabtype); } //----------------------------------------------------------------------------- function LinkForum(%forum, %topic) { - ForumsTopicsList.refreshFlag = true; - LaunchForums( %forum, %topic ); + ForumsTopicsList.refreshFlag = true; + LaunchForums( %forum, %topic ); } //----------------------------------------------------------------------------- function LinkWeb(%url) { - gotoWebPage( %url ); + gotoWebPage( %url ); } //----------------------------------------------------------------------------- function LinkInvitation(%action, %tribe, %player, %owner) { - %owner.key = LaunchGui.key++; - switch$(%action) - { - case "cancel": - %owner.state = "cancelInvite"; - case "accept": - %owner.state = "acceptInvite"; - case "reject": - %owner.state = "rejectInvite"; - } + %owner.key = LaunchGui.key++; + switch$(%action) + { + case "cancel": + %owner.state = "cancelInvite"; + case "accept": + %owner.state = "acceptInvite"; + case "reject": + %owner.state = "rejectInvite"; + } canvas.SetCursor(ArrowWaitCursor); - DatabaseQuery(28,%action TAB %tribe TAB %player,%owner,%owner.key); + DatabaseQuery(28,%action TAB %tribe TAB %player,%owner,%owner.key); } //----------------------------------------------------------------------------- function LinkEMail(%MailTo) { - $EmailToAddress = %MailTo; - $EmailCCAddress = ""; + Email_ToEdit.setText(%MailTo); + Email_CCEdit.setText(""); $EmailSubject = ""; Canvas.pushDialog(EmailComposeDlg); EmailBodyText.setValue(""); + Email_Subject.makeFirstResponder(1); +} +//----------------------------------------------------------------------------- +function LinkEMailTribe(%MailTo) +{ +// error("LEMT: " @ %MailTo); + %toList = ""; + %ccList = ""; + %curLen = 0; + %toggle = 0; + for(%x = 0; %x < MemberList.rowCount(); %x++) + { +// %curLen = StrLen(%toList); + %cWord = getField(MemberList.getRowText(%x),0); +// if( (%curLen + StrLen(%cWord) + 1) <= 2000 ) + if (%toggle == 0) + { +// error("ToList Adding: " @ %cWord TAB %curLen TAB %x); + %toList = %toList @ %cWord @ ","; + %toggle++; +// Email_ToEdit.setText(Email_ToEdit.getValue() @ %cWord @ ","); + } + else + { +// error("CCList Adding: " @ %cWord TAB %curLen TAB %x); +// Email_CCEdit.setText(Email_CCEdit.getValue() @ %cWord @ ","); + %ccList = %ccList @ %cWord @ ","; + %toggle = 0; + } + } +// error("TOLIST: " @ strLen(%toList) NL %toList); + //rror("CCList: " @ strLen(%ccList) NL %ccList); + Email_ToEdit.setValue(getSubStr(%toList,0,Email_ToEdit.maxLength)); + Email_CCEdit.setValue(getSubStr(%ccList,0,Email_CCEdit.maxLength)); + $EmailSubject = ""; + EmailBodyText.setValue(""); + Canvas.pushDialog(EmailComposeDlg); Email_Subject.makeFirstResponder(1); } //----------------------------------------------------------------------------- @@ -583,26 +636,26 @@ function SetMemberProfile() TextCheck(E_Title.getValue(),TribeAdminMemberDlg); if(TribeAdminMemberDlg.textCheck==0) { - TribeAdminMemberDlg.key = LaunchGui.key++; - TribeAdminMemberDlg.state = "setMemberProfile"; + TribeAdminMemberDlg.key = LaunchGui.key++; + TribeAdminMemberDlg.state = "setMemberProfile"; canvas.SetCursor(ArrowWaitCursor); - %title = E_Title.getValue(); - DatabaseQuery(21,TribeAdminMemberDlg.vTribe TAB - TribeAdminMemberDlg.vPlayer TAB - %title TAB - TribeAdminMemberDlg.vPerm, - TribeAdminMemberDlg, - TribeAdminMemberDlg.key); + %title = E_Title.getValue(); + DatabaseQuery(21,TribeAdminMemberDlg.vTribe TAB + TribeAdminMemberDlg.vPlayer TAB + %title TAB + TribeAdminMemberDlg.vPerm, + TribeAdminMemberDlg, + TribeAdminMemberDlg.key); - Canvas.popDialog(TribeAdminMemberDlg); - } - else - { - MessageBoxOK("WARNING","Member Title contains illegal characters. Please correct and try again."); - } + Canvas.popDialog(TribeAdminMemberDlg); + } + else + { + MessageBoxOK("WARNING","Member Title contains illegal characters. Please correct and try again."); + } } else - MessageBoxOK("WARNING","Member Title cannot be blank...really."); + MessageBoxOK("WARNING","Member Title cannot be blank...really."); } //----------------------------------------------------------------------------- function TAM_OnAction(%caller) @@ -643,7 +696,7 @@ function TribeAndWarriorBrowserGui::onWake(%this) // Open the player's page: %warrior = getField( %info, 0 ); TWBTabView.view( %warrior, "Warrior" ); - w_profile.setValue(1); + w_profile.setValue(1); // Add tabs for the player's tribal pages: %tribeCount = getField( getRecord( %info, 1 ), 0 ); //%cert @@ -654,9 +707,9 @@ function TribeAndWarriorBrowserGui::onWake(%this) } } else if(PlayerPane.visible) - PlayerPane.onWake(); + PlayerPane.onWake(); else - TribePane.onWake(); + TribePane.onWake(); } //----------------------------------------------------------------------------- function TribeAndWarriorBrowserGui::setKey( %this, %key ) @@ -686,100 +739,100 @@ function TribeAndWarriorBrowserGui::onSleep(%this) //==-- CreateTribeDlg ------------------------------------------------------- function CreateTribeDlg::onWake( %this ) { - //rbAppendTab.setValue(1); + //rbAppendTab.setValue(1); updateTribeTagPreview(); } //----------------------------------------------------------------------------- function CreateTribeDlg::CreateTribe(%this) { - CreateTribeProcess(); + CreateTribeProcess(); } //----------------------------------------------------------------------------- function CreateTribeDlg::Cancel(%this) { - Canvas.PopDialog(CreateTribeDlg); + Canvas.PopDialog(CreateTribeDlg); $CreateTribeName = ""; $CreateTribeTag = ""; - CreateTribeDlg.delete(); + CreateTribeDlg.delete(); - if(isObject(CreateTribeDlg)) - CreateTribeDlg.delete(); + if(isObject(CreateTribeDlg)) + CreateTribeDlg.delete(); } //----------------------------------------------------------------------------- function CreateTribeDlg::onDatabaseQueryResult(%this,%status,%resultString,%key) { - if ( %this.key != %key ) - return; -// echo("RECV: " @ %status); - if(getField(%status,0)==0) - { - switch$(%this.state) - { - case "createTribe": - TWBTabView.view( $CreateTribeName, "Tribe" ); - Canvas.popDialog(CreateTribeDlg); - $CreateTribeName = ""; - $CreateTribeTag = ""; - if(isObject(CreateTribeDlg)) - CreateTribeDlg.delete(); - WonUpdateCertificate(); - } - } - else if (getSubStr(getField(%status,1),0,9) $= "ORA-04061") - { - %this.state = "error"; - MessageBoxOK("ERROR","There was an error processing your request, please wait a few moments and try again."); - } - else - { - %this.state = "error"; - MessageBoxOK("WARNING",getField(%status,1)); - } - Canvas.setCursor(defaultCursor); + if ( %this.key != %key ) + return; +// echo("RECV: " @ %status); + if(getField(%status,0)==0) + { + switch$(%this.state) + { + case "createTribe": + TWBTabView.view( $CreateTribeName, "Tribe" ); + Canvas.popDialog(CreateTribeDlg); + $CreateTribeName = ""; + $CreateTribeTag = ""; + if(isObject(CreateTribeDlg)) + CreateTribeDlg.delete(); + WonUpdateCertificate(); + } + } + else if (getSubStr(getField(%status,1),0,9) $= "ORA-04061") + { + %this.state = "error"; + MessageBoxOK("ERROR","There was an error processing your request, please wait a few moments and try again."); + } + else + { + %this.state = "error"; + MessageBoxOK("WARNING",getField(%status,1)); + } + Canvas.setCursor(defaultCursor); } //----------------------------------------------------------------------------- function CreateTribeDlg::onDatabaseRow(%this,%row,%isLastRow,%key) { - if( %this.key != %key ) - return; -// echo("RECV: " @ %row); + if( %this.key != %key ) + return; +// echo("RECV: " @ %row); } //==-- TribeAdminMemberDlg --------------------------------------------------- function TribeAdminMemberDlg::onWake(%this) { - + } //----------------------------------------------------------------------------- function TribeAdminMemberDlg::onDatabaseQueryResult( %this, %status, %resultString, %key) { if ( %this.key != %key ) - return; -// echo("RECV: " @ %status); - if(getField(%status,0)==0) - { - switch$(%this.state) - { - case "setMemberProfile": - %this.state = "done"; - ForumsTopicsList.refreshFlag = true; - messageBoxOK("COMPLETE","Member Profile has been updated","WonUpdateCertificate();TL_Profile.setValue(1);"); - } - } - else if (getSubStr(getField(%status,1),0,9) $= "ORA-04061") - { - %this.state = "error"; - MessageBoxOK("ERROR","There was an error processing your request, please wait a few moments and try again."); - } - else - messageBoxOK("WARNING",getField(%status,1)); - Canvas.setCursor(defaultCursor); + return; +// echo("RECV: " @ %status); + if(getField(%status,0)==0) + { + switch$(%this.state) + { + case "setMemberProfile": + %this.state = "done"; + ForumsTopicsList.refreshFlag = true; + messageBoxOK("COMPLETE","Member Profile has been updated","WonUpdateCertificate();TL_Profile.setValue(1);"); + } + } + else if (getSubStr(getField(%status,1),0,9) $= "ORA-04061") + { + %this.state = "error"; + MessageBoxOK("ERROR","There was an error processing your request, please wait a few moments and try again."); + } + else + messageBoxOK("WARNING",getField(%status,1)); + Canvas.setCursor(defaultCursor); } //----------------------------------------------------------------------------- function TribeAdminMemberDlg::onDatabaseRow(%this,%row,%isLastRow,%key) { if ( %this.key != %key ) - return; -// echo("RECV: " @ %row); + return; +// echo("RECV: " @ %row); } //----------------------------------------------------------------------------- function TribeAdminMemberDlg::connectionTerminated( %this, %key ) @@ -818,83 +871,83 @@ function BrowserSearchMatchList::onSelect( %this, %id, %text ) //----------------------------------------------------------------------------- function BrowserSearchMatchList::onAdd(%this) { -// BrowserSearchMatchList.addStyle( 1, "Univers", 12 , "150 150 150", "200 200 200", "60 60 60" ); +// BrowserSearchMatchList.addStyle( 1, "Univers", 12 , "150 150 150", "200 200 200", "60 60 60" ); } //==-- BrowserSearchPane ---------------------------------------------------- function BrowserSearchPane::onDatabaseQueryResult(%this, %status, %resultStatus, %key) { if(%key != %this.key) return; - echo("RECV: " @ %status); - if(getField(%status,0)==0) - { - switch$(%this.state) - { - case "warriorSearch": - if(getField(%resultStatus,0)<=0) - { - %this.state = "done"; - MessageBoxOK("NOTICE","No Players found"); - } - else - { - %this.rowNum = -1; - %this.state = "warrior"; - } - case "tribeSearch": - if(getField(%resultStatus,0)<=0) - { - %this.state = "done"; - MessageBoxOK("NOTICE","No Tribes found"); - } - else - { - %this.rowNum = -1; - %this.state = "tribe"; - } - case "getOnline": - error("GONLINE:" @ %status TAB %resultString); - if(getField(%status,0) == 0) - for(%str=0;%strRequest Invite") : "NO"); - %Tdesc = %Tdesc @ "" NL ""; - TWBText.setText(%TDesc); - TProfileHdr.Desc = %resultString; - if(trim(TProfileHdr.tribegfx) !$= "") - TeamPix.setBitmap(TProfileHdr.tribegfx); - else - TeamPix.setBitmap($TribeGfx); - TWBTitle.name = TPRofileHdr.tribeName; - TWBTitle.setValue(TProfileHdr.tribeName TAB TProfileHdr.tribeTag); - TWBText.SetText(TWBText.getText() NL TProfileHdr.Desc); - if(memberlist.rowCount()==0) - { - %this.needRefresh = 0; - TL_ROSTER.setValue(1); - } + case "getTribeProfile": + %this.state = "done"; + GetProfileHdr(0,getFields(%status,2)); + TWBText.Clear(); + %isMember = getTribeMember(TProfileHdr.TribeName); + %Tdesc = "Recruiting: " @ + (TProfileHdr.recruiting ? (%isMember ? "YES" : "YES Request Invite") : "NO"); + %Tdesc = %Tdesc @ "" NL ""; + TWBText.setText(%TDesc); + TProfileHdr.Desc = %resultString; + if(trim(TProfileHdr.tribegfx) !$= "") + TeamPix.setBitmap(TProfileHdr.tribegfx); + else + TeamPix.setBitmap($TribeGfx); + TWBTitle.name = TPRofileHdr.tribeName; + TWBTitle.setValue(TProfileHdr.tribeName TAB TProfileHdr.tribeTag); + TWBText.SetText(TWBText.getText() NL TProfileHdr.Desc); + if(memberlist.rowCount()==0) + { + %this.needRefresh = 0; + TL_ROSTER.setValue(1); + } - case "getTribeRoster": - %this.linecount--; - %this.MList = ""; - if(getField(%resultString,0)>0) + case "getTribeRoster": + //error("GTRoster Rows: " @ getField(%resultString,0)); + %this.linecount--; + %this.MList = ""; + %this.trid = 0; + if(isObject(memberListGroup)) + memberListGroup.delete(); + if(getField(%resultString,0)>0) { - %this.state = "tribeRoster"; + %this.state = "tribeRoster"; %this.rosterRowcount = getField(%resultString,0); } - else - { - %this.state="done"; - messageBoxOK("NOTICE","No Tribe Members Found."); - } + else + { + %this.state="done"; + messageBoxOK("NOTICE","No Tribe Members Found."); + } - case "getTribeNews": - TWBText.Clear(); - %this.articleLines = 0; - if(GetTribeMember(TProfileHdr.tribeName)) - { - TWBText.SetText("" @ TProfileHdr.tribeName @ " Options:" @ - "\n\nTribal Forum\n" @ - "Tribal Chat: Public\n" @ - "Tribal Chat: Private"); - } - else - { - TWBText.SetText("" @ TProfileHdr.tribeName @ " Options:\n\n" @ - "Enter " @ TProfileHdr.tribeName @ " Public Chat\n" ); - } + case "getTribeNews": + TWBText.Clear(); + %this.articleLines = 0; + if(GetTribeMember(TProfileHdr.tribeName)) + { + TWBText.SetText("" @ TProfileHdr.tribeName @ " Options:" @ + "\n\nTribal Forum\n" @ + "Tribal Chat: Public\n" @ + "Tribal Chat: Private"); + } + else + { + TWBText.SetText("" @ TProfileHdr.tribeName @ " Options:\n\n" @ + "Enter " @ TProfileHdr.tribeName @ " Public Chat\n" ); + } - %this.state = "done"; + %this.state = "done"; -// if(getField(%resultString,0)>0) -// { -// %this.state = "tribeNews"; -// } -// else -// { -// %this.state="done"; -// messageBoxOK("NOTICE","No Tribe News."); -// } +// if(getField(%resultString,0)>0) +// { +// %this.state = "tribeNews"; +// } +// else +// { +// %this.state="done"; +// messageBoxOK("NOTICE","No Tribe News."); +// } - case "getTribeInvites": - if(getField(%resultString,0) > 0) - { - %this.state = "tribeInvites"; - } - else - { - %this.NeedRefresh = 0; - %this.state = "done"; - } - case "cancelInvite": - %this.state = "done"; - tl_invites.setValue(1); - case "setTribeGfx": - %this.state = "done"; - messageBoxOK("NOTICE",getField(%status,1)); - tl_profile.setValue(1); - case "changeTribeTag": - %this.state = "done"; - messageBoxOK("NOTICE","Tribe Tag has been updated.","WonUpdateCertificate();"); - case "requestInvite": - %this.state = "done"; - messageBoxOK("NOTICE",getField(%status,1)); - } - } - else if (getSubStr(getField(%status,1),0,9) $= "ORA-04061") - { - %this.state = "error"; - MessageBoxOK("ERROR","There was an error processing your request, please wait a few moments and try again."); - } - else - { - %this.state = "done"; - messageBoxOK("WARNING",getField(%status,1)); - } - canvas.setCursor(DefaultCursor); + case "getTribeInvites": + if(getField(%resultString,0) > 0) + { + %this.state = "tribeInvites"; + %this.tiid = 0; + if(isObject(memberListGroup)) + memberListGroup.delete(); + } + else + { + %this.NeedRefresh = 0; + %this.state = "done"; + } + case "cancelInvite": + %this.state = "done"; + tl_invites.setValue(1); + case "setTribeGfx": + %this.state = "done"; + messageBoxOK("NOTICE",getField(%status,1)); + tl_profile.setValue(1); + case "changeTribeTag": + %this.state = "done"; + messageBoxOK("NOTICE","Tribe Tag has been updated.","WonUpdateCertificate();"); + case "requestInvite": + %this.state = "done"; + messageBoxOK("NOTICE",getField(%status,1)); + } + } + else if (getSubStr(getField(%status,1),0,9) $= "ORA-04061") + { + %this.state = "error"; + MessageBoxOK("ERROR","There was an error processing your request, please wait a few moments and try again."); + } + else + { + %this.state = "done"; + messageBoxOK("WARNING",getField(%status,1)); + } + canvas.setCursor(DefaultCursor); } //----------------------------------------------------------------------------- function TribePane::onDatabaseRow(%this, %row, %isLastRow, %key) { if ( %this.key != %key ) - return; -// echo("RECV: " @ %row); - switch$(%this.state) - { - case "tribeRoster": - %name = getField(%row, 0); - %wid = getField(%row,3); - %linkName = getLinkName(%row, 0); - %adminLevel = getField(%row, 5); - %title = getField(%row, 4); - %date = getField(%row, 6); - %editkick = getField(%row, 8); - %onLine = getField(%row,9); - if(%this.Admin $= "007") - %this.Admin = %name; + return; +// echo("RECV: " @ %row); + switch$(%this.state) + { + case "tribeRoster": + %name = getField(%row, 0); + %wid = getField(%row,3); + %linkName = getLinkName(%row, 0); + %adminLevel = getField(%row, 5); + %title = getField(%row, 4); + %date = getField(%row, 6); + %editkick = getField(%row, 8); + %onLine = getField(%row,9); - if(%name !$="") - { - MemberList.AddMember(%wid,%name,%adminLevel,%editkick,%row); - MemberList.AddRow(%wid,%name TAB %title TAB %adminLevel); -// MemberList.setRowStylebyID( %wid, !%onLine ); - } + if(%this.Admin $= "007") + %this.Admin = %name; - if(%this.linecount <= 0) - %this.MList = %this.MList @ %name; - else if (%this.MList $= "") - if(%name !$="") - %this.MList = %name @ ","; - else - %this.Mlist = ""; - else - if(%name !$= "") - %this.MList = %this.MList @ %name @ ","; - %this.linecount++; + if(%name !$="") + { + MemberList.AddMember(%this.trid, %wid,%name,%adminLevel,%editkick,%row); + MemberList.AddRow(%wid,%name TAB %title TAB %adminLevel TAB %this.trid); + %this.trid++; + //MemberList.setRowStylebyID( %wid, !%onLine ); + } - if(%isLastRow) - { - MemberList.GetOnlineStatus(); - if(%this.needRefresh) - { - %this.needRefresh = 0; - TL_ROSTER.setValue(1); - } - } + if(%isLastRow) + { + %this.MList = %this.MList @ %name; + MemberList.GetOnlineStatus(); + if(%this.needRefresh) + { + %this.needRefresh = 0; + TL_ROSTER.setValue(1); + } + } + else + %this.MList = %this.MList @ %name @ ","; - case "tribeNews": - %this.articleID = getField(%row,0); - %this.forumName = getField(%row,1); - %authorQuad = getFields(%row,5,8); - %this.articleAuthor = getLinkName(%authorQuad); - %this.articleUpdate = getField(%row,9); - %this.articleTitle = getField(%row,10); - %text = "" @ "" - @ %this.articleTitle @ ""NL " submitted by " @ %this.articleAuthor SPC "on" SPC %this.articleUpdate @ "\n"; - %text = %text @ getFields(%row,11); - TWBText.SetText(TWBText.GetText() @ %text @ "\n------------------------------------\n\n"); + %this.linecount++; - case "tribeInvites": - %inviteId = getField(%row,0); - %inviteDate = getField(%row,1); - %invitorQuad = getField(getfields(%row,2,5),0); - %invitedQuad = getField(getFields(%row,6,9),0); - %isOwned = getField(%row,10); - %onLine = getField(%row,11); - MemberList.AddInvite(%inviteID,%invitedQuad,%invitorQuad,%isOwned,%row); - MemberList.AddRow(%inviteID, getField(%invitedQuad,0) TAB %inviteDate); - MemberList.setRowStylebyID( %inviteId, !%onLine ); - if(%isLastRow) + case "tribeNews": + %this.articleID = getField(%row,0); + %this.forumName = getField(%row,1); + %authorQuad = getFields(%row,5,8); + %this.articleAuthor = getLinkName(%authorQuad); + %this.articleUpdate = getField(%row,9); + %this.articleTitle = getField(%row,10); + %text = "" @ "" + @ %this.articleTitle @ ""NL " submitted by " @ %this.articleAuthor SPC "on" SPC %this.articleUpdate @ "\n"; + %text = %text @ getFields(%row,11); + TWBText.SetText(TWBText.GetText() @ %text @ "\n------------------------------------\n\n"); + + case "tribeInvites": + %inviteId = getField(%row,0); + %inviteDate = getField(%row,1); + %invitorQuad = getField(getfields(%row,2,5),0); + %invitedQuad = getField(getFields(%row,6,9),0); + %isOwned = getField(%row,10); + %onLine = getField(%row,11); + MemberList.AddInvite(%this.tiID, %inviteID,%invitedQuad,%invitorQuad,%isOwned,%row); + MemberList.AddRow(%inviteID, getField(%invitedQuad,0) TAB %inviteDate TAB %this.tiID); + %this.tiID++; + MemberList.setRowStylebyID( %inviteId, !%onLine ); + if(%isLastRow) MemberList.GetOnlineStatus(); - } + } } //----------------------------------------------------------------------------- function TribePane::connectionTerminated(%this,%key) { - canvas.setCursor(DefaultCursor); + canvas.setCursor(DefaultCursor); if (%this.NeedRefresh==1) { %this.NeedRefresh = 0; - TWBTitle.OldText = TWBTitle.name; + TWBTitle.OldText = TWBTitle.name; TL_Roster.setValue(1); } } //----------------------------------------------------------------------------- function TribePane::RosterDblClick(%this) { - LaunchBrowser( GetField(MemberList.getRowText(MemberList.getSelectedRow()),0), "Warrior" ); + LaunchBrowser( GetField(MemberList.getRowText(MemberList.getSelectedRow()),0), "Warrior" ); } //----------------------------------------------------------------------------- function TribePane::ButtonClick( %this, %senderid ) @@ -1491,22 +1547,22 @@ function TribePane::ButtonClick( %this, %senderid ) %this.state = "status"; %tribeName = TWBTabView.getSelectedText(); - if(isEventPending(TribeAndWarriorBrowserGui.eid)) - cancel(TribeAndWarriorBrowserGui.eid); + if(isEventPending(TribeAndWarriorBrowserGui.eid)) + cancel(TribeAndWarriorBrowserGui.eid); switch(%senderid) { case 0: //PROFILE - if(TWBTitle.OldText $= TWBTitle.name || MemberList.rowCount()==0) + if(TWBTitle.OldText $= TWBTitle.name || MemberList.rowCount()==0) %this.NeedRefresh=0; - else + else %this.NeedRefresh=1; %this.key = LaunchGui.key++; %this.state = "getTribeProfile"; TWBTitle.OldText = TWBTitle.name; TribeAndWarriorBrowserGui.eid = schedule(500,0,DatabaseQuery,22,%tribeName,%this,%this.key); - case 1: //ROSTER + case 1: //ROSTER MemberList.Clear(); MemberList.ClearColumns(); MemberList.clearList(); @@ -1534,17 +1590,17 @@ function TribePane::ButtonClick( %this, %senderid ) MemberList.addColumn( 0, "PLAYER", 100, 0, 350,"left" ); MemberList.addColumn( 1, "INVITED", 112, 0, 300, "left" ); TribeAndWarriorBrowserGui.eid = schedule(500, 0, DatabaseQueryArray,11,0,%tribeName,%this,%this.key,true); - case 4: //Admin Tribe - if(trim(TWBText.getText()) !$= "") - { - TribePropertiesDlg.pendingChanges = ""; - Canvas.PushDialog(TribePropertiesDlg); - } - else - { - tl_profile.setvalue(1); - MessageBoxOk("ERROR","The Tribe Profile was not properly loaded, please wait a moment and try again"); - } + case 4: //Admin Tribe + if(trim(TWBText.getText()) !$= "") + { + TribePropertiesDlg.pendingChanges = ""; + Canvas.PushDialog(TribePropertiesDlg); + } + else + { + tl_profile.setvalue(1); + MessageBoxOk("ERROR","The Tribe Profile was not properly loaded, please wait a moment and try again"); + } } } //----------------------------------------------------------------------------- @@ -1578,64 +1634,72 @@ function PlayerPane::onAdd(%this) //----------------------------------------------------------------------------- function PlayerPane::onWake(%this) { - w_admin.setVisible(getField(getRecord(wonGetAuthInfo(),0),0) $= TProfileHdr.PlayerName); - if(trim(TProfileHdr.playerGfx)$="") - PlayerPix.setBitmap($PlayerGfx); - else - PlayerPix.setBitmap(TProfileHdr.playergfx); + w_admin.setVisible(getField(getRecord(wonGetAuthInfo(),0),0) $= TProfileHdr.PlayerName); + if(trim(TProfileHdr.playerGfx)$="") + PlayerPix.setBitmap($PlayerGfx); + else + PlayerPix.setBitmap(TProfileHdr.playergfx); - w_profile.setValue(1); + w_profile.setValue(1); } //----------------------------------------------------------------------------- function PlayerPane::onDatabaseQueryResult(%this,%status,%resultString,%key) { - if(%this.key != %key) - return; -// echo("RECV: " @ %status); - if(getField(%status,0)==0) - { - switch$(%this.state) - { - case "getWarriorProfile": - %isCaller = getField(getRecord(wonGetAuthInfo(),0),0) $= TWBTitle.name; - TWBTitle.name = getField(%status,2); - TWBTitle.SetValue(( getField(%status,4) ? getField(%status,2) @ getField(%status,3) : getField(%status,3) @ getField(%status,2))); - GetProfileHdr(1,getFields(%status,2)); - if(trim(TProfileHdr.playerGfx) !$= "") - PlayerPix.setBitmap(TProfileHdr.playerGfx); - else - PlayerPix.setBitmap($PlayerGfx); - %profileText = " \n"; - %profileText = %profileText @ "Registered:" SPC TProfileHdr.registered @ "\n"; -// %profileText = %profileText @ "Online: " SPC (TProfileHdr.onLine ? "YES":"NO") @ "\n"; + if(%this.key != %key) + return; +// echo("RECV: " @ %status); + if(getField(%status,0)==0) + { + switch$(%this.state) + { + case "getWarriorProfile": + %isCaller = getField(getRecord(wonGetAuthInfo(),0),0) $= TWBTitle.name; + TWBTitle.name = getField(%status,2); + TWBTitle.SetValue(( getField(%status,4) ? getField(%status,2) @ getField(%status,3) : getField(%status,3) @ getField(%status,2))); + GetProfileHdr(1,getFields(%status,2)); + if(trim(TProfileHdr.playerGfx) !$= "") + PlayerPix.setBitmap(TProfileHdr.playerGfx); + else + PlayerPix.setBitmap($PlayerGfx); + %profileText = " \n"; + %profileText = %profileText @ "Registered:" SPC TProfileHdr.registered @ "\n"; +// %profileText = %profileText @ "Online: " SPC (TProfileHdr.onLine ? "YES":"NO") @ "\n"; - if(trim(TProfileHdr.playerURL) !$= "") - %profileText = %profileText @ "WebSite: " SPC ""@TProfileHdr.playerURL@"\n\n"; - else - %profileText = %profileText @ "WebSite: " SPC "www.tribes2.com\n\n"; + if(trim(TProfileHdr.playerURL) !$= "") + %profileText = %profileText @ "WebSite: " SPC ""@TProfileHdr.playerURL@"\n\n"; + else + %profileText = %profileText @ "WebSite: " SPC "www.tribes2.com\n\n"; + + %profileText = %profileText @ ""; + W_Text.setText(%profileText @ %resultString); + TProfileHdr.Desc = %resultString; + if( w_memberlist.rowCount() ==0 ) + { + %this.needRefresh = 0; + W_tribes.setValue(1); + } + case "getWarriorHistory": + W_Text.setText("\nPLAYER HISTORY:\n\n"); + W_Text.setText(W_Text.getText() @ ""); + if(getField(%resultString,0)>0) + %this.state = "warriorHistory"; + else + %this.state = "done"; + case "getWarriorTribeList": + %this.wtid = 0; + if(isObject(w_memberListGroup)) + w_memberListGroup.delete(); + + if(getField(%resultString,0)>0) + %this.state = "warriorTribeList"; + else + %this.state = "done"; + case "getWarriorBuddyList": + %this.blid = 0; + if(isObject(w_memberListGroup)) + w_memberListGroup.delete(); - %profileText = %profileText @ ""; - W_Text.setText(%profileText @ %resultString); - TProfileHdr.Desc = %resultString; - if( w_memberlist.rowCount() ==0 ) - { - %this.needRefresh = 0; - W_tribes.setValue(1); - } - case "getWarriorHistory": - W_Text.setText("\nPLAYER HISTORY:\n\n"); - W_Text.setText(W_Text.getText() @ ""); - if(getField(%resultString,0)>0) - %this.state = "warriorHistory"; - else - %this.state = "done"; - case "getWarriorTribeList": - if(getField(%resultString,0)>0) - %this.state = "warriorTribeList"; - else - %this.state = "done"; - case "getWarriorBuddyList": if(getField(%resultString,0)>0) %this.state = "warriorBuddyList"; else @@ -1671,8 +1735,8 @@ function PlayerPane::onDatabaseQueryResult(%this,%status,%resultString,%key) w_tribes.setValue(1); case "getVisitorOptions": %isCaller = getField(getRecord(wonGetAuthInfo(),0),0) $= TWBTitle.name; - %callerTribes = getField(%status,8); - %callerTribeList = getFields(%status,9); + %callerTribes = getField(%status,9); + %callerTribeList = getFields(%status,10); if(!%isCaller) { %newText = "OPTIONS:\n\n"; @@ -1713,120 +1777,123 @@ function PlayerPane::onDatabaseQueryResult(%this,%status,%resultString,%key) MessageBoxOK("CONFIRMED",getField(%status,1)); case "changePlayerName": %this.state = "done"; - IRCClient::quit(); - WonUpdateCertificate(); - TProfileHdr.playername = NewNameEdit.getValue(); - wp_currentname.setText(NewNameEdit.getValue()); - twbTabView.setTabText(twbTabView.getSelectedId(),NewNameEdit.getValue()); - w_profile.setValue(1); - MessageBoxOK("CONFIRMED","Warrior name has been changed." NL "This will require you to close and restart the game to ensure proper function","WarriorPropertiesDlg.onWake();"); - case "clearWarriorDescription": - %this.state = "done"; - MessageBoxOK("CONFIRMED","Warrior Description Cleared"); - } - } - else if (getSubStr(getField(%status,1),0,9) $= "ORA-04061") - { - %this.state = "error"; - MessageBoxOK("ERROR","There was an error processing your request, please wait a few moments and try again."); - } - else - { - %this.state = "error"; - MessageBoxOK("WARNING",getField(%status,1)); - } - canvas.setCursor(DefaultCursor); + IRCClient::quit(); + if(WonUpdateCertificate()) + { + TProfileHdr.playername = NewNameEdit.getValue(); + wp_currentname.setText(NewNameEdit.getValue()); + twbTabView.setTabText(twbTabView.getSelectedId(),NewNameEdit.getValue()); + MessageBoxOK("CONFIRMED","Warrior name has been changed." NL "This will require you to close and restart the game to ensure proper function","WarriorPropertiesDlg.onWake();"); + } + case "clearWarriorDescription": + %this.state = "done"; + MessageBoxOK("CONFIRMED","Warrior Description Cleared"); + } + } + else if (getSubStr(getField(%status,1),0,9) $= "ORA-04061") + { + %this.state = "error"; + MessageBoxOK("ERROR","There was an error processing your request, please wait a few moments and try again."); + } + else + { + %this.state = "error"; + MessageBoxOK("WARNING",getField(%status,1)); + } + canvas.setCursor(DefaultCursor); } //----------------------------------------------------------------------------- function PlayerPane::onDatabaseRow(%this,%row,%isLastRow,%key) { - if(%this.key != %key) - return; -// echo("RECV: " @ %row); - switch$(%this.state) - { - case "warriorHistory": - W_Text.setText(W_Text.getText() @ %row @ "\n"); - if(%isLastRow) - { - %this.state = "done"; - if( %this.needRefresh ) - { - %this.needRefresh = 0; - W_tribes.setValue(1); - } - } - case "warriorTribeList": - %wid = getField(%row,2); - %name = getField(%row,0); - %title = getField(%row,5); - %adminLevel = getField(%row,3); - %editkick = getField(%row,4); - W_MemberList.AddMember(%wid,%name,%adminLevel,%editkick,%row); - W_MemberList.AddRow(%wid,%name TAB %title TAB %adminLevel); + if(%this.key != %key) + return; +// echo("RECV: " @ %row); + switch$(%this.state) + { + case "warriorHistory": + W_Text.setText(W_Text.getText() @ %row @ "\n"); + if(%isLastRow) + { + %this.state = "done"; + if( %this.needRefresh ) + { + %this.needRefresh = 0; + W_tribes.setValue(1); + } + } + case "warriorTribeList": + %wid = getField(%row,2); + %name = getField(%row,0); + %title = getField(%row,5); + %adminLevel = getField(%row,3); + %editkick = getField(%row,4); + W_MemberList.AddMember(%this.wtid, %wid,%name,%adminLevel,%editkick,%row); + W_MemberList.AddRow(%wid,%name TAB %title TAB %adminLevel TAB %this.wtid); + %this.wtid++; - case "warriorBuddyList": - W_MemberList.AddInvite(getField(%row,3),getFields(%row,0,3),getFields(%row,0,3),4,%row); - W_MemberList.AddRow(getField(%row,3),getField(%row,0) TAB getField(%row,4)); - if(%isLastRow) - W_MemberList.getOnlineStatus(); -// W_MemberList.setRowStyleByID(getField(%row,3),!getField(%row,5)); - } + case "warriorBuddyList": + W_MemberList.AddInvite(%this.blid, getField(%row,3),getFields(%row,0,3),getFields(%row,0,3),4,%row); + W_MemberList.AddRow(getField(%row,3),getField(%row,0) TAB getField(%row,4) TAB %this.blid); + %this.blid++; + if(%isLastRow) + W_MemberList.getOnlineStatus(); +// W_MemberList.setRowStyleByID(getField(%row,3),!getField(%row,5)); + } } //----------------------------------------------------------------------------- function PlayerPane::DblClick(%this) { - - if(w_buddylist.getValue()==1 && getField(GetRecord(wonGetAuthInfo(),0),0) $= TWBTabView.getTabText(TWBTabView.GetSelectedID())) - %caller = "Warrior"; - else if (w_tribes.getValue()==1) - %caller = "Tribe"; - else - %caller = ""; - if(trim(%caller) !$="") - LaunchBrowser( GetField(W_MemberList.getRowText(W_MemberList.getSelectedRow()),0), %caller); + + if(w_buddylist.getValue()==1 && getField(GetRecord(wonGetAuthInfo(),0),0) $= TWBTabView.getTabText(TWBTabView.GetSelectedID())) + %caller = "Warrior"; + else if (w_tribes.getValue()==1) + %caller = "Tribe"; + else + %caller = ""; + if(trim(%caller) !$="") + LaunchBrowser( GetField(W_MemberList.getRowText(W_MemberList.getSelectedRow()),0), %caller); } //----------------------------------------------------------------------------- function PlayerPane::ButtonClick( %this, %senderid ) -{ - canvas.SetCursor(ArrowWaitCursor); - %this.key = LaunchGui.key++; - %this.tabstate = "WARRIOR"; - if(isEventPending(TribeAndWarriorBrowserGui.eid)) - cancel(TribeAndWarriorBrowserGui.eid); - switch(%senderid) +{ + canvas.SetCursor(ArrowWaitCursor); + %this.key = LaunchGui.key++; + %this.tabstate = "WARRIOR"; + if(isEventPending(TribeAndWarriorBrowserGui.eid)) + cancel(TribeAndWarriorBrowserGui.eid); + switch(%senderid) { - case 0: //Player Profile w/ Description - W_Text.setValue(""); - %this.state = "getWarriorProfile"; - %this.qrystatus = 0; - %owner = getField(getRecord(WonGetAuthInfo(),0),0); - %playerName = TWBTabView.getTabText(TWBTabView.GetSelectedID()); - if(TWBTitle.OldText $= TWBTitle.name || w_memberlist.rowCount()==0) - %this.NeedRefresh=0; - else - %this.NeedRefresh=1; + case 0: //Player Profile w/ Description + W_Text.setValue(""); + %this.state = "getWarriorProfile"; + %this.qrystatus = 0; + %owner = getField(getRecord(WonGetAuthInfo(),0),0); + %playerName = TWBTabView.getTabText(TWBTabView.GetSelectedID()); + if(TWBTitle.OldText $= TWBTitle.name || w_memberlist.rowCount()==0) + %this.NeedRefresh=0; + else + %this.NeedRefresh=1; - TWBTitle.OldText = TWBTitle.name; - if (%owner $= %PlayerName) - %callId = 2; - else - %callId = 1; + TWBTitle.OldText = TWBTitle.name; + if (%owner $= %PlayerName) + %callId = 2; + else + %callId = 1; - TribeAndWarriorBrowserGui.eid = schedule(500,0,DatabaseQuery,23,%playerName,%this,%this.key); - case 1: //Player History - W_Text.setValue(""); - %this.state = "getWarriorHistory"; - %this.qrystatus = 1; - %playerName = TWBTabView.getTabText(TWBTabView.GetSelectedID()); - %callId = 3; - - TribeAndWarriorBrowserGui.eid = schedule(500,0,DatabaseQueryArray,12,0,%playerName,%this,%this.key,true); + TribeAndWarriorBrowserGui.eid = schedule(500,0,DatabaseQuery,23,%playerName,%this,%this.key); + case 1: //Player History + W_Text.setValue(""); + %this.state = "getWarriorHistory"; + %this.qrystatus = 1; + %playerName = TWBTabView.getTabText(TWBTabView.GetSelectedID()); + %callId = 3; + TribeAndWarriorBrowserGui.eid = schedule(500,0,DatabaseQueryArray,12,0,%playerName,%this,%this.key,true); case 2: //TribeList W_MemberList.Clear(); W_MemberList.ClearColumns(); W_MemberList.clearList(); W_MemberList.CID = 0; + %this.wtid = 0; %this.state = "getWarriorTribeList"; W_MemberList.addColumn( 0, "TRIBE", 94, 0, 330 ); W_MemberList.addColumn( 1, "TITLE", 80, 0, 300 ); @@ -1838,15 +1905,17 @@ function PlayerPane::ButtonClick( %this, %senderid ) for(%ix=0;%ix= 2; - W_MemberList.AddMember(%wid,%name,%adminLevel,%editkick,%row); - W_MemberList.AddRow(%wid,%name TAB %title TAB %adminLevel); + W_MemberList.AddMember(%this.wtid, %wid,%name,%adminLevel,%editkick,%row); + W_MemberList.AddRow(%wid,%name TAB %title TAB %adminLevel TAB %this.wtid); + %this.wtid++; } } else @@ -1880,44 +1949,45 @@ function PlayerPane::ButtonClick( %this, %senderid ) w_profile.setValue(1); messageBoxOK("ERROR","Your Profile was not loaded properly, Please wait a moment and try again"); } - } } //----------------------------------------------------------------------------- function W_MemberList::ClearList() { - if(isObject(W_MemberListGroup)) - W_MemberListGroup.Delete(); + if(isObject(W_MemberListGroup)) + W_MemberListGroup.Delete(); } //----------------------------------------------------------------------------- -function W_MemberList::AddMember(%this,%id, %name, %access, %plevel, %vline) +function W_MemberList::AddMember(%this,%mid, %id, %name, %access, %plevel, %vline) { - if(!isObject(W_MemberListGroup)) - new SimGroup(W_MemberListGroup); + if(!isObject(W_MemberListGroup)) + new SimGroup(W_MemberListGroup); %player = new scriptObject() { className = "TMember"; + rowID = %mid; name = %name; classId = %id; privLevel = %access; canAdmin = %plevel; - rcvrec = %vline; + rcvrec = %vline; }; W_MemberListGroup.Add(%player); } //----------------------------------------------------------------------------- -function W_MemberList::AddInvite(%this, %id, %invited, %invitor, %plevel, %vline) +function W_MemberList::AddInvite(%this, %rid, %id, %invited, %invitor, %plevel, %vline) { - if(!isObject(W_MemberListGroup)) - new SimGroup(W_MemberListGroup); + if(!isObject(W_MemberListGroup)) + new SimGroup(W_MemberListGroup); %player = new ScriptObject() { className = "TBuddy"; - classId = %id; - name = %invited; - privLevel = %plevel; - iName = %invitor; - rcvrec = %vline; + rowID = %rid; + classId = %id; + name = %invited; + privLevel = %plevel; + iName = %invitor; + rcvrec = %vline; }; W_MemberListGroup.add(%player); } @@ -1926,24 +1996,28 @@ function W_MemberList::onRightMouseDown( %this, %column, %row, %mousePos ) { // Open the action menu: W_MemberList.setSelectedRow(%row); - if(getField(GetRecord(WonGetAuthInfo(),0),0) $= TWBTabView.getTabText(TWBTabView.GetSelectedID())) //is it me? - { - warriorPopup.player = w_memberlistgroup.getObject(%row); - if ( WarriorPopup.player.name !$= "" ) - { - WarriorPopup.position = %mousePos; - Canvas.pushDialog(WarriorPopupDlg); - WarriorPopUpDlg.onWake(); - WarriorPopup.forceOnAction(); - } - else - error( "Member/Invite Locate Error!" ); - } + if(getField(GetRecord(WonGetAuthInfo(),0),0) $= TWBTabView.getTabText(TWBTabView.GetSelectedID())) //is it me? + { + if(w_tribes.getValue()) + %ka = 3; + else + %ka = 2; + warriorPopup.player = w_memberlistgroup.getObject(getField(W_MemberList.getRowText(W_MemberList.getSelectedRow()),%ka)); + if ( WarriorPopup.player.name !$= "" ) + { + WarriorPopup.position = %mousePos; + Canvas.pushDialog(WarriorPopupDlg); + WarriorPopUpDlg.onWake(); + WarriorPopup.forceOnAction(); + } + else + error( "Member/Invite Locate Error!" ); + } } //----------------------------------------------------------------------------- function w_MemberList::onAdd(%this) { - W_MemberList.addStyle( 1, "Univers", 12 , "150 150 150", "200 200 200", "60 60 60" ); + W_MemberList.addStyle( 1, "Univers", 12 , "150 150 150", "200 200 200", "60 60 60" ); } //----------------------------------------------------------------------------- function W_MemberList::GetOnlineStatus(%this) @@ -1976,127 +2050,129 @@ function W_MemberList::onDatabaseQueryResult(%this,%status,%resultString,%key) //==-------------------------------------------------------------------------- function WarriorPopupDlg::onWake( %this ) { - TribeAndWarriorBrowserGui.WDialogOpen = true; - warriorPopUP.clear(); + TribeAndWarriorBrowserGui.WDialogOpen = true; + warriorPopUP.clear(); switch(W_MemberList.CID) { - case 0: if(getField(GetRecord(WonGetAuthInfo(),0),0) $= TWBTabView.getTabText(TWBTabView.GetSelectedID())) - { // visitor is owner - WarriorPopUp.add( strupr(WarriorPopup.Player.name), -1); - WarriorPopUp.add( "---------------------------------------------", -1); -// WarriorPopup.add( "Clear Primary Tribe setting", 0); - WarriorPopUp.add( "Make Primary Tribe", 1 ); - WarriorPopup.add( "Leave Tribe", 2 ); - WarriorPopup.add( "Go To Forum", 3 ); - } + case 0: if(getField(GetRecord(WonGetAuthInfo(),0),0) $= TWBTabView.getTabText(TWBTabView.GetSelectedID())) + { // visitor is owner + WarriorPopUp.add( strupr(WarriorPopup.Player.name), -1); + WarriorPopUp.add( "---------------------------------------------", -1); +// WarriorPopup.add( "Clear Primary Tribe setting", 0); + WarriorPopUp.add( "Make Primary Tribe", 1 ); + WarriorPopup.add( "Leave Tribe", 2 ); + WarriorPopup.add( "Go To Forum", 3 ); + } - case 1: if(getField(GetRecord(WonGetAuthInfo(),0),0) $= TWBTabView.getTabText(TWBTabView.GetSelectedID())) - { // visitor is owner - WarriorPopUp.add( strupr(getField(WarriorPopup.player.name,0)), -1); - WarriorPopUp.add( "---------------------------------------------", -1); - WarriorPopup.add( "Contact By EMail", 4 ); - WarriorPopup.add( "Remove from Buddylist", 5 ); - WarriorPopup.add( ".............................................", -1); - WarriorPopup.add( "Clear BuddyList", 6 ); - WarriorPopup.add( "EMail BuddyList", 7 ); - } + case 1: if(getField(GetRecord(WonGetAuthInfo(),0),0) $= TWBTabView.getTabText(TWBTabView.GetSelectedID())) + { // visitor is owner + WarriorPopUp.add( strupr(getField(WarriorPopup.player.name,0)), -1); + WarriorPopUp.add( "---------------------------------------------", -1); + WarriorPopup.add( "Contact By EMail", 4 ); + WarriorPopup.add( "Remove from Buddylist", 5 ); + WarriorPopup.add( ".............................................", -1); + WarriorPopup.add( "Clear BuddyList", 6 ); + WarriorPopup.add( "EMail BuddyList", 7 ); + } - case 2: WarriorPopup.Add("HMMM...",8); - case 3: WarriorPopup.Add("HMMM...",8); - default: WarriorPopup.Add("HMMM...",8); + case 2: WarriorPopup.Add("HMMM...",8); + case 3: WarriorPopup.Add("HMMM...",8); + default: WarriorPopup.Add("HMMM...",8); } Canvas.rePaint(); } //----------------------------------------------------------------------------- function WarriorPopup::onSelect( %this, %id, %text ) { - switch( %id ) - { - case 0: // 0 Make No Primary Tribe - %player = "NONE"; - LinkMakePrimary("setNoPrimaryTribe",%player,PlayerPane); - case 1: // 1 Make Primary Tribe - %player = getField(WarriorPopup.player.name,0); - LinkMakePrimary("setPrimaryTribe",%player,PlayerPane); - case 2: // 2 Leave Tribe - %tribe = getField(WarriorPopup.player.name,0); - MessageBoxYesNo("CONFIRM", "Are you sure you wish to leave \n" @ %player @ "" @ %tribe @ "?", - "LinkLeaveTribe(\"" @ %tribe @ "\",\"" @ PlayerPane @ "\");",""); - case 3: // 3 Go To TribeForum - %tribe = getField(WarriorPopup.player.name,0); - switch$(%tribe) - { - case "T2 ADMINISTRATION": - %tribe = "Game Feedback"; - } - ForumsThreadPane.setVisible(false); - ForumsTopicsPane.setVisible(true); - linkForum(%tribe,""); - case 4: // 4 EMail Buddy - %player = getField(WarriorPopup.player.name,0); - LinkEMail(%player); - case 5: // 5 Remove Buddy - %player = getField(WarriorPopup.player.name,0); - LinkRemoveBuddy(%player, PlayerPane, "removeBuddy"); - case 6: // clear Buddylist; - LinkClearBuddylist(PlayerPane,"removeBuddy"); - case 7: // 7 EMail Buddylist - for(%x=0;%x\n" @ %player @ "" @ %tribe @ "?", + "LinkLeaveTribe(\"" @ %tribe @ "\",\"" @ PlayerPane @ "\");",""); + case 3: // 3 Go To TribeForum + %tribe = getField(WarriorPopup.player.name,0); + switch$(%tribe) + { + case "T2 ADMINISTRATION": + %tribe = "Game Feedback"; + } + ForumsThreadPane.setVisible(false); + ForumsTopicsPane.setVisible(true); + linkForum(%tribe,""); + case 4: // 4 EMail Buddy + %player = getField(WarriorPopup.player.name,0); + LinkEMail(%player); + case 5: // 5 Remove Buddy + %player = getField(WarriorPopup.player.name,0); + LinkRemoveBuddy(%player, PlayerPane, "removeBuddy"); + case 6: // clear Buddylist; + LinkClearBuddylist(PlayerPane,"removeBuddy"); + case 7: // 7 EMail Buddylist + for(%x=0;%x\n" @ %player @ " from " @ %tribe @ "?", - "LinkKickMember(\"" @ %player @ "\",\"" @ %tribe @ "\"," @ %this @ ");", ""); - case 1: // 1 Admin Member - LinkEditMember(GetField(TribememberPopup.player.rcvrec,0) - ,TWBTabView.GetTabText(TWBTabView.GetSelectedID()) - ,GetField(TribeMemberPopup.player.rcvrec,5) - ,GetField(TribeMemberPopup.player.rcvrec,4) - ,TribeAdminMemberDlg); - case 2: // 2 EMail Member - LinkEMail(TribeMemberPopup.player.name); - case 3: // 3 EMail Tribe - LinkEMail(TribePane.MList); - case 4: // 4 Add To Buddylist - MessageBoxYesNo("CONFIRM","Add " @ TribeMemberPopup.player.name @ " to Buddy List?", - "LinkAddBuddy(\"" @ TribeMemberPopup.player.name @ "\",TWBText,\"addBuddy\");",""); - case 5: // 5 Add To Blocklist - MessageBoxYesNo("CONFIRM","Block Email from " @ TribeMemberPopup.player.name @ "?", - "LinkBlockPlayer(\"" @ TribeMemberPopup.player.name @ "\",EmailGui,\"setBlock\");",""); - // -- 1-INVITE ---- - case 6: // 6 Cancel Invite - %player = TribeMemberPopup.player.name; - %tribe = TWBTabView.GetTabText(TWBTabView.GetSelectedID()); - MessageBoxYesNo("CONFIRM", "Are you sure you wish to cancel the invitation for " @ %player @ " to join " @ %tribe @ "?", - "TribeMemberPopup.onSelect(12,\"call12\");",""); - case 7: // 7 EMail Invited Player - LinkEMail(TribeMemberPopup.player.name); - case 8: // 8 INVITE TO CHAT - MessageboxOK("NOTICE","This is a preview of coming functionality and is not yet available for use."); - case 9: - case 10: - case 11: - case 12: %player = TribeMemberPopup.player.name; - %tribe = TWBTabView.GetTabText(TWBTabView.GetSelectedID()); - LinkInvitation("cancel",%tribe,%player,TribePane); + // -- 0-ROSTER ---- + case 0: // 0 Kick + %player = TribeMemberPopup.player.name; + %tribe = TWBTabView.GetTabText(TWBTabView.GetSelectedID()); + if(MemberList.rowCount()==1) + TribePropertiesDlg.DisbandTribe(TribePropertiesDlg); + else + MessageBoxYesNo("CONFIRM", "Are you sure you wish to kick \n" @ %player @ " from " @ %tribe @ "?", + "LinkKickMember(\"" @ %player @ "\",\"" @ %tribe @ "\"," @ %this @ ");", ""); + case 1: // 1 Admin Member + LinkEditMember(GetField(TribememberPopup.player.rcvrec,0) + ,TWBTabView.GetTabText(TWBTabView.GetSelectedID()) + ,GetField(TribeMemberPopup.player.rcvrec,5) + ,GetField(TribeMemberPopup.player.rcvrec,4) + ,TribeAdminMemberDlg); + case 2: // 2 EMail Member + LinkEMail(TribeMemberPopup.player.name); + case 3: // 3 EMail Tribe + LinkEMailTribe(MemberList.getSelectedID()); + case 4: // 4 Add To Buddylist + MessageBoxYesNo("CONFIRM","Add " @ TribeMemberPopup.player.name @ " to Buddy List?", + "LinkAddBuddy(\"" @ TribeMemberPopup.player.name @ "\",TWBText,\"addBuddy\");",""); + case 5: // 5 Add To Blocklist + MessageBoxYesNo("CONFIRM","Block Email from " @ TribeMemberPopup.player.name @ "?", + "LinkBlockPlayer(\"" @ TribeMemberPopup.player.name @ "\",EmailGui,\"setBlock\");",""); + // -- 1-INVITE ---- + case 6: // 6 Cancel Invite + %player = TribeMemberPopup.player.name; + %tribe = TWBTabView.GetTabText(TWBTabView.GetSelectedID()); + MessageBoxYesNo("CONFIRM", "Are you sure you wish to cancel the invitation for " @ %player @ " to join " @ %tribe @ "?", + "TribeMemberPopup.onSelect(12,\"call12\");",""); + case 7: // 7 EMail Invited Player + LinkEMail(TribeMemberPopup.player.name); + case 8: // 8 INVITE TO CHAT + MessageboxOK("NOTICE","This is a preview of coming functionality and is not yet available for use."); + case 9: + case 10: + case 11: + case 12: %player = TribeMemberPopup.player.name; + %tribe = TWBTabView.GetTabText(TWBTabView.GetSelectedID()); + LinkInvitation("cancel",%tribe,%player,TribePane); } canvas.popDialog(TribeMemberPopupDlg); } //----------------------------------------------------------------------------- function TribeMemberPopupDlg::onSleep(%this) { - TribeWarriorBrowserGui.TDialogOpen = false; + TribeWarriorBrowserGui.TDialogOpen = false; } //----------------------------------------------------------------------------- function TribePropertiesDlg::onWake(%this) { - if(TProfileHdr.recruiting) - TP_RecruitFlagBtn.setValue(1); - else - TP_RecruitFlagNoBtn.setValue(1); + if(TProfileHdr.recruiting) + TP_RecruitFlagBtn.setValue(1); + else + TP_RecruitFlagNoBtn.setValue(1); - if(TProfileHdr.appending) - TP_AppendFlagBtn.setValue(1); - else - TP_PrePendFlagBtn.setValue(1); + if(TProfileHdr.appending) + TP_AppendFlagBtn.setValue(1); + else + TP_PrePendFlagBtn.setValue(1); - TP_CurrentTag.setText(TProfileHdr.TribeTag); - TP_NewTag.setText(TProfileHdr.TribeTag); - TP_TribeDescription.setText(TProfileHdr.Desc); + TP_CurrentTag.setText(TProfileHdr.TribeTag); + TP_NewTag.setText(TProfileHdr.TribeTag); + TP_TribeDescription.setText(TProfileHdr.Desc); - %this.RefreshTag(); - %this.pendingChanges = ""; + %this.RefreshTag(); + %this.pendingChanges = ""; } //----------------------------------------------------------------------------- function TribePropertiesDlg::Close(%this) { - if(%this.pendingChanges $="") - { - Canvas.popDialog(%this); - GraphicsControl.setVisible(0); - SecurityControl.setVisible(0); - ProfileControl.setVisible(1); - TL_Profile.setValue(1); - } - else - MessageBoxYesNo("CONFIRM","Close without saving changes?", - "Canvas.popDialog("@%this@");TL_Profile.setValue(1);",""); + if(%this.pendingChanges $="") + { + Canvas.popDialog(%this); + GraphicsControl.setVisible(0); + SecurityControl.setVisible(0); + ProfileControl.setVisible(1); + TL_Profile.setValue(1); + } + else + MessageBoxYesNo("CONFIRM","Close without saving changes?", + "Canvas.popDialog("@%this@");TL_Profile.setValue(1);",""); } //----------------------------------------------------------------------------- function TribePropertiesDlg::DisbandTribe(%this) { - MessageBoxYesNo("CONFIRM","NOTE: Only the Tribe Owner will be able to disband the Tribe." NL " " NL - "DISBAND " @ TProfileHdr.tribename @ "?", - "KillTribe(\"" @ TProfileHdr.tribename @ "\");",""); + MessageBoxYesNo("CONFIRM","NOTE: Only the Tribe Owner will be able to disband the Tribe." NL " " NL + "DISBAND " @ TProfileHdr.tribename @ "?", + "KillTribe(\"" @ TProfileHdr.tribename @ "\");",""); } //----------------------------------------------------------------------------- function TribePropertiesDlg::ChangeRecruiting(%this) { - if(TP_RecruitFlagBtn.getValue()) - %recruiting = 1; - else - %recruiting = 0; - if(TProfileHdr.recruiting != %recruiting) - { - LinkTribeToggle("Recruiting",TProfileHdr.TribeName TAB TP_RecruitFlagBtn.getValue(),TWBText,"togglerecruiting"); - %this.pendingChanges=""; - } + if(TP_RecruitFlagBtn.getValue()) + %recruiting = 1; + else + %recruiting = 0; + if(TProfileHdr.recruiting != %recruiting) + { + LinkTribeToggle("Recruiting",TProfileHdr.TribeName TAB TP_RecruitFlagBtn.getValue(),TWBText,"togglerecruiting"); + %this.pendingChanges=""; + } } //----------------------------------------------------------------------------- function TribePropertiesDlg::ToggleAppending(%this) { - if(TProfileHdr.appending != TP_AppendFlagBtn.getValue()) - { - LinkTribeToggle("Appending",TProfileHdr.TribeName TAB TP_AppendFlagBtn.getValue(),TWBText,"toggleappending"); - %this.pendingChanges=""; - } + if(TProfileHdr.appending != TP_AppendFlagBtn.getValue()) + { + LinkTribeToggle("Appending",TProfileHdr.TribeName TAB TP_AppendFlagBtn.getValue(),TWBText,"toggleappending"); + %this.pendingChanges=""; + } } //----------------------------------------------------------------------------- function TribePropertiesDlg::ChangeTag(%this) { - if(TP_NewTag.getValue() !$= "") - { - TextCheck(TP_NewTag.getValue(),%this); - if(%this.textCheck==1) - { - MessageBoxOK("WARNING","The requested Tribe Tag contains invalid characters, please change your tag and try again."); - } - else - { - TribePane.key = LaunchGui.key++; - TribePane.state = "changeTribeTag"; - DatabaseQuery(30,TProfileHdr.tribeID TAB TP_NewTag.getValue(),TribePane,TribePane.key); - %this.pendingChanges=""; - } - } - else - { - MessageBoxOK("WARNING","Tribe Tag cannot be blank","TP_NewTag.makeFirstResponder(1);"); - } + if(TP_NewTag.getValue() !$= "") + { + TextCheck(TP_NewTag.getValue(),%this); + if(%this.textCheck==1) + { + MessageBoxOK("WARNING","The requested Tribe Tag contains invalid characters, please change your tag and try again."); + } + else + { + TribePane.key = LaunchGui.key++; + TribePane.state = "changeTribeTag"; + DatabaseQuery(30,TProfileHdr.tribeID TAB TP_NewTag.getValue(),TribePane,TribePane.key); + %this.pendingChanges=""; + } + } + else + { + MessageBoxOK("WARNING","Tribe Tag cannot be blank","TP_NewTag.makeFirstResponder(1);"); + } } //----------------------------------------------------------------------------- function TribePropertiesDlg::EditDescription(%this) { - %this.pendingChanges = "EDITDESC"; - %this.UpdateDescription(); + %this.pendingChanges = "EDITDESC"; + %this.UpdateDescription(); } //----------------------------------------------------------------------------- function TribePropertiesDlg::ClearDescription(%this) { - TribePane.key = LaunchGui.key++; - TP_TribeDescription.setText(""); - TProfileHdr.Desc = ""; - TWBText.editType = "tribe"; + TribePane.key = LaunchGui.key++; + TP_TribeDescription.setText(""); + TProfileHdr.Desc = ""; + TWBText.editType = "tribe"; canvas.SetCursor(ArrowWaitCursor); - DatabaseQuery(15,TProfileHdr.tribename TAB getRecordCount(%desc) TAB %desc,TribePane,TribePane.key); + DatabaseQuery(15,TProfileHdr.tribename TAB getRecordCount(%desc) TAB %desc,TribePane,TribePane.key); } //----------------------------------------------------------------------------- function TribePropertiesDlg::UpdateDescription(%this) { - TWBText.editType = "tribe"; - LinkEditWarriorDesc(TProfileHdr.tribename,TWBText); + TWBText.editType = "tribe"; + LinkEditWarriorDesc(TProfileHdr.tribename,TWBText); } //----------------------------------------------------------------------------- function TribePropertiesDlg::RefreshTag(%this) @@ -2373,43 +2454,43 @@ function TribePropertiesDlg::RefreshTag(%this) //----------------------------------------------------------------------------- function TribePropertiesDlg::LoadGfxPane(%this) { - TribeGraphic.setBitmap(TProfileHdr.tribeGfx); - %ctrl = TribeGraphicsList; - %fileSpec = "*.jpg"; - %ctrl.clearColumns(); - %ctrl.clear(); - %ctrl.addColumn( 0, "FILENAME", 100, 0, 200 ); - %id = -1; - %rowId = ""; - for ( %file = findFirstFile( %fileSpec ); %file !$= ""; %file = findNextFile( %fileSpec ) ) - { - %currBmp = TeamPix.Bitmap; - %match = "texticons/twb/" @ fileBase( %file ) @ ".jpg" $= %currBmp; - if(getSubStr(fileBase(%file) @ ".jpg",0,3)$= "twb") - %ctrl.addRow( %id++, fileBase( %file ) ); + TribeGraphic.setBitmap(TProfileHdr.tribeGfx); + %ctrl = TribeGraphicsList; + %fileSpec = "*.jpg"; + %ctrl.clearColumns(); + %ctrl.clear(); + %ctrl.addColumn( 0, "FILENAME", 100, 0, 200 ); + %id = -1; + %rowId = ""; + for ( %file = findFirstFile( %fileSpec ); %file !$= ""; %file = findNextFile( %fileSpec ) ) + { + %currBmp = TeamPix.Bitmap; + %match = "texticons/twb/" @ fileBase( %file ) @ ".jpg" $= %currBmp; + if(getSubStr(fileBase(%file) @ ".jpg",0,3)$= "twb") + %ctrl.addRow( %id++, fileBase( %file ) ); - if(%match) - %rowId = %id; - } - if(%rowID!$="") - %ctrl.setSelectedRow(%rowID); + if(%match) + %rowId = %id; + } + if(%rowID!$="") + %ctrl.setSelectedRow(%rowID); } //----------------------------------------------------------------------------- function TribePropertiesDlg::setTribeGraphic(%this) { - if(isEventPending(TribeAndWarriorBrowserGui.eid)) - cancel(TribeAndWarriorBrowserGui.eid); - TribePane.key = LaunchGui.key++; - TribePane.state = "setTribeGfx"; - TeamPix.setBitmap(TribeGraphic.bitmap); + if(isEventPending(TribeAndWarriorBrowserGui.eid)) + cancel(TribeAndWarriorBrowserGui.eid); + TribePane.key = LaunchGui.key++; + TribePane.state = "setTribeGfx"; + TeamPix.setBitmap(TribeGraphic.bitmap); canvas.SetCursor(ArrowWaitCursor); - TribeAndWarriorBrowserGui.eid = schedule(250,0,DatabaseQuery,29,TProfileHdr.tribename TAB TribeGraphic.bitmap,TribePane,TribePane.key); + TribeAndWarriorBrowserGui.eid = schedule(250,0,DatabaseQuery,29,TProfileHdr.tribename TAB TribeGraphic.bitmap,TribePane,TribePane.key); } //----------------------------------------------------------------------------- function TribeGraphicsList::onSelect(%this) { - %jpg = "texticons/twb/" @ %this.getRowText(%this.getSelectedRow()) @ ".jpg"; - TribeGraphic.setBitmap(%jpg); + %jpg = "texticons/twb/" @ %this.getRowText(%this.getSelectedRow()) @ ".jpg"; + TribeGraphic.setBitmap(%jpg); } //----------------------------------------------------------------------------- function TribePropertiesDlg::ConnectionTerminated(%this) @@ -2418,132 +2499,132 @@ function TribePropertiesDlg::ConnectionTerminated(%this) //----------------------------------------------------------------------------- function WarriorPropertiesDlg::onWake(%this) { - %this.pendingChanges = ""; - UrlEdit.setValue(TProfileHdr.playerURL); - WP_CurrentName.setValue(TProfileHdr.playername); - NewNameEdit.setValue(""); - WP_WarriorDescription.setText(TProfileHdr.Desc); - %this.LoadGfxPane(); + %this.pendingChanges = ""; + UrlEdit.setValue(TProfileHdr.playerURL); + WP_CurrentName.setValue(TProfileHdr.playername); + NewNameEdit.setValue(""); + WP_WarriorDescription.setText(TProfileHdr.Desc); + %this.LoadGfxPane(); } //----------------------------------------------------------------------------- function WarriorPropertiesDlg::Close(%this) { - if(%this.pendingChanges !$="") - MessageBoxYesNo("CONFIRM","Close without saving changes?", - "Canvas.popDialog("@%this@");W_Profile.setValue(1);",""); - else - { - Canvas.popDialog(%this); - w_GraphicsControl.setVisible(0); - W_ProfilePane.setVisible(1); - W_Profile.setValue(1); - } + if(%this.pendingChanges !$="") + MessageBoxYesNo("CONFIRM","Close without saving changes?", + "Canvas.popDialog("@%this@");W_Profile.setValue(1);",""); + else + { + Canvas.popDialog(%this); + w_GraphicsControl.setVisible(0); + W_ProfilePane.setVisible(1); + W_Profile.setValue(1); + } } //----------------------------------------------------------------------------- function WarriorPropertiesDlg::EditDescription(%this) { - %this.pendingChanges = "EDITDESC"; - TWBText.editType = "warrior"; - LinkEditWarriorDesc(getField(TWBTitle.getValue(),0),TWBText); + %this.pendingChanges = "EDITDESC"; + TWBText.editType = "warrior"; + LinkEditWarriorDesc(getField(TWBTitle.getValue(),0),TWBText); } //----------------------------------------------------------------------------- function WarriorPropertiesDlg::ClearDescription(%this) { - MessageBoxYesNo("CONFIRM","Clear your Players Description?","WarriorPropertiesDlg.doClearDescription();",""); + MessageBoxYesNo("CONFIRM","Clear your Players Description?","WarriorPropertiesDlg.doClearDescription();",""); } //----------------------------------------------------------------------------- function WarriorPropertiesDlg::doClearDescription(%this) { - PlayerPane.key = LaunchGui.key++; - PlayerPane.state = "clearWarriorDescription"; - TProfileHdr.Desc = "NONE"; - TWBText.editType = "warrior"; + PlayerPane.key = LaunchGui.key++; + PlayerPane.state = "clearWarriorDescription"; + TProfileHdr.Desc = "NONE"; + TWBText.editType = "warrior"; canvas.SetCursor(ArrowWaitCursor); - %this.pendingChanges = ""; - EditDescriptionText.setText("No Description On File"); - WP_WarriorDescription.setText(EditDescriptionText.getText()); - DatabaseQuery(17,TProfileHdr.Desc,PlayerPane,PlayerPane.key); + %this.pendingChanges = ""; + EditDescriptionText.setText("No Description On File"); + WP_WarriorDescription.setText(EditDescriptionText.getText()); + DatabaseQuery(17,TProfileHdr.Desc,PlayerPane,PlayerPane.key); } //----------------------------------------------------------------------------- function WarriorPropertiesDlg::LoadGfxPane(%this) { - PlayerGraphic.setBitmap(PlayerPix.bitmap); - %ctrl = WarriorGraphicsList; - %width = getSubStr(%ctrl.getExtent(),0,3)-4; - %fileSpec = "*.jpg"; - %ctrl.clearColumns(); - %ctrl.clear(); - %ctrl.addColumn( 0, "FILENAME",%width, 0, 200 ); - %id = -1; - %rowId = ""; - for ( %file = findFirstFile( %fileSpec ); %file !$= ""; %file = findNextFile( %fileSpec ) ) - { - %currBmp = PlayerPix.Bitmap; - %match = "texticons/twb/" @ fileBase( %file ) @ ".jpg" $= %currBmp; + PlayerGraphic.setBitmap(PlayerPix.bitmap); + %ctrl = WarriorGraphicsList; + %width = getSubStr(%ctrl.getExtent(),0,3)-4; + %fileSpec = "*.jpg"; + %ctrl.clearColumns(); + %ctrl.clear(); + %ctrl.addColumn( 0, "FILENAME",%width, 0, 200 ); + %id = -1; + %rowId = ""; + for ( %file = findFirstFile( %fileSpec ); %file !$= ""; %file = findNextFile( %fileSpec ) ) + { + %currBmp = PlayerPix.Bitmap; + %match = "texticons/twb/" @ fileBase( %file ) @ ".jpg" $= %currBmp; - if(getSubStr(fileBase(%file) @ ".jpg",0,3)$= "twb") - %ctrl.addRow( %id++, fileBase( %file ) ); + if(getSubStr(fileBase(%file) @ ".jpg",0,3)$= "twb") + %ctrl.addRow( %id++, fileBase( %file ) ); - if(%match) - %rowId = %id; - } - if(%rowID!$="") - %ctrl.setSelectedRow(%rowID); + if(%match) + %rowId = %id; + } + if(%rowID!$="") + %ctrl.setSelectedRow(%rowID); } //----------------------------------------------------------------------------- function WarriorPropertiesDlg::setPlayerGraphic(%this) { - if(isEventPending(TribeAndWarriorBrowserGui.eid)) - cancel(TribeAndWarriorBrowserGui.eid); - PlayerPane.key = LaunchGui.key++; - PlayerPane.state = "setPlayerGfx"; - PlayerPix.setBitmap(PlayerGraphic.bitmap); + if(isEventPending(TribeAndWarriorBrowserGui.eid)) + cancel(TribeAndWarriorBrowserGui.eid); + PlayerPane.key = LaunchGui.key++; + PlayerPane.state = "setPlayerGfx"; + PlayerPix.setBitmap(PlayerGraphic.bitmap); canvas.SetCursor(ArrowWaitCursor); - %this.pendingChanges = ""; - TribeAndWarriorBrowserGui.eid = schedule(250,0,DatabaseQuery,31,PlayerGraphic.bitmap,PlayerPane,PlayerPane.key); + %this.pendingChanges = ""; + TribeAndWarriorBrowserGui.eid = schedule(250,0,DatabaseQuery,31,PlayerGraphic.bitmap,PlayerPane,PlayerPane.key); } //----------------------------------------------------------------------------- function WarriorPropertiesDlg::UpdateUrl(%this) { - if(trim(UrlEdit.getValue()) $= "") - { - UrlEdit.setValue("www.tribes2.com"); - MessageBoxYesNo("CONFIRM","Your URL is blank, by default www.tribes2.com will become your URL. Continue?","WarriorPropertiesDlg.setURL();","UrlEdit.setValue(\"\");"); - } - else - WarriorPropertiesDlg.setURL(); - + if(trim(UrlEdit.getValue()) $= "") + { + UrlEdit.setValue("www.tribes2.com"); + MessageBoxYesNo("CONFIRM","Your URL is blank, by default www.tribes2.com will become your URL. Continue?","WarriorPropertiesDlg.setURL();","UrlEdit.setValue(\"\");"); + } + else + WarriorPropertiesDlg.setURL(); + } //----------------------------------------------------------------------------- function WarriorPropertiesDlg::setURL(%this) { - if(isEventPending(TribeAndWarriorBrowserGui.eid)) - cancel(TribeAndWarriorBrowserGui.eid); - PlayerPane.key = LaunchGui.key++; - PlayerPane.state = "setPlayerUrl"; - canvas.SetCursor(ArrowWaitCursor); - %this.pendingChanges = ""; - DatabaseQuery(32,UrlEdit.getValue(),PlayerPane,PlayerPane.key); + if(isEventPending(TribeAndWarriorBrowserGui.eid)) + cancel(TribeAndWarriorBrowserGui.eid); + PlayerPane.key = LaunchGui.key++; + PlayerPane.state = "setPlayerUrl"; + canvas.SetCursor(ArrowWaitCursor); + %this.pendingChanges = ""; + DatabaseQuery(32,UrlEdit.getValue(),PlayerPane,PlayerPane.key); } //----------------------------------------------------------------------------- function WarriorPropertiesDlg::ChangePlayerName(%this) -{ - MessageBoxYesNo("CONFIRM","Changing your name will require you to close the game and restart. Proceed?","WarriorPropertiesDlg.ProcessNameChange();","NewNameEdit.setValue(\"\");"); +{ + MessageBoxYesNo("CONFIRM","Changing your name will require you to close the game and restart. Proceed?","WarriorPropertiesDlg.ProcessNameChange();","NewNameEdit.setValue(\"\");"); } //----------------------------------------------------------------------------- function WarriorPropertiesDlg::ProcessNameChange(%this) { - PlayerPane.key = LaunchGui.key++; - PlayerPane.state = "changePlayerName"; + PlayerPane.key = LaunchGui.key++; + PlayerPane.state = "changePlayerName"; canvas.SetCursor(ArrowWaitCursor); - %this.pendingChanges = ""; - DatabaseQuery(33,NewNameEdit.getValue(),PlayerPane,PlayerPane.key); + %this.pendingChanges = ""; + DatabaseQuery(33,NewNameEdit.getValue(),PlayerPane,PlayerPane.key); } //----------------------------------------------------------------------------- function WarriorGraphicsList::onSelect(%this) { - %jpg = "texticons/twb/" @ %this.getRowText(%this.getSelectedRow()) @ ".jpg"; - PlayerGraphic.setBitmap(%jpg); + %jpg = "texticons/twb/" @ %this.getRowText(%this.getSelectedRow()) @ ".jpg"; + PlayerGraphic.setBitmap(%jpg); } //----------------------------------------------------------------------------- function WarriorPropertiesDlg::ConnectionTerminated(%this) diff --git a/base/scripts/webemail.cs b/base/scripts/webemail.cs index 6dbc024..ff31128 100644 --- a/base/scripts/webemail.cs +++ b/base/scripts/webemail.cs @@ -13,6 +13,7 @@ //echo("Added email: " @ %tag SPC %text); $EmailCachePath = "webcache/" @ getField(getRecord(wonGetAuthInfo(),0),3) @ "/"; +$EmailFileName = "email1"; $EmailColumnCount = 0; $EmailColumnName[0] = "Status"; $EmailColumnRange[0] = "50 75"; @@ -41,13 +42,13 @@ function LaunchEmail() //----------------------------------------------------------------------------- function EmailMessageNew() { - $EmailToAddress = ""; - $EmailCCAddress = ""; + Email_ToEdit.setText(""); + Email_CCEdit.setText(""); $EmailSubject = ""; + EmailBodyText.setValue(""); EMailComposeDlg.state = "sendMail"; Canvas.pushDialog(EmailComposeDlg); - EmailBodyText.setValue(""); Email_ToEdit.makeFirstResponder(1); } //----------------------------------------------------------------------------- @@ -55,12 +56,12 @@ function EmailMessageReply() { EMailComposeDlg.state = "replyMail"; %text = EmailMessageVector.getLineTextByTag( EM_Browser.getSelectedId() ); - $EmailToAddress = getField(getRecord(%text, 1), 0); - $EmailCCAddress = ""; + Email_ToEdit.setText(getField(getRecord(%text, 1), 0)); + Email_CCEdit.setText(""); $EmailSubject = "RE: " @ getRecord(%text, 6); %date = getRecord(%text, 3); Canvas.pushDialog(EmailComposeDlg); - EmailBodyText.setValue("\n\n----------------------------------\n On " @ %date SPC $EmailToAddress @ " wrote:\n\n" @ EmailGetBody(%text) ); + EmailBodyText.setValue("\n\n----------------------------------\n On " @ %date SPC Email_toEdit.getValue() @ " wrote:\n\n" @ EmailGetBody(%text) ); EmailBodyText.SetCursorPosition(0); EmailBodyText.makeFirstResponder(1); } @@ -68,8 +69,8 @@ function EmailMessageReply() function EmailMessageForward() { %text = EmailMessageVector.getLineTextByTag( EM_Browser.getSelectedId() ); - $EmailToAddress = ""; - $EmailCCAddress = ""; + Email_ToEdit.setText(""); + Email_CCEdit.setText(""); $EmailSubject = "FW: " @ getRecord(%text, 6); Canvas.pushDialog(EmailComposeDlg); EmailBodyText.setValue("\n\n\n--- Begin Forwarded Message ---\n\n" @ EmailGetTextDisplay(%text)); @@ -82,12 +83,12 @@ function EmailMessageReplyAll() { EMailComposeDlg.state = "replyAll"; %text = EmailMessageVector.getLineTextByTag( EM_Browser.getSelectedId() ); - $EmailToAddress = getField(getRecord(%text, 1), 0); - $EmailCCAddress = getRecord(%text, 4) @ getRecord(%text,5); + Email_ToEdit.setText(getField(getRecord(%text, 1), 0)); + Email_CCEdit.setText(getRecord(%text, 4) @ getRecord(%text,5)); $EmailSubject = "RE: " @ getRecord(%text, 6); %date = getRecord(%text, 3); Canvas.pushDialog(EmailComposeDlg); - EmailBodyText.setValue("\n\n===========================\n On " @ %date SPC $EmailToAddress @ " wrote:\n\n" @ EmailGetBody(%text) ); + EmailBodyText.setValue("\n\n===========================\n On " @ %date SPC Email_ToEdit.getValue() @ " wrote:\n\n" @ EmailGetBody(%text) ); EmailBodyText.makeFirstResponder(1); EmailBodyText.SetCursorPosition(0); } @@ -144,10 +145,14 @@ function DoEmailDelete(%qnx, %mid, %owner, %key, %row) function EmailSend() { EMailComposeDlg.key = LaunchGui.key++; - CheckEmailNames(); EMailComposeDlg.state = "sendMail"; - %text = $EMailToAddress TAB $EMailCCAddress TAB $EmailSubject TAB EMailBodyText.getValue(); - DatabaseQuery(5,getsubstr(%text,0,3600),EMailComposeDlg,EMailComposeDlg.key); + CheckEmailNames(); + %to = Email_ToEdit.getValue(); + %cc = Email_CCEdit.getValue(); + %subj = $EmailSubject; + %text = EMailBodyText.getValue(); + %lenny = strLen(%to @ %cc @ %subj); + DatabaseQuery(5, %to TAB %cc TAB %subj TAB getSubStr(%text,0,4000-%lenny),EMailComposeDlg,EMailComposeDlg.key); Canvas.popDialog(EmailComposeDlg); } //----------------------------------------------------------------------------- @@ -203,37 +208,38 @@ function getLinkNameList(%line) //----------------------------------------------------------------------------- function CheckEmailNames() { - $EmailTOAddress = strUpr(trim($EmailTOAddress)); - $EmailCCAddress = strUpr(trim($EmailCCAddress)); - %toLength = strLen($EmailTOAddress); - %ccLength = strLen($EmailCCAddress); + %EmailTOAddress = strUpr(trim(Email_ToEdit.getValue())); + %EmailCCAddress = strUpr(trim(Email_CCEdit.getValue())); + %toLength = strLen(%EmailTOAddress); + %ccLength = strLen(%EmailCCAddress); %checkList = ""; if(%toLength > 0) { - if(trim(getSubStr($EmailTOAddress,%toLength-1,1)) !$= "," || trim(getSubStr($EmailTOAddress,%toLength,1)) !$= ",") - $EmailTOAddress = $EmailTOAddress @ ","; + if(trim(getSubStr(%EmailTOAddress,%toLength-1,1)) !$= "," || trim(getSubStr(%EmailTOAddress,%toLength,1)) !$= ",") + %EmailTOAddress = %EmailTOAddress @ ","; } else - $EmailTOAddress = ","; + %EmailTOAddress = ","; if(%ccLength > 0) { - if(trim(getSubStr($EmailCCAddress,%ccLength-1,1)) !$= "," || trim(getSubStr($EmailCCAddress,%ccLength,1)) !$= ",") - $EmailCCAddress = $EmailCCAddress @ ","; + if(trim(getSubStr(%EmailCCAddress,%ccLength-1,1)) !$= "," || trim(getSubStr(%EmailCCAddress,%ccLength,1)) !$= ",") + %EmailCCAddress = %EmailCCAddress @ ","; } else %ccList = ","; + for(%x=0;%x<2;%x++) { %pos = 0; %start = 0; if(%x == 0) - %nList = $EmailTOAddress; + %nList = %EmailTOAddress; else if(%x == 1) { - $EmailTOAddress = %nList; - %nList = $EmailCCAddress; + %EmailTOAddress = %nList; + %nList = %EmailCCAddress; } if(strLen(%nList)>1) @@ -283,7 +289,9 @@ function CheckEmailNames() } } } - $EmailCCAddress = %nList; + %EmailCCAddress = %nList; + Email_ToEdit.setText(%EMailToAddress); + Email_CCEdit.setText(%EmailCCAddress); } //----------------------------------------------------------------------------- function EmailGetTextDisplay(%text) @@ -500,14 +508,14 @@ function EmailComposeDlg::Cancel(%this) //----------------------------------------------------------------------------- function EmailComposeDlg::SendMail(%this) { - $EmailToAddress = Email_ToEdit.getValue(); - $EmailSubject = EMail_Subject.getValue(); + %EmailToAddress = Email_ToEdit.getValue(); + %EmailSubject = EMail_Subject.getValue(); // NEED TO CHECK FOR DUPLICATES - if(trim($EmailToAddress) $= "") + if(trim(%EmailToAddress) $= "") MessageBoxOK("No Address","TO Address may not be left blank. Please enter a player name to send this message to."); else { - if(trim($EmailSubject) $= "") + if(trim(%EmailSubject) $= "") MessageBoxOK("No Subject","Please enter a Subject for your message."); else EMailSend(); @@ -633,12 +641,6 @@ function StrToList(%listName, %str, %delim) } } //----------------------------------------------------------------------------- -// NOTE: This control is not a ShellFancyTextList, so the addStyle method is not valid -// function LC_BigList::onAdd(%this) -// { -// LC_BigList.addStyle( 1, "Univers", 12 , "150 150 150", "200 200 200", "60 60 60" ); -// } -//----------------------------------------------------------------------------- function LC_BigList::GetOnlineStatus(%this) { %this.key = LaunchGui.key++; @@ -657,14 +659,14 @@ function LC_BigList::onDatabaseQueryResult(%this,%status,%resultString,%key) { if(%key != %this.key) return; - switch$(%this.status) - { - case "getOnline": if(getField(%status,0) == 0) - for(%str=0;%str0) { + %this.txid = 0; ForumShell.setTitle($ForumsGetTopics @ ": " @ getField(%resultString,0)); %this.state = "TopicList"; %recordCount = getField(%resultString,0); @@ -785,7 +812,6 @@ function ForumsGui::onDatabaseRow(%this,%row,%isLastRow,%key) { if(%this.key != %key) return; - echo("RECV: " @ %row); %forumTID = getField(ForumsList.getRowTextbyId(ForumsList.getSelectedID()),2); switch$(%this.state) { @@ -809,6 +835,7 @@ function ForumsGui::onDatabaseRow(%this,%row,%isLastRow,%key) ForumsList.setSelectedRow( 1 ); } case "TopicList": + %id = getField(%row, 1); %topic = getField(%row, 2); %postCount = getField(%row, 3); @@ -816,13 +843,15 @@ function ForumsGui::onDatabaseRow(%this,%row,%isLastRow,%key) %name = getField(%row, 8); %hasDeletes = getField(%row,12); %slevel = getField(%row,13); - %maxUpdateId = getField(%row,14)-1; - ForumsTopicsList.addTopic( %id, %topic, %date, %maxUpdateID, %slevel, %row); - ForumsTopicsList.addRow( %id, %topic TAB %postCount TAB %name TAB %date TAB %hasDeletes); + %maxUpdateId = getField(%row,14); + ForumsTopicsList.addTopic( %this.txid, %id, %topic, %date, %maxUpdateID, %slevel, %row); + ForumsTopicsList.addRow( %id, %topic TAB %postCount TAB %name TAB %date TAB %hasDeletes TAB %this.txid); + %this.txid++; if ( %isLastRow ) //is last line { %this.state = "done"; ForumShell.setTitle("FORUMS: " @ getField(ForumsList.getRowTextbyID(ForumsList.getSelectedID()),0)); +// ForumsTopicsList.sort(); ForumsTopicsList.updateReadStatus(); %this.refreshFlag = false; if ( ForumsGui.LaunchTopic !$= "" ) @@ -873,7 +902,7 @@ function ForumsGui::onDatabaseRow(%this,%row,%isLastRow,%key) { ForumsMessageVector.tid = ForumsTopicsList.getSelectedID(); ForumsTopicsList.thread = TopicsListGroup.getObject(ForumsTopicsList.getSelectedRow()); - ForumsTopicsList.thread.updateID = %high-1; + ForumsTopicsList.thread.updateID = %high; CacheForumTopic(); ForumsMessageList.loadCache(ForumsTopicsList.getSelectedID()); } @@ -971,19 +1000,6 @@ function ForumsTopicsList::onAdd( %this ) }; }; - // Add the columns from the prefs: - for ( %i = 0; %i < $TopicColumnCount; %i++ ) - { - %this.addColumn( %i, - $TopicColumnName[%i], - $pref::Topics::Column[%i], - firstWord( $TopicColumnRange[%i] ), - getWord( $TopicColumnRange[%i], 1 ), - $TopicColumnFlags[%i] ); - } - - %this.setSortColumn( $pref::Topics::SortColumnKey ); - %this.setSortIncreasing( $pref::Topics::SortInc ); // Add the "Unread" style: %this.addStyle( 1, $ShellBoldFont, $ShellFontSize, "80 220 200", "30 255 225", "10 60 40" ); // Add the "Ignored" style: @@ -992,19 +1008,20 @@ function ForumsTopicsList::onAdd( %this ) %this.addStyle( 3, $ShellFont, $ShellFontSize, "200 50 50", "200 100 100", "200 50 50" ); } //----------------------------------------------------------------------------- -function ForumsTopicsList::AddTopic(%this, %id, %topicname, %date, %mid, %slevel, %vline) +function ForumsTopicsList::AddTopic(%this, %iRow, %id, %topicname, %date, %mid, %slevel, %vline) { if(!isObject(TopicsListGroup)) new SimGroup(TopicsListGroup); %topic = new scriptObject() { className = "TTopic"; + rowID = %iRow; Id = %id; name = %topicname; date = %date; - updateid = %mid-1; + updateid = %mid; slevel = %slevel; - rcvrec = %vline; + rcvrec = %vline; }; TopicsListGroup.Add(%topic); } @@ -1017,8 +1034,12 @@ function ForumsTopicsList::ClearList() //----------------------------------------------------------------------------- function ForumsTopicsList::onRightMouseDown( %this, %column, %row, %mousePos ) { - ForumsTopicsList.setSelectedRow(%row); - TopicsPopupMenu.topic = TopicsListGroup.getObject(%row); + ForumsTopicsList.setSelectedRow(%row); +// for(%i=0;%i= 0 @@ -1354,14 +1375,6 @@ function ForumsMessageList::onAdd( %this ) }; }; - // Add columns from the prefs: - for ( %i = 0; %i < $ForumColumnCount; %i++ ) - %this.addColumn( %i, - $ForumColumnName[%i], - $pref::Forum::Column[%i], - firstWord( $ForumColumnRange[%i] ), - getWord( $ForumColumnRange[%i], 1 ) ); - // We want no sorting done on this list -- leave them in the order that they are entered. // Add the "Unread" style: %this.addStyle( 1, $ShellBoldFont, $ShellFontSize, "80 220 200", "30 255 225", "0 0 0" ); } @@ -1378,7 +1391,7 @@ function ForumsMessageList::AddPost(%this, %id, %postname, %authorID, %authorNam author = %authorName; authorID = %authorID; date = %date; - updateid = %mid-1; + updateid = %mid; slevel = %slevel; rcvrec = %vline; }; @@ -1453,16 +1466,21 @@ function PostsPopupMenu::onSelect( %this, %id, %text ) PostsPopupDlg.key = LaunchGui.key++; PostsPopupDlg.state = "requestPostReview"; %fieldData = ForumsList.getSelectedID() TAB ForumsTopicsList.getSelectedID() TAB ForumsMessageList.getSelectedID() TAB PostsPopupMenu.post.authorID; - databaseQuery(61, %fieldData, PostsPopupDlg, PostsPopupDlg.key); + MessageBoxYesNo("CONFIRM","Request Admin Review?","PostsPopupMenu.adminCall(61,\"" @ %fieldData @ "\");",""); case 10: //Remove Post PostsPopupDlg.key = LaunchGui.key++; PostsPopupDlg.state = "adminRemovePost"; %fieldData = 0 TAB ForumsList.getSelectedID() TAB ForumsTopicsList.getSelectedID() TAB ForumsMessageList.getSelectedID() TAB PostsPopupMenu.post.authorID; - databaseQuery(63, %fieldData, PostsPopupDlg, PostsPopupDlg.key); + MessageBoxYesNo("CONFIRM","Remove Post?","PostsPopupMenu.adminCall(63,\"" @ %fieldData @ "\");",""); } canvas.popDialog(PostsPopupDlg); } //----------------------------------------------------------------------------- +function PostsPopupMenu::AdminCall(%this, %ord, %fields) +{ + databaseQuery(%ord, %fields, PostsPopupDlg, PostsPopupDlg.key); +} +//----------------------------------------------------------------------------- function PostsPopupDlg::onSleep(%this) { ForumsGui.TDialogOpen = false; @@ -1481,8 +1499,8 @@ function PostsPopupDlg::onDatabaseQueryResult(%this,%status,%recordCount,%key) ForumsMessageList.removeRow( %selRow ); ForumsMessageList.setSelectedRow( %selRow ); CacheForumTopic(); - $EmailToAddress = getField(%status,3); - $EmailCCAddress = ""; + Email_ToEdit.setText(getField(%status,3)); + Email_CCEdit.setText(""); switch(getField(%status,2)) { case 1: $EmailSubject = "Policy Violation Warning"; @@ -1721,4 +1739,4 @@ function ForumsComposeDlg::onSleep( %this ) { $pref::Forum::PostWindowPos = FC_Window.getPosition(); $pref::Forum::PostWindowExtent = FC_Window.getExtent(); -} \ No newline at end of file +} diff --git a/base/scripts/weblinks.cs b/base/scripts/weblinks.cs index 4015dd6..a0af5c1 100644 --- a/base/scripts/weblinks.cs +++ b/base/scripts/weblinks.cs @@ -1,53 +1,105 @@ -addWebLink( "Tribes 2 Home Page", "www.tribes2.com" ); -addWebLink( "T2 Technical Information", "sierrastudios.com/games/tribes2/support" ); -addWebLink( "5 Assed Monkey", "www.5assedmonkey.com" ); -addWebLink( "Arc 2055", "www.arc2055.com" ); -addWebLink( "Atari Secret Society", "www.atarisecretsociety.org" ); -addWebLink( "BarrysWorld", "www.barrysworld.com" ); -addWebLink( "Bomb", "www.bomb.net" ); -addWebLink( "Box Factory Games", "http://www.bfgames1.com" ); -addWebLink( "Clan Happytyme", "www.happytyme.com" ); -addWebLink( "ClanBase", "www.clanbase.com" ); -addWebLink( "ClanServ", "www.clanserv.com" ); -addWebLink( "Dopplegangers", "www.dopplegangers.com" ); -addWebLink( "Dutchbat Homeworld", "www.dutchbat-homeworld.com" ); -addWebLink( "eDome Tribes 2", "http://games.edome.net/tribes2/" ); -addWebLink( "Euro Tribesplayers", "www.euro-tribesplayers.com" ); -addWebLink( "eXtreme-Players", "www.eXtreme-players.de" ); -addWebLink( "Game Forces", "www.gameforces.net" ); -addWebLink( "Game Planet", "www.gameplanet.co.nz" ); -addWebLink( "Game Surf", "www.gamesurf.de" ); -addWebLink( "Grave Diggers Union", "www.gravediggersunion.com" ); -addWebLink( "HomeLan", "www.homelan.com" ); -addWebLink( "IanStorm", "www.ianstorm.com" ); -addWebLink( "IMGaming", "www.imgaming.com" ); -addWebLink( "Long Dongles", "www.longdongles.com" ); -addWebLink( "MaxBaud.Net", "www.maxbaud.net" ); -addWebLink( "MoreGaming", "www.moregaming.com" ); -addWebLink( "NetGames UK", "www.nguk.net" ); -addWebLink( "NGI", "www.ngi.it" ); -addWebLink( "PlanetTribes", "www.planettribes.com" ); -addWebLink( "Raging Angels", "www.ragingangels.org" ); -addWebLink( "Rogue Disciples", "www.roguedisciples.com" ); -addWebLink( "StrikeForce", "www.strikeforcecenter.com" ); -addWebLink( "Supreme Tribes", "www.supremetribes.com" ); -addWebLink( "Sydney Gamers League", "www.sgl.org.au" ); -addWebLink( "System Recall", "www.systemrecall.com.com" ); -addWebLink( "TeamSound", "www.teamsound.com" ); -addWebLink( "Telenordia", "www.telenordia.se" ); -addWebLink( "Telepresence Heavy Assault Team", "www.that.co.nz" ); -addWebLink( "Temple of Blood", "www.templeofblood.com" ); -addWebLink( "The Ghostbear Tribe", "www.ghostbear.net" ); -addWebLink( "ToKrZ", "www.tokrz.com" ); -addWebLink( "Tribes Attack", "www.tribesattack.com" ); -addWebLink( "Tribes Center", "www.tribescenter.com" ); -addWebLink( "Tribes 2 Database", "www.tribes2database.com" ); -addWebLink( "Tribes Gamers", "www.tribesgamers.com" ); -addWebLink( "TribesMaps", "www.tribesmaps.com" ); -addWebLink( "TribalWar", "www.tribalwar.com" ); -addWebLink( "Tribes Worlds", "www.tribesworlds.com" ); -addWebLink( "Tribes-Universe", "www.tribes-universe.com" ); -addWebLink( "WirePlay", "www.wireplay.com.au" ); -//addWebLink( "Z Free", "games13.clear.net.nz" ); +function weblinksmenu::defaultList(%this) +{ + addWebLink( "Tribes 2 Home Page", "www.tribes2.com" ); + addWebLink( "T2 Technical Information", "sierrastudios.com/games/tribes2/support" ); + addWebLink( "5 Assed Monkey", "www.5assedmonkey.com" ); + addWebLink( "Arc 2055", "www.arc2055.com" ); + addWebLink( "Atari Secret Society", "www.atarisecretsociety.org" ); + addWebLink( "BarrysWorld", "www.barrysworld.com" ); + addWebLink( "Bomb", "www.bomb.net" ); + addWebLink( "Clan Happytyme", "www.happytyme.com" ); + addWebLink( "ClanBase", "www.clanbase.com" ); + addWebLink( "ClanServ", "www.clanserv.com" ); + addWebLink( "Dopplegangers", "www.dopplegangers.com" ); + addWebLink( "Dutchbat Homeworld", "www.dutchbat-homeworld.com" ); + addWebLink( "eDome Tribes 2", "http://games.edome.net/tribes2/" ); + addWebLink( "Euro Tribesplayers", "www.euro-tribesplayers.com" ); + addWebLink( "eXtreme-Players", "www.eXtreme-players.de" ); + addWebLink( "Game Forces", "www.gforces.net" ); + addWebLink( "Game Planet", "www.gameplanet.co.nz" ); + addWebLink( "Game Surf", "www.gamesurf.de" ); + addWebLink( "Grave Diggers Union", "www.gravediggersunion.com" ); + addWebLink( "HomeLan", "www.homelan.com" ); + addWebLink( "IanStorm", "www.ianstorm.com" ); + addWebLink( "IMGaming", "www.imgaming.com" ); + addWebLink( "LAN Place", "www.lanplace.co.nz" ); + addWebLink( "Long Dongles", "www.longdongles.com" ); + addWebLink( "MaxBaud.Net", "www.maxbaud.net" ); + addWebLink( "MoreGaming", "www.moregaming.com" ); + addWebLink( "NetGames UK", "www.nguk.net" ); + addWebLink( "NGI", "www.ngi.it" ); + addWebLink( "PlanetTribes", "www.planettribes.com" ); + addWebLink( "Raging Angels", "www.ragingangels.org" ); + addWebLink( "Rogue Disciples", "www.roguedisciples.com" ); + addWebLink( "StrikeForce", "www.strikeforcecenter.com" ); + addWebLink( "Sydney Gamers League", "www.sgl.org.au" ); + addWebLink( "System Recall", "www.systemrecall.com" ); + addWebLink( "TeamSound", "www.teamsound.com" ); + addWebLink( "Telenordia", "www.telenordia.se" ); + addWebLink( "Telepresence Heavy Assault Team", "www.that.co.nz" ); + addWebLink( "Temple of Blood", "www.templeofblood.com" ); + addWebLink( "The Ghostbear Tribe", "www.ghostbear.net" ); + addWebLink( "ToKrZ", "www.tokrz.com" ); + addWebLink( "Tribes Attack", "www.tribesattack.com" ); + addWebLink( "Tribes Center", "www.tribescenter.com" ); + addWebLink( "Tribes 2 Database", "www.tribes2database.com" ); + addWebLink( "Tribes Gamers", "www.tribesgamers.com" ); + addWebLink( "TribesMaps", "www.tribesmaps.com" ); + addWebLink( "TribalWar", "www.tribalwar.com" ); + addWebLink( "Tribes Worlds", "www.tribesworlds.com" ); + addWebLink( "Tribes-Universe", "www.tribes-universe.com" ); + addWebLink( "WirePlay", "www.wireplay.com.au" ); + //addWebLink( "Z Free", "games13.clear.net.nz" ); + //addWebLink( "Box Factory Games", "http://www.bfgames1.com" ); + //addWebLink( "Box Factory Games", "http://www.bfgn.hobbiton.org" ); + for ( %i = 0; %i < $WebLinkCount; %i++ ) + %this.add( $WebLink[%i, name], %i ); + weblinksmenu.setSelected(0); +} +function weblinksmenu::onDatabaseQueryResult(%this,%status,%resultstring,%key) +{ + if(%key != %this.key) + return; + echo("RECV:" @ %status); + switch$(%this.state) + { + case "fetchWeblink": + if(getField(%status,0) == 0) + { + %this.isloaded = true; + %this.state = "getLinks"; + $WebLink = ""; + %this.clear(); + %this.rownum = 0; + } + else + { + %this.state = "error"; + $WebLink = ""; + %this.clear(); + %this.defaultList(); + } + } +} + +function weblinksmenu::onDatabaseRow(%this,%row,%isLastRow,%key) +{ + if(%key != %this.key) + return; + + echo("RECV:" @ %row); + switch$(%this.state) + { + case "getLinks": + if(getField(%row,0) $= "0") + { + addWebLink(getField(%row,1),getField(%row,2)); + %this.add( getField(%row,1), %this.rownum ); + %this.rownum++; + } + if(%isLastRow) + weblinksmenu.setSelected(0); + } +} diff --git a/base/scripts/webnews.cs b/base/scripts/webnews.cs index 5add214..df56b96 100644 --- a/base/scripts/webnews.cs +++ b/base/scripts/webnews.cs @@ -24,22 +24,26 @@ function NewsGui::onWake(%this) NewsPrevBtn.setVisible( false ); NewsNextBtn.setVisible( false ); NewsSubmitBtn.setVisible( false ); - NewsMOTDText.setValue( "This is the fake Message of the Day just for people playing the demo." ); - %this.addStaticArticle( "ALIENS INVADE CLEVELAND!", "Oh, never mind.\nIt just usually looks like that.\nMy bad." ); - %this.addStaticArticle( "OMG! Tribes 2 is the Coolest!", "It's official, Tribes 2 is the coolest thing since ice cream." ); - %this.addStaticArticle( "BigDevDawg Worship Service Rescheduled", "Please note that the weekly devotional service for the followers of the almighty DevDawg has been rescheduled to 9pm so that it no longer conflicts with \"That 70\'s Show\"." ); + NewsMOTDText.setValue( "Welcome to the Tribes 2 Demo!" ); + %this.addStaticArticle( "What's In The Demo?", "There are two training missions, and two multiplayer maps in this demo.\nIf you're new to the Tribes experience, you should consider trying out the training missions so you can become familiar with the basics of the game. Then, after you learn how to use your jets and weapons, jump into multiplayer on one of our Demo Servers to fight against other players like yourself." ); + %this.addStaticArticle( "How Do I Change Settings?", "There is a LAUNCH button in the lower left of this screen. Click on it and choose the SETTINGS option. There you will find ways to modify your graphics, textures, network settings and more. \nMost of these settings will be configured automatically based on your hardware configs, so try the game with the default settings for a while and see how it plays. Then, optimize your settings accordingly thereafter." ); +// %this.addStaticArticle( "Two Game Types", "Talk about CTF and Hunters" ); } else { - Canvas.SetCursor(ArrowWaitCursor); - %this.state = "status"; - %this.key = LaunchGui.key++; - %this.caller = "GETNEWS"; - DatabaseQueryArray(0,0,"0" TAB "0",%this,%this.key); - // Fetch the message of the day: - NewsMOTDText.key = LaunchGui.key++; - NewsMOTDText.state = "isvalid"; - DatabaseQuery(0,"",NewsMOTDText,NewsMOTDText.key); + Canvas.SetCursor(ArrowWaitCursor); + %this.state = "status"; + %this.key = LaunchGui.key++; + %this.caller = "GETNEWS"; + DatabaseQueryArray(0,0,"0" TAB "0",%this,%this.key); + // Fetch the message of the day: + NewsMOTDText.key = LaunchGui.key++; + NewsMOTDText.state = "isvalid"; + DatabaseQuery(0,"",NewsMOTDText,NewsMOTDText.key); + weblinksmenu.clear(); + weblinksmenu.key = launchgui.key++; + weblinksmenu.state = "fetchWeblink"; + DatabaseQueryArray(15,0,"WEBLINK",weblinksmenu,weblinksmenu.key); } WebLinksMenu.setSelected( 0 ); NewsPrevBtn.setActive( false ); @@ -487,13 +491,12 @@ function addWebLink( %name, %address ) //----------------------------------------------------------------------------- function WebLinksMenu::onAdd( %this ) { - for ( %i = 0; %i < $WebLinkCount; %i++ ) - %this.add( $WebLink[%i, name], %i ); } //----------------------------------------------------------------------------- function WebLinksMenu::launchWebBrowser( %this ) { %address = $WebLink[WebLinksMenu.getSelected(), address]; + error("SELECTED:" SPC WebLinksMenu.getSelected()); if ( %address !$= "" ) { if ( isFullScreen() ) diff --git a/base/scripts/webstuff.cs b/base/scripts/webstuff.cs index d2af6de..95f09da 100644 --- a/base/scripts/webstuff.cs +++ b/base/scripts/webstuff.cs @@ -246,5 +246,5 @@ function DatabaseQueryCancel(%id) function WONUpdateCertificateDone(%errCode, %errStr) { - IRCClient::relogin(); + IRCClient::reconnect(); } \ No newline at end of file diff --git a/base/version.cs b/base/version.cs index 328f232..55f6341 100644 --- a/base/version.cs +++ b/base/version.cs @@ -1 +1 @@ -buildVersion.setValue( "JUN 8, 2001, 11:12 PM (dmoore)" ); +buildVersion.setValue( "JUL 3, 2001, 1:09 PM (dmoore)" ); diff --git a/console_start.cs b/console_start.cs index 7d32312..0107967 100644 --- a/console_start.cs +++ b/console_start.cs @@ -13,6 +13,7 @@ $Login = false; $clientprefs = "prefs/clientPrefs.cs"; $serverprefs = "prefs/serverPrefs.cs"; $fromLauncher = false; +$PureServer = true; //------------------------------------------------------------------------------ function prepBuild() @@ -168,11 +169,16 @@ else { setModPaths( $nextArg ); $i += 2; + $PureServer = false; } else if($arg $= "-dedicated") { $LaunchMode = "DedicatedServer"; } + else if($arg $= "-nonpure") + { + $PureServer = false; + } else if($arg $= "-clientprefs" && $hasNextArg) { $i++; @@ -193,6 +199,14 @@ else $mission = $nextArg; $missionType = $nextArg2; } + else if($arg $= "-telnetParams" && $has2NextArgs) + { + $i += 3; + $telnetPort = $nextArg; + $telnetPassword = $nextArg2; + $telnetListenPass = $nextArg3; + telnetSetParameters($telnetPort, $telnetPassword, $telnetListenPass); + } else if($arg $= "-connect" && $hasNextArg) { $i++; @@ -209,18 +223,21 @@ else $i++; $JournalFile = $nextArg; $JournalMode = "LoadJournal"; + $PureServer = false; } else if($arg $= "-jsave" && $hasNextArg) { $i++; $JournalFile = $nextArg; $JournalMode = "SaveJournal"; + $PureServer = false; } else if($arg $= "-jplay" && $hasNextArg) { $i++; $JournalFile = $nextArg; $journalMode = "PlayJournal"; + $PureServer = false; } else if($arg $= "-navBuild" && $has2NextArgs) { @@ -246,6 +263,7 @@ else $Login = true; $LoginName = $nextArg; $LoginPassword = $nextArg2; + $PureServer = false; } else if($arg $= "-show") { @@ -271,6 +289,7 @@ else prepBuild(); setLogMode(1); setEchoFileLoads(true); + $PureServer = false; } else if($arg $= "-quit") { @@ -287,6 +306,13 @@ else $fromLauncher = true; } + //see if we're launching a pure server + if ($LaunchMode $= "DedicatedServer" && $PureServer) + { + if (setPureServer(1)) + $Con::prompt = "PURE%"; + } + // load autoexec once for command-line overrides: exec("autoexec.cs", true); @@ -313,6 +339,29 @@ exec("scripts/serverDefaults.cs", true); exec($clientprefs, true, true); exec($serverprefs, true, true); +//convert the team skin and name vars to tags... +$index = 0; +while ($Host::TeamSkin[$index] !$= "") +{ + $TeamSkin[$index] = addTaggedString($Host::TeamSkin[$index]); + $index++; +} + +$index = 0; +while ($Host::TeamName[$index] !$= "") +{ + $TeamName[$index] = addTaggedString($Host::TeamName[$index]); + $index++; +} + +// initialize the hologram names: +$index = 1; +while ( $Host::holoName[$index] !$= "" ) +{ + $holoName[$index] = $Host::holoName[$index]; + $index++; +} + // load autoexec again to override video settings/window creation exec("autojournal.cs", true, true); // put journal'd startup options in here @@ -505,14 +554,20 @@ function LoginMessageBoxButtonProcess() } //------------------------------------------------------------------------------ - function EditAccountDlg::onUpdate(%this) { + if ( strcmp( $LoginPassword, EA_OldPassword.getValue() ) != 0 ) + { + LoginMessageBox( "UPDATE FAILED", "The password you entered is incorrect.", "OK" ); + return; + } + if ( strcmp( $CreateAccountPassword, $CreateAccountConfirmPassword ) ) { LoginMessageBox( "ERROR", "Passwords don't match.", "OK" ); return; } + WONStartUpdateAccount( $CreateAccountPassword, $CreateAccountEmail, $CreateAccountSendInfo ); @@ -527,11 +582,12 @@ function EditAccountDlg::onDontUpdate(%this) schedule(0,0,LoginDone); } +//------------------------------------------------------------------------------ function StartupGui::checkLoginDone( %this, %editAcct, %emailCheck ) { %result = WONLoginResult(); %code = getField( %result, 1 ); - %codeText = getField(%result, 2); + %codeText = getField( %result, 2 ); %status = getField( %result, 0 ); %errorString = getField( %result, 3); @@ -550,8 +606,7 @@ function StartupGui::checkLoginDone( %this, %editAcct, %emailCheck ) %msg = "Account Creation Failed - Invalid login name. Login names may only contain letters, numbers and underlines, and must be from 3 to 16 characters in length."; case "WS_DBProxyServ_UserDoesNotExist": %msg = "Email Password Failed - No such login name. Please check the login name and try again."; - case "WS_AuthServ_BadCDKey": - case "WS_DBProxyServ_InvalidCDKey": + case "WS_AuthServ_BadCDKey" or "WS_DBProxyServ_InvalidCDKey": %msg = "Account Creation Failed - Invalid CD Key. Please check the CD key for errors."; case "WS_TimedOut": %msg = "Login Failed - Server timed out. Your internet connection may be having problems or the servers may be temporarily unavailable."; @@ -598,8 +653,10 @@ function StartupGui::checkLoginDone( %this, %editAcct, %emailCheck ) else %msg = "Login Failed - Your internet connection may be having problems or the servers may be temporarily unavailable. (Error code: " @ %codeText @ ")"; } + Canvas.popDialog( LoginMessagePopupDlg ); - if(StartupGui.updatingAccount) + + if ( StartupGui.updatingAccount ) LoginMessageBox( "UPDATE FAILED", %msg, "OK", "schedule(0,0,LoginDone);" ); else if ( %emailCheck ) LoginMessageBox( "FETCH FAILED", %msg, "OK", "StartupGui::dumbFunction();" ); @@ -612,7 +669,7 @@ function StartupGui::checkLoginDone( %this, %editAcct, %emailCheck ) if ( $pref::RememberPassword ) { if ( StartupGui.updatingAccount ) - EditAccountPasswordBox.savePassword(); + EA_NewPassword.savePassword(); else LoginPasswordBox.savePassword(); } @@ -980,6 +1037,7 @@ if(!$SkipLogin) WONInit(); //------------------------------------------------------------------------------ + if ($LaunchMode $= "DedicatedServer" || $LaunchMode $= "Console" || $LaunchMode $= "NavBuild" || @@ -1606,146 +1664,211 @@ else // Edit Account dialog: new GuiControl(EditAccountDlg) { - profile = "GuiDefaultProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "0 0"; - extent = "640 480"; - minExtent = "8 8"; - visible = "1"; - helpTag = "0"; - open = "0"; + profile = "GuiDefaultProfile"; + horizSizing = "right"; + vertSizing = "bottom"; + position = "0 0"; + extent = "640 480"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + open = "0"; - new ShellPaneCtrl() { - profile = "ShellDlgPaneProfile"; - horizSizing = "center"; - vertSizing = "center"; - position = "70 105"; - extent = "500 255"; - minExtent = "48 92"; - visible = "1"; - helpTag = "0"; - text = "ACCOUNT INFORMATION"; - noTitleBar = "0"; + new ShellPaneCtrl() { + profile = "ShellDlgPaneProfile"; + horizSizing = "center"; + vertSizing = "center"; + position = "94 116"; + extent = "452 284"; + minExtent = "48 92"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "ACCOUNT INFORMATION"; + maxLength = "255"; + noTitleBar = "0"; - new ShellBitmapButton() { - profile = "ShellButtonProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "282 200"; - extent = "128 38"; - minExtent = "32 38"; - visible = "1"; - command = "EditAccountDlg.onUpdate();"; - helpTag = "0"; - text = "UPDATE"; - simpleStyle = "0"; - }; - new GuiTextCtrl() { - profile = "ShellTextRightProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "126 51"; - extent = "100 22"; - minExtent = "8 8"; - visible = "1"; - helpTag = "0"; - text = "Password:"; - }; - new GuiTextCtrl() { - profile = "ShellTextRightProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "126 81"; - extent = "100 22"; - minExtent = "8 8"; - visible = "1"; - helpTag = "0"; - text = "Confirm Password:"; - }; - new GuiTextCtrl() { - profile = "ShellTextRightProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "37 125"; - extent = "100 22"; - minExtent = "8 8"; - visible = "1"; - helpTag = "0"; - text = "Email:"; - }; - new GuiLoginPasswordCtrl(EditAccountPasswordBox) { - profile = "NewTextEditProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "222 43"; - extent = "180 38"; - minExtent = "32 38"; - visible = "1"; - variable = "$CreateAccountPassword"; - helpTag = "0"; - historySize = "0"; - maxLength = "16"; - password = "1"; - glowOffset = "9 9"; - }; - new ShellTextEditCtrl() { - profile = "NewTextEditProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "222 73"; - extent = "180 38"; - minExtent = "32 38"; - visible = "1"; - variable = "$CreateAccountConfirmPassword"; - helpTag = "0"; - historySize = "0"; - maxLength = "16"; - password = "1"; - glowOffset = "9 9"; - }; - new ShellTextEditCtrl() { - profile = "NewTextEditProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "133 115"; - extent = "269 38"; - minExtent = "32 38"; - visible = "1"; - variable = "$CreateAccountEmail"; - helpTag = "0"; - historySize = "0"; - maxLength = "128"; - password = "0"; - glowOffset = "9 9"; - }; - new ShellToggleButton() { - profile = "ShellRadioProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "63 156"; - extent = "366 30"; - minExtent = "26 27"; - visible = "1"; - variable = "$CreateAccountSendInfo"; - helpTag = "0"; - text = "SEND ME INFORMATION ABOUT TRIBES 2 AND OTHER PRODUCTS"; - }; - new ShellBitmapButton() { - profile = "ShellButtonProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "72 200"; - extent = "128 38"; - minExtent = "32 38"; - visible = "1"; - command = "EditAccountDlg.onDontUpdate();"; - accelerator = "escape"; - helpTag = "0"; - text = "DON\'T UPDATE"; - simpleStyle = "0"; - }; - }; + new GuiTextCtrl() { + profile = "ShellTextRightProfile"; + horizSizing = "right"; + vertSizing = "top"; + position = "106 38"; + extent = "100 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Old Password:"; + maxLength = "255"; + }; + new ShellTextEditCtrl(EA_OldPassword) { + profile = "NewTextEditProfile"; + horizSizing = "right"; + vertSizing = "top"; + position = "202 30"; + extent = "180 38"; + minExtent = "32 38"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + maxLength = "16"; + historySize = "0"; + password = "1"; + tabComplete = "0"; + deniedSound = "InputDeniedSound"; + glowOffset = "9 9"; + }; + new GuiTextCtrl() { + profile = "ShellTextRightProfile"; + horizSizing = "right"; + vertSizing = "top"; + position = "106 80"; + extent = "100 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "New Password:"; + maxLength = "255"; + }; + new GuiTextCtrl() { + profile = "ShellTextRightProfile"; + horizSizing = "right"; + vertSizing = "top"; + position = "66 110"; + extent = "140 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Confirm New Password:"; + maxLength = "255"; + }; + new GuiTextCtrl() { + profile = "ShellTextRightProfile"; + horizSizing = "right"; + vertSizing = "top"; + position = "44 154"; + extent = "73 22"; + minExtent = "8 8"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + helpTag = "0"; + text = "Email:"; + maxLength = "255"; + }; + new GuiLoginPasswordCtrl(EA_NewPassword) { + profile = "NewTextEditProfile"; + horizSizing = "right"; + vertSizing = "top"; + position = "202 72"; + extent = "180 38"; + minExtent = "32 38"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "$CreateAccountPassword"; + helpTag = "0"; + maxLength = "16"; + historySize = "0"; + password = "1"; + tabComplete = "0"; + deniedSound = "InputDeniedSound"; + glowOffset = "9 9"; + }; + new ShellTextEditCtrl() { + profile = "NewTextEditProfile"; + horizSizing = "right"; + vertSizing = "top"; + position = "202 102"; + extent = "180 38"; + minExtent = "32 38"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "$CreateAccountConfirmPassword"; + helpTag = "0"; + maxLength = "16"; + historySize = "0"; + password = "1"; + tabComplete = "0"; + deniedSound = "InputDeniedSound"; + glowOffset = "9 9"; + }; + new ShellTextEditCtrl() { + profile = "NewTextEditProfile"; + horizSizing = "right"; + vertSizing = "top"; + position = "113 144"; + extent = "269 38"; + minExtent = "32 38"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "$CreateAccountEmail"; + helpTag = "0"; + maxLength = "128"; + historySize = "0"; + password = "0"; + tabComplete = "0"; + deniedSound = "InputDeniedSound"; + glowOffset = "9 9"; + }; + new ShellToggleButton() { + profile = "ShellRadioProfile"; + horizSizing = "center"; + vertSizing = "top"; + position = "43 190"; + extent = "366 30"; + minExtent = "26 27"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + variable = "$CreateAccountSendInfo"; + helpTag = "0"; + text = "SEND ME INFORMATION ABOUT TRIBES 2 AND OTHER PRODUCTS"; + maxLength = "255"; + }; + new ShellBitmapButton() { + profile = "ShellButtonProfile"; + horizSizing = "right"; + vertSizing = "top"; + position = "65 229"; + extent = "128 38"; + minExtent = "32 38"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + command = "EditAccountDlg.onDontUpdate();"; + accelerator = "escape"; + helpTag = "0"; + text = "CANCEL"; + simpleStyle = "0"; + }; + new ShellBitmapButton() { + profile = "ShellButtonProfile"; + horizSizing = "right"; + vertSizing = "top"; + position = "259 229"; + extent = "128 38"; + minExtent = "32 38"; + visible = "1"; + hideCursor = "0"; + bypassHideCursor = "0"; + command = "EditAccountDlg.onUpdate();"; + helpTag = "0"; + text = "UPDATE"; + simpleStyle = "0"; + }; + }; }; // Create Account dialog: