diff --git a/SierraUp.cfg b/SierraUp.cfg index 227153b..3509366 100644 --- a/SierraUp.cfg +++ b/SierraUp.cfg @@ -1,7 +1,7 @@ ProductName "Tribes2" DisplayName "Tribes 2" PatchFolder .\patch -CurrentVersion 0.22075.0.0 +CurrentVersion 0.22228.0.0 AutoStart MonitorPatch LaunchExe "tribes2.exe" diff --git a/base/console_end.cs b/base/console_end.cs index 8ded399..a58e015 100644 --- a/base/console_end.cs +++ b/base/console_end.cs @@ -208,7 +208,6 @@ loadGui("ShellSaveFileDlg"); // menus loadGui("AddressDlg"); loadGui("GenDialog"); -loadGui("CreateWarriorDlg"); loadGui("LaunchGui"); loadGui("LaunchToolbarDlg"); loadGui("GameGui"); @@ -587,7 +586,7 @@ function DispatchLaunchMode() } } -if(WONGetAuthInfo() $= "" && $LaunchMode !$= "Demo") +if($LaunchMode !$= "Demo") VerifyCDCheck(DispatchLaunchMode); else DispatchLaunchMode(); diff --git a/base/gui/CreateWarriorDlg.gui b/base/gui/CreateWarriorDlg.gui deleted file mode 100644 index b085fe9..0000000 --- a/base/gui/CreateWarriorDlg.gui +++ /dev/null @@ -1,93 +0,0 @@ -//--- OBJECT WRITE BEGIN --- -new GuiControl(CreateWarriorDlg) { - profile = "DlgBackProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "0 0"; - extent = "640 480"; - minExtent = "8 8"; - visible = "1"; - helpTag = "0"; - - new ShellPaneCtrl() { - profile = "ShellDlgPaneProfile"; - horizSizing = "center"; - vertSizing = "center"; - position = "130 123"; - extent = "380 233"; - minExtent = "48 92"; - visible = "1"; - helpTag = "0"; - text = "CREATE WARRIOR"; - noTitleBar = "0"; - - new GuiMLTextCtrl(CreateWarriorText) { - profile = "ShellMediumTextProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "37 37"; - extent = "306 18"; - minExtent = "8 8"; - visible = "1"; - helpTag = "0"; - lineSpacing = "2"; - allowColorChars = "0"; - }; - new GuiTextCtrl() { - profile = "ShellTextRightProfile"; - horizSizing = "right"; - vertSizing = "top"; - position = "48 142"; - extent = "92 22"; - minExtent = "8 8"; - visible = "1"; - helpTag = "0"; - text = "Warrior Name:"; - }; - new ShellTextEditCtrl(CreateWarriorNameEdit) { - profile = "NewTextEditProfile"; - horizSizing = "right"; - vertSizing = "top"; - position = "136 134"; - extent = "182 38"; - minExtent = "32 38"; - visible = "1"; - variable = "$CreateAccountWarriorName"; - command = "CreateWarriorNameEdit.checkValidPlayerName();"; - altCommand = "LoginCreateWarrior();"; - helpTag = "0"; - historySize = "0"; - maxLength = "16"; - password = "0"; - glowOffset = "9 9"; - }; - new ShellBitmapButton(CreateWarriorBtn) { - profile = "ShellButtonProfile"; - horizSizing = "right"; - vertSizing = "top"; - position = "211 178"; - extent = "128 38"; - minExtent = "32 38"; - visible = "1"; - command = "LoginCreateWarrior();"; - helpTag = "0"; - text = "DONE"; - simpleStyle = "0"; - }; - new ShellBitmapButton() { - profile = "ShellButtonProfile"; - horizSizing = "right"; - vertSizing = "top"; - position = "41 178"; - extent = "128 38"; - minExtent = "32 38"; - visible = "1"; - command = "quit();"; - accelerator = "escape"; - helpTag = "0"; - text = "QUIT"; - simpleStyle = "0"; - }; - }; -}; -//--- OBJECT WRITE END --- diff --git a/base/gui/EmailGui.gui b/base/gui/EmailGui.gui index 8c2447d..98235f5 100644 --- a/base/gui/EmailGui.gui +++ b/base/gui/EmailGui.gui @@ -10,16 +10,6 @@ new GuiChunkedBitmapCtrl(EmailGui) { variable = "$ShellBackground"; helpTag = "0"; useVariable = "1"; - key = "2"; - messageCount = "1"; - state = "done"; - cacheLoaded = "1"; - soundPlayed = "0"; - eid = "593"; - checkingEMail = "1"; - checkSchedule = "596"; - btnClicked = "0"; - STATUS = "error"; new ShellPaneCtrl() { profile = "ShellPaneProfile"; diff --git a/base/gui/GameGui.gui b/base/gui/GameGui.gui index bc15aca..5e59d39 100644 --- a/base/gui/GameGui.gui +++ b/base/gui/GameGui.gui @@ -21,6 +21,7 @@ new GuiChunkedBitmapCtrl(GameGui) { visible = "1"; helpTag = "0"; text = "GAME"; + maxLength = "255"; noTitleBar = "0"; new ShellTabFrame(GM_TabFrame) { @@ -64,18 +65,19 @@ new GuiChunkedBitmapCtrl(GameGui) { profile = "BrowserFilterLabelProfile"; horizSizing = "right"; vertSizing = "bottom"; - position = "5 2"; - extent = "39 22"; + position = "4 3"; + extent = "48 26"; minExtent = "8 8"; visible = "1"; helpTag = "0"; text = "FILTER:"; + maxLength = "255"; }; new GuiControl() { profile = "GuiDefaultProfile"; horizSizing = "width"; vertSizing = "bottom"; - position = "48 2"; + position = "56 3"; extent = "104 22"; minExtent = "8 8"; visible = "1"; @@ -86,39 +88,56 @@ new GuiChunkedBitmapCtrl(GameGui) { horizSizing = "right"; vertSizing = "bottom"; position = "0 0"; - extent = "8 22"; + extent = "67 26"; minExtent = "8 8"; visible = "1"; helpTag = "0"; + text = "All Servers"; + maxLength = "255"; }; }; new GuiTextCtrl(GMJ_StatusText) { profile = "BrowserStatusTextProfile"; horizSizing = "left"; vertSizing = "bottom"; - position = "157 2"; - extent = "190 22"; + position = "162 3"; + extent = "190 26"; minExtent = "8 8"; visible = "1"; helpTag = "0"; text = "Status Text..."; + maxLength = "255"; }; new GuiProgressCtrl(GMJ_ProgressBar) { profile = "BrowserProgressProfile"; horizSizing = "left"; vertSizing = "bottom"; - position = "354 4"; - extent = "200 14"; + position = "355 5"; + extent = "154 18"; minExtent = "8 8"; visible = "1"; helpTag = "0"; }; + new ShellBitmapButton(GMJ_StopBtn) { + profile = "ShellButtonProfile"; + horizSizing = "left"; + vertSizing = "bottom"; + position = "504 -4"; + extent = "59 38"; + minExtent = "32 38"; + visible = "1"; + command = "stopServerQuery();"; + accelerator = "escape"; + helpTag = "0"; + text = "STOP"; + simpleStyle = "0"; + }; new ShellFancyArrayScrollCtrl() { profile = "ShellServerBrowserProfile"; horizSizing = "width"; vertSizing = "height"; - position = "0 18"; - extent = "558 260"; + position = "0 25"; + extent = "558 253"; minExtent = "8 8"; visible = "1"; helpTag = "0"; @@ -130,8 +149,8 @@ new GuiChunkedBitmapCtrl(GameGui) { profile = "ShellServerBrowserProfile"; horizSizing = "right"; vertSizing = "bottom"; - position = "195 16"; - extent = "363 244"; + position = "184 16"; + extent = "374 237"; minExtent = "8 52"; visible = "1"; helpTag = "0"; @@ -147,7 +166,7 @@ new GuiChunkedBitmapCtrl(GameGui) { horizSizing = "right"; vertSizing = "bottom"; position = "4 4"; - extent = "339 220"; + extent = "350 213"; minExtent = "8 8"; visible = "1"; helpTag = "0"; @@ -157,7 +176,7 @@ new GuiChunkedBitmapCtrl(GameGui) { horizSizing = "right"; vertSizing = "bottom"; position = "0 0"; - extent = "769 8"; + extent = "831 8"; minExtent = "8 8"; visible = "1"; helpTag = "0"; @@ -169,7 +188,7 @@ new GuiChunkedBitmapCtrl(GameGui) { horizSizing = "right"; vertSizing = "bottom"; position = "0 0"; - extent = "538 239"; + extent = "538 232"; minExtent = "8 20"; visible = "1"; altCommand = "Canvas.pushDialog(ServerInfoDlg);"; @@ -188,6 +207,7 @@ new GuiChunkedBitmapCtrl(GameGui) { drawSeparators = "0"; headerSort = "1"; allowReposition = "1"; + noSelect = "0"; iconBase = "gui/shll_icon"; }; }; @@ -287,6 +307,7 @@ new GuiChunkedBitmapCtrl(GameGui) { visible = "1"; helpTag = "0"; text = "Game Type:"; + maxLength = "255"; }; new ShellPopupMenu(GMH_MissionType) { profile = "ShellPopupProfile"; @@ -298,6 +319,7 @@ new GuiChunkedBitmapCtrl(GameGui) { visible = "1"; helpTag = "0"; text = "GAME TYPE"; + maxLength = "255"; maxPopupHeight = "200"; buttonBitmap = "gui/shll_pulldown"; rolloverBarBitmap = "gui/shll_pulldownbar_rol"; @@ -314,6 +336,7 @@ new GuiChunkedBitmapCtrl(GameGui) { visible = "1"; helpTag = "0"; text = "Mission Name:"; + maxLength = "255"; }; new ShellScrollCtrl() { profile = "NewScrollCtrlProfile"; @@ -380,6 +403,7 @@ new GuiChunkedBitmapCtrl(GameGui) { visible = "1"; helpTag = "0"; text = "Server Name:"; + maxLength = "255"; }; new ShellTextEditCtrl() { profile = "NewTextEditProfile"; @@ -391,8 +415,8 @@ new GuiChunkedBitmapCtrl(GameGui) { visible = "1"; variable = "$Host::GameName"; helpTag = "0"; - historySize = "0"; maxLength = "24"; + historySize = "0"; password = "0"; glowOffset = "9 9"; }; @@ -406,6 +430,7 @@ new GuiChunkedBitmapCtrl(GameGui) { visible = "1"; helpTag = "0"; text = "Password:"; + maxLength = "255"; }; new ShellTextEditCtrl() { profile = "NewTextEditProfile"; @@ -417,8 +442,8 @@ new GuiChunkedBitmapCtrl(GameGui) { visible = "1"; variable = "$Host::Password"; helpTag = "0"; - historySize = "0"; maxLength = "16"; + historySize = "0"; password = "0"; glowOffset = "9 9"; }; @@ -432,6 +457,7 @@ new GuiChunkedBitmapCtrl(GameGui) { visible = "1"; helpTag = "0"; text = "Max Players:"; + maxLength = "255"; }; new ShellTextEditCtrl(GMH_MaxPlayersTE) { profile = "NewTextEditNumericProfile"; @@ -443,9 +469,9 @@ new GuiChunkedBitmapCtrl(GameGui) { visible = "1"; variable = "$Host::MaxPlayers"; helpTag = "0"; + maxLength = "3"; validate = "validateMaxPlayers();"; historySize = "0"; - maxLength = "3"; password = "0"; glowOffset = "9 9"; }; @@ -473,6 +499,7 @@ new GuiChunkedBitmapCtrl(GameGui) { variable = "$Host::BotsEnabled"; helpTag = "0"; text = "ENABLE BOTS"; + maxLength = "255"; }; new GuiControl(GMH_EnableBotsGroup) { profile = "GuiDefaultProfile"; @@ -494,6 +521,7 @@ new GuiChunkedBitmapCtrl(GameGui) { visible = "1"; helpTag = "0"; text = "Number of Bots:"; + maxLength = "255"; }; new GuiTextCtrl(GMH_BotCountText) { profile = "ShellAltTextProfile"; @@ -505,6 +533,7 @@ new GuiChunkedBitmapCtrl(GameGui) { visible = "1"; helpTag = "0"; text = "(0)"; + maxLength = "255"; }; new ShellSliderCtrl(GMH_MinCombatantSlider) { profile = "ShellSliderProfile"; @@ -519,7 +548,7 @@ new GuiChunkedBitmapCtrl(GameGui) { helpTag = "0"; range = "0.000000 1.000000"; ticks = "15"; - value = "0.333333"; + value = "0.136667"; usePlusMinus = "1"; }; new GuiTextCtrl(GMH_BotDiffText) { @@ -532,6 +561,7 @@ new GuiChunkedBitmapCtrl(GameGui) { visible = "1"; helpTag = "0"; text = "Bot Difficulty:"; + maxLength = "255"; }; new GuiTextCtrl(GMH_BotMinText) { profile = "ShellTextRightProfile"; @@ -543,6 +573,7 @@ new GuiChunkedBitmapCtrl(GameGui) { visible = "1"; helpTag = "0"; text = "Min:"; + maxLength = "255"; }; new ShellSliderCtrl(GMH_BotMinSlider) { profile = "ShellSliderProfile"; @@ -570,6 +601,7 @@ new GuiChunkedBitmapCtrl(GameGui) { visible = "1"; helpTag = "0"; text = "Max:"; + maxLength = "255"; }; new ShellSliderCtrl(GMH_BotMaxSlider) { profile = "ShellSliderProfile"; @@ -624,6 +656,7 @@ new GuiChunkedBitmapCtrl(GameGui) { visible = "1"; helpTag = "0"; text = "Warrior:"; + maxLength = "255"; }; new ShellPopupMenu(GMW_WarriorPopup) { profile = "ShellPopupProfile"; @@ -635,6 +668,7 @@ new GuiChunkedBitmapCtrl(GameGui) { visible = "1"; helpTag = "0"; text = "Select Warrior"; + maxLength = "255"; maxPopupHeight = "200"; buttonBitmap = "gui/shll_pulldown"; rolloverBarBitmap = "gui/shll_pulldownbar_rol"; @@ -674,6 +708,7 @@ new GuiChunkedBitmapCtrl(GameGui) { visible = "1"; helpTag = "0"; text = "Race/Gender:"; + maxLength = "255"; }; new ShellPopupMenu(GMW_RaceGenderPopup) { profile = "ShellPopupProfile"; @@ -685,6 +720,7 @@ new GuiChunkedBitmapCtrl(GameGui) { visible = "1"; helpTag = "0"; text = "Select Race/Gender"; + maxLength = "255"; maxPopupHeight = "200"; buttonBitmap = "gui/shll_pulldown"; rolloverBarBitmap = "gui/shll_pulldownbar_rol"; @@ -701,6 +737,7 @@ new GuiChunkedBitmapCtrl(GameGui) { visible = "1"; helpTag = "0"; text = "Skin:"; + maxLength = "255"; }; new ShellPopupMenu(GMW_SkinPopup) { profile = "ShellPopupProfile"; @@ -712,6 +749,7 @@ new GuiChunkedBitmapCtrl(GameGui) { visible = "1"; helpTag = "0"; text = "Select Skin"; + maxLength = "255"; maxPopupHeight = "200"; buttonBitmap = "gui/shll_pulldown"; rolloverBarBitmap = "gui/shll_pulldownbar_rol"; @@ -728,6 +766,7 @@ new GuiChunkedBitmapCtrl(GameGui) { visible = "1"; helpTag = "0"; text = "Voice:"; + maxLength = "255"; }; new ShellPopupMenu(GMW_VoicePopup) { profile = "ShellPopupProfile"; @@ -739,6 +778,7 @@ new GuiChunkedBitmapCtrl(GameGui) { visible = "1"; helpTag = "0"; text = "Select Voice"; + maxLength = "255"; maxPopupHeight = "200"; buttonBitmap = "gui/shll_pulldown"; rolloverBarBitmap = "gui/shll_pulldownbar_rol"; @@ -755,6 +795,7 @@ new GuiChunkedBitmapCtrl(GameGui) { visible = "1"; helpTag = "0"; text = "Test Voice:"; + maxLength = "255"; }; new ShellBitmapButton(GMW_VoiceTestBtn) { profile = "SoundTestButtonProfile"; @@ -826,6 +867,7 @@ new GuiChunkedBitmapCtrl(GameGui) { command = "GMW_PlayerModel.update();"; helpTag = "0"; text = "LIGHT"; + maxLength = "255"; groupNum = "1"; }; new ShellRadioButton(GMW_MediumRdo) { @@ -839,6 +881,7 @@ new GuiChunkedBitmapCtrl(GameGui) { command = "GMW_PlayerModel.update();"; helpTag = "0"; text = "MEDIUM"; + maxLength = "255"; groupNum = "1"; }; new ShellRadioButton(GMW_HeavyRdo) { @@ -852,6 +895,7 @@ new GuiChunkedBitmapCtrl(GameGui) { command = "GMW_PlayerModel.update();"; helpTag = "0"; text = "HEAVY"; + maxLength = "255"; groupNum = "1"; }; }; @@ -861,11 +905,11 @@ new GuiChunkedBitmapCtrl(GameGui) { horizSizing = "left"; vertSizing = "bottom"; position = "396 4"; - extent = "160 20"; + extent = "160 22"; minExtent = "8 8"; visible = "0"; helpTag = "0"; - text = ""; + maxLength = "255"; }; }; }; diff --git a/base/gui/guiProfiles.cs b/base/gui/guiProfiles.cs index e232e1b..7f2c6e5 100644 --- a/base/gui/guiProfiles.cs +++ b/base/gui/guiProfiles.cs @@ -725,7 +725,7 @@ new GuiControlProfile ("ShellTopicTextProfile") new GuiControlProfile ("BrowserFilterLabelProfile") { fontType = $ShellLabelFont; - fontSize = $ShellMediumFontSize; + fontSize = 22; fontColor = "0 220 0"; justify = "left"; autoSizeWidth = true; @@ -735,7 +735,7 @@ new GuiControlProfile ("BrowserFilterLabelProfile") new GuiControlProfile ("BrowserFilterTextProfile") { fontType = $ShellLabelFont; - fontSize = $ShellMediumFontSize; + fontSize = 22; fontColor = "66 219 234"; justify = "left"; autoSizeWidth = true; @@ -745,7 +745,7 @@ new GuiControlProfile ("BrowserFilterTextProfile") new GuiControlProfile ("BrowserStatusTextProfile") { fontType = $ShellLabelFont; - fontSize = $ShellMediumFontSize; + fontSize = 22; fontColor = "66 219 234"; justify = "right"; autoSizeWidth = false; @@ -1601,7 +1601,13 @@ new GuiControlProfile ("GuiChannelVectorProfile") fontColor = "249 250 194"; // default font color fontColors[1] = "255 255 255"; // nick font color fontColors[2] = "255 255 0"; // tribe font color - fontColors[3] = "0 200 0"; // server font color + fontColors[3] = "0 200 0"; // server font color + fontColors[4] = "4 235 105"; // client join/drop, tournament mode + fontColors[5] = "219 200 128"; // gameplay, admin/voting, pack/deployable + fontColors[6] = "77 253 95"; // team chat, spam protection message, client tasks + fontColors[7] = "40 231 240"; // global chat + fontColors[8] = "200 200 50 200"; // used in single player game + fontColors[9] = "0 255 255"; // action autoSizeWidth = false; autoSizeHeight = true; }; diff --git a/base/input.log b/base/input.log index 08c18af..211408b 100644 --- a/base/input.log +++ b/base/input.log @@ -1,4 +1,4 @@ -Input log opened at Tue Apr 3 10:28:59 2001 +Input log opened at Mon Apr 9 17:42:34 2001 Operating System: WinNT version 5.0 diff --git a/base/missions/Abominable.mis b/base/missions/Abominable.mis index c396aed..29e6441 100644 --- a/base/missions/Abominable.mis +++ b/base/missions/Abominable.mis @@ -279,7 +279,7 @@ new SimGroup(MissionGroup) { targetClientId = "-1"; targetObjectId = "-1"; location = "-393.239 -700.595 209.593"; - weightLevel1 = "4949"; + weightLevel1 = "4950"; weightLevel2 = "0"; weightLevel3 = "0"; weightLevel4 = "0"; @@ -307,7 +307,7 @@ new SimGroup(MissionGroup) { targetClientId = "-1"; targetObjectId = "-1"; location = "-390.81 -704.636 186.451"; - weightLevel1 = "4951"; + weightLevel1 = "4950"; weightLevel2 = "0"; weightLevel3 = "0"; weightLevel4 = "0"; @@ -368,8 +368,8 @@ new SimGroup(MissionGroup) { targetClientId = "-1"; targetObjectId = "3449"; location = "-161.64 -23.2113 296.991"; - weightLevel1 = "4800"; - weightLevel2 = "2800"; + weightLevel1 = "5000"; + weightLevel2 = "3000"; weightLevel3 = "0"; weightLevel4 = "0"; offense = "1"; @@ -396,7 +396,7 @@ new SimGroup(MissionGroup) { targetClientId = "-1"; targetObjectId = "-1"; location = "-170.462 -13.963 295.049"; - weightLevel1 = "4790"; + weightLevel1 = "4950"; weightLevel2 = "0"; weightLevel3 = "0"; weightLevel4 = "0"; @@ -588,8 +588,8 @@ new SimGroup(MissionGroup) { targetClientId = "-1"; targetObjectId = "3462"; location = "120.531 595.532 61.3005"; - weightLevel1 = "4000"; - weightLevel2 = "2000"; + weightLevel1 = "5000"; + weightLevel2 = "3000"; weightLevel3 = "0"; weightLevel4 = "0"; offense = "1"; @@ -643,8 +643,8 @@ new SimGroup(MissionGroup) { targetClientId = "-1"; targetObjectId = "3478"; location = "23.5983 -395.053 240.566"; - weightLevel1 = "4900"; - weightLevel2 = "2900"; + weightLevel1 = "5000"; + weightLevel2 = "3000"; weightLevel3 = "0"; weightLevel4 = "0"; offense = "1"; @@ -725,8 +725,8 @@ new SimGroup(MissionGroup) { targetClientId = "-1"; targetObjectId = "3473"; location = "-366.433 349.044 279.604"; - weightLevel1 = "4500"; - weightLevel2 = "2500"; + weightLevel1 = "5000"; + weightLevel2 = "3000"; weightLevel3 = "0"; weightLevel4 = "0"; offense = "1"; @@ -836,8 +836,8 @@ new SimGroup(MissionGroup) { targetClientId = "-1"; targetObjectId = "3449"; location = "-161.64 -23.2113 296.991"; - weightLevel1 = "4800"; - weightLevel2 = "2800"; + weightLevel1 = "5000"; + weightLevel2 = "3000"; weightLevel3 = "0"; weightLevel4 = "0"; offense = "1"; @@ -864,7 +864,7 @@ new SimGroup(MissionGroup) { targetClientId = "-1"; targetObjectId = "-1"; location = "-154.08 -29.4053 295.085"; - weightLevel1 = "4790"; + weightLevel1 = "4950"; weightLevel2 = "0"; weightLevel3 = "0"; weightLevel4 = "0"; @@ -894,8 +894,8 @@ new SimGroup(MissionGroup) { targetClientId = "-1"; targetObjectId = "-1"; location = "-391.639 -689.494 211.654"; - weightLevel1 = "4000"; - weightLevel2 = "2000"; + weightLevel1 = "5000"; + weightLevel2 = "3000"; weightLevel3 = "0"; weightLevel4 = "0"; offense = "1"; @@ -1007,8 +1007,8 @@ new SimGroup(MissionGroup) { targetClientId = "-1"; targetObjectId = "3462"; location = "120.531 595.532 61.3005"; - weightLevel1 = "4950"; - weightLevel2 = "2950"; + weightLevel1 = "5000"; + weightLevel2 = "3000"; weightLevel3 = "0"; weightLevel4 = "0"; offense = "1"; @@ -1035,7 +1035,7 @@ new SimGroup(MissionGroup) { targetClientId = "-1"; targetObjectId = "-1"; location = "118.059 590.475 53.3606"; - weightLevel1 = "4951"; + weightLevel1 = "4950"; weightLevel2 = "0"; weightLevel3 = "0"; weightLevel4 = "0"; @@ -1091,7 +1091,7 @@ new SimGroup(MissionGroup) { targetClientId = "-1"; targetObjectId = "-1"; location = "124.983 610.647 36.895"; - weightLevel1 = "4949"; + weightLevel1 = "4950"; weightLevel2 = "0"; weightLevel3 = "0"; weightLevel4 = "0"; @@ -1175,8 +1175,8 @@ new SimGroup(MissionGroup) { targetClientId = "-1"; targetObjectId = "3478"; location = "23.5983 -395.053 240.566"; - weightLevel1 = "4500"; - weightLevel2 = "2500"; + weightLevel1 = "5000"; + weightLevel2 = "3000"; weightLevel3 = "0"; weightLevel4 = "0"; offense = "1"; @@ -1230,8 +1230,8 @@ new SimGroup(MissionGroup) { targetClientId = "-1"; targetObjectId = "3473"; location = "-366.433 349.044 279.604"; - weightLevel1 = "4900"; - weightLevel2 = "2900"; + weightLevel1 = "5000"; + weightLevel2 = "3000"; weightLevel3 = "0"; weightLevel4 = "0"; offense = "1"; diff --git a/base/missions/Equinox.mis b/base/missions/Equinox.mis index 69ac0f7..ea2120e 100644 --- a/base/missions/Equinox.mis +++ b/base/missions/Equinox.mis @@ -532,8 +532,7 @@ new SimGroup(MissionGroup) { weightLevel4 = "0"; offense = "1"; defense = "0"; - equipment = "LIGHT"; - desiredEquipment = "EnergyPack"; + desiredEquipment = "Light EnergyPack"; buyEquipmentSet = "LightEnergyDefault"; issuedByHuman = "0"; issuedByClientId = "-1"; @@ -615,8 +614,7 @@ new SimGroup(MissionGroup) { weightLevel4 = "0"; offense = "1"; defense = "0"; - equipment = "LIGHT"; - desiredEquipment = "EnergyPack"; + desiredEquipment = "Light EnergyPack"; buyEquipmentSet = "LightEnergyDefault"; issuedByHuman = "0"; issuedByClientId = "-1"; @@ -752,8 +750,7 @@ new SimGroup(MissionGroup) { weightLevel4 = "0"; offense = "1"; defense = "0"; - equipment = "LIGHT"; - desiredEquipment = "EnergyPack"; + desiredEquipment = "Light EnergyPack"; buyEquipmentSet = "LightEnergyDefault"; issuedByHuman = "0"; issuedByClientId = "-1"; @@ -808,8 +805,7 @@ new SimGroup(MissionGroup) { weightLevel4 = "0"; offense = "1"; defense = "0"; - equipment = "LIGHT"; - desiredEquipment = "EnergyPack"; + desiredEquipment = "Light EnergyPack"; buyEquipmentSet = "LightEnergyDefault"; issuedByHuman = "0"; issuedByClientId = "-1"; @@ -944,7 +940,7 @@ new SimGroup(MissionGroup) { targetClientId = "-1"; targetObjectId = "-1"; location = "397.609 363.834 60.6696"; - weightLevel1 = "3499"; + weightLevel1 = "3500"; weightLevel2 = "0"; weightLevel3 = "0"; weightLevel4 = "0"; @@ -1060,7 +1056,7 @@ new SimGroup(MissionGroup) { targetClientId = "-1"; targetObjectId = "-1"; location = "-196.452 436.083 69.2254"; - weightLevel1 = "3499"; + weightLevel1 = "3500"; weightLevel2 = "0"; weightLevel3 = "0"; weightLevel4 = "0"; @@ -1176,7 +1172,7 @@ new SimGroup(MissionGroup) { targetClientId = "-1"; targetObjectId = "-1"; location = "-67.1821 -328.063 78.2324"; - weightLevel1 = "3499"; + weightLevel1 = "3500"; weightLevel2 = "0"; weightLevel3 = "0"; weightLevel4 = "0"; @@ -1292,7 +1288,7 @@ new SimGroup(MissionGroup) { targetClientId = "-1"; targetObjectId = "-1"; location = "333.331 -256.922 90.2415"; - weightLevel1 = "3499"; + weightLevel1 = "3500"; weightLevel2 = "0"; weightLevel3 = "0"; weightLevel4 = "0"; @@ -1353,8 +1349,7 @@ new SimGroup(MissionGroup) { weightLevel4 = "0"; offense = "1"; defense = "0"; - equipment = "LIGHT"; - desiredEquipment = "EnergyPack"; + desiredEquipment = "Light EnergyPack"; buyEquipmentSet = "LightEnergyDefault"; issuedByHuman = "0"; issuedByClientId = "-1"; @@ -1436,8 +1431,7 @@ new SimGroup(MissionGroup) { weightLevel4 = "0"; offense = "1"; defense = "0"; - equipment = "LIGHT"; - desiredEquipment = "EnergyPack"; + desiredEquipment = "Light EnergyPack"; buyEquipmentSet = "LightEnergyDefault"; issuedByHuman = "0"; issuedByClientId = "-1"; @@ -1573,8 +1567,7 @@ new SimGroup(MissionGroup) { weightLevel4 = "0"; offense = "1"; defense = "0"; - equipment = "LIGHT"; - desiredEquipment = "EnergyPack"; + desiredEquipment = "Light EnergyPack"; buyEquipmentSet = "LightEnergyDefault"; issuedByHuman = "0"; issuedByClientId = "-1"; @@ -1602,8 +1595,7 @@ new SimGroup(MissionGroup) { weightLevel4 = "0"; offense = "1"; defense = "0"; - equipment = "LIGHT"; - desiredEquipment = "EnergyPack"; + desiredEquipment = "Light EnergyPack"; buyEquipmentSet = "LightEnergyDefault"; issuedByHuman = "0"; issuedByClientId = "-1"; @@ -1738,7 +1730,7 @@ new SimGroup(MissionGroup) { targetClientId = "-1"; targetObjectId = "-1"; location = "397.531 363.855 60.6663"; - weightLevel1 = "3499"; + weightLevel1 = "3500"; weightLevel2 = "0"; weightLevel3 = "0"; weightLevel4 = "0"; @@ -1854,7 +1846,7 @@ new SimGroup(MissionGroup) { targetClientId = "-1"; targetObjectId = "-1"; location = "-196.672 435.882 69.7214"; - weightLevel1 = "3499"; + weightLevel1 = "3500"; weightLevel2 = "0"; weightLevel3 = "0"; weightLevel4 = "0"; @@ -1970,7 +1962,7 @@ new SimGroup(MissionGroup) { targetClientId = "-1"; targetObjectId = "-1"; location = "-67.0291 -327.63 77.9927"; - weightLevel1 = "3499"; + weightLevel1 = "3500"; weightLevel2 = "0"; weightLevel3 = "0"; weightLevel4 = "0"; @@ -2086,7 +2078,7 @@ new SimGroup(MissionGroup) { targetClientId = "-1"; targetObjectId = "-1"; location = "328.481 -260.225 90.4923"; - weightLevel1 = "3499"; + weightLevel1 = "3500"; weightLevel2 = "0"; weightLevel3 = "0"; weightLevel4 = "0"; diff --git a/base/missions/Insalubria.mis b/base/missions/Insalubria.mis index 6bf235e..901c4cb 100644 --- a/base/missions/Insalubria.mis +++ b/base/missions/Insalubria.mis @@ -1139,8 +1139,7 @@ new SimGroup(MissionGroup) { weightLevel4 = "0"; offense = "1"; defense = "0"; - equipment = "LIGHT"; - desiredEquipment = "EnergyPack"; + desiredEquipment = "Light EnergyPack"; buyEquipmentSet = "LightEnergyDefault"; issuedByHuman = "0"; issuedByClientId = "-1"; @@ -1586,8 +1585,7 @@ new SimGroup(MissionGroup) { weightLevel4 = "0"; offense = "1"; defense = "0"; - equipment = "LIGHT"; - desiredEquipment = "EnergyPack"; + desiredEquipment = "Light EnergyPack"; buyEquipmentSet = "LightEnergyDefault"; issuedByHuman = "0"; issuedByClientId = "-1"; @@ -1928,8 +1926,7 @@ new SimGroup(MissionGroup) { weightLevel4 = "0"; offense = "1"; defense = "0"; - equipment = "LIGHT"; - desiredEquipment = "EnergyPack"; + desiredEquipment = "Light EnergyPack"; buyEquipmentSet = "LightEnergyDefault"; issuedByHuman = "0"; issuedByClientId = "-1"; @@ -2219,8 +2216,7 @@ new SimGroup(MissionGroup) { weightLevel4 = "0"; offense = "1"; defense = "0"; - equipment = "LIGHT"; - desiredEquipment = "EnergyPack"; + desiredEquipment = "Light EnergyPack"; buyEquipmentSet = "LightEnergyDefault"; issuedByHuman = "0"; issuedByClientId = "-1"; @@ -2488,8 +2484,7 @@ new SimGroup(MissionGroup) { weightLevel4 = "0"; offense = "1"; defense = "0"; - equipment = "LIGHT"; - desiredEquipment = "EnergyPack"; + desiredEquipment = "Light EnergyPack"; buyEquipmentSet = "LightEnergyDefault"; issuedByHuman = "0"; issuedByClientId = "-1"; @@ -2934,8 +2929,7 @@ new SimGroup(MissionGroup) { weightLevel4 = "0"; offense = "1"; defense = "0"; - equipment = "LIGHT"; - desiredEquipment = "EnergyPack"; + desiredEquipment = "Light EnergyPack"; buyEquipmentSet = "LightEnergyDefault"; issuedByHuman = "0"; issuedByClientId = "-1"; @@ -3251,8 +3245,7 @@ new SimGroup(MissionGroup) { weightLevel4 = "0"; offense = "1"; defense = "0"; - equipment = "LIGHT"; - desiredEquipment = "EnergyPack"; + desiredEquipment = "Light EnergyPack"; buyEquipmentSet = "LightEnergyDefault"; issuedByHuman = "0"; issuedByClientId = "-1"; @@ -3438,8 +3431,7 @@ new SimGroup(MissionGroup) { weightLevel4 = "0"; offense = "1"; defense = "0"; - equipment = "LIGHT"; - desiredEquipment = "EnergyPack"; + desiredEquipment = "Light EnergyPack"; buyEquipmentSet = "LightEnergyDefault"; issuedByHuman = "0"; issuedByClientId = "-1"; diff --git a/base/scripts/BountyGame.cs b/base/scripts/BountyGame.cs index c98e0f8..7e1589c 100644 --- a/base/scripts/BountyGame.cs +++ b/base/scripts/BountyGame.cs @@ -779,6 +779,9 @@ function BountyGame::enterMissionArea(%game, %playerData, %player) function BountyGame::leaveMissionArea(%game, %playerData, %player) { + if(%player.getState() $= "Dead") + return; + %player.client.outOfBounds = true; messageClient(%player.client, 'LeaveMissionArea', '\c1You have left the mission area. Return or take damage.~wfx/misc/warning_beep.wav'); %player.alertThread = %game.schedule(1000, "AlertPlayer", 3, %player); diff --git a/base/scripts/ChatGui.cs b/base/scripts/ChatGui.cs index d635fd0..8ec79e7 100644 --- a/base/scripts/ChatGui.cs +++ b/base/scripts/ChatGui.cs @@ -56,7 +56,8 @@ function JoinChatDlg::onWake(%this) //------------------------------------------------------------------------------ function JoinChatList::onSelect(%this,%id,%text) { - JoinChatName.setValue(%text); + %stripped = stripChars( %text, "\c4"); + JoinChatName.setValue(%stripped); } //------------------------------------------------------------------------------ @@ -147,7 +148,7 @@ function ChatTabView::onSelect(%this,%obj,%name) $IRCClient::attachedChannel = %obj; } $IRCClient::currentChannel = %obj; - ChatRoomMemberList_refresh(%obj); + ChatRoomMemberList_rebuild(%obj); ChatMessageEntry.schedule(1, makeFirstResponder, true); } @@ -265,16 +266,83 @@ function ChatRoomMemberList::onAdd(%this) } //------------------------------------------------------------------------------ -function ChatRoomMemberList_refresh(%c) +function ChatRoomMemberList_rebuild(%c) { + if(!%c) + %c = $IRCClient::currentChannel; + + //error("ChatRoomMemberList_rebuild("@%c@")"); ChatRoomMemberList.clear(); - for (%i = 0; %i < %c.numMembers(); %i++) + for (%i = 0; %i < %c.numMembers(); %i++) { ChatRoomMemberList.addRow(%c.getMemberId(%i),%c.getMemberNick(%i)); ChatRoomMemberList.setRowStyle(%i,%c.getMemberId(%i).flags | %c.getFlags(%i)); } } +//------------------------------------------------------------------------------ +function ChatRoomMemberList_refresh(%channel) +{ + %list = nameToId(ChatRoomMemberList); + + // we only want to refresh the list if its the currently active channel + // we will rebuild the list on channel switch + if(%channel != $IRCClient::currentChannel) + return; + + //%me = $IRCClient::people.getObject(0); + + //echo("Gui count :"@%list.rowCount()); + //echo("Member count :" @ %channel.numMembers()); + %add = ( %list.rowCount() < %channel.numMembers() ? true : false); + + if(%add) + { + // get our gui list + for(%i = 0; %i < %list.rowCount(); %i++) + { + %list.guiValue[%i] = %list.getRowId(%i); + //echo("List "@%i@": "@%list.guiValue[%i]@"("@%channel.getMemberNick(%i)@")"); + } + // get "real" list + for(%i = 0; %i < %channel.numMembers(); %i++) + { + %member = %channel.getMemberId(%i); + if(%member != %list.guiValue[%i]) + { + + // here is the difference, lets do the magic + //echo("did we just add: " SPC %channel.getMemberNick(%i)); + %list.addRow(%channel.getMemberId(%i), %channel.getMemberNick(%i), %i); + %list.setRowStyle(%i, %channel.getMemberId(%i).flags | %channel.getFlags(%i)); + + break; + } + } + } + else + { + for(%i = 0; %i < %list.rowCount(); %i++) + { + %list.guiValue[%i] = %list.getRowId(%i); + } + + for(%i = 0; %i < %channel.numMembers(); %i++) + { + %member = %channel.getMemberId(%i); + if(%member != %list.guiValue[%i]) + { + //echo("List "@%i@": "@%list.guiValue[%i] SPC IRCClient::taggedNick(%list.guiValue[%i])); + //error(%list.getRowId(%i)); + + %list.removeRow(%i); + break; + } + } + + } +} + //------------------------------------------------------------------------------ function ChannelBannedList_refresh() { @@ -570,7 +638,7 @@ function AcceptChannelOptions() //------------------------------------------------------------------------------ function EditChatOptions() { - $tempHighlightOn = $pref::IRCClient::HightlightOn; + $tempHighlightOn = $pref::IRCClient::HighlightOn; ButtonChatHighlight.setValue($tempHighlightOn); $tempHideLinks = $pref::IRCClient::hideLinks; @@ -685,7 +753,11 @@ function IRCClient::notify(%event) case IDIRC_CHANNEL_LIST: JoinChatList.clear(); for (%i = 0; %i < $IRCClient::numChannels; %i++) - JoinChatList.addRow(%i,IRCClient::displayChannel($IRCClient::channelNames[%i])); + { + %officailChannelMod = IRCClient::getOfficailChannelMod($IRCClient::channelNames[%i]); + %channelListDisplayName = %officailChannelMod @ IRCClient::displayChannel($IRCClient::channelNames[%i]) @"\c1 ["@ $IRCClient::channelUsers[%i] @"]"; + JoinChatList.addRow(%i, %channelListDisplayName); + } JoinChatList.sort(0); if (strlen(JoinChatName.getValue())) { @@ -714,7 +786,7 @@ function IRCClient::notify(%event) case IDIRC_SORT: %i = $IRCClient::currentChannel.findMember($IRCClient::people.getObject(0)); ChatEditChannelBtn.setVisible($IRCClient::currentChannel.getFlags(%i) & $PERSON_OPERATOR); - ChatRoomMemberList_refresh($IRCClient::currentChannel); + ChatRoomMemberList_rebuild($IRCClient::currentChannel); case IDIRC_PART: ChatRoomMemberList_refresh($IRCClient::currentChannel); case IDIRC_KICK: @@ -1062,6 +1134,20 @@ function IRCClient::findChannel(%name,%create) } } +//------------------------------------------------------------------------------ +function IRCClient::getOfficailChannelMod(%name) +{ + if(%name $= "#Tribes2" + || %name $= "#Tribes2-recruiting" + || %name $= "#Help") + { + return "\c4"; + } + else return ""; + +} + + //------------------------------------------------------------------------------ function IRCClient::displayChannel(%channel) { @@ -1136,7 +1222,11 @@ function IRCClient::connect() } } - $IRCClient::server = getField(getRecord($IRCClient::serverList, $IRCClient::serverIndex), 0); + if($IRCTestServer !$= "") + $IRCClient::server = $IRCTestServer; + else + $IRCClient::server = getField(getRecord($IRCClient::serverList, $IRCClient::serverIndex), 0); + IRCClient::newMessage("","Connecting to " @ $IRCClient::server); $IRCClient::state = IDIRC_CONNECTING_SOCKET; IRCClient::notify(IDIRC_CONNECTING_SOCKET); @@ -1286,6 +1376,8 @@ function IRCClient::send(%message) //------------------------------------------------------------------------------ function IRCTCP::onLine(%this,%line) { + if($IRCEcho) + echo("IRC " @ %line); // HACK: Windows 2000 bug. We shouldn't need to do this! if ($IRCClient::state $= IDIRC_CONNECTING_SOCKET) IRCTCP::onConnected(%this); @@ -1347,8 +1439,9 @@ function IRCClient::dispatch(%prefix,%command,%params) IRCClient::onPrivMsg(%prefix,%params); case "JOIN": IRCClient::onJoin(%prefix,%params); - case "NICK": - IRCClient::onNick(%prefix,%params); + case "NICK": + error("onNick has been removed!"); + //IRCClient::onNick(%prefix,%params); case "QUIT": IRCClient::onQuit(%prefix,%params); case "ERROR": @@ -1508,8 +1601,8 @@ function IRCClient::onJoin(%prefix,%params) %p.ref++; IRCClient::notify(IDIRC_JOIN); } - if ($pref::IRCClient::showjoinleave && !(%p.flags & $PERSON_IGNORE)) - IRCClient::newMessage(%c,IRCClient::taggedNick(%p) @ " has joined the conversation."); + if ($pref::IRCClient::showJoin && !(%p.flags & $PERSON_IGNORE)) + IRCClient::newMessage(%c,"\c4"@IRCClient::taggedNick(%p) @ " has joined the conversation."); // if this is me then set this as the current channel if (%p == $IRCClient::people.getObject(0)) @@ -1518,6 +1611,9 @@ function IRCClient::onJoin(%prefix,%params) IRCClient::notify(IDIRC_ADDCHANNEL); IRCClient::send("MODE " @ %c.getName()); + + // this is a hack, the list isnt being rebuilt right away but it is if you give it a half second + schedule(500, 0, chatRoomMemberList_rebuild); } IRCClient::connected(); } @@ -1563,24 +1659,6 @@ function IRCClient::onPrivMsg(%prefix,%params) } } -//------------------------------------------------------------------------------ -function IRCClient::onNick(%prefix,%params) -{ - %person = IRCClient::findPerson2(%prefix,false); - - if (%person) - { - %old = IRCClient::taggedNick(%person); - - %person.displayName = %params; - IRCClient::setIdentity(%person,%person.ident); - IRCClient::correctNick(%person); - - if (!(%person.flags & $PERSON_IGNORE)) - IRCClient::newMessage($IRCClient::currentChannel,%old @ " is now known as " @ IRCClient::taggedNick(%person) @ "."); - } -} - //------------------------------------------------------------------------------ function IRCClient::onQuit(%prefix,%params) { @@ -1595,7 +1673,7 @@ function IRCClient::onQuit(%prefix,%params) if (%c.removeMember(%p)) { if (!(%p.flags & $PERSON_IGNORE)) - IRCClient::newMessage(%c,IRCClient::taggedNick(%p) @ " has disconnected from IRC."); + IRCClient::newMessage(%c,"\c4" @ IRCClient::taggedNick(%p) @ " has disconnected from IRC."); if (%c == $IRCClient::currentChannel) IRCClient::notify(IDIRC_PART); } @@ -1765,8 +1843,8 @@ function IRCClient::onPart(%prefix,%params) if (%p && %c) if (%c.removeMember(%p)) { - if ($pref::IRCClient::showjoinleave && !(%p.flags & $PERSON_IGNORE)) - IRCClient::newMessage(%c,IRCClient::taggedNick(%p) @ " has left the conversation."); + if ($pref::IRCClient::showLeave && !(%p.flags & $PERSON_IGNORE)) + IRCClient::newMessage(%c,"\c4"@IRCClient::taggedNick(%p) @ " has left the conversation."); IRCClient::notify(IDIRC_PART); %p.ref--; if (%p.ref == 0) @@ -1890,6 +1968,8 @@ function IRCClient::onModeReply(%prefix,%params) //------------------------------------------------------------------------------ function IRCClient::onMode(%prefix,%params) { +//echo("IRCClient::onMode( "@%prefix@", "@ %params @" )"); + // EXAMPLE: :RickO!ricko@rick-266.dynamix.com MODE #starsiege +v homer128 // EXAMPLE: PACKET: :RickO!ricko@rick-266.dynamix.com MODE #starsiege +m // EXAMPLE: PACKET: :RickO!ricko@rick-266.dynamix.com MODE #starsiege -m @@ -1928,13 +2008,15 @@ function IRCClient::onMode(%prefix,%params) break; nextToken(%prefix,arg,"!"); + %name = IRCClient::findPerson(%arg); + %taggedName = IRCClient::taggedNick(%name); if (%c.getFlags(%i) & $PERSON_OPERATOR) - IRCClient::newMessage(%c,%arg @ " made you an operator."); + IRCClient::newMessage(%c, %taggedName @ " made you an operator."); else if (%c.getFlags(%i) & $PERSON_SPEAKER) - IRCClient::newMessage(%c,%arg @ " made you a speaker."); + IRCClient::newMessage(%c, %taggedName @ " made you a speaker."); else - IRCClient::newMessage(%c,%arg @ " made you an spectator."); + IRCClient::newMessage(%c, %taggedName @ " made you an spectator."); case "v": // Speaker (voice) %params = nextToken(%params,arg," "); @@ -1951,13 +2033,15 @@ function IRCClient::onMode(%prefix,%params) break; nextToken(%prefix,arg,"!"); + %name = IRCClient::findPerson(%arg); + %taggedName = IRCClient::taggedNick(%name); if (%c.getFlags(%i) & $PERSON_OPERATOR) - IRCClient::newMessage(%c,%arg @ " made you an operator."); + IRCClient::newMessage(%c, %taggedName @ " made you an operator."); else if (%c.getFlags(%i) & $PERSON_SPEAKER) - IRCClient::newMessage(%c,%arg @ " made you a speaker."); + IRCClient::newMessage(%c, %taggedName @ " made you a speaker."); else - IRCClient::newMessage(%c,%arg @ " made you a spectator."); + IRCClient::newMessage(%c, %taggedName @ " made you a spectator."); // CHANNEL Mode command case "b": // Ban @@ -2115,6 +2199,7 @@ function IRCClient::censor(%str) //------------------------------------------------------------------------------ function IRCClient::onList(%prefix,%params) { +//error("IRCClient::onList( "@ %prefix @", "@ %params @")"); //EXAMPLE: :StLouis.MO.US.UnderNet.org 322 homer128 #bmx 9 :BMX Rules! %params = nextToken(%params,nick," "); @@ -2131,6 +2216,7 @@ function IRCClient::onList(%prefix,%params) if ($IRCClient::silentList) { $IRCClient::channelNames[$IRCClient::numChannels] = %ch; + $IRCClient::channelUsers[$IRCClient::numChannels] = %users; $IRCClient::channelTopics[$IRCClient::numChannels] = %topic; $IRCClient::numChannels++; } @@ -2180,6 +2266,7 @@ function IRCClient::onBanListEnd(%prefix,%params) //------------------------------------------------------------------------------ function IRCClient::onBadNick(%prefix,%params) { + //error("IRCClient::onBadNick( "@%prefix@", "@%params@" )"); IRCClient::newMessage("","NOTICE: Nickname (" @ $IRCClient::people.getObject(0).displayName @ ") is already in use."); IRCClient::notify(IDIRC_ERR_NICK_IN_USE); } @@ -2228,7 +2315,7 @@ function IRCClient::onAction(%prefix,%params) %person = IRCClient::findPerson2(%prefix,true); %name = IRCClient::taggedNick(%person); - IRCClient::newMessage(%c, %name @ " " @ %msg); + IRCClient::newMessage(%c, %name @ "\c9 " @ %msg); } //------------------------------------------------------------------------------ @@ -2528,7 +2615,7 @@ function IRCClient::sendAction(%message) { IRCClient::send("PRIVMSG " @ $IRCClient::currentChannel.getName() @ " :\x01ACTION " @ %message @ "\x01"); %me = $IRCClient::people.getObject(0); - IRCClient::newMessage($IRCClient::currentChannel,IRCClient::taggedNick(%me) @ " " @ %message); + IRCClient::newMessage($IRCClient::currentChannel, IRCClient::taggedNick(%me) @ "\c9 " @ %message); } } @@ -2892,7 +2979,8 @@ function IRCClient::onJoinGame(%address,%desc) { %c = $IRCClient::channels.getObject(%i); if (!%c.private) - IRCClient::send2(%msg,%c.getName()); + //IRCClient::send2(%msg,%c.getName()); + IRCClient::send("PRIVMSG " @ %c.getName() @ ":\x01ACTION " @ %msg @ "\x01"); } } @@ -2904,6 +2992,6 @@ function IRCClient::onLeaveGame() if ($LaunchMode $= "Normal") { - IRCClient::init(); - IRCClient::connect(); + IRCClient::init(); + IRCClient::connect(); } \ No newline at end of file diff --git a/base/scripts/ChooseFilterDlg.cs b/base/scripts/ChooseFilterDlg.cs index b837b8b..34e26cc 100644 --- a/base/scripts/ChooseFilterDlg.cs +++ b/base/scripts/ChooseFilterDlg.cs @@ -10,10 +10,11 @@ function ChooseFilterDlg::onWake( %this ) CF_FilterList.clear(); CF_FilterList.addRow( 0, "All servers" ); CF_FilterList.addRow( 1, "Servers with buddies" ); + CF_FilterList.addRow( 2, "Favorites only" ); for ( %i = 0; $pref::ServerBrowser::Filter[%i] !$= ""; %i++ ) - CF_FilterList.addRow( %i + 2, $pref::ServerBrowser::Filter[%i] ); + CF_FilterList.addRow( %i + 3, $pref::ServerBrowser::Filter[%i] ); - if ( $pref::ServerBrowser::activeFilter >= %i + 2 ) + if ( $pref::ServerBrowser::activeFilter >= %i + 3 ) $pref::ServerBrowser::activeFilter = 0; CF_FilterList.setSelectedById( $pref::ServerBrowser::activeFilter ); @@ -26,8 +27,8 @@ function ChooseFilterDlg::onSleep( %this ) { // export out all the filters... %count = CF_FilterList.rowCount(); - for ( %row = 2; %row < %count; %row++ ) - $pref::ServerBrowser::Filter[%row - 2] = CF_FilterList.getRowText( %row ); + for ( %row = 3; %row < %count; %row++ ) + $pref::ServerBrowser::Filter[%row - 3] = CF_FilterList.getRowText( %row ); } //------------------------------------------------------------------------------ @@ -55,7 +56,7 @@ function ChooseFilterDlg::newFilter( %this ) function ChooseFilterDlg::editFilter( %this ) { %rowId = CF_FilterList.getSelectedId(); - if ( %rowId < 2 ) // can't edit default filters + if ( %rowId < 3 ) // can't edit default filters return; // get an updated list of game types: @@ -127,7 +128,7 @@ function ChooseFilterDlg::saveFilter( %this ) function ChooseFilterDlg::deleteFilter( %this ) { %rowId = CF_FilterList.getSelectedId(); - if ( %rowId < 2 ) // can't delete default filters + if ( %rowId < 3 ) // can't delete default filters return; %row = CF_FilterList.getRowNumById( %rowId ); @@ -163,7 +164,7 @@ function ChooseFilterDlg::go( %this ) function CF_FilterList::onSelect( %this, %id, %text ) { // Let the user know they can't edit or delete the default filters: - if ( %id < 2 ) + if ( %id < 3 ) { CF_EditFilterBtn.setActive( false ); CF_DeleteFilterBtn.setActive( false ); diff --git a/base/scripts/CnHGame.cs b/base/scripts/CnHGame.cs index c3c3e4b..48953a5 100644 --- a/base/scripts/CnHGame.cs +++ b/base/scripts/CnHGame.cs @@ -233,25 +233,6 @@ function CnHGame::equip(%game, %player) } //--------------- Scoring functions ----------------- -//NOTE - if we revert to this method of scoring, the function DefaultGame::awardScoreSuicide() no longer increments %client.deaths -// function CnHGame::recalcScore(%game, %cl) -// { -// //%cl.offenseScore = ((%cl.kills * %game.SCORE_PER_KILL) * (%cl.kills * %game.SCORE_PER_KILL)) / ((%cl.kills * %game.SCORE_PER_KILL) + (%cl.deaths * %game.SCORE_PER_DEATH)); //currently 1 pt per -// %cl.offenseScore = %cl.kills * %game.SCORE_PER_KILL; // 1 -// %cl.offenseScore += %cl.deaths * %game.SCORE_PER_DEATH; // -1 -// %cl.offenseScore += %cl.teamKills * %game.SCORE_PER_TEAMKILL; // -1 -// %cl.offenseScore += %cl.flipFlopsCapped * %game.SCORE_PER_PLYR_FLIPFLOP_CAP; -// -// -// %cl.defenseScore = %cl.turretKills * %game.SCORE_PER_TURRET_KILL; // 1 -// %cl.defenseScore += %cl.flipFlopDefends * %game.SCORE_PER_FLIPFLOP_DEFEND; -// -// %cl.score = %cl.offenseScore + %cl.defenseScore; -// //track switches held (not touched), switches defended, kills, deaths, suicides, tks -// -// %game.recalcTeamRanks(%cl); -// } - function CnHGame::recalcScore(%game, %cl) { %killValue = %cl.kills * %game.SCORE_PER_KILL; @@ -263,7 +244,7 @@ function CnHGame::recalcScore(%game, %cl) %killPoints = (%killValue * %killValue) / (%killValue - %deathValue); %cl.offenseScore = %killPoints; - %cl.offenseScore += %cl.suicides * %game.SCORE_PER_SUICIDE + //-1 + %cl.offenseScore += %cl.suicides * %game.SCORE_PER_SUICIDE; //-1 %cl.offenseScore += %cl.teamKills * %game.SCORE_PER_TEAMKILL; // -1 %cl.offenseScore += %cl.flipFlopsCapped * %game.SCORE_PER_PLYR_FLIPFLOP_CAP; @@ -287,8 +268,10 @@ function CnHGame::updateKillScores(%game, %clVictim, %clKiller, %damageType, %im %game.awardScoreKill(%clKiller); %game.awardScoreDeath(%clVictim); - if (%game.testPlayerFFDefend(%clVictim, %clKiller)) - %game.awardScorePlayerFFDefend(%clVictim, %clKiller); + //see if we were defending a flip flop + %flipflop = %game.testPlayerFFDefend(%clVictim, %clKiller); + if (isObject(%flipflop)) + %game.awardScorePlayerFFDefend(%clKiller, %flipflop); } else { @@ -306,25 +289,33 @@ function CnHGame::updateKillScores(%game, %clVictim, %clKiller, %damageType, %im function CnHGame::testPlayerFFDefend(%game, %victimID, %killerID) { - InitContainerRadiusSearch(%victimID.plyrPointOfDeath, %game.RADIUS_FLIPFLOP_DEFENSE, $TypeMasks::ItemObjectType); - %objID = containerSearchNext(); - while(%objID != 0) + if (!isObject(%victimId) || !isObject(%killerId) || %killerId.team <= 0) + return -1; + + //loop through the flipflops looking for one within range that belongs to the killer... + %ffGroup = nameToID("MissionCleanup/FlipFlops"); + for (%i = 0; %i < %ffGroup.getCount(); %i++) { - %objType = %objID.getDataBlock().getName(); - //echo("tFD found " @ %objType @ " belonging to team " @ %objID.team); - if ((%objType $= "FlipFlop") && (%objID.team == %killerID.team)) - return true; //found a killer's team flipflop near the point of victim's death - else - %objID = containerSearchNext(); + %ffObj = %ffGroup.getObject(%i); + if (VectorDist(%ffObj.position, %victimID.plyrPointOfDeath) < %game.RADIUS_FLIPFLOP_DEFENSE) + { + if (%ffObj.team == %killerID.team) + return %ffObj; + } } - return false; //didn't find a qualifying flipflop within required radius of victims point of death + + //none were found + return -1; } -function CnHGame::awardScorePlayerFFDefend(%game, %cl, %this) +function CnHGame::awardScorePlayerFFDefend(%game, %cl, %flipflop) { %cl.flipFlopDefends++; - //if (%game.SCORE_PER_FLIPFLOP_DEFEND != 0) - //messageClient(%cl, $scoreFliDefMsg, 'You receive a %1 point bonus for defending the %2.', %game.SCORE_PER_FLIPFLOP_DEFEND, %game.cleanWord(%this.name)); + if (%game.SCORE_PER_FLIPFLOP_DEFEND != 0) + { + messageClient(%cl, 'msgFFDef', '\c0You received a %1 point bonus for defending %2.', %game.SCORE_PER_FLIPFLOP_DEFEND, %game.cleanWord(%flipflop.name)); + messageTeamExcept(%cl, 'msgFFDef', '\c0Teammate %1 received a %2 point bonus for defending %3', %cl.name, %game.SCORE_PER_FLIPFLOP_DEFEND, %game.cleanWord(%flipflop.name)); + } %game.recalcScore(%cl); } @@ -334,6 +325,11 @@ function CnHGame::awardScorePlayerFFCap(%game, %cl, %this) return; %cl.flipFlopsCapped++; + if (%game.SCORE_PER_PLYR_FLIPFLOP_CAP != 0) + { + messageClient(%cl, 'msgFFDef', '\c0You received a %1 point bonus for holding the %2.', %game.SCORE_PER_PLYR_FLIPFLOP_CAP, %game.cleanWord(%this.name)); + messageTeamExcept(%cl, 'msgFFDef', '\c0Teammate %1 received a %2 point bonus for holding the %3', %cl.name, %game.SCORE_PER_PLYR_FLIPFLOP_CAP, %game.cleanWord(%this.name)); + } %game.recalcScore(%cl); } diff --git a/base/scripts/DMGame.cs b/base/scripts/DMGame.cs index a4e69af..f20e601 100644 --- a/base/scripts/DMGame.cs +++ b/base/scripts/DMGame.cs @@ -287,6 +287,9 @@ function DMGame::enterMissionArea(%game, %playerData, %player) function DMGame::leaveMissionArea(%game, %playerData, %player) { + if(%player.getState() $= "Dead") + return; + %player.client.outOfBounds = true; messageClient(%player.client, 'LeaveMissionArea', '\c1You have left the mission area. Return or take damage.~wfx/misc/warning_beep.wav'); logEcho(%player.client.nameBase@" (pl "@%player@"/cl "@%player.client@") left mission area"); diff --git a/base/scripts/GameGui.cs b/base/scripts/GameGui.cs index f479cb4..7502b9f 100644 --- a/base/scripts/GameGui.cs +++ b/base/scripts/GameGui.cs @@ -107,6 +107,7 @@ function GM_JoinPane::onActivate( %this ) if ( %this.onceOnly $= "" ) { GM_VersionText.setText( "Version" SPC getT2VersionNumber() ); + GMJ_StopBtn.setActive( false ); %this.onceOnly = 1; GMJ_Browser.lastQuery = $PlayingOnline ? "Master" : "LanServers"; @@ -202,7 +203,12 @@ function updateServerBrowser() function updateServerBrowserStatus( %text, %percentage ) { GMJ_StatusText.setValue( %text ); - GMJ_ProgressBar.setValue( %percentage ); + if ( %percentage >= 0 && %percentage <= 1 ) + { + GMJ_ProgressBar.setValue( %percentage ); + if ( %percentage == 0 ) // Query is over. + GMJ_StopBtn.setActive( false ); + } } //------------------------------------------------------------------------------ @@ -225,6 +231,7 @@ function GMJ_Browser::runQuery( %this ) GMJ_FilterBtn.setVisible( false ); GMJ_FilterText.setText( "LAN Servers" ); queryLanServers( $JoinGamePort ); + GMJ_StopBtn.setActive( true ); } else { @@ -236,6 +243,7 @@ function GMJ_Browser::runQuery( %this ) GMJ_StatusText.setValue( "Querying the master server..." ); GMJ_FilterText.setText( "All servers" ); queryMasterServer( $JoinGamePort ); + GMJ_StopBtn.setActive( true ); } else if ( $pref::ServerBrowser::activeFilter == 1 ) { @@ -245,10 +253,26 @@ function GMJ_Browser::runQuery( %this ) %this.key = LaunchGui.key++; DatabaseQueryArray( 5, 0, "", %this, %this.key ); } + else if ( $pref::ServerBrowser::activeFilter == 2 ) + { + // Favorites only: + GMJ_FilterText.setText( "Favorites" ); + if ( $pref::ServerBrowser::FavoriteCount <= 0 || $pref::ServerBrowser::Favorite[0] $= "" ) + { + GMJ_StatusText.setValue( "No favorites found." ); + MessageBoxOK( "INVALID FILTER", "You haven't marked any servers as favorites. Click the Favorites column to mark a server as a favorite." ); + } + else + { + GMJ_StatusText.setValue( "Querying favorites..." ); + queryFavoriteServers(); + GMJ_StopBtn.setActive( true ); + } + } else { GMJ_StatusText.setValue( "Querying the master server..." ); - %filterIndex = $pref::ServerBrowser::activeFilter - 2; + %filterIndex = $pref::ServerBrowser::activeFilter - 3; if ( $pref::ServerBrowser::Filter[%filterIndex] !$= "" ) { %filter = $pref::ServerBrowser::Filter[%filterIndex]; @@ -262,6 +286,7 @@ function GMJ_Browser::runQuery( %this ) getField( %filter, 4 ), // Max Players getField( %filter, 5 ), // Region Mask getField( %filter, 6 ) ); // Max Ping + GMJ_StopBtn.setActive( true ); } else { @@ -269,6 +294,7 @@ function GMJ_Browser::runQuery( %this ) $pref::ServerBrowser::activeFilter = 0; GMJ_FilterText.setText( "All servers" ); queryMasterServer( $JoinGamePort ); + GMJ_StopBtn.setActive( true ); } } } @@ -304,6 +330,7 @@ function GMJ_Browser::onDatabaseRow( %this, %row, %isLastRow, %key ) { GMJ_StatusText.setValue( "Querying the master server..." ); queryMasterServer( $JoinGamePort, 0, "Any", "Any", 0, 255, 0xFFFFFFFF, 0, %this.buddyList ); + GMJ_StopBtn.setActive( true ); %this.buddyList = ""; } } @@ -550,6 +577,7 @@ function JoinSelectedGame() function JoinGame(%address) { MessagePopup( "JOINING SERVER", "CONNECTING" ); + cancelServerQuery(); echo("Joining Server " @ %address); %playerPref = $pref::Player[$pref::Player::Current]; %playerName = getField( %playerPref, 0 ); @@ -872,6 +900,7 @@ function StartHostedGame() MessagePopup( "STARTING SERVER", "Initializing..." ); Canvas.repaint(); + cancelServerQuery(); setNetPort( $Host::Port ); CreateServer( $Host::Map, $Host::MissionType ); %playerPref = $pref::Player[$pref::Player::Current]; diff --git a/base/scripts/LaunchLanGui.cs b/base/scripts/LaunchLanGui.cs index b8d4bf9..4624a81 100644 --- a/base/scripts/LaunchLanGui.cs +++ b/base/scripts/LaunchLanGui.cs @@ -31,6 +31,8 @@ function OnlineLogIn() FilterEditGameType.clear(); FilterEditMissionType.clear(); queryMasterGameTypes(); + // Start the Email checking... + EmailGui.checkSchedule = schedule( 5000, 0, CheckEmail, true ); Canvas.setContent(LaunchGui); } @@ -284,86 +286,6 @@ function LaunchGui::onSleep(%this) Canvas.popDialog( LaunchToolbarDlg ); } -//---------------------------------------------------------------------------- -// Login/Warrior creation functions: -//--------------------------------------------------------------------------- -function CreateWarriorDlg::onAdd( %this ) -{ - %this.created = ""; -} - -//---------------------------------------------------------------------------- -function CreateWarriorDlg::onWake( %this ) -{ - CreateWarriorText.setText( "Enter your warrior name.\nThis is the name by which you will be represented on forums, chat, and in e-mail." - @ " It is also the name you will use when becoming a member of a tribe." ); - CreateWarriorBtn.setActive( false ); - CreateWarriorNameEdit.schedule( 100, makeFirstResponder, 1 ); -} - -//---------------------------------------------------------------------------- -function CreateWarriorDlg::onLine( %this, %line, %key ) -{ - //error( "** line = \"" @ %line @ "\" **" ); - if ( %key != %this.key ) - return; - - if ( %this.checkState $= "createplayer" ) - { - if ( getField( %line, 0 ) $= "0" ) - %this.checkState = "getquad"; - else - { - MessageBoxOK( "FAILED", getField( %line, 1 ), "resetCreateWarrior();" ); - %this.checkState = ""; - } - } - else if ( %this.checkState $= "getquad" ) - { - %this.created = true; - CloseMessagePopup(); - MessageBoxOK( "SUCCESS", "You successfully created the new warrior \"" @ $CreateAccountWarriorName @ "\".", "checkNamesAndAliases();" ); - } -} - -//---------------------------------------------------------------------------- -function resetCreateWarrior() -{ - $CreateAccountWarriorName = ""; - Canvas.pushDialog( CreateWarriorDlg ); -} - -//---------------------------------------------------------------------------- -function CreateWarriorDlg::connectionTerminated( %this, %key ) -{ - if ( %key != %this.key ) - return; -} - -//---------------------------------------------------------------------------- -function CreateWarriorNameEdit::checkValidPlayerName( %this ) -{ - %name = strToPlayerName( %this.getValue() ); - %this.setValue( %name ); - - CreateWarriorBtn.setActive( strlen( stripTrailingSpaces( %name ) ) > 2 ); -} - -//---------------------------------------------------------------------------- -function LoginCreateWarrior() -{ - CreateWarriorNameEdit.checkValidPlayerName(); - if ( CreateWarriorBtn.isActive() ) - { - Canvas.popDialog(CreateWarriorDlg); - MessagePopup( "PLEASE WAIT", "Creating warrior..." ); - CreateWarriorDlg.key = LaunchGui.key++; - CreateWarriorDlg.checkState = "createplayer"; - - HTTPSecureRequest("update_createplayer", $CreateAccountWarriorName, CreateWarriorDlg, CreateWarriorDlg.key); - } -} - //---------------------------------------------------------------------------- function checkNamesAndAliases() { @@ -374,14 +296,7 @@ function checkNamesAndAliases() if ( LaunchGui.getWarrior ) { %cert = WONGetAuthInfo(); - if ( %cert $= "" && !CreateWarriorDialog.created ) - { - // THIS WILL GO INTO THE CREATE ACCOUNT PROCESS SOON! - // Must create our player nickname: - Canvas.pushDialog( CreateWarriorDlg ); - return; - } - else + if ( %cert !$= "" ) { LaunchGui.getWarrior = ""; if ( %cert $= "" ) @@ -408,6 +323,8 @@ function checkNamesAndAliases() %gotoWarriorSetup = true; } } + else + MessageBoxOK( "WARNING", "Failed to get account information. You may need to quit the game and log in again." ); } } else if ( $pref::Player::Count == 0 ) diff --git a/base/scripts/OptionsDlg.cs b/base/scripts/OptionsDlg.cs index 9579944..d7d9d05 100644 --- a/base/scripts/OptionsDlg.cs +++ b/base/scripts/OptionsDlg.cs @@ -45,13 +45,13 @@ function OptionsDlg::onWake( %this ) OP_VideoDriverMenu.add( getField( %buffer, %i ), %i ); // 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.setValue( $pref::Video::fullScreen ); OP_FullScreenTgl.onAction(); OP_ApplyBtn.setActive( false ); diff --git a/base/scripts/RabbitGame.cs b/base/scripts/RabbitGame.cs index 255d0db..2fdeb30 100644 --- a/base/scripts/RabbitGame.cs +++ b/base/scripts/RabbitGame.cs @@ -358,6 +358,9 @@ function RabbitGame::enterMissionArea(%game, %playerData, %player) function RabbitGame::leaveMissionArea(%game, %playerData, %player) { + if(%player.getState() $= "Dead") + return; + %player.client.outOfBounds = true; if (%player.client.team == $RabbitTeam) messageClient(%player.client, 'LeaveMissionArea', '\c1You have left the mission area. Return or take damage.~wfx/misc/warning_beep.wav'); diff --git a/base/scripts/Training1.cs b/base/scripts/Training1.cs index 5e7da21..74b6a80 100644 --- a/base/scripts/Training1.cs +++ b/base/scripts/Training1.cs @@ -1306,6 +1306,14 @@ function trainingPlayerHitGround() schedule(%heartBeatLengthMS, Game, trainingIntroFlightEnd); } +function SinglePlayerGame::displayDeathMessages(%game, %clVictim, %clKiller, %damageType, %implement) +{ + if(game.trainingIntro) + return; + else Parent::displayDeathMessages(%game, %clVictim, %clKiller, %damageType, %implement); +} + + function serverCmdBuildClientTask(%client, %task, %team) { // player shouldnt be able to use the voice commands to do anything diff --git a/base/scripts/Training2.cs b/base/scripts/Training2.cs index 82489d6..3dbb84e 100644 --- a/base/scripts/Training2.cs +++ b/base/scripts/Training2.cs @@ -193,6 +193,15 @@ function dogKillerSpeaks(%line) serverCmdCannedChat($teammate0, %line, true); } +function findDogKillerNextRespawn() +{ + %num = game.respawnPoint; + %group = nameToId("Team1/DropPoints/Respawns"); + %object = %group.getObject(%num); + return %object; + +} + function getTeammateGlobals() { $TeammateWarnom0 = "Dogkiller"; @@ -379,7 +388,6 @@ function Pack::onCollision(%data, %obj, %col) function FlipFlop::playerTouch(%data, %flipFlop, %player) { - if(!Parent::playerTouch(%data, %flipflop, %player)) return; @@ -541,9 +549,43 @@ function SinglePlayerGame::onClientKilled(%game, %clVictim, %clKiller, %damageTy game.sentryTurretKill = true; doText(T2_tipDefense05); } + + if(%clVictim == $player && game.respawnPoint != 3) + { + %point = findDogKillerNextRespawn(); + %DKdefend = new AIObjective(AIODefendLocation) + { + datablock = "AIObjectiveMarker"; + position = %point.position; + rotation = "1 0 0 0"; + scale = "1 1 1"; + description = "Defend the players next respawn"; + location = %point.position; + weightLevel1 = 7000; + targetClientId = "-1"; + targetObjectId = %point; + }; + MissionCleanup.add(%DKdefend); + $ObjectiveQ[$playerTeam].add(%DKdefend); + game.dogKillersPlayerDefend = %DKdefend; + } + Parent::onClientKilled(%game, %clVictim, %clKiller, %damageType, %implement); } +function spawnSinglePlayer() +{ + if(isObject(game.dogKillersPlayerDefend)) + { + AIClearObjective($teammate0.dogKillersPlayerDefend); + $teammate0.dogKillersPlayerDefend.weightLevel1 = 0; + + game.dogKillersPlayerDefend.delete(); + } + + parent::spawnSinglePlayer(); +} + function missionClientKilled(%clVictim, %killer) { @@ -632,6 +674,7 @@ function checkObjectives() //Dogkiller can now pick up team objectives AIClearObjective($teammate0.DogKillerEscort); $teammate0.DogKillerEscort.weightLevel1 = 0; + schedule(6000, game, dogKillerSpeaks, 'ChatSelfDefendBase'); doText(T2_10); @@ -641,7 +684,7 @@ function checkObjectives() // first get the gens up if( ! nameToId("base3/EasternFortification").isPowered() ) { - echo("switch is not powered"); + //echo("switch is not powered"); doText(t2_TipDefense02, 1000); } diff --git a/base/scripts/Training4.cs b/base/scripts/Training4.cs index 154fbbe..2f81955 100644 --- a/base/scripts/Training4.cs +++ b/base/scripts/Training4.cs @@ -103,6 +103,7 @@ function activateskillSpecificTrainingSettings() // skill 3: no turret, no destroy turret or upstairs gen objectives if(%skill > 2) { nameToId(Team1TurretBaseLarge1).hide(true); + freeTarget(nameToId(Team1TurretBaseLarge1).getTarget()); nameToId(GenForceField).delete(); } } diff --git a/base/scripts/Training5.cs b/base/scripts/Training5.cs index c1daf97..a9213d0 100644 --- a/base/scripts/Training5.cs +++ b/base/scripts/Training5.cs @@ -107,7 +107,9 @@ function setUpDifficultySettings(%skill) if(%skill < 2) { nameToId(DownStairsSentry).hide(true); + freeTarget(nameToId(DownStairsSentry).getTarget()); nameToId(UpstairsTurret).hide(true); + freeTarget(nameToId(UpstairsTurret).getTarget()); } if(%skill == 3) nameToId(SatchelChargePack).hide(true); diff --git a/base/scripts/admin.cs b/base/scripts/admin.cs index 440bf7b..1b07628 100644 --- a/base/scripts/admin.cs +++ b/base/scripts/admin.cs @@ -9,7 +9,18 @@ function serverCmdStartNewVote(%client, %typeName, %actionMsg, %arg1, %arg2, %ar //send a message to everyone about the vote... if (%playerVote) { - if((%client.team != %arg1.team && Game.numTeams > 1) && %typeName !$= "VoteAdminPlayer") + %teamSpecific = Game.numTeams > 1; + %kickerIsObs = %client.team == 0; + %kickeeIsObs = %arg1.team == 0; + %sameTeam = %client.team == %arg1.team; + + if( %kickeeIsObs ) + { + %teamSpecific = false; + %sameTeam = false; + } + + if(( !%sameTeam && %teamSpecific) && %typeName !$= "VoteAdminPlayer") { messageClient(%client, '', "\c2Player votes must be team based."); return; @@ -26,8 +37,7 @@ function serverCmdStartNewVote(%client, %typeName, %actionMsg, %arg1, %arg2, %ar Game.kickClient = %arg1; %clientsVoting = 0; - %teamSpecific = Game.numTeams > 1; - if(%arg1.team != 0 && %teamSpecific) + if(%teamSpecific) { for ( %clientIndex = 0; %clientIndex < ClientGroup.getCount(); %clientIndex++ ) { @@ -35,8 +45,8 @@ function serverCmdStartNewVote(%client, %typeName, %actionMsg, %arg1, %arg2, %ar if(%cl.team == %client.team) { - %clients[%clientsVoting++] = %clientIndex; - messageClient( %client, 'VoteStarted', '\c2%1 initiated a vote to %2 %3.', %client.name, %actionMsg, %arg1.name); + messageClient( %cl, 'VoteStarted', '\c2%1 initiated a vote to %2 %3.', %client.name, %actionMsg, %arg1.name); + %clientsVoting++; } } } @@ -78,10 +88,12 @@ function serverCmdStartNewVote(%client, %typeName, %actionMsg, %arg1, %arg2, %ar // open the vote hud for all clients that will participate in this vote if(%teamSpecific) { - for(%i = 0; %i < %clientsVoting; %i++) - { - %cl = ClientGroup.getObject(%clients[%i]); - messageClient(%cl, 'openVoteHud', "", %clientsVoting, ($Host::VotePassPercent / 100)); + for ( %clientIndex = 0; %clientIndex < ClientGroup.getCount(); %clientIndex++ ) + { + %cl = ClientGroup.getObject( %clientIndex ); + + if(%cl.team == %client.team) + messageClient(%cl, 'openVoteHud', "", %clientsVoting, ($Host::VotePassPercent / 100)); } } else diff --git a/base/scripts/ai.cs b/base/scripts/ai.cs index 22b542f..73601b7 100644 --- a/base/scripts/ai.cs +++ b/base/scripts/ai.cs @@ -20,6 +20,8 @@ $AIModeMountVehicle = 4; $AIClientLOSTimeout = 15000; //how long a client has to remain out of sight of the bot //before the bot "can't see" the client anymore... +$AIClientMinLOSTime = 10000; //how long a bot will search for a client + //-----------------------------------// //Objective weights - level 1 @@ -275,6 +277,7 @@ function AIMissionEnd() %client.clearStep(); %client.lastDamageClient = -1; %client.lastDamageTurret = -1; + %client.shouldEngage = -1; %client.setEngageTarget(-1); %client.setTargetObject(-1); %client.pilotVehicle = false; @@ -552,6 +555,7 @@ function onAIRespawn(%client) %client.clearStep(); %client.lastDamageClient = -1; %client.lastDamageTurret = -1; + %client.shouldEngage = -1; %client.setEngageTarget(-1); %client.setTargetObject(-1); %client.pilotVehicle = false; @@ -624,9 +628,7 @@ function AIFindClosestEnemyToLoc(%srcClient, %srcLocation, %radius, %losTimeout, //make sure we find someone who's alive if (AIClientIsAlive(%cl) && %cl.team != %srcClient.team) { - %clIsCloaked = false; - if (%cl.player.getInventory("CloakingPack") > 0 && %cl.player.getImageState($BackpackSlot) $= "activate") - %clIsCloaked = true; + %clIsCloaked = !isTargetVisible(%cl.target, %srcClient.getSensorGroup()); //make sure the client can see the enemy %hasLOS = %srcClient.hasLOSToClient(%cl); diff --git a/base/scripts/aiBountyGame.cs b/base/scripts/aiBountyGame.cs index 266e708..7539b3b 100644 --- a/base/scripts/aiBountyGame.cs +++ b/base/scripts/aiBountyGame.cs @@ -63,7 +63,7 @@ function AIBountyEngageTask::weight(%task, %client) //see if anyone has fired on us recently... %mustEngage = false; - %losTimeout = 5000 + ($AIClientLOSTimeout * %client.getSkillLevel()); + %losTimeout = $AIClientMinLOSTime + ($AIClientLOSTimeout * %client.getSkillLevel()); if (AIClientIsAlive(%client.lastDamageClient, %losTimeout) && getSimTime() - %client.lastDamageTime < %losTimeout) { //see if the attacker is either our target or, we are their target diff --git a/base/scripts/aiDefaultTasks.cs b/base/scripts/aiDefaultTasks.cs index 1310686..659e28d 100644 --- a/base/scripts/aiDefaultTasks.cs +++ b/base/scripts/aiDefaultTasks.cs @@ -110,7 +110,7 @@ function AIEngageTask::weight(%task, %client) } //see if anyone has fired on us recently... - %losTimeout = 5000 + ($AIClientLOSTimeout * %client.getSkillLevel()); + %losTimeout = $AIClientMinLOSTime + ($AIClientLOSTimeout * %client.getSkillLevel()); if (AIClientIsAlive(%client.lastDamageClient, %losTimeout) && getSimTime() - %client.lastDamageTime < %losTimeout) { //see if we should turn on the new attacker diff --git a/base/scripts/aiHunters.cs b/base/scripts/aiHunters.cs index aafe542..ba9d038 100644 --- a/base/scripts/aiHunters.cs +++ b/base/scripts/aiHunters.cs @@ -188,7 +188,7 @@ function AIHuntersTask::weight(%task, %client) } else { - %losTimeout = 5000 + ($AIClientLOSTimeout * %client.getSkillLevel()); + %losTimeout = $AIClientMinLOSTime + ($AIClientLOSTimeout * %client.getSkillLevel()); %result = AIFindClosestEnemy(%client, $AIHuntersCloseFlagDist, %losTimeout); %closestEnemy = getWord(%result, 0); %closestEnemydist = getWord(%result, 1); @@ -268,7 +268,7 @@ function AIHuntersTask::weight(%task, %client) } //find the closest player with the most flags (that we have los to) - %losTimeout = 5000 + ($AIClientLOSTimeout * %client.getSkillLevel()); + %losTimeout = $AIClientMinLOSTime + ($AIClientLOSTimeout * %client.getSkillLevel()); %bestClientToEngage = findClientWithMostFlags(%client, %losTimeout); %bestClientDist = 32767; if (AIClientIsAlive(%bestClientToEngage)) diff --git a/base/scripts/aiObjectives.cs b/base/scripts/aiObjectives.cs index 2ec6ee2..23cdd87 100644 --- a/base/scripts/aiObjectives.cs +++ b/base/scripts/aiObjectives.cs @@ -451,7 +451,7 @@ function AIDefendLocation::weight(%task, %client) //search for a new vehicle to attack %task.engageVehicle = -1; - %losTimeout = 5000 + ($AIClientLOSTimeout * %client.getSkillLevel()); + %losTimeout = $AIClientMinLOSTime + ($AIClientLOSTimeout * %client.getSkillLevel()); %result = AIFindClosestEnemyPilot(%client, 300, %losTimeout); %pilot = getWord(%result, 0); %pilotDist = getWord(%result, 1); @@ -700,7 +700,7 @@ function AIAttackLocation::weight(%task, %client) %task.baseWeight = %client.objectiveWeight; //if we're a sniper, we're going to cheat, and see if there are clients near the attack location - %losTimeout = 5000 + ($AIClientLOSTimeout * %client.getSkillLevel()); + %losTimeout = $AIClientMinLOSTime + ($AIClientLOSTimeout * %client.getSkillLevel()); %distToLoc = VectorDist(%client.player.getWorldBoxCenter(), %task.location); if (%client.player.getInventory(SniperRifle) > 0 && %client.player.getInventory(EnergyPack) > 0 && %distToLoc > 60) %result = AIFindClosestEnemyToLoc(%client, %task.location, 50, $AIClientLOSTimeout, true); @@ -1052,7 +1052,7 @@ function AITouchObject::weight(%task, %client) //see if we can find someone to shoot at... if (%client.getEngageTarget() <= 0) { - %losTimeout = 5000 + ($AIClientLOSTimeout * %client.getSkillLevel()); + %losTimeout = $AIClientMinLOSTime + ($AIClientLOSTimeout * %client.getSkillLevel()); %myLocation = %client.player.getWorldBoxCenter(); %result = AIFindClosestEnemy(%client, 40, %losTimeout); %task.engageTarget = getWord(%result, 0); @@ -1264,25 +1264,29 @@ function AIEscortPlayer::weight(%task, %client) if (%task == %client.objectiveTask) %task.baseWeight = %client.objectiveWeight; - //always shoot at the closest person to the client being escorted - if (AIClientIsAlive(%task.targetClient)) + //make sure we still have someone to escort + if (!AiClientIsAlive(%task.targetClient)) { - %targetPos = %task.targetClient.player.getWorldBoxCenter(); - %losTimeout = 5000 + ($AIClientLOSTimeout * %client.getSkillLevel()); - %result = AIFindClosestEnemyToLoc(%client, %targetPos, 50, %losTimeout); + %task.setWeight(0); + return; + } + + //always shoot at the closest person to the client being escorted + %targetPos = %task.targetClient.player.getWorldBoxCenter(); + %losTimeout = $AIClientMinLOSTime + ($AIClientLOSTimeout * %client.getSkillLevel()); + %result = AIFindClosestEnemyToLoc(%client, %targetPos, 50, %losTimeout); + %task.engageTarget = getWord(%result, 0); + if (!AIClientIsAlive(%task.engageTarget)) + { + if (AIClientIsAlive(%task.targetClient.lastDamageClient, %losTimeout) && getSimTime() - %task.targetClient.lastDamageTime < %losTimeout) + %task.engageTarget = %task.targetClient.lastDamageClient; + } + if (!AIClientIsAlive(%task.engageTarget)) + { + %myPos = %client.player.getWorldBoxCenter(); + %result = AIFindClosestEnemy(%client, 50, %losTimeout); %task.engageTarget = getWord(%result, 0); - if (!AIClientIsAlive(%task.engageTarget)) - { - if (AIClientIsAlive(%task.targetClient.lastDamageClient, %losTimeout) && getSimTime() - %task.targetClient.lastDamageTime < %losTimeout) - %task.engageTarget = %task.targetClient.lastDamageClient; - } - if (!AIClientIsAlive(%task.engageTarget)) - { - %myPos = %client.player.getWorldBoxCenter(); - %result = AIFindClosestEnemy(%client, 50, %losTimeout); - %task.engageTarget = getWord(%result, 0); - } - } + } //if both us and the person we're escorting are in a vehicle, set the weight high! if (%task.targetClient.player.isMounted() && %client.player.isMounted()) @@ -1315,6 +1319,17 @@ function AIEscortPlayer::weight(%task, %client) function AIEscortPlayer::monitor(%task, %client) { + //make sure we still have someone to escort + if (!AiClientIsAlive(%task.targetClient)) + { + if (%task == %client.objectiveTask) + { + AIUnassignClient(%client); + Game.AIChooseGameObjective(%client); + } + return; + } + //first, buy the equipment if (%client.needEquipment) { @@ -1348,7 +1363,6 @@ function AIEscortPlayer::monitor(%task, %client) //see if our target is mounted in a vehicle... if (%task.targetClient.player.isMounted()) { - //find the passenger seat the bot will take %vehicle = %task.targetClient.vehicleMounted; %node = findAIEmptySeat(%vehicle, %client.player); @@ -2618,7 +2632,7 @@ function AIDeployEquipment::monitor(%task, %client) if (%distance < 10 && %dist2D < 10) %client.aimAt(%task.location, 1000); - if ((%client.pathDistRemaining(20) > %distance + 0.25) || %dist2D > 0.3) + if ((%client.pathDistRemaining(20) > %distance + 0.25) || %dist2D > 0.5) { %task.deployAttempts = 0; %task.checkObstructed = false; @@ -3620,12 +3634,17 @@ function AIODeployEquipment::weight(%this, %client, %level, %minWeight, %invento return 0; //first, make sure we haven't deployed too many... - if ($TeamDeployedCount[%client.team, %this.equipment] >= $TeamDeployableMax[%this.equipment]) + if (%this.equipment $= "TurretOutdoorDeployable" || %this.equipment $= "TurretIndoorDeployable") + %maxAllowed = countTurretsAllowed(%this.equipment); + else + %maxAllowed = $TeamDeployableMax[%this.equipment]; + + if ($TeamDeployedCount[%client.team, %this.equipment] >= %maxAllowed) return 0; //now make sure there are no other items in the way... InitContainerRadiusSearch(%this.location, $MinDeployableDistance, $TypeMasks::VehicleObjectType | - $TypeMasks::MoveableObjectType | + $TypeMasks::MoveableObjectType | $TypeMasks::StaticShapeObjectType | $TypeMasks::TSStaticShapeObjectType | $TypeMasks::ForceFieldObjectType | diff --git a/base/scripts/client.cs b/base/scripts/client.cs index bdb4b9a..b06fe05 100644 --- a/base/scripts/client.cs +++ b/base/scripts/client.cs @@ -75,7 +75,7 @@ function addMessageHudLine(%text) %origPosition = chatHud.position; //add the message... - while(HudMessageVector.getNumLines() && (HudMessageVector.getNumLines() >= $pref::HudMessageLogSize)) + while( !chatPageDown.isVisible() && HudMessageVector.getNumLines() && (HudMessageVector.getNumLines() >= $pref::HudMessageLogSize)) { %tag = HudMessageVector.getLineTag(0); if(%tag != 0) @@ -89,7 +89,7 @@ function addMessageHudLine(%text) if (%linesToScroll > 0) { chatPageDown.setVisible(true); - ChatPageDown.position = ( firstWord( outerChatHud.extent ) - 20 ) @ " " @ ( $chatScrollLenY[$chatHudLength] - 6 ); + ChatPageDown.position = ( firstWord( outerChatHud.extent ) - 20 ) @ " " @ ( $chatScrollLenY[$Pref::chatHudLength] - 6 ); chatHud.position = %origPosition; } else diff --git a/base/scripts/clientAudio.cs b/base/scripts/clientAudio.cs index e87077f..d4e34ce 100644 --- a/base/scripts/clientAudio.cs +++ b/base/scripts/clientAudio.cs @@ -255,6 +255,13 @@ new AudioProfile(TaskCompletedSound) preload = true; }; +new AudioProfile(InputDeniedSound) +{ + filename = "fx/misc/diagnostic_beep.wav"; + description = "audioGui"; + preload = true; +}; + //-------------------------------------------------------------------------- //-------------------------------------- Shapebase lock/homing tones... new AudioDescription(AudioLockTones) diff --git a/base/scripts/clientDefaults.cs b/base/scripts/clientDefaults.cs index c87b06b..57cc00f 100644 --- a/base/scripts/clientDefaults.cs +++ b/base/scripts/clientDefaults.cs @@ -76,11 +76,12 @@ $pref::Input::LinkMouseSensitivity = 1; $pref::Input::KeyboardTurnSpeed = 0.1; $pref::Interior::TexturedFog = 0; $pref::IRCClient::autoreconnect = 1; -$pref::IRCClient::showjoinleave = 1; $pref::IRCClient::awaymsg = "Don't be alarmed. I'm going to step away from my computer."; $pref::IRCClient::banmsg = "You, and three generations of your offspring, are banned from this channel."; $pref::IRCClient::kickmsg = "Alright, you're outta here!"; $pref::IRCClient::hostmsg = "left to host a game."; +$pref::IRCClient::showJoin = true; +$pref::IRCClient::showLeave = true; $pref::Lobby::Column1 = 120; $pref::Lobby::Column2 = 120; $pref::Lobby::Column3 = 50; @@ -102,7 +103,7 @@ $pref::Player::defaultFov = 90; $pref::Player::zoomSpeed = 0; $pref::RememberPassword = 0; $pref::sceneLighting::cacheSize = 60000; -$pref::sceneLighting::purgeMethod = "maxSize"; +$pref::sceneLighting::purgeMethod = "lastModified"; $pref::sceneLighting::cacheLighting = 1; $pref::sceneLighting::terrainGenerateLevel = 1; $pref::ServerBrowser::activeFilter = 0; diff --git a/base/scripts/controlDefaults.cs b/base/scripts/controlDefaults.cs index 8aaaf10..619de32 100644 --- a/base/scripts/controlDefaults.cs +++ b/base/scripts/controlDefaults.cs @@ -1070,6 +1070,7 @@ function clientCmdSetPassengerVehicleKeys() { passengerKeys.copyBind( moveMap, toggleZoom ); passengerKeys.copyBind( moveMap, setZoomFOV ); + passengerKeys.copyBind( moveMap, toggleScoreScreen ); } function clientCmdSetDefaultVehicleKeys(%inVehicle) @@ -1122,6 +1123,8 @@ function clientCmdSetDefaultVehicleKeys(%inVehicle) passengerKeys.copyBind( moveMap, voteNo ); passengerKeys.copyBind( moveMap, toggleCommanderMap ); passengerKeys.bindCmd( keyboard, escape, "", "escapeFromGame();" ); + passengerKeys.copyBind( moveMap, toggleHelpGui ); + passengerKeys.copyBind( moveMap, toggleScoreScreen ); // Bind the weapon keys as well: passengerKeys.copyBind( moveMap, nextWeapon ); diff --git a/base/scripts/creditsText.cs b/base/scripts/creditsText.cs index 6bc02c1..553668f 100644 --- a/base/scripts/creditsText.cs +++ b/base/scripts/creditsText.cs @@ -180,6 +180,9 @@ addCreditsLine(""); addCreditsLine("Manual Layout"); addCreditsLine("Kim McGovern"); addCreditsLine(""); +addCreditsLine("Localization Coordinator"); +addCreditsLine("Warren Wright"); +addCreditsLine(""); addCreditsLine("Sound Effects"); addCreditsLine("EFX/Wilshire Studios"); addCreditsLine("CS Productions Inc."); @@ -332,7 +335,7 @@ addCreditsLine("Bodhi \"Heliometus Max\" Daher"); addCreditsLine("Brad \"Bort\" Klann"); addCreditsLine("Bret D. \"Bacchus\" Wilson"); addCreditsLine("Brian \"Aftershock\" Parker"); -addCreditsLine("Carl Anderson"); +addCreditsLine("Carl \"Daddy\" Anderson"); addCreditsLine("Charlie Schillberg"); addCreditsLine("Chason \"Phantom Stranger\" Ellis"); addCreditsLine("Chris \"Pie4Foo\" Abele"); diff --git a/base/scripts/damageTypes.cs b/base/scripts/damageTypes.cs index 77bb40d..42ca05f 100644 --- a/base/scripts/damageTypes.cs +++ b/base/scripts/damageTypes.cs @@ -379,7 +379,7 @@ datablock SimDataBlock(TankDamageProfile) shieldDamageScale[$DamageType::SatchelCharge] = 2.0; shieldDamageScale[$DamageType::Default] = 1.0; shieldDamageScale[$DamageType::Impact] = 0.75; - shieldDamageScale[$DamageType::Ground] = 1.0; + shieldDamageScale[$DamageType::Ground] = 0.75; shieldDamageScale[$DamageType::Explosion] = 2.0; shieldDamageScale[$DamageType::Lightning] = 10.0; @@ -408,7 +408,7 @@ datablock SimDataBlock(TankDamageProfile) damageScale[$DamageType::SatchelCharge] = 2.0; damageScale[$DamageType::Default] = 1.0; damageScale[$DamageType::Impact] = 0.75; - damageScale[$DamageType::Ground] = 1.0; + damageScale[$DamageType::Ground] = 0.75; damageScale[$DamageType::Explosion] = 1.0; damageScale[$DamageType::Lightning] = 10.0; }; @@ -441,7 +441,7 @@ datablock SimDataBlock(MPBDamageProfile) shieldDamageScale[$DamageType::SatchelCharge] = 2.0; shieldDamageScale[$DamageType::Default] = 1.0; shieldDamageScale[$DamageType::Impact] = 0.5; - shieldDamageScale[$DamageType::Ground] = 1.0; + shieldDamageScale[$DamageType::Ground] = 0.5; shieldDamageScale[$DamageType::Explosion] = 2.0; shieldDamageScale[$DamageType::Lightning] = 10.0; @@ -470,7 +470,7 @@ datablock SimDataBlock(MPBDamageProfile) damageScale[$DamageType::SatchelCharge] = 2.0; damageScale[$DamageType::Default] = 1.0; damageScale[$DamageType::Impact] = 0.5; - damageScale[$DamageType::Ground] = 1.0; + damageScale[$DamageType::Ground] = 0.5; damageScale[$DamageType::Explosion] = 1.0; damageScale[$DamageType::Lightning] = 10.0; }; diff --git a/base/scripts/defaultGame.cs b/base/scripts/defaultGame.cs index 14bb2fe..9dcfc30 100644 --- a/base/scripts/defaultGame.cs +++ b/base/scripts/defaultGame.cs @@ -574,6 +574,11 @@ function DefaultGame::gameOver( %game ) %client.endMission(); messageClient( %client, 'MsgClearDebrief', "" ); %game.sendDebriefing( %client ); + + //clear the score hud... + messageClient( %client, 'SetScoreHudHeader', "", "" ); + messageClient( %client, 'SetScoreHudSubheader', "", ""); + messageClient( %client, 'ClearHud', "", 'scoreScreen', 0 ); } } @@ -1255,9 +1260,16 @@ function DefaultGame::AIChangeTeam(%game, %client, %newTeam) return; //clear the ai from any objectives, etc... - AIUnassignClient(%client); - %client.clearTasks(); + AIUnassignClient(%client); + %client.stop(); + %client.clearTasks(); %client.clearStep(); + %client.lastDamageClient = -1; + %client.lastDamageTurret = -1; + %client.shouldEngage = -1; + %client.setEngageTarget(-1); + %client.setTargetObject(-1); + %client.pilotVehicle = false; %client.defaultTasksAdded = false; //kill the player, which should cause the Game object to perform whatever cleanup is required. diff --git a/base/scripts/deployables.cs b/base/scripts/deployables.cs index f2f7452..ed799ae 100644 --- a/base/scripts/deployables.cs +++ b/base/scripts/deployables.cs @@ -118,7 +118,7 @@ datablock StaticShapeData(DeployedStationInventory) : StaticShapeDamageProfile renderWhenDestroyed = false; doesRepair = true; - deployedObject = true; + deployedObject = true; cmdCategory = "DSupport"; cmdIcon = CMDStationIcon; @@ -199,7 +199,7 @@ datablock StaticShapeData(DeployedMotionSensor) : StaticShapeDamageProfile explosion = DeployablesExplosion; dynamicType = $TypeMasks::SensorObjectType; - deployedObject = true; + deployedObject = true; cmdCategory = "DSupport"; cmdIcon = CMDSensorIcon; @@ -281,7 +281,7 @@ datablock StaticShapeData(DeployedPulseSensor) : StaticShapeDamageProfile explosion = DeployablesExplosion; dynamicType = $TypeMasks::SensorObjectType; - deployedObject = true; + deployedObject = true; cmdCategory = "DSupport"; cmdIcon = CMDSensorIcon; @@ -504,10 +504,10 @@ function Deployables::searchView(%obj, %searchRange, %mask) //------------------------------------------------- function ShapeBaseImageData::testMaxDeployed(%item, %plyr) { - if(%item.item $= TurretOutdoorDeployable || %item.item $= TurretIndoorDeployable) - %itemCount = countTurretsAllowed(%item.item); - else - %itemCount = $TeamDeployableMax[%item.item]; + if(%item.item $= TurretOutdoorDeployable || %item.item $= TurretIndoorDeployable) + %itemCount = countTurretsAllowed(%item.item); + else + %itemCount = $TeamDeployableMax[%item.item]; return $TeamDeployedCount[%plyr.team, %item.item] >= %itemCount; } @@ -550,7 +550,7 @@ function ShapeBaseImageData::testObjectTooClose(%item) //------------------------------------------------- function TurretOutdoorDeployableImage::testNoTerrainFound(%item) { - return %item.surface.getClassName() !$= TerrainBlock; + return %item.surface.getClassName() !$= TerrainBlock; } function ShapeBaseImageData::testNoTerrainFound(%item, %surface) @@ -736,36 +736,43 @@ function ShapeBaseImageData::testInvalidDeployConditions(%item, %plyr, %slot) 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.testTurretSaturation()) %disqualified = $NotDeployableReason::TurretSaturation; + else + { + // Test that there are no objstructing objects that this object + // will intersect with + // + %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; + } + } if (%plyr.getMountedImage($BackpackSlot) == %item) //player still have the item? { if (%disqualified) - activateDeploySensorRed(%plyr); + activateDeploySensorRed(%plyr); else activateDeploySensorGrn(%plyr); @@ -904,9 +911,9 @@ function ShapeBaseImageData::onDeploy(%item, %plyr, %slot) else %deplObj.setTransform(%item.surfacePt SPC %rot); - // set the recharge rate right away - if(%deplObj.getDatablock().rechargeRate) - %deplObj.setRechargeRate(%deplObj.getDatablock().rechargeRate); + // set the recharge rate right away + if(%deplObj.getDatablock().rechargeRate) + %deplObj.setRechargeRate(%deplObj.getDatablock().rechargeRate); // set team, owner, and handle %deplObj.team = %plyr.client.Team; @@ -1121,10 +1128,19 @@ function DeployedStationInventory::onEndSequence(%data, %obj, %thread) %trigger = new Trigger() { dataBlock = stationTrigger; - polyhedron = "-0.75 0.0 0.1 1.5 0.0 0.0 0.0 -1.5 0.0 0.0 0.0 2.3"; + polyhedron = "-0.125 0.0 0.1 0.25 0.0 0.0 0.0 -0.7 0.0 0.0 0.0 1.0"; }; MissionCleanup.add(%trigger); - %trigger.setTransform(%obj.getTransform()); + + %trans = %obj.getTransform(); + %vSPos = getWords(%trans,0,2); + %vRot = getWords(%trans,3,5); + %vAngle = getWord(%trans,6); + %matrix = VectorOrthoBasis(%vRot @ " " @ %vAngle + 0.0); + %yRot = getWords(%matrix, 3, 5); + %pos = vectorAdd(%vSPos, vectorScale(%yRot, -0.1)); + + %trigger.setTransform(%pos @ " " @ %vRot @ " " @ %vAngle); // associate the trigger with the station %trigger.station = %obj; @@ -1190,25 +1206,25 @@ function DeployedTurret::onDestroyed(%this, %obj, %prevState) function countTurretsAllowed(%type) { - for(%j = 1; %j < Game.numTeams; %j++) - %teamPlayerCount[%j] = 0; + for(%j = 1; %j < Game.numTeams; %j++) + %teamPlayerCount[%j] = 0; %numClients = ClientGroup.getCount(); for(%i = 0; %i < %numClients; %i++) { %cl = ClientGroup.getObject(%i); - if(%cl.team > 0) - %teamPlayerCount[%cl.team]++; + if(%cl.team > 0) + %teamPlayerCount[%cl.team]++; } - // the bigger team determines the number of turrets allowed - %maxPlayers = %teamPlayerCount[1] > %teamPlayerCount[2] ? %teamPlayerCount[1] : %teamPlayerCount[2]; - // each team can have 1 turret of each type (indoor/outdoor) for every 2 players - // minimum and maximums are defined in deployables.cs - %teamTurretMax = mFloor(%maxPlayers / 2); - if(%teamTurretMax < $TeamDeployableMin[%type]) - %teamTurretMax = $TeamDeployableMin[%type]; - else if(%teamTurretMax > $TeamDeployableMax[%type]) - %teamTurretMax = $TeamDeployableMax[%type]; - - return %teamTurretMax; + // the bigger team determines the number of turrets allowed + %maxPlayers = %teamPlayerCount[1] > %teamPlayerCount[2] ? %teamPlayerCount[1] : %teamPlayerCount[2]; + // each team can have 1 turret of each type (indoor/outdoor) for every 2 players + // minimum and maximums are defined in deployables.cs + %teamTurretMax = mFloor(%maxPlayers / 2); + if(%teamTurretMax < $TeamDeployableMin[%type]) + %teamTurretMax = $TeamDeployableMin[%type]; + else if(%teamTurretMax > $TeamDeployableMax[%type]) + %teamTurretMax = $TeamDeployableMax[%type]; + + return %teamTurretMax; } diff --git a/base/scripts/inventory.cs b/base/scripts/inventory.cs index 46bf048..563c1f0 100644 --- a/base/scripts/inventory.cs +++ b/base/scripts/inventory.cs @@ -128,7 +128,10 @@ function ShapeBase::throw(%this,%data) if (%this.inv[%data.getName()] > 0) { // Throw item first... %this.throwItem(%data); - %this.decInventory(%data,1); + if($AmmoIncrement[%data.getName()] !$= "") + %this.decInventory(%data,$AmmoIncrement[%data.getName()]); + else + %this.decInventory(%data,1); return true; } return false; diff --git a/base/scripts/packs/repairpack.cs b/base/scripts/packs/repairpack.cs index a9c65c7..6794794 100644 --- a/base/scripts/packs/repairpack.cs +++ b/base/scripts/packs/repairpack.cs @@ -103,7 +103,7 @@ datablock ShapeBaseImageData(RepairGunImage) usesEnergy = true; minEnergy = 3; - cutOffEnergy = 3.1; + cutOffEnergy = 3.1; emap = true; repairFactorPlayer = 0.002; // <--- attention DaveG! @@ -229,21 +229,21 @@ function RepairGunImage::onActivateReady(%this,%obj,%slot) { %obj.errMsgSent = false; %obj.selfRepairing = false; - %obj.repairing = 0; + %obj.repairing = 0; %obj.setImageLoaded(%slot, false); } function RepairGunImage::onValidate(%this,%obj,%slot) { - // this = repairgunimage datablock - // obj = player wielding the repair gun - // slot = weapon slot + // this = repairgunimage datablock + // obj = player wielding the repair gun + // slot = weapon slot - if(%obj.getEnergyLevel() <= %this.cutOffEnergy) - { - stopRepairing(%obj); - return; - } + if(%obj.getEnergyLevel() <= %this.cutOffEnergy) + { + stopRepairing(%obj); + return; + } %repGun = %obj.getMountedImage(%slot); // muzVec is the vector coming from the repair gun's "muzzle" %muzVec = %obj.getMuzzleVector(%slot); @@ -261,7 +261,7 @@ function RepairGunImage::onValidate(%this,%obj,%slot) $TypeMasks::StaticShapeObjectType | $TypeMasks::TurretObjectType | $TypeMasks::InteriorObjectType; // search for objects within the beam's range that fit the masks above %scanTarg = ContainerRayCast(%muzPoint, %rangeEnd, %searchMasks, %obj); - // screen out interiors + // screen out interiors if(%scanTarg && !(%scanTarg.getType() & $TypeMasks::InteriorObjectType)) { // a target in range was found @@ -270,13 +270,13 @@ function RepairGunImage::onValidate(%this,%obj,%slot) if(%repTgt.getDamageLevel()) { // yes, it's damaged - if(%repTgt != %obj.repairing) - { - if(isObject(%obj.repairing)) - stopRepairing(%obj); + if(%repTgt != %obj.repairing) + { + if(isObject(%obj.repairing)) + stopRepairing(%obj); %obj.repairing = %repTgt; - } + } // setting imageLoaded to true sends us to repair state (function onRepair) %obj.setImageLoaded(%slot, true); } @@ -295,43 +295,43 @@ function RepairGunImage::onValidate(%this,%obj,%slot) } } - //AI hack - too many things influence the aiming, so I'm going to force the repair object for bots only - else if (%obj.client.isAIControlled() && isObject(%obj.client.repairObject)) - { - %repTgt = %obj.client.repairObject; - %repPoint = %repTgt.getAIRepairPoint(); - if (%repPoint $= "0 0 0") - %repPoint = %repTgt.getWorldBoxCenter(); - %repTgtVector = VectorNormalize(VectorSub(%muzPoint, %repPoint)); - %aimVector = VectorNormalize(VectorSub(%muzPoint, %rangeEnd)); + //AI hack - too many things influence the aiming, so I'm going to force the repair object for bots only + else if (%obj.client.isAIControlled() && isObject(%obj.client.repairObject)) + { + %repTgt = %obj.client.repairObject; + %repPoint = %repTgt.getAIRepairPoint(); + if (%repPoint $= "0 0 0") + %repPoint = %repTgt.getWorldBoxCenter(); + %repTgtVector = VectorNormalize(VectorSub(%muzPoint, %repPoint)); + %aimVector = VectorNormalize(VectorSub(%muzPoint, %rangeEnd)); - //if the dot product is very close (ie. we're aiming in the right direction) - if (VectorDot(%repTgtVector, %aimVector) > 0.85) - { - //do an LOS to make sure nothing is in the way... - %scanTarg = ContainerRayCast(%muzPoint, %repPoint, %searchMasks, %obj); - if (firstWord(%scanTarg) == %repTgt) - { - // yes, it's damaged + //if the dot product is very close (ie. we're aiming in the right direction) + if (VectorDot(%repTgtVector, %aimVector) > 0.85) + { + //do an LOS to make sure nothing is in the way... + %scanTarg = ContainerRayCast(%muzPoint, %repPoint, %searchMasks, %obj); + if (firstWord(%scanTarg) == %repTgt) + { + // yes, it's damaged - if(isObject(%obj.repairing)) - stopRepairing(%obj); + if(isObject(%obj.repairing)) + stopRepairing(%obj); - %obj.repairing = %repTgt; - // setting imageLoaded to true sends us to repair state (function onRepair) - %obj.setImageLoaded(%slot, true); - } - } - } + %obj.repairing = %repTgt; + // setting imageLoaded to true sends us to repair state (function onRepair) + %obj.setImageLoaded(%slot, true); + } + } + } else if(%obj.getDamageLevel()) { // there is no target in range, but the player is damaged // check to see if we were repairing something before -- if so, stop repairing old target if(%obj.repairing != 0) if(%obj.repairing != %obj) - stopRepairing(%obj); - if(isObject(%obj.repairing)) - stopRepairing(%obj); + stopRepairing(%obj); + if(isObject(%obj.repairing)) + stopRepairing(%obj); %obj.repairing = %obj; // quick, to onRepair! @@ -346,32 +346,32 @@ function RepairGunImage::onValidate(%this,%obj,%slot) messageClient(%obj.client, 'MsgRepairPackNoTarget', '\c2No target to repair.'); %obj.errMsgSent = true; } - stopRepairing(%obj); + stopRepairing(%obj); } } function RepairGunImage::onRepair(%this,%obj,%slot) { - // this = repairgunimage datablock - // obj = player wielding the repair gun - // slot = weapon slot + // this = repairgunimage datablock + // obj = player wielding the repair gun + // slot = weapon slot - if(%obj.getEnergyLevel() <= %this.cutOffEnergy) - { - stopRepairing(%obj); - return; - } + if(%obj.getEnergyLevel() <= %this.cutOffEnergy) + { + stopRepairing(%obj); + return; + } // reset the flag that indicates an error message has been sent %obj.errMsgSent = false; %target = %obj.repairing; if(!%target) { // no target -- whoops! never mind - stopRepairing(%obj); + stopRepairing(%obj); } else { - %target.repairedBy = %obj.client; //keep track of who last repaired this item + %target.repairedBy = %obj.client; //keep track of who last repaired this item if(%obj.repairing == %obj) { // player is self-repairing @@ -405,22 +405,31 @@ function RepairGunImage::onRepair(%this,%obj,%slot) %searchMasks = $TypeMasks::PlayerObjectType | $TypeMasks::VehicleObjectType | $TypeMasks::StaticShapeObjectType | $TypeMasks::TurretObjectType; - //AI hack to help "fudge" the repairing stuff... - if (%obj.client.isAIControlled() && isObject(%obj.client.repairObject) && %obj.client.repairObject == %obj.repairing) - { - %repTgt = %obj.client.repairObject; - %repPoint = %repTgt.getAIRepairPoint(); - if (%repPoint $= "0 0 0") - %repPoint = %repTgt.getWorldBoxCenter(); - %repTgtVector = VectorNormalize(VectorSub(%muzPoint, %repPoint)); - %aimVector = VectorNormalize(VectorSub(%muzPoint, %rangeEnd)); + //AI hack to help "fudge" the repairing stuff... + if (%obj.client.isAIControlled() && isObject(%obj.client.repairObject) && %obj.client.repairObject == %obj.repairing) + { + %repTgt = %obj.client.repairObject; + %repPoint = %repTgt.getAIRepairPoint(); + if (%repPoint $= "0 0 0") + %repPoint = %repTgt.getWorldBoxCenter(); + %repTgtVector = VectorNormalize(VectorSub(%muzPoint, %repPoint)); + %aimVector = VectorNormalize(VectorSub(%muzPoint, %rangeEnd)); - //if the dot product is very close (ie. we're aiming in the right direction) - if (VectorDot(%repTgtVector, %aimVector) > 0.85) - %scanTarg = ContainerRayCast(%muzPoint, %repPoint, %searchMasks, %obj); - } - else - %scanTarg = ContainerRayCast(%muzPoint, %rangeEnd, %searchMasks, %obj); + //if the dot product is very close (ie. we're aiming in the right direction) + if (VectorDot(%repTgtVector, %aimVector) > 0.85) + %scanTarg = ContainerRayCast(%muzPoint, %repPoint, %searchMasks, %obj); + } + else + %scanTarg = ContainerRayCast(%muzPoint, %rangeEnd, %searchMasks, %obj); + + if (%scanTarg) + { + %pos = getWords(%scanTarg, 1, 3); + %obstructMask = $TypeMasks::InteriorObjectType | $TypeMasks::TerrainObjectType; + %obstruction = ContainerRayCast(%muzPoint, %pos, %obstructMask, %obj); + if (%obstruction) + %scanTarg = "0"; + } if(%scanTarg) { @@ -433,9 +442,9 @@ function RepairGunImage::onRepair(%this,%obj,%slot) { // the target is not the same as the one we were just repairing // stop repairing old target, start repairing new target - stopRepairing(%obj); - if(isObject(%obj.repairing)) - stopRepairing(%obj); + stopRepairing(%obj); + if(isObject(%obj.repairing)) + stopRepairing(%obj); %obj.repairing = %repTgt; // extract the name of what player is repairing based on what it is @@ -470,12 +479,12 @@ function RepairGunImage::onRepair(%this,%obj,%slot) } else { - %rateOfRepair = %this.repairFactorObject; + %rateOfRepair = %this.repairFactorObject; if(%repTgt.getClassName() $= Player) - { + { %tgtName = getTaggedString(%repTgt.client.name); - %rateOfRepair = %this.repairFactorPlayer; - } + %rateOfRepair = %this.repairFactorPlayer; + } else if(%repTgt.getGameName() !$= "") %tgtName = %repTgt.getGameName(); else @@ -488,8 +497,8 @@ function RepairGunImage::onRepair(%this,%obj,%slot) else { // same target, but not damaged -- we must be done - messageClient(%obj.client, 'MsgRepairPackDone', '\c2Repairs completed.'); - Game.objectRepaired(%repTgt, %tgtName); + messageClient(%obj.client, 'MsgRepairPackDone', '\c2Repairs completed.'); + Game.objectRepaired(%repTgt, %tgtName); } %obj.errMsgSent = true; stopRepairing(%obj); @@ -507,7 +516,7 @@ function RepairGunImage::onRepair(%this,%obj,%slot) function RepairGunImage::onDeactivate(%this,%obj,%slot) { - stopRepairing(%obj); + stopRepairing(%obj); } function stopRepairing(%player) @@ -536,10 +545,10 @@ function stopRepairing(%player) %player.repairProjectile = 0; } } - %player.repairing = 0; - %player.repairingRate = 0; - %player.setImageTrigger($WeaponSlot, false); - %player.setImageLoaded($WeaponSlot, false); + %player.repairing = 0; + %player.repairingRate = 0; + %player.setImageTrigger($WeaponSlot, false); + %player.setImageLoaded($WeaponSlot, false); } function startRepairing(%player, %self) @@ -552,7 +561,7 @@ function startRepairing(%player, %self) // one repair, hold the projectile %player.setRepairRate(%player.getRepairRate() + RepairGunImage.repairFactorPlayer); %player.selfRepairing = true; - %player.repairingRate = RepairGunImage.repairFactorPlayer; + %player.repairingRate = RepairGunImage.repairFactorPlayer; } else { @@ -561,21 +570,21 @@ function startRepairing(%player, %self) //else // %player.repairing.beingRepaired++; - //AI hack... - if (%player.client.isAIControlled() && %player.client.repairObject == %player.repairing) - { + //AI hack... + if (%player.client.isAIControlled() && %player.client.repairObject == %player.repairing) + { %initialPosition = %player.getMuzzlePoint($WeaponSlot); %initialDirection = VectorSub(%initialPosition, %player.repairing.getWorldBoxCenter()); - } - else - { + } + else + { %initialDirection = %player.getMuzzleVector($WeaponSlot); %initialPosition = %player.getMuzzlePoint($WeaponSlot); - } - if(%player.repairing.getClassName() $= Player) - %repRate = RepairGunImage.repairFactorPlayer; - else - %repRate = RepairGunImage.repairFactorObject; + } + if(%player.repairing.getClassName() $= Player) + %repRate = RepairGunImage.repairFactorPlayer; + else + %repRate = RepairGunImage.repairFactorObject; %player.repairing.setRepairRate(%player.repairing.getRepairRate() + %repRate); %player.repairingRate = %repRate; diff --git a/base/scripts/projectiles.cs b/base/scripts/projectiles.cs index 90799cb..b6610f9 100644 --- a/base/scripts/projectiles.cs +++ b/base/scripts/projectiles.cs @@ -123,9 +123,12 @@ function ShapeBaseImageData::onFire(%data, %obj, %slot) vehicleObject = %vehicle; }; } - if (%data.deleteLastProjectile && isObject(%obj.lastProjectile)) - %obj.lastProjectile.delete(); + + if (isObject(%obj.lastProjectile) && %obj.deleteLastProjectile) + %obj.lastProjectile.delete(); + %obj.lastProjectile = %p; + %obj.deleteLastProjectile = %data.deleteLastProjectile; MissionCleanup.add(%p); // AI hook diff --git a/base/scripts/server.cs b/base/scripts/server.cs index 363c962..9b89e90 100644 --- a/base/scripts/server.cs +++ b/base/scripts/server.cs @@ -165,6 +165,11 @@ function DestroyServer() $missionRunning = false; allowConnections(false); stopHeartbeat(); + %game = game.class; + MissionGroup.delete(); + MissionCleanup.delete(); + %game.deactivatePackages(); + %game.delete(); if(isObject($ServerGroup)) $ServerGroup.delete(); @@ -301,6 +306,7 @@ function getValidVoicePitch(%voice, %voicePitch) function GameConnection::onConnect( %client, %name, %raceGender, %skin, %voice, %voicePitch ) { + %client.setMissionCRC($missionCRC); sendLoadInfoToClient( %client ); //%client.setSimulatedNetParams(0.1, 30); @@ -663,6 +669,17 @@ function loadMissionStage2() %file = "missions/" @ $missionName @ ".mis"; if(!isFile(%file)) return; + + // send the mission file crc to the clients (used for mission lighting) + $missionCRC = getFileCRC(%file); + %count = ClientGroup.getCount(); + for(%i = 0; %i < %count; %i++) + { + %client = ClientGroup.getObject(%i); + if(!%client.isAIControlled()) + %client.setMissionCRC($missionCRC); + } + $countDownStarted = false; exec(%file); $instantGroup = MissionCleanup; @@ -1101,6 +1118,10 @@ function serverCmdPlayCel(%client,%anim) // NOTENOTENOTE: Review function serverCmdPlayAnim(%client, %anim) { + if( %anim $= "Death1" || %anim $= "Death2" || %anim $= "Death3" || %anim $= "Death4" || %anim $= "Death5" || + %anim $= "Death6" || %anim $= "Death7" || %anim $= "Death8" || %anim $= "Death9" || %anim $= "Death10" || %anim $= "Death11" ) + return; + %player = %client.player; // don't play animations if player is in a vehicle if (%player.isMounted()) @@ -1610,7 +1631,11 @@ function checkMissionStart() countDown($Host::warmupTime * 1000); else Game.startMatch(); - } + + for(%x = 0; %x < $NumVehiclesDeploy; %x++) + $VehiclesDeploy[%x].getDataBlock().schedule(%timeMS / 2, "vehicleDeploy", $VehiclesDeploy[%x], 0, 1); + $NumVehiclesDeploy = 0; + } else { schedule(2000, ServerGroup, "checkMissionStart"); @@ -1628,11 +1653,7 @@ function Countdown(%timeMS) %game = Game.getId(); else return; - - for(%x = 0; %x < $NumVehiclesDeploy; %x++) - $VehiclesDeploy[%x].getDataBlock().schedule(%timeMS / 2, "vehicleDeploy", $VehiclesDeploy[%x]); - $NumVehiclesDeploy = 0; - + $countdownStarted = true; Game.matchStart = Game.schedule( %timeMS, "StartMatch" ); diff --git a/base/scripts/station.cs b/base/scripts/station.cs index fcbc1e9..71ae4fb 100644 --- a/base/scripts/station.cs +++ b/base/scripts/station.cs @@ -848,6 +848,7 @@ function Station::onLosePowerDisabled(%data, %obj) if(%data.getName() $= DeployedStationInventory) %obj.stopThread($ActivateThread); // reset some attributes + %occupied.setCloaked(false); %occupied.station = ""; %occupied.inStation = false; %obj.triggeredBy = ""; @@ -900,14 +901,9 @@ function DeployedStationInventory::setPlayersPosition(%data, %obj, %trigger, %co if((VectorLen(%vel) < 22) && (%obj.triggeredBy != %colObj)) { // build offset for player position - %yrot = getWords(VectorOrthoBasis( getWords( %obj.getTransform(), 3, 6 ) ) ,3 ,5); - %yrot = VectorScale( %yrot, -1.0 ); - %statTrans = %obj.getTransform(); - %statX = getWord( %statTrans, 0 ); - %statY = getWord( %statTrans, 1 ); - %statZ = getWord( %statTrans, 2 ); - - %colObj.setTransform( %statX + getWord( %yRot, 0 ) @ " " @ %statY + getWord( %yRot, 1 ) @ " " @ %statZ + 0.2 @ " " @ getWords( %statTrans, 3, 6 ) ); + %rot = getWords(%obj.getTransform(), 3, 6); + %colObj.setTransform( getWords(%colObj.getTransform(),0,2) @ " " @ %rot ); + %colObj.setvelocity("0 0 0"); %colObj.setMoveState(true); %colObj.schedule(1600,"setMoveState", false); diff --git a/base/scripts/turret.cs b/base/scripts/turret.cs index 781f2e1..d33ed5b 100644 --- a/base/scripts/turret.cs +++ b/base/scripts/turret.cs @@ -271,6 +271,9 @@ function TurretData::replaceCallback(%this, %turret, %engineer) function TurretData::onDestroyed(%this, %turret, %prevState) { + if( isObject( %turret.lastProjectile ) ) + %turret.lastProjectile.delete(); + Parent::onDestroyed(%this, %turret, %prevState); } diff --git a/base/scripts/vehicles/vehicle.cs b/base/scripts/vehicles/vehicle.cs index 1a699a8..ad53435 100644 --- a/base/scripts/vehicles/vehicle.cs +++ b/base/scripts/vehicles/vehicle.cs @@ -1,9 +1,13 @@ +// Notes: +// - respawning vehicles with turrets (bomber/tank) will not setup the turret properly + //Damage Rate for entering Liquid $VehicleDamageLava = 0.0325; $VehicleDamageHotLava = 0.0325; $VehicleDamageCrustyLava = 0.0325; $NumVehiclesDeploy = 0; + //************************************************************** //* GENERAL PURPOSE FUNCTIONS //************************************************************** @@ -22,7 +26,7 @@ function VehicleData::onAdd(%data, %obj) if(%obj.deployed) { if($countDownStarted) - %data.schedule(($Host::WarmupTime * 1000) / 2, "vehicleDeploy", %obj); + %data.schedule(($Host::WarmupTime * 1000) / 2, "vehicleDeploy", %obj, 0, 1); else { $VehiclesDeploy[$NumVehiclesDeploy] = %obj; @@ -73,6 +77,21 @@ function VehicleData::onDamage(%this,%obj) } } +function VehicleData::playerDismounted(%data, %obj, %player) +{ + //this function is declared to prevent console error msg spam... +} + +function HoverVehicle::useCreateHeight() +{ + //this function is declared to prevent console error msg spam... +} + +function WheeledVehicle::useCreateHeight() +{ + //this function is declared to prevent console error msg spam... +} + function AssaultVehicle::onDamage(%this, %obj) { (%obj.getMountNodeObject(10)).setDamagelevel(%obj.getDamageLevel()); @@ -345,6 +364,9 @@ function BomberFlyer::onAdd(%this, %obj) //for this particular weapon - a non-firing datablock used only so the AI can aim the turret //Also needed so we can set the turret parameters.. %turret.mountImage(AIAimingTurretBarrel, 0); + + // setup the turret's target info + setTargetSensorGroup(%turret.getTarget(), %turret.team); setTargetNeverVisMask(%turret.getTarget(), 0xffffffff); } @@ -370,7 +392,6 @@ function AssaultVehicle::onAdd(%this, %obj) %turret.selectedWeapon = 1; MissionCleanup.add(%turret); %turret.team = %obj.teamBought; - setTargetSensorGroup(%turret.getTarget(), %turret.team); %turret.setSelfPowered(); %obj.mountObject(%turret, 10); %turret.mountImage(AssaultPlasmaTurretBarrel, 2); @@ -379,10 +400,14 @@ function AssaultVehicle::onAdd(%this, %obj) //vehicle turrets should not auto fire at targets %turret.setAutoFire(false); + //Needed so we can set the turret parameters.. %turret.mountImage(AssaultTurretParam, 0); - setTargetNeverVisMask(%turret.getTarget(), 0xffffffff); %obj.schedule(6000, "playThread", $ActivateThread, "activate"); + + // set the turret's target info + setTargetSensorGroup(%turret.getTarget(), %turret.team); + setTargetNeverVisMask(%turret.getTarget(), 0xffffffff); } //---------------------------- @@ -487,7 +512,6 @@ function MobileBaseVehicle::deleteAllMounted(%data, %obj) function ScoutFlyer::playerMounted(%data, %obj, %player, %node) { // scout flyer == SUV (single-user vehicle) - setTargetSensorGroup(%obj.getTarget(), %player.client.getSensorGroup()); commandToClient(%player.client, 'setHudMode', 'Pilot', "Shrike", %node); $numVWeapons = 1; } @@ -523,8 +547,6 @@ function BomberFlyer::playerMounted(%data, %obj, %player, %node) %obj.getMountNodeObject(10).selectedWeapon = 1; commandToClient(%player.client,'SetWeaponryVehicleKeys', true); - setTargetSensorGroup(%turret.getTarget(), %player.client.getSensorGroup()); - setTargetNeverVisMask(%turret.getTarget(), 0xffffffff); commandToClient(%player.client, 'setHudMode', 'Pilot', "Bomber", %node); } else @@ -604,9 +626,6 @@ function AssaultVehicle::playerMounted(%data, %obj, %player, %node) //commandToClient(%player.client, 'showVehicleWeapons', %data.getName()); //%player.client.setVWeaponsHudActive(1); // plasma turret icon (default) - setTargetSensorGroup(%turret.getTarget(), %player.client.getSensorGroup()); - setTargetNeverVisMask(%turret.getTarget(), 0xffffffff); - $aWeaponActive = 0; commandToClient(%player.client,'SetWeaponryVehicleKeys', true); %obj.getMountNodeObject(10).selectedWeapon = 1; @@ -694,16 +713,16 @@ function WheeledVehicle::deployVehicle(%obj, %data, %player) //* JERICHO DEPLOYMENT and UNDEPLOYMENT //************************************************************** -function MobileBaseVehicle::vehicleDeploy(%data, %obj, %player) +function MobileBaseVehicle::vehicleDeploy(%data, %obj, %player, %force) { - if(VectorLen(%obj.getVelocity()) <= 0.1) + if(VectorLen(%obj.getVelocity()) <= 0.1 || %force) { %deployMessage = ""; - if( (%deployMessage = %data.checkTurretDistance(%obj)) $= "") + if( (%deployMessage = %data.checkTurretDistance(%obj)) $= "" || %force) { if(%obj.station $= "") { - if( (%deployMessage = %data.checkDeploy(%obj)) $= "") + if( (%deployMessage = %data.checkDeploy(%obj)) $= "" || %force) { %obj.station = new StaticShape() { scale = "1 1 1"; @@ -743,7 +762,7 @@ function MobileBaseVehicle::vehicleDeploy(%data, %obj, %player) %obj.turret.setSelfPowered(); %obj.turret.playThread($PowerThread,"Power"); } - if(%deployMessage $= "") + if(%deployMessage $= "" || %force) { if(%obj.turret.getTarget() == -1) %obj.turret.setTarget(%obj.turret.target); @@ -1323,6 +1342,7 @@ function VehicleData::respawn(%data, %marker) %newObj = %data.create(%marker.curTeam, %marker); %newObj.startFade(1000, 0, false); %newObj.setTransform(%marker.getTransform()); + setTargetSensorGroup(%newObj.target, %newObj.team); MissionCleanup.add(%newObj); } diff --git a/base/scripts/vehicles/vehicle_bomber.cs b/base/scripts/vehicles/vehicle_bomber.cs index 5bf8f76..edbb749 100644 --- a/base/scripts/vehicles/vehicle_bomber.cs +++ b/base/scripts/vehicles/vehicle_bomber.cs @@ -125,6 +125,10 @@ datablock FlyingVehicleData(BomberFlyer) : BomberDamageProfile isProtectedMountPoint[1] = true; isProtectedMountPoint[2] = true; + cameraDefaultFov = 90.0; + cameraMinFov = 5.0; + cameraMaxFov = 120.0; + cameraMaxDist = 22; cameraOffset = 5; cameraLag = 1.0; @@ -745,11 +749,6 @@ datablock ShapeBaseImageData(BomberTargetingImage) function BomberTargetingImage::onFire(%data,%obj,%slot) { - if( %obj.isCloaked() ) - { - %obj.setCloaked( false ); - %obj.reCloak = %obj.schedule( 500, "setCloaked", true ); - } %bomber = %obj.getObjectMount(); if(%bomber.beacon) { diff --git a/base/scripts/vehicles/vehicle_mpb.cs b/base/scripts/vehicles/vehicle_mpb.cs index 6d028e3..d84e5c0 100644 --- a/base/scripts/vehicles/vehicle_mpb.cs +++ b/base/scripts/vehicles/vehicle_mpb.cs @@ -120,7 +120,7 @@ datablock WheeledVehicleData(MobileBaseVehicle) : MPBDamageProfile gyroDamping = 0.3; stabilizerForce = 10; minDrag = 10; - softImpactSpeed = 20; // Play SoftImpact Sound + softImpactSpeed = 15; // Play SoftImpact Sound hardImpactSpeed = 25; // Play HardImpact Sound // Ground Impact Damage (uses DamageType::Ground) @@ -132,8 +132,8 @@ datablock WheeledVehicleData(MobileBaseVehicle) : MPBDamageProfile collDamageMultiplier = 0.040; // Engine - engineTorque = 4.5 * 745; - breakTorque = 4.5 * 745; + engineTorque = 7.0 * 745; + breakTorque = 7.0 * 745; maxWheelSpeed = 20; // Springs @@ -144,7 +144,7 @@ datablock WheeledVehicleData(MobileBaseVehicle) : MPBDamageProfile // Tires tireRadius = 1.6; - tireFriction = 2.0; + tireFriction = 10.0; tireRestitution = 0.5; tireLateralForce = 3000; tireLateralDamping = 400; diff --git a/base/scripts/vehicles/vehicle_tank.cs b/base/scripts/vehicles/vehicle_tank.cs index 787b032..d74b406 100644 --- a/base/scripts/vehicles/vehicle_tank.cs +++ b/base/scripts/vehicles/vehicle_tank.cs @@ -104,7 +104,7 @@ datablock HoverVehicleData(AssaultVehicle) : TankDamageProfile { spawnOffset = "0 0 4"; - floatingGravMag = 3.5; + floatingGravMag = 4.5; catagory = "Vehicles"; shapeFile = "vehicle_grav_tank.dts"; diff --git a/base/scripts/vehicles/vehicle_wildcat.cs b/base/scripts/vehicles/vehicle_wildcat.cs index 30b11e3..e05b1bb 100644 --- a/base/scripts/vehicles/vehicle_wildcat.cs +++ b/base/scripts/vehicles/vehicle_wildcat.cs @@ -35,7 +35,7 @@ datablock HoverVehicleData(ScoutVehicle) : WildcatDamageProfile { spawnOffset = "0 0 1"; - floatingGravMag = 2.5; + floatingGravMag = 3.5; catagory = "Vehicles"; shapeFile = "vehicle_grav_scout.dts"; diff --git a/base/scripts/weapTurretCode.cs b/base/scripts/weapTurretCode.cs index dae4d2d..bb15f16 100644 --- a/base/scripts/weapTurretCode.cs +++ b/base/scripts/weapTurretCode.cs @@ -226,8 +226,13 @@ function ScoutChaingunPairImage::onUnmount(%this,%obj,%slot) } -function BomberTurret::onDamage() +function BomberTurret::onDamage(%data, %obj) { + %newDamageVal = %obj.getDamageLevel(); + if(%obj.lastDamageVal !$= "") + if(isObject(%obj.getObjectMount()) && %obj.lastDamageVal > %newDamageVal) + %obj.getObjectMount().setDamageLevel(%newDamageVal); + %obj.lastDamageVal = %newDamageVal; } function BomberTurret::damageObject(%this, %damageObj, %projectile, %amount, %damageType) @@ -304,7 +309,11 @@ function BomberTurret::playerDismount(%data, %obj) %obj.fireTrigger = 0; %obj.setImageTrigger(2, false); %obj.setImageTrigger(4, false); - %obj.setImageTrigger(6, false); + if(%obj.getImageTrigger(6)) + { + %obj.setImageTrigger(6, false); + ShapeBaseImageData::deconstruct(%obj.getMountedImage(6), %obj); + } %client = %obj.getControllingClient(); commandToClient(%client, 'endBomberSight'); // %client.player.setControlObject(%client.player); @@ -338,12 +347,13 @@ function BomberBombPairImage::onUnmount(%this,%obj,%slot) function BomberTurretBarrel::onTriggerDown(%this, %obj, %slot) { - %obj.schedule(300, "setImageTrigger", 3, true); + %obj.turretBarrelSchedule = %obj.schedule(300, "setImageTrigger", 3, true); } function BomberTurretBarrel::onTriggerUp(%this, %obj, %slot) { - %obj.schedule(400, "setImageTrigger", 3, false); + cancel(%obj.turretBarrelSchedule); + %obj.setImageTrigger( 3, false); } function BomberTurretBarrelPair::onMount(%this, %obj, %slot) @@ -391,8 +401,13 @@ function MobileTurretBase::onAdd(%this, %obj) setTargetNeverVisMask(%obj.target, 0xffffffff); } -function MobileTurretBase::onDamage() +function MobileTurretBase::onDamage(%data, %obj) { + %newDamageVal = %obj.getDamageLevel(); + if(%obj.lastDamageVal !$= "") + if(isObject(%obj.getObjectMount()) && %obj.lastDamageVal > %newDamageVal) + %obj.getObjectMount().setDamageLevel(%newDamageVal); + %obj.lastDamageVal = %newDamageVal; } function MobileTurretBase::damageObject(%this, %targetObject, %sourceObject, %position, %amount, %damageType) @@ -408,8 +423,13 @@ function MobileTurretBase::onEndSequence(%data, %obj, %thread) //Used so that the parent wont be called.. } -function AssaultPlasmaTurret::onDamage() +function AssaultPlasmaTurret::onDamage(%data, %obj) { + %newDamageVal = %obj.getDamageLevel(); + if(%obj.lastDamageVal !$= "") + if(isObject(%obj.getObjectMount()) && %obj.lastDamageVal > %newDamageVal) + %obj.getObjectMount().setDamageLevel(%newDamageVal); + %obj.lastDamageVal = %newDamageVal; } function AssaultPlasmaTurret::damageObject(%this, %damageObj, %projectile, %amount, %damageType) diff --git a/base/scripts/weapons/cameraGrenade.cs b/base/scripts/weapons/cameraGrenade.cs index 3e9d6e9..aa01c5f 100644 --- a/base/scripts/weapons/cameraGrenade.cs +++ b/base/scripts/weapons/cameraGrenade.cs @@ -115,6 +115,7 @@ datablock SensorData(CameraSensorObject) detectsPassiveJammed = true; detectRadius = 40; detectsFOVOnly = true; + useObjectFOV = true; }; datablock TurretData(TurretDeployedCamera) : TurretDamageProfile diff --git a/base/scripts/weapons/missileLauncher.cs b/base/scripts/weapons/missileLauncher.cs index 873a7e4..bda3b5e 100644 --- a/base/scripts/weapons/missileLauncher.cs +++ b/base/scripts/weapons/missileLauncher.cs @@ -620,7 +620,7 @@ datablock SeekerProjectileData(ShoulderMissile) indirectDamage = 0.8; damageRadius = 8.0; radiusDamageType = $DamageType::Missile; - kickBackStrength = 3000; + kickBackStrength = 2000; explosion = "MissileExplosion"; splash = MissileSplash; diff --git a/base/scripts/weapons/shockLance.cs b/base/scripts/weapons/shockLance.cs index 3d3c8c6..c8134ee 100644 --- a/base/scripts/weapons/shockLance.cs +++ b/base/scripts/weapons/shockLance.cs @@ -184,7 +184,7 @@ datablock ShockLanceProjectileData(BasicShocker) sound = ""; zapDuration = 1.0; - impulse = 2500; + impulse = 1800; boltLength = 14.0; extension = 14.0; // script variable indicating distance you can shock people from lightningFreq = 25.0; diff --git a/base/scripts/webbrowser.cs b/base/scripts/webbrowser.cs index 354880a..d29f76f 100644 --- a/base/scripts/webbrowser.cs +++ b/base/scripts/webbrowser.cs @@ -1,6 +1,6 @@ //==-- FUNCTIONS ------------------------------------------------------------- //$strcheck = "14 : < > * ^ | ~ @ % & / \\ ` \""; -$strcheck = "4 : % \\ /"; +$strcheck = "6 < > : % \\ /"; $playerGfx = "texticons/twb/twb_default.jpg"; $tribeGfx = "texticons/twb/twb_default.jpg"; @@ -308,6 +308,7 @@ function SearchTribes() //----------------------------------------------------------------------------- function KillTribe(%tribe) { + TWBTabView.closeCurrentPane(); Canvas.popDialog(TribePropertiesDlg); TribePane.key = LaunchGui.key++; TribePane.state = "killTribe"; @@ -2314,3 +2315,4 @@ function WarriorGraphicsList::onSelect(%this) function WarriorPropertiesDlg::ConnectionTerminated(%this) { } +//----------------------------------------------------------------------------- diff --git a/base/scripts/webemail.cs b/base/scripts/webemail.cs index 81d5fe6..714096d 100644 --- a/base/scripts/webemail.cs +++ b/base/scripts/webemail.cs @@ -36,6 +36,7 @@ if(!isObject(EmailMessageVector)) function LaunchEmail() { LaunchTabView.viewTab( "EMAIL", EmailGui, 0 ); + EmailGui.checkSchedule = schedule(1000,0, CheckEmail, false); } //----------------------------------------------------------------------------- function EmailMessageNew() @@ -348,12 +349,12 @@ function EmailNewMessageArrived(%message, %seq) //----------------------------------------------------------------------------- function GetEMailBtnClick() { - if(isEventPending(EMailGUI.eid)) - cancel(EmailGui.eid); + if(isEventPending(EMailGUI.checkSchedule)) + cancel(EmailGui.checkSchedule); EMailGui.btnClicked = true; EMailGui.checkingEMail = false; - EMailGui.eid = schedule(1000 * 2 * 1, 0, CheckEmail, false); + EMailGui.checkSchedule = schedule(1000 * 2, 0, CheckEmail, false); canvas.SetCursor(ArrowWaitCursor); } //----------------------------------------------------------------------------- @@ -1000,6 +1001,7 @@ function EMailGui::onDatabaseQueryResult(%this, %status, %RowCount_Result, %key) MessageBoxOK("NOTICE","No New Mail"); EmailGui.btnClicked = false; } + %this.checkingEmail = false; %this.checkSchedule = schedule(1000 * 60 * 5, 0, CheckEmail, true); // echo("scheduling Email check " @ %this.checkSchedule @ " in 5 minutes"); } @@ -1107,6 +1109,7 @@ function EMailGui::onDatabaseRow(%this, %row,%isLastRow,%key) { EmailGui.dumpCache(); EmailGui.loadCache(); + %this.checkingEmail = false; %this.checkSchedule = schedule(1000 * 60 * 5, 0, CheckEmail, true); // echo("scheduling Email check " @ %this.checkSchedule @ " in 5 minutes"); } @@ -1222,9 +1225,8 @@ function EmailGui::dumpCache( %this ) //----------------------------------------------------------------------------- function EmailGui::onSleep( %this ) { - EMailGui.checkingEMail = false; - %this.checkingEmail = ""; - %this.checkSchedule = schedule(1000 * 10 * 1, 0, CheckEmail, true); +// EMailGui.checkingEMail = false; +// %this.checkSchedule = schedule(1000 * 0 * 1, 0, CheckEmail, true); Canvas.popDialog( LaunchToolbarDlg ); } //----------------------------------------------------------------------------- diff --git a/base/scripts/webforums.cs b/base/scripts/webforums.cs index bf7f9ca..b3e17c1 100644 --- a/base/scripts/webforums.cs +++ b/base/scripts/webforums.cs @@ -317,6 +317,7 @@ function ForumsNewTopic() } else { +// ForumsGui.LaunchForum = getField(ForumsList.getRowTextById(ForumsList.getSelectedID()),0); $ForumsSubject = ""; Canvas.pushDialog( ForumsComposeDlg ); ForumsBodyText.setValue( "" ); @@ -339,6 +340,7 @@ function ForumsOpenThread(%tid) //----------------------------------------------------------------------------- function ForumsPost() { +// error("FORUMPOST: " @ ForumsComposeDlg.action TAB ForumsComposeDlg.parentPost TAB $ForumsSubject); $ForumsSubject = FP_SubjectEdit.getValue(); if ( trim($ForumsSubject) $= "" ) { @@ -346,62 +348,71 @@ function ForumsPost() "FP_SubjectEdit.makeFirstResponder(1);"); return; } - - ForumsTopicsList.refreshFlag = 1; - + TextCheck($ForumsSubject,ForumsGui); if(!ForumsGui.textCheck) { - if(ForumsComposeDlg.action !$= "Post" || ForumsComposeDlg.parentPost != 0) +// if(ForumsComposeDlg.action !$= "Post" || ForumsComposeDlg.parentPost != 0) +// { +// %proxy = ForumsMessageList; +// %newGroup = TopicsListGroup.getObject(ForumsTopicsList.getSelectedRow()); +// %proxy.lastId = %newGroup.updateid; +// %proxy.highestUpdate = %proxy.lastId; +// %proxy.state = "updateCheck"; +// } + + ForumsTopicsList.refreshFlag = 1; + if(ForumsComposeDlg.parentPost == 0) //this is a new topic request { - %proxy = ForumsMessageList; - %newGroup = TopicsListGroup.getObject(ForumsTopicsList.getSelectedRow()); - %proxy.lastId = %newGroup.updateid; - %proxy.highestUpdate = %proxy.lastId; - %proxy.state = "updateCheck"; + if(ForumsComposeDlg.action $= "Post") + { + %ord = 12; + %proxy = ForumsGui; + %proxy.state = "newTopic"; + ForumsGui.LaunchTopic = $ForumsSubject; + %fieldData = ForumsComposeDlg.forum TAB + ForumsComposeDlg.topic TAB + ForumsComposeDlg.parentPost TAB + $ForumsSubject TAB + ForumsBodyText.getValue(); + } + else if(ForumsComposeDlg.action $="News") + { + %ord = 14; + %proxy.state = "postNews"; + %fieldData = ForumsComposeDlg.post TAB + $ForumsSubject TAB + ForumsBodyText.getValue(); + } } - else - { - %proxy = ForumsGui; - %proxy.state = "newTopic"; - } - - if(ForumsComposeDlg.action $= "Post" || ForumsComposeDlg.action $= "Reply") + else if(ForumsComposeDlg.parentPost != 0) { + if(ForumsComposeDlg.action $= "Reply") + { + %ord = 12; %proxy = ForumsMessageList; %proxy.state = "replyPost"; - %proxy.key = LaunchGui.key++; - canvas.SetCursor(ArrowWaitCursor); - DatabaseQuery(12,ForumsComposeDlg.forum TAB - ForumsComposeDlg.topic TAB - ForumsComposeDlg.parentPost TAB - $ForumsSubject TAB - ForumsBodyText.getValue(), - %proxy, %proxy.key); - } - else if(ForumsComposeDlg.action $="Edit") - { + %fieldData = ForumsComposeDlg.forum TAB + ForumsComposeDlg.topic TAB + ForumsComposeDlg.parentPost TAB + $ForumsSubject TAB + ForumsBodyText.getValue(); + } + else if(ForumsComposeDlg.action $="Edit") + { + %ord = 13; %proxy = ForumsMessageList; - %proxy.key = LaunchGui.key++; %proxy.state = "editPost"; - canvas.SetCursor(ArrowWaitCursor); - DatabaseQuery(13,ForumsComposeDlg.parentPost TAB - $ForumsSubject TAB - ForumsBodyText.getValue() - ,%proxy - ,%proxy.key); - } - else if(ForumsComposeDlg.action $="News") - { - %proxy.state = "postNews"; - %proxy.key = LaunchGui.key++; - canvas.SetCursor(ArrowWaitCursor); - DatabaseQuery(14,ForumsComposeDlg.post TAB - $ForumsSubject TAB - ForumsBodyText.getValue(), - %proxy,%proxy.key); - } - Canvas.popDialog(ForumsComposeDlg); + %fieldData = ForumsComposeDlg.parentPost TAB + $ForumsSubject TAB + ForumsBodyText.getValue(); + } + } + %proxy.key = LaunchGui.key++; + canvas.SetCursor(ArrowWaitCursor); +// error("DQ: " @ %ord NL %fieldData); + DatabaseQuery(%ord,%fieldData,%proxy, %proxy.key); + Canvas.popDialog(ForumsComposeDlg); } else { @@ -424,6 +435,7 @@ function ForumsRejectPost() //forumsDeletePost() ForumsMessageList.key = LaunchGui.key++; ForumsMessageList.state = "deletePost"; canvas.SetCursor(ArrowWaitCursor); +// error("REJECT: " @ ForumsComposeDlg.parentPost); MessageBoxYesNo("CONFIRM", "Are you sure you wish to remove the selected post?", "DatabaseQuery(14," @ ForumsComposeDlg.parentPost @ "," @ ForumsMessagelist @ "," @ ForumsMessagelist.key @ ");", "canvas.SetCursor(defaultCursor);"); } @@ -482,12 +494,14 @@ function GetForumsList() //----------------------------------------------------------------------------- function GetTopicsList() { +// error("GTL: " @ ForumsComposeDlg.forum); ForumsGui.key = LaunchGui.key++; ForumShell.setTitle($ForumsGetTopics); ForumsGui.state = "getTopicList"; ForumsTopicsList.clear(); canvas.SetCursor(ArrowWaitCursor); ForumsTopicsList.clearList(); +// error("DQA:" @ 8 TAB ForumsComposeDlg.forum); DatabaseQueryArray(8,80,ForumsComposeDlg.forum,ForumsGui,ForumsGui.key); ForumsTopicsList.refreshFlag = 0; } @@ -513,6 +527,7 @@ function GetTopicPosts() ForumsMessageVector.clear(); ForumsMessageList.clear(); } +// error("DQA:" @ 8 TAB ForumsComposeDlg.topic); DatabaseQueryArray(9,0,ForumsComposeDlg.Topic TAB ForumsMessageList.lastID,ForumsGui,ForumsGui.key); } //----------------------------------------------------------------------------- @@ -546,7 +561,7 @@ function ForumsGui::onWake(%this) ForumShell.setTitle($ForumsConnecting); ForumsGui.state = "getForumList"; canvas.SetCursor(ArrowWaitCursor); - DatabaseQueryArray(7,200,"",ForumsGui,ForumsGui.key); + DatabaseQueryArray(7,100,"",ForumsGui,ForumsGui.key); } // Make these buttons inactive until a message is selected: FO_ReplyBtn.setActive( false ); @@ -609,10 +624,7 @@ function ForumsGui::onDatabaseQueryResult(%this,%status,%resultString,%key) %forumID = getField(ForumsList.getRowTextById(ForumsList.getSelectedID()),2); %forumTID = ForumsTopicsList.getSelectedID(); -// if(%statFlag >= %forumFlag) - %this.bflag = %statFlag; -// else -// %this.bflag = %forumFlag; + %this.bflag = %statFlag; switch$ ( %this.bflag ) { @@ -680,6 +692,9 @@ function ForumsGui::onDatabaseQueryResult(%this,%status,%resultString,%key) case "postNews": %this.state = "done"; messageBoxOK("CONFIRMED","Your News Reply has been submitted"); + case "newTopic": + %this.state = "done"; + ForumsRefreshTopics(); } } else if (getSubStr(getField(%status,1),0,9) $= "ORA-04061") @@ -706,8 +721,15 @@ function ForumsGui::onDatabaseRow(%this,%row,%isLastRow,%key) { case "ForumList": ForumsList.addRow(getField(%row,0),getField(%row,1) TAB getField(%row,2) TAB getField(%row,3)); +// error("ISLASTROW:" TAB %isLastRow); if ( %isLastRow ) //is last line { + %ai = wonGetAuthInfo(); + for(%east=0;%east= -2999) { if(%code == -2902) - %msg = "Account Creation Failed - That CDKey is already in use." @ %code; + %msg = "Account has already been created - Please login." @ %code; else %msg = "Account Creation Failed - That warrior name is already in use. Please choose another warrior name and try again. Code = " @ %code; } @@ -606,6 +606,14 @@ function CreateAccount() $CreateAccountEmail = ""; $CreateAccountSendInfo = 0; + if ( $platform $= "windows" && isKoreanBuild() ) + { + CreateAccountAgeBlurbText.setText( "If you are under 15 years old, you are not allowed to create a Tribes 2 account." ); + CreateAccountOldEnoughTgl.setText( "I AM AT LEAST 15 YEARS OF AGE" ); + } + else + CreateAccountAgeBlurbText.setText( "We are COPPA compliant.\nIf you are under 13, you are not allowed to create a Tribes 2 account." ); + Canvas.pushDialog( CreateAccountDlg ); } @@ -1714,27 +1722,15 @@ else helpTag = "0"; text = "Email:"; }; - new GuiTextCtrl() { + new GuiMLTextCtrl(CreateAccountAgeBlurbText) { profile = "ShellTextRightProfile"; horizSizing = "right"; vertSizing = "bottom"; - position = "174 289"; - extent = "134 22"; + position = "60 289"; + extent = "376 44"; minExtent = "8 8"; visible = "1"; helpTag = "0"; - text = "We are COPPA compliant."; - }; - new GuiTextCtrl() { - profile = "ShellTextRightProfile"; - horizSizing = "right"; - vertSizing = "bottom"; - position = "73 305"; - extent = "351 22"; - minExtent = "8 8"; - visible = "1"; - helpTag = "0"; - text = "If you are under 13, you are not allowed to create a Tribes 2 account."; }; new GuiTextCtrl() { profile = "ShellTextRightProfile"; @@ -1910,7 +1906,7 @@ else helpTag = "0"; text = "SEND ME INFORMATION ABOUT TRIBES 2 AND OTHER PRODUCTS"; }; - new ShellToggleButton() { + new ShellToggleButton(CreateAccountOldEnoughTgl) { profile = "ShellRadioProfile"; horizSizing = "right"; vertSizing = "bottom";