mirror of
https://github.com/Ragora/TribesReplay.git
synced 2026-01-19 17:44:45 +00:00
v23669 (06/25/01):
- (bug fix) Vehicles and deployables now properly explode if they are destroyed while someone is repairing them. - (bug fix) Sniper laser shots no longer create water splash effects if hitting ground near the water. - (bug fix) Immersion iForce force feedback mouse is now working properly again. - (bug fix) The "flag jumping" bug is now fixed. When a flag lands after being dropped, it will stay put when it slides to rest. - (bug fix) Fixed a situation where closing tribe or player tags on the Browser out of order would cause a disconnect with the database server. - (bug fix) Players can no longer fire, place mines, place grenades, or place beacons when inside a force field. - (bug fix) Fixed bug where modifier keys (specifically SHIFT) bound to actions in the game would still cause those actions when typing in a text edit control in-game (such as the chat entry) - (bug fix) Fixed a bug that could cause a player to drop to desktop when attempting to join a game which was in the process of cycling missions. - (bug fix) Fixed a Radeon video card issue which could occur if the desktop color bit-depth was different than the color bit-depth that the player was using in the game. - (bug fix) You won't try to fade into a vehicle that was destroyed after you purchased it, but before you had actually tported to the seat. - (bug fix) Minor change in the MPB explosion so that the turret part of the MPB doesn't seem to hover in place for a split-second during the explosion. - (bug fix) Bomber bombs now tumble properly and won't seem to disappear when falling. - (bug fix) Fixed a rare problem that could cause a client crash while the server is resetting. - (bug fix) Fixed a problem with the ELF gun effect that was causing hangs. - (bug fix) Telnet can now be used to set passwords for PURE servers so that they can be used for match games. (command line option...see the post in T2FAQs called "How do I TELNET INTO A PURE SERVER?" for more information on how to use this ability.) - (bug fix) The "cloning" issue (where players could clone themselves by dying, going to the CC with the CC camera showing themselves, spawn, and flicker back and forth to the CC) is now fixed and no longer occurs. - (bug fix) Another "cloning" issue which occurred when the Tourney Admin would switch teams for players is fixed and no longer occurs. - (bug fix) Fixed a bug where, when a client joins a server where the client does not have the map being run on the server, the client hangs while loading. This now elegantly exits instead of hanging. - (bug fix) Fixed an issue where the last few characters of the Server Info dialog would be cut off. - (bug fix) Fixed a situation where a blank error box could occur if CD key not entered properly when creating an account. - (bug fix) Sensor rings will no longer show up on the Command Circuit if the generators are not powered. - (bug fix) There was a rare bug where, if a player was standing in a force field's position when that force field went from a depowered to powered state (in otherwords, if the gens were repaired while he stood in the FF position), then the player would be stuck forever. If this case occurs, that player will now be destroyed. - (improvement) The "redjack" icon has been removed and new network throughput graphs have been implemented to better help players troubleshoot their net settings. Additionally, a more accurate and complete set of network presets is available. (See details below under "NETWORK SETTINGS" for more information.) - (improvement) The pure server concept is now implemented. Pure servers only allow regulation scripts and maps to be run on the server (no restrictions yet on the client), thus ensuring that anyone that joins a "base" server is playing the game as it was designed by Dynamix. MODs are still easily joined, but players can be assured that a "Base" game is really a "Base" game now. (Any game with server or rules mods that is not actually named as a new MOD will be described as "variant" instead of "base" on the master server list.) NOTE: See "PURE SERVER" below for more information on this. - (improvement) Old Password is now required in order to enter a New Password when editing your account. - (improvement) Password handling is different now in order to make it more difficult for people to casually find a password on a hard drive. - (improvement) Made more room for player names to display on the Server Info box. - (improvement) Bomber and Tank now have separate energy capacitors for their turret weapons. This energy pool is completely separate from the energy pool that the thrusters and force shields use. (Gunner energy is displayed as a second bar below the regular vehicle energy and is orangish in color.) - (improvement) Vertical thrusters on air vehicles are now more efficient to enable better takeoffs from ground level. - (improvement) Changed team damage OFF to include friendly turret fire and vehicle fire. (In otherwords, if Team Damage is OFF, then turrets fire and vehicle fire will not affect friendly units.) - (improvement) Splash damage no longer falls off so dramatically with distance. You will find that area effect (explosion) weapons now are more effective within their damage area. - (improvement) While in Tournament mode, and while in observer mode at the beginning of a match (before teams have been selected), players will now be able to chat with one another. - (improvement) Added observer points to Tombstone (it previously had none). - (improvement) Grenades tossing is slightly improved. The grenades will throw farther with less time spent pressing the grenade key. (They still have the exact same minimum and maximum throwing distances, it's just easier to throw it out to max range now.) - (community) Player histories are now accurate. - (community) Preferences in the FORUMs should be fixed now so that they stay in existence. The sort is the only exception. That will reformat each time you enter the FORUM and you will need to select whichever sort your prefer at that time.
This commit is contained in:
parent
7d0bae2fd4
commit
7f1fccfdff
|
|
@ -1,7 +1,7 @@
|
|||
ProductName "Tribes2"
|
||||
DisplayName "Tribes 2"
|
||||
PatchFolder .\patch
|
||||
CurrentVersion 0.23115.0.0
|
||||
CurrentVersion 0.23669.0.0
|
||||
AutoStart
|
||||
MonitorPatch
|
||||
LaunchExe "tribes2.exe"
|
||||
|
|
|
|||
|
|
@ -37,11 +37,14 @@ exec("scripts/message.cs");
|
|||
//function to be called when the game exits
|
||||
function onExit()
|
||||
{
|
||||
IRCClient::quit();
|
||||
if ( !isDemo() && !isDemoServer() )
|
||||
IRCClient::quit();
|
||||
|
||||
echo("exporting pref::* to ClientPrefs.cs");
|
||||
export("$pref::*", "prefs/ClientPrefs.cs", False);
|
||||
BanList::Export("prefs/banlist.cs");
|
||||
if ( $PlayingOnline )
|
||||
savePlayerDatabase();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -80,6 +83,8 @@ exec("scripts/targetManager.cs");
|
|||
exec("scripts/gameCanvas.cs");
|
||||
exec("scripts/centerPrint.cs");
|
||||
exec("scripts/CreditsGui.cs");
|
||||
if (isDemo())
|
||||
exec("scripts/DemoEndGui.cs");
|
||||
exec("scripts/ChatGui.cs");
|
||||
|
||||
// see if the mission and type are valid
|
||||
|
|
@ -213,6 +218,7 @@ loadGui("GameGui");
|
|||
loadGui("ChooseFilterDlg");
|
||||
loadGui("ServerInfoDlg");
|
||||
loadGui("EnterIPDlg");
|
||||
loadGui("FindServerDlg");
|
||||
loadGui("AdvancedHostDlg");
|
||||
loadGui("NewWarriorDlg");
|
||||
loadGui("JoinChatDlg");
|
||||
|
|
@ -251,6 +257,8 @@ loadGui("SinglePlayerEscapeDlg");
|
|||
loadGui("LobbyGui");
|
||||
loadGui("DebriefGui");
|
||||
loadGui("CreditsGui");
|
||||
if (isDemo())
|
||||
loadGui("DemoEndGui");
|
||||
loadGui("MoveThreadDlg");
|
||||
loadGui("NewMissionGui");
|
||||
loadGui("ChatDlg");
|
||||
|
|
@ -523,33 +531,56 @@ function abs(%val)
|
|||
|
||||
function ServerConnectionAccepted()
|
||||
{
|
||||
%info = GMJ_Browser.getServerInfoString();
|
||||
%desc = "joined a" SPC getField(%info,4) @ " game (" @ getField(%info,3) @ ") on the \"" @ getField(%info,0) @ "\" server.";
|
||||
if ( !isDemo() && !isDemoServer() )
|
||||
{
|
||||
%info = GMJ_Browser.getServerInfoString();
|
||||
%desc = "joined a" SPC getField(%info,4) @ " game (" @ getField(%info,3) @ ") on the \"" @ getField(%info,0) @ "\" server.";
|
||||
|
||||
IRCClient::onJoinGame($JoinGameAddress,%desc);
|
||||
IRCClient::onJoinGame($JoinGameAddress,%desc);
|
||||
|
||||
if ( !$pref::Net::CheckEmail )
|
||||
CancelEmailCheck();
|
||||
if ( !$pref::Net::CheckEmail )
|
||||
CancelEmailCheck();
|
||||
|
||||
// if($pref::Net::DisconnectChat)
|
||||
// IRCClient::quit();
|
||||
// if($pref::Net::DisconnectChat)
|
||||
// IRCClient::quit();
|
||||
}
|
||||
|
||||
Canvas.setContent("LoadingGui");
|
||||
checkGotLoadInfo();
|
||||
}
|
||||
|
||||
function LocalConnectionAccepted()
|
||||
{
|
||||
%desc = $pref::IRCClient::hostmsg;
|
||||
if ( !isDemo() && !isDemoServer() )
|
||||
{
|
||||
%desc = $pref::IRCClient::hostmsg;
|
||||
|
||||
IRCClient::onJoinGame("", %desc);
|
||||
IRCClient::onJoinGame("", %desc);
|
||||
|
||||
if ( !$pref::Net::CheckEmail )
|
||||
CancelEmailCheck();
|
||||
if ( !$pref::Net::CheckEmail )
|
||||
CancelEmailCheck();
|
||||
|
||||
// if($pref::Net::DisconnectChat)
|
||||
// IRCClient::quit(); //this is screwed up right now ^^
|
||||
// if($pref::Net::DisconnectChat)
|
||||
// IRCClient::quit(); //this is screwed up right now ^^
|
||||
}
|
||||
|
||||
Canvas.setContent("LoadingGui");
|
||||
checkGotLoadInfo();
|
||||
}
|
||||
|
||||
function checkGotLoadInfo()
|
||||
{
|
||||
if ( LoadingGui.gotLoadInfo )
|
||||
Canvas.setContent( LoadingGui );
|
||||
else
|
||||
LoadingGui.checkSchedule = schedule( 500, 0, checkGotLoadInfo );
|
||||
}
|
||||
|
||||
function cancelLoadInfoCheck()
|
||||
{
|
||||
if ( LoadingGui.checkSchedule )
|
||||
{
|
||||
cancel( LoadingGui.checkSchedule );
|
||||
LoadingGui.checkSchedule = "";
|
||||
}
|
||||
}
|
||||
|
||||
function DispatchLaunchMode()
|
||||
|
|
|
|||
|
|
@ -7,16 +7,20 @@ new GuiControl(AdvancedHostDlg) {
|
|||
extent = "640 480";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
|
||||
new ShellPaneCtrl() {
|
||||
profile = "ShellDlgPaneProfile";
|
||||
horizSizing = "center";
|
||||
vertSizing = "center";
|
||||
position = "70 30";
|
||||
extent = "500 420";
|
||||
position = "50 30";
|
||||
extent = "540 420";
|
||||
minExtent = "48 92";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
text = "ADVANCED HOST OPTIONS";
|
||||
maxLength = "255";
|
||||
|
|
@ -26,10 +30,12 @@ new GuiControl(AdvancedHostDlg) {
|
|||
profile = "ShellTextRightProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "88 40";
|
||||
position = "114 40";
|
||||
extent = "40 22";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
text = "Port:";
|
||||
maxLength = "255";
|
||||
|
|
@ -38,24 +44,30 @@ new GuiControl(AdvancedHostDlg) {
|
|||
profile = "NewTextEditNumericProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "124 32";
|
||||
position = "150 32";
|
||||
extent = "98 38";
|
||||
minExtent = "32 38";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
maxLength = "8";
|
||||
historySize = "0";
|
||||
password = "0";
|
||||
tabComplete = "0";
|
||||
deniedSound = "InputDeniedSound";
|
||||
glowOffset = "9 9";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
profile = "ShellTextRightProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "223 40";
|
||||
position = "249 40";
|
||||
extent = "64 22";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
text = "Time Limit:";
|
||||
maxLength = "255";
|
||||
|
|
@ -64,24 +76,30 @@ new GuiControl(AdvancedHostDlg) {
|
|||
profile = "NewTextEditNumericProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "283 32";
|
||||
position = "309 32";
|
||||
extent = "68 38";
|
||||
minExtent = "32 38";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
maxLength = "3";
|
||||
historySize = "0";
|
||||
password = "0";
|
||||
tabComplete = "0";
|
||||
deniedSound = "InputDeniedSound";
|
||||
glowOffset = "9 9";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
profile = "ShellTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "349 40";
|
||||
position = "375 40";
|
||||
extent = "41 22";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
text = "Minutes";
|
||||
maxLength = "255";
|
||||
|
|
@ -90,10 +108,12 @@ new GuiControl(AdvancedHostDlg) {
|
|||
profile = "ShellTextRightProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "97 70";
|
||||
position = "123 70";
|
||||
extent = "110 22";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
text = "Admin Password:";
|
||||
maxLength = "255";
|
||||
|
|
@ -102,60 +122,86 @@ new GuiControl(AdvancedHostDlg) {
|
|||
profile = "NewTextEditProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "203 62";
|
||||
position = "229 62";
|
||||
extent = "180 38";
|
||||
minExtent = "32 38";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
maxLength = "16";
|
||||
historySize = "0";
|
||||
password = "0";
|
||||
tabComplete = "0";
|
||||
deniedSound = "InputDeniedSound";
|
||||
glowOffset = "9 9";
|
||||
};
|
||||
new ShellToggleButton(AH_DedicatedTgl) {
|
||||
profile = "ShellRadioProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "82 106";
|
||||
position = "94 106";
|
||||
extent = "150 30";
|
||||
minExtent = "26 27";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
text = "DEDICATED";
|
||||
maxLength = "255";
|
||||
};
|
||||
new ShellToggleButton(AH_AdminVoteTgl) {
|
||||
new ShellToggleButton(AH_PureServerTgl) {
|
||||
profile = "ShellRadioProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "268 106";
|
||||
position = "296 106";
|
||||
extent = "150 30";
|
||||
minExtent = "26 27";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
text = "ALLOW ADMIN VOTES";
|
||||
text = "PURE SERVER";
|
||||
maxLength = "255";
|
||||
};
|
||||
new ShellToggleButton(AH_TournamentTgl) {
|
||||
profile = "ShellRadioProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "82 136";
|
||||
position = "32 136";
|
||||
extent = "150 30";
|
||||
minExtent = "26 27";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
text = "TOURNAMENT MODE";
|
||||
maxLength = "255";
|
||||
};
|
||||
new ShellToggleButton(AH_AdminVoteTgl) {
|
||||
profile = "ShellRadioProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "195 136";
|
||||
extent = "150 30";
|
||||
minExtent = "26 27";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
text = "ALLOW ADMIN VOTES";
|
||||
maxLength = "255";
|
||||
};
|
||||
new ShellToggleButton(AH_AllowSmurfTgl) {
|
||||
profile = "ShellRadioProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "268 136";
|
||||
position = "358 136";
|
||||
extent = "150 30";
|
||||
minExtent = "26 27";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
text = "ALLOW ALIASES";
|
||||
maxLength = "255";
|
||||
|
|
@ -164,10 +210,12 @@ new GuiControl(AdvancedHostDlg) {
|
|||
profile = "ShellTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "62 174";
|
||||
position = "79 174";
|
||||
extent = "114 22";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
text = "Vote Pass Percentage:";
|
||||
maxLength = "255";
|
||||
|
|
@ -176,10 +224,12 @@ new GuiControl(AdvancedHostDlg) {
|
|||
profile = "ShellAltTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "181 175";
|
||||
position = "198 175";
|
||||
extent = "29 20";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
text = "60%";
|
||||
maxLength = "255";
|
||||
|
|
@ -188,10 +238,12 @@ new GuiControl(AdvancedHostDlg) {
|
|||
profile = "ShellSliderProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "72 189";
|
||||
position = "89 189";
|
||||
extent = "170 24";
|
||||
minExtent = "12 24";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
variable = "value";
|
||||
altCommand = "AH_VotePassText.update();";
|
||||
helpTag = "0";
|
||||
|
|
@ -204,10 +256,12 @@ new GuiControl(AdvancedHostDlg) {
|
|||
profile = "ShellTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "62 214";
|
||||
position = "79 214";
|
||||
extent = "54 22";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
text = "Vote Time:";
|
||||
maxLength = "255";
|
||||
|
|
@ -216,10 +270,12 @@ new GuiControl(AdvancedHostDlg) {
|
|||
profile = "ShellAltTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "121 215";
|
||||
position = "138 215";
|
||||
extent = "69 20";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
text = "20 seconds";
|
||||
maxLength = "255";
|
||||
|
|
@ -228,10 +284,12 @@ new GuiControl(AdvancedHostDlg) {
|
|||
profile = "ShellSliderProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "72 229";
|
||||
position = "89 229";
|
||||
extent = "170 24";
|
||||
minExtent = "12 24";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
variable = "value";
|
||||
altCommand = "AH_VoteTimeText.update();";
|
||||
helpTag = "0";
|
||||
|
|
@ -244,10 +302,12 @@ new GuiControl(AdvancedHostDlg) {
|
|||
profile = "ShellTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "260 175";
|
||||
position = "277 175";
|
||||
extent = "93 22";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
text = "Observer Timeout:";
|
||||
maxLength = "255";
|
||||
|
|
@ -256,10 +316,12 @@ new GuiControl(AdvancedHostDlg) {
|
|||
profile = "ShellAltTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "358 176";
|
||||
position = "375 176";
|
||||
extent = "69 20";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
text = "30 seconds";
|
||||
maxLength = "255";
|
||||
|
|
@ -268,10 +330,12 @@ new GuiControl(AdvancedHostDlg) {
|
|||
profile = "ShellSliderProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "270 190";
|
||||
position = "287 190";
|
||||
extent = "170 24";
|
||||
minExtent = "12 24";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
variable = "value";
|
||||
altCommand = "AH_RespawnText.update();";
|
||||
helpTag = "0";
|
||||
|
|
@ -284,10 +348,12 @@ new GuiControl(AdvancedHostDlg) {
|
|||
profile = "ShellTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "260 215";
|
||||
position = "277 215";
|
||||
extent = "72 22";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
text = "Warmup Time:";
|
||||
maxLength = "255";
|
||||
|
|
@ -296,10 +362,12 @@ new GuiControl(AdvancedHostDlg) {
|
|||
profile = "ShellAltTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "337 216";
|
||||
position = "354 216";
|
||||
extent = "69 20";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
text = "30 seconds";
|
||||
maxLength = "255";
|
||||
|
|
@ -308,10 +376,12 @@ new GuiControl(AdvancedHostDlg) {
|
|||
profile = "ShellSliderProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "270 230";
|
||||
position = "287 230";
|
||||
extent = "170 24";
|
||||
minExtent = "12 24";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
variable = "value";
|
||||
altCommand = "AH_WarmupText.update();";
|
||||
helpTag = "0";
|
||||
|
|
@ -324,22 +394,26 @@ new GuiControl(AdvancedHostDlg) {
|
|||
profile = "ShellTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "top";
|
||||
position = "123 262";
|
||||
position = "143 262";
|
||||
extent = "58 22";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
text = "Server Info:";
|
||||
maxLength = "255";
|
||||
};
|
||||
new ShellScrollCtrl() {
|
||||
profile = "NewScrollCtrlProfile";
|
||||
horizSizing = "right";
|
||||
horizSizing = "center";
|
||||
vertSizing = "top";
|
||||
position = "120 275";
|
||||
position = "140 275";
|
||||
extent = "260 85";
|
||||
minExtent = "24 52";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
willFirstRespond = "1";
|
||||
hScrollBar = "alwaysOff";
|
||||
|
|
@ -357,6 +431,8 @@ new GuiControl(AdvancedHostDlg) {
|
|||
extent = "230 71";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
|
||||
new GuiMLTextEditCtrl(AH_ServerInfo) {
|
||||
|
|
@ -367,10 +443,13 @@ new GuiControl(AdvancedHostDlg) {
|
|||
extent = "230 71";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
lineSpacing = "2";
|
||||
allowColorChars = "0";
|
||||
maxChars = "-1";
|
||||
deniedSound = "InputDeniedSound";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -378,10 +457,12 @@ new GuiControl(AdvancedHostDlg) {
|
|||
profile = "ShellButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "top";
|
||||
position = "74 365";
|
||||
extent = "140 38";
|
||||
position = "95 365";
|
||||
extent = "128 38";
|
||||
minExtent = "32 38";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
command = "Canvas.popDialog( AdvancedHostDlg );";
|
||||
accelerator = "escape";
|
||||
helpTag = "0";
|
||||
|
|
@ -392,10 +473,12 @@ new GuiControl(AdvancedHostDlg) {
|
|||
profile = "ShellButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "top";
|
||||
position = "287 365";
|
||||
extent = "140 38";
|
||||
position = "317 365";
|
||||
extent = "128 38";
|
||||
minExtent = "32 38";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
command = "AdvancedHostDlg.Accept();";
|
||||
helpTag = "0";
|
||||
text = "SAVE";
|
||||
|
|
|
|||
|
|
@ -10,12 +10,14 @@ new GuiControl(EMailComposeDlg) {
|
|||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
state = "done";
|
||||
key = "6";
|
||||
|
||||
new ShellWindowCtrl(EmailComposeWindow) {
|
||||
profile = "ShellWindowProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "67 37";
|
||||
position = "77 37";
|
||||
extent = "500 408";
|
||||
minExtent = "386 230";
|
||||
visible = "1";
|
||||
|
|
@ -32,7 +34,7 @@ new GuiControl(EMailComposeDlg) {
|
|||
canClose = "1";
|
||||
closeCommand = "EmailComposeDlg.Cancel();";
|
||||
|
||||
new ShellTextEditCtrl(Email_ToEdit) {
|
||||
new ShellTextEditCtrl(Email_TOEdit) {
|
||||
profile = "NewTextEditProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "bottom";
|
||||
|
|
@ -42,16 +44,15 @@ new GuiControl(EMailComposeDlg) {
|
|||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
variable = "$EmailToAddress";
|
||||
helpTag = "0";
|
||||
maxLength = "2000";
|
||||
maxLength = "2001";
|
||||
historySize = "0";
|
||||
password = "0";
|
||||
tabComplete = "0";
|
||||
deniedSound = "InputDeniedSound";
|
||||
glowOffset = "9 9";
|
||||
};
|
||||
new ShellTextEditCtrl(EMail_CCEdit) {
|
||||
new ShellTextEditCtrl(Email_CCEdit) {
|
||||
profile = "NewTextEditProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "bottom";
|
||||
|
|
@ -61,9 +62,8 @@ new GuiControl(EMailComposeDlg) {
|
|||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
variable = "$EmailCCAddress";
|
||||
helpTag = "0";
|
||||
maxLength = "2000";
|
||||
maxLength = "2001";
|
||||
historySize = "0";
|
||||
password = "0";
|
||||
tabComplete = "0";
|
||||
|
|
|
|||
111
base/gui/FindServerDlg.gui
Normal file
111
base/gui/FindServerDlg.gui
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
new GuiControl(FindServerDlg) {
|
||||
profile = "DlgBackProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
position = "0 0";
|
||||
extent = "640 480";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
|
||||
new ShellPaneCtrl() {
|
||||
profile = "ShellDlgPaneProfile";
|
||||
horizSizing = "center";
|
||||
vertSizing = "center";
|
||||
position = "155 156";
|
||||
extent = "330 167";
|
||||
minExtent = "48 92";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
text = "FIND SERVER";
|
||||
maxLength = "255";
|
||||
noTitleBar = "0";
|
||||
|
||||
new GuiTextCtrl() {
|
||||
profile = "ShellTextRightProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "20 45";
|
||||
extent = "75 22";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
text = "Find Text:";
|
||||
maxLength = "255";
|
||||
};
|
||||
new ShellTextEditCtrl(FS_SearchPattern) {
|
||||
profile = "NewTextEditProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "91 36";
|
||||
extent = "205 38";
|
||||
minExtent = "32 38";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
command = "FS_SearchPattern.validate();";
|
||||
altCommand = "FindServerDlg::onGo();";
|
||||
helpTag = "0";
|
||||
maxLength = "24";
|
||||
historySize = "5";
|
||||
password = "0";
|
||||
tabComplete = "0";
|
||||
deniedSound = "InputDeniedSound";
|
||||
glowOffset = "9 9";
|
||||
};
|
||||
new ShellToggleButton() {
|
||||
profile = "ShellRadioProfile";
|
||||
horizSizing = "center";
|
||||
vertSizing = "bottom";
|
||||
position = "85 76";
|
||||
extent = "160 30";
|
||||
minExtent = "26 27";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
variable = "$pref::ServerBrowser::IgnoreCase";
|
||||
helpTag = "0";
|
||||
text = "IGNORE CASE";
|
||||
maxLength = "255";
|
||||
};
|
||||
new ShellBitmapButton() {
|
||||
profile = "ShellButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "top";
|
||||
position = "43 112";
|
||||
extent = "100 38";
|
||||
minExtent = "32 38";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
command = "Canvas.popDialog( FindServerDlg );";
|
||||
accelerator = "escape";
|
||||
helpTag = "0";
|
||||
text = "CANCEL";
|
||||
simpleStyle = "0";
|
||||
};
|
||||
new ShellBitmapButton(FS_GoBtn) {
|
||||
profile = "ShellButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "top";
|
||||
position = "187 112";
|
||||
extent = "100 38";
|
||||
minExtent = "32 38";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
command = "FindServerDlg.onGo();";
|
||||
helpTag = "0";
|
||||
text = "GO";
|
||||
simpleStyle = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
|
@ -431,4 +431,5 @@ function GuiEditor::onSelect(%this, %ctrl)
|
|||
GuiEditorInspectName.setValue(%ctrl.getName());
|
||||
}
|
||||
|
||||
GlobalActionMap.bind(keyboard, "alt f1", GuiEdit);
|
||||
if (!isDemo())
|
||||
GlobalActionMap.bind(keyboard, "alt f1", GuiEdit);
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -9,7 +9,7 @@ new GameTSCtrl(PlayGui) {
|
|||
visible = "1";
|
||||
setFirstResponder = "1";
|
||||
modal = "1";
|
||||
hideCursor = "1";
|
||||
hideCursor = "1";
|
||||
helpTag = "0";
|
||||
beaconBaseTextureName = "gui/beacon_base";
|
||||
beaconTargetTextureName = "gui/crosshairs";
|
||||
|
|
@ -199,20 +199,156 @@ new GameTSCtrl(PlayGui) {
|
|||
autoResize = "0";
|
||||
subRegion = "0 2 65 15";
|
||||
};
|
||||
|
||||
|
||||
new HudBitmapCtrl(lagHudIndicator) {
|
||||
profile = "GuiButtonProfile";
|
||||
|
||||
new ShellFieldCtrl(NetGraphHudFrame) {
|
||||
profile = "GuiChatBackProfile";
|
||||
horizSizing = "left";
|
||||
vertSizing = "bottom";
|
||||
position = "570 38";
|
||||
extent = "35 32";
|
||||
position = "266 8";
|
||||
extent = "176 50";
|
||||
minExtent = "8 8";
|
||||
visible = "0";
|
||||
frameColor = "0 1 0 1";
|
||||
opacity = "0.8";
|
||||
bitmap = "gui/hud_disconnect.png";
|
||||
|
||||
new HudNetDisplay(NetGraphHud) {
|
||||
profile = "HudScoreProfile";
|
||||
horizSizing = "left";
|
||||
vertSizing = "bottom";
|
||||
position = "1 1";
|
||||
extent = "174 48";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
};
|
||||
};
|
||||
|
||||
new GuiControl(NetBarHudFrame) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "left";
|
||||
vertSizing = "bottom";
|
||||
position = "290 0";
|
||||
extent = "129 68";
|
||||
minExtent = "8 8";
|
||||
visible = "0";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
|
||||
new HudNetDisplay(NetBarHud) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "left";
|
||||
vertSizing = "bottom";
|
||||
position = "1 1";
|
||||
extent = "174 48";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
infoCallback = "1";
|
||||
renderGraph = false;
|
||||
historySize = 2;
|
||||
};
|
||||
|
||||
new ShellFieldCtrl() {
|
||||
profile = "ShellFieldProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "6 27";
|
||||
extent = "120 18";
|
||||
minExtent = "16 18";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
|
||||
new HudBarBaseCtrl(NetBarHudSendBar) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "120 18";
|
||||
minExtent = "120 18";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
fillColor = "0.000000 0.800000 0.000000 1.000000";
|
||||
frameColor = "0.000000 1.000000 0.000000 1.000000";
|
||||
opacity = "0.6";
|
||||
autoCenter = "0";
|
||||
autoResize = "0";
|
||||
flipVertical = "0";
|
||||
flipHorizontal = "0";
|
||||
subRegion = "2 2 116 15";
|
||||
displayMounted = "0";
|
||||
pulseRate = "500";
|
||||
pulseThreshold = "0.3";
|
||||
verticalFill = "0";
|
||||
};
|
||||
};
|
||||
new ShellFieldCtrl() {
|
||||
profile = "ShellFieldProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "6 46";
|
||||
extent = "120 18";
|
||||
minExtent = "16 18";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
|
||||
new HudBarBaseCtrl(NetBarHudReceiveBar) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "120 18";
|
||||
minExtent = "120 18";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
fillColor = "0.000000 0.800000 0.000000 1.000000";
|
||||
frameColor = "0.000000 1.000000 0.000000 1.000000";
|
||||
opacity = "0.6";
|
||||
autoCenter = "0";
|
||||
autoResize = "0";
|
||||
flipVertical = "0";
|
||||
flipHorizontal = "0";
|
||||
subRegion = "2 2 116 15";
|
||||
displayMounted = "0";
|
||||
pulseRate = "500";
|
||||
pulseThreshold = "0.3";
|
||||
verticalFill = "0";
|
||||
};
|
||||
};
|
||||
new GuiTextCtrl(NetBarHudPingText) {
|
||||
profile = "ShellTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "9 9";
|
||||
extent = "36 22";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
text = "0ms";
|
||||
maxLength = "255";
|
||||
};
|
||||
new GuiTextCtrl(NetBarHudPacketLossText) {
|
||||
profile = "ShellTextRightProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "76 9";
|
||||
extent = "48 22";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
text = "0%";
|
||||
maxLength = "255";
|
||||
};
|
||||
};
|
||||
|
||||
new GuiControl(retCenterHud) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "center";
|
||||
|
|
@ -405,13 +541,13 @@ new GameTSCtrl(PlayGui) {
|
|||
markerImageNames[2] = "small_diamond"; // assigned task
|
||||
markerImageNames[3] = "small_cross"; // client waypoint
|
||||
markerImageNames[4] = "small_circle"; // target
|
||||
|
||||
missileMarker1 = "gui/RET_missile_marker";
|
||||
missileMarker2 = "gui/RET_missile_marker_red";
|
||||
missileFlash1 = "gui/RET_missile_horizflash_red";
|
||||
missileFlash2 = "gui/RET_missile_vertflash_red";
|
||||
|
||||
missileMarker1 = "gui/RET_missile_marker";
|
||||
missileMarker2 = "gui/RET_missile_marker_red";
|
||||
missileFlash1 = "gui/RET_missile_horizflash_red";
|
||||
missileFlash2 = "gui/RET_missile_vertflash_red";
|
||||
|
||||
LOSMarkerUpdate = 250; // amount of time in ms that markers get LOS updates. Turn this down to get more updates or up to get less.
|
||||
LOSMarkerUpdate = 250; // amount of time in ms that markers get LOS updates. Turn this down to get more updates or up to get less.
|
||||
};
|
||||
|
||||
new GuiControl(dashboardHud) {
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ new GuiControl(RemapDlg) {
|
|||
extent = "640 480";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
hideCursor = "1";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
|
||||
new ShellPaneCtrl(RemapFrame) {
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ new GuiControl(ServerInfoDlg) {
|
|||
};
|
||||
new ShellScrollCtrl(SI_ContentScroll) {
|
||||
profile = "NewScrollCtrlProfile";
|
||||
horizSizing = "right";
|
||||
horizSizing = "width";
|
||||
vertSizing = "bottom";
|
||||
position = "0 100";
|
||||
extent = "336 162";
|
||||
|
|
@ -105,20 +105,20 @@ new GuiControl(ServerInfoDlg) {
|
|||
|
||||
new GuiScrollContentCtrl() {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
horizSizing = "width";
|
||||
vertSizing = "bottom";
|
||||
position = "7 7";
|
||||
extent = "322 174";
|
||||
extent = "306 174";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
|
||||
new GuiMLTextCtrl(SI_ContentWindow) {
|
||||
profile = "InfoWindowProfile";
|
||||
horizSizing = "right";
|
||||
horizSizing = "width";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "271 52";
|
||||
extent = "306 52";
|
||||
minExtent = "24 52";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ new GuiCursor(ResizeDownCursor)
|
|||
new GuiCursor(GrabCursor)
|
||||
{
|
||||
hotSpot = "9 13";
|
||||
bitmapName = "gui/CUR_Grab.png";
|
||||
bitmapName = "gui/CUR_Grab";
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
|
@ -463,7 +463,7 @@ new GuiControlProfile ("ShellServerBrowserProfile")
|
|||
fontColorHL = "6 245 215";
|
||||
fontColorNA = "128 128 128";
|
||||
fontColorSEL = "25 68 56";
|
||||
fontColors[4] = "20 197 93"; // Mod base color
|
||||
fontColors[4] = "20 167 93"; // Mod base color
|
||||
fontColors[5] = "40 217 113"; // Mod rollover color
|
||||
fontColors[6] = "5 60 30"; // Mod selected color
|
||||
fontColors[7] = "108 108 108"; // Differing build base color
|
||||
|
|
@ -1071,7 +1071,7 @@ new GuiControlProfile ("GuiTextBGWhiteRightProfile")
|
|||
new GuiControlProfile ("GuiHelpLineProfile")
|
||||
{
|
||||
borderColor = "231 101 26";
|
||||
bitmap = "gui/hud_dot.png";
|
||||
bitmap = "gui/hud_dot";
|
||||
};
|
||||
|
||||
new GuiControlProfile ("GuiTextObjHudCenterProfile")
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
Input log opened at Fri Jun 8 23:22:20 2001
|
||||
Input log opened at Tue Jul 3 14:37:21 2001
|
||||
|
||||
Operating System:
|
||||
WinNT version 5.0
|
||||
|
|
|
|||
|
|
@ -85,6 +85,27 @@ new SimGroup(MissionGroup) {
|
|||
cloudSpeed0 = "0.000050 0.000050";
|
||||
};
|
||||
new SimGroup(ObserverDropPoints) {
|
||||
new Camera(ODP1) {
|
||||
position = "211.873 -381.834 217.636";
|
||||
rotation = "0.999673 -0.00146427 0.025526 6.5684";
|
||||
scale = "1 1 1";
|
||||
dataBlock = "Observer";
|
||||
lockCount = "1";
|
||||
};
|
||||
new Camera(ODP2) {
|
||||
position = "-28.7603 -76.9109 85.8217";
|
||||
rotation = "0.527807 -0.0636426 0.846977 16.2049";
|
||||
scale = "1 1 1";
|
||||
dataBlock = "Observer";
|
||||
lockCount = "1";
|
||||
};
|
||||
new Camera(ODP3) {
|
||||
position = "-470.718 251.278 227.398";
|
||||
rotation = "0.201232 -0.0969256 0.974736 52.5921";
|
||||
scale = "1 1 1";
|
||||
dataBlock = "Observer";
|
||||
lockCount = "1";
|
||||
};
|
||||
};
|
||||
new SimGroup(Environmental) {
|
||||
|
||||
|
|
|
|||
|
|
@ -93,4 +93,5 @@ moveMap.bind(mouse0, "yaxis", pitch);
|
|||
moveMap.bind(mouse0, "button0", mouseFire);
|
||||
moveMap.bind(mouse0, "button1", mouseJet);
|
||||
moveMap.bind(mouse0, "zaxis", cycleWeaponAxis);
|
||||
GlobalActionMap.bind(keyboard, "super2", toggleConsole);
|
||||
if (!isDemo())
|
||||
GlobalActionMap.bind(keyboard, "super2", toggleConsole);
|
||||
|
|
|
|||
|
|
@ -94,4 +94,5 @@ moveMap.bind(mouse0, "yaxis", pitch);
|
|||
moveMap.bind(mouse0, "button0", mouseFire);
|
||||
moveMap.bind(mouse0, "button1", mouseJet);
|
||||
moveMap.bind(mouse0, "zaxis", cycleWeaponAxis);
|
||||
GlobalActionMap.bind(keyboard, "^", toggleConsole);
|
||||
if (!isDemo())
|
||||
GlobalActionMap.bind(keyboard, "^", toggleConsole);
|
||||
|
|
|
|||
|
|
@ -94,4 +94,5 @@ moveMap.bind(mouse0, "yaxis", pitch);
|
|||
moveMap.bind(mouse0, "button0", mouseFire);
|
||||
moveMap.bind(mouse0, "button1", mouseJet);
|
||||
moveMap.bind(mouse0, "zaxis", cycleWeaponAxis);
|
||||
GlobalActionMap.bind(keyboard, "backslash", toggleConsole);
|
||||
if (!isDemo())
|
||||
GlobalActionMap.bind(keyboard, "backslash", toggleConsole);
|
||||
|
|
|
|||
|
|
@ -93,4 +93,5 @@ moveMap.bind(mouse0, "yaxis", pitch);
|
|||
moveMap.bind(mouse0, "button0", mouseFire);
|
||||
moveMap.bind(mouse0, "button1", mouseJet);
|
||||
moveMap.bind(mouse0, "zaxis", cycleWeaponAxis);
|
||||
GlobalActionMap.bind(keyboard, "º", toggleConsole);
|
||||
if (!isDemo())
|
||||
GlobalActionMap.bind(keyboard, "º", toggleConsole);
|
||||
|
|
|
|||
|
|
@ -102,4 +102,5 @@ observerMap.bind(keyboard, "space", jump);
|
|||
observerMap.bind(keyboard, "e", moveup);
|
||||
observerMap.bind(keyboard, "c", movedown);
|
||||
observerMap.bind(mouse0, "button1", mouseJet);
|
||||
GlobalActionMap.bind(keyboard, "grave", toggleConsole);
|
||||
if (!isDemo())
|
||||
GlobalActionMap.bind(keyboard, "grave", toggleConsole);
|
||||
|
|
|
|||
|
|
@ -146,6 +146,10 @@ function CTFGame::missionLoadDone(%game)
|
|||
|
||||
// remove
|
||||
MissionGroup.clearFlagWaypoints();
|
||||
|
||||
//reset some globals, just in case...
|
||||
$dontScoreTimer[1] = false;
|
||||
$dontScoreTimer[2] = false;
|
||||
}
|
||||
|
||||
function CTFGame::playerTouchFlag(%game, %player, %flag)
|
||||
|
|
@ -212,6 +216,7 @@ function CTFGame::playerTouchEnemyFlag(%game, %player, %flag)
|
|||
}
|
||||
|
||||
%flag.hide(true);
|
||||
%flag.startFade(0, 0, false);
|
||||
%flag.isHome = false;
|
||||
if(%flag.stand)
|
||||
%flag.stand.getDataBlock().onFlagTaken(%flag.stand);//animate, if exterior stand
|
||||
|
|
@ -675,7 +680,10 @@ function CTFGame::awardScoreFlagTouch(%game, %cl, %flag)
|
|||
return;
|
||||
|
||||
$dontScoreTimer[%team] = true;
|
||||
schedule(%game.TOUCH_DELAY_MS, 0, eval, "$dontScoreTimer["@%team@"] = false;");
|
||||
//tinman - needed to remove all game calls to "eval" for the PURE server...
|
||||
%game.schedule(%game.TOUCH_DELAY_MS, resetDontScoreTimer, %team);
|
||||
//schedule(%game.TOUCH_DELAY_MS, 0, eval, "$dontScoreTimer["@%team@"] = false;");
|
||||
//schedule(%game.TOUCH_DELAY_MS, 0, eval, "$dontScoreTimer["@%team@"] = false;");
|
||||
$TeamScore[%team] += %game.SCORE_PER_TEAM_FLAG_TOUCH;
|
||||
messageAll('MsgTeamScoreIs', "", %team, $TeamScore[%team]);
|
||||
|
||||
|
|
@ -689,6 +697,11 @@ function CTFGame::awardScoreFlagTouch(%game, %cl, %flag)
|
|||
%game.checkScoreLimit(%team);
|
||||
}
|
||||
|
||||
function CTFGame::resetDontScoreTimer(%game, %team)
|
||||
{
|
||||
$dontScoreTimer[%team] = false;
|
||||
}
|
||||
|
||||
function CTFGame::checkScoreLimit(%game, %team)
|
||||
{
|
||||
%scoreLimit = MissionGroup.CTF_scoreLimit * %game.SCORE_PER_TEAM_FLAG_CAP;
|
||||
|
|
@ -848,6 +861,9 @@ function CTFGame::vStationOnRepaired(%game, %obj, %objName)
|
|||
|
||||
function CTFGame::enterMissionArea(%game, %playerData, %player)
|
||||
{
|
||||
if(%player.getState() $= "Dead")
|
||||
return;
|
||||
|
||||
%player.client.outOfBounds = false;
|
||||
messageClient(%player.client, 'EnterMissionArea', '\c1You are back in the mission area.');
|
||||
logEcho(%player.client.nameBase@" (pl "@%player@"/cl "@%player.client@") entered mission area");
|
||||
|
|
@ -862,6 +878,9 @@ function CTFGame::enterMissionArea(%game, %playerData, %player)
|
|||
|
||||
function CTFGame::leaveMissionArea(%game, %playerData, %player)
|
||||
{
|
||||
if(%player.getState() $= "Dead")
|
||||
return;
|
||||
|
||||
// maybe we'll do this just in case
|
||||
%player.client.outOfBounds = true;
|
||||
// if the player is holding a flag, strip it and throw it back into the mission area
|
||||
|
|
@ -925,3 +944,61 @@ function CTFGame::applyConcussion(%game, %player)
|
|||
%game.dropFlag( %player );
|
||||
}
|
||||
|
||||
function CTFGame::vehicleDestroyed(%game, %vehicle, %destroyer)
|
||||
{
|
||||
//vehicle name
|
||||
%data = %vehicle.getDataBlock();
|
||||
//%vehicleType = getTaggedString(%data.targetNameTag) SPC getTaggedString(%data.targetTypeTag);
|
||||
%vehicleType = getTaggedString(%data.targetTypeTag);
|
||||
if(%vehicleType !$= "MPB")
|
||||
%vehicleType = strlwr(%vehicleType);
|
||||
%pref = (%vehicleType $= "Assault Tank") ? "an" : "a";
|
||||
|
||||
%enemyTeam = ( %destroyer.team == 1 ) ? 2 : 1;
|
||||
|
||||
//what destroyed this vehicle
|
||||
if(%destroyer.client)
|
||||
{
|
||||
//it was a player, or his mine, satchel, whatever...
|
||||
%destroyer = %destroyer.client;
|
||||
}
|
||||
else if(%destroyer.getClassName() $= "Turret")
|
||||
{
|
||||
if(%destroyer.getControllingClient())
|
||||
{
|
||||
//manned turret
|
||||
%destroyer = %destroyer.getControllingClient();
|
||||
}
|
||||
else
|
||||
{
|
||||
%destroyerName = "A turret";
|
||||
}
|
||||
}
|
||||
else if(%destroyer.getDataBlock().catagory $= "Vehicles")
|
||||
{
|
||||
// Vehicle vs vehicle kill!
|
||||
if(%name $= "BomberFlyer" || %name $= "AssaultVehicle")
|
||||
%gunnerNode = 1;
|
||||
else
|
||||
%gunnerNode = 0;
|
||||
|
||||
if(%destroyer.getMountNodeObject(%gunnerNode))
|
||||
%destroyer = %destroyer.getMountNodeObject(gunnerNode).client;
|
||||
}
|
||||
else // Is there anything else we care about?
|
||||
return;
|
||||
|
||||
|
||||
if(%destroyerName $= "")
|
||||
%destroyerName = %destroyer.name;
|
||||
|
||||
if(%vehicle.team == %destroyer.team) // team kill
|
||||
messageAll( 'msgVehicleTeamDestroy', '\c0%1 TEAMKILLED %3 %2!', %destroyerName, %vehicleType, %pref);
|
||||
|
||||
else // legit kill
|
||||
{
|
||||
messageTeamExcept(%destroyer, 'msgVehicleDestroy', '\c0%1 destroyed an enemy %2.', %destroyerName, %vehicleType);
|
||||
messageTeam(%enemyTeam, 'msgVehicleDestroy', '\c0%1 destroyed your team\'s %2.', %destroyerName, %vehicleType);
|
||||
messageClient(%destroyer, 'msgVehicleDestroy', '\c0You destroyed an enemy %1.', %vehicleType);
|
||||
}
|
||||
}
|
||||
|
|
@ -245,25 +245,42 @@ function ChatGuiMessageVector::urlClickCallback(%this,%type,%url,%content)
|
|||
JoinGame(%content);
|
||||
case "warrior":
|
||||
LaunchBrowser(%url,"Warrior");
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function ChatSendText()
|
||||
{
|
||||
if ($IRCClient::people.getObject(0).flags & $PERSON_AWAY)
|
||||
IRCClient::away("");
|
||||
else
|
||||
{
|
||||
if ($IRCClient::awaytimeout)
|
||||
cancel($IRCClient::awaytimeout);
|
||||
$IRCClient::awaytimeout = schedule($AWAY_TIMEOUT,0,"ChatAway_Timeout");
|
||||
}
|
||||
if ($IRCClient::currentChannel.private)
|
||||
IRCClient::send2(ChatMessageEntry.getValue(),$IRCClient::currentChannel.getName());
|
||||
else
|
||||
IRCClient::send2(ChatMessageEntry.getValue(),"");
|
||||
ChatMessageEntry.setValue("");
|
||||
TextCheck2(ChatMessageEntry.getValue(),ChatMessageEntry);
|
||||
if(ChatMessageEntry.textCheck)
|
||||
{
|
||||
for(%x=0;%x<getField($strcheck2,0);%x++)
|
||||
{
|
||||
%msgStr = %msgStr @ getField($strcheck2,1+%x) @ " ";
|
||||
}
|
||||
MessageBoxOK("NOTICE","The Following Characters may not be used in T2 Chat text:\n" NL
|
||||
%msgStr);
|
||||
ChatMessageEntry.makeFirstResponder(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if ($IRCClient::people.getObject(0).flags & $PERSON_AWAY)
|
||||
IRCClient::away("");
|
||||
else
|
||||
{
|
||||
if ($IRCClient::awaytimeout)
|
||||
cancel($IRCClient::awaytimeout);
|
||||
$IRCClient::awaytimeout = schedule($AWAY_TIMEOUT,0,"ChatAway_Timeout");
|
||||
}
|
||||
if ($IRCClient::currentChannel.private)
|
||||
IRCClient::send2(ChatMessageEntry.getValue(),$IRCClient::currentChannel.getName());
|
||||
else
|
||||
IRCClient::send2(ChatMessageEntry.getValue(),"");
|
||||
ChatMessageEntry.setValue("");
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
|
@ -277,25 +294,25 @@ function ChatAway_Timeout()
|
|||
function ChatRoomMemberList::onAdd(%this)
|
||||
{
|
||||
ChatRoomMemberList.addStyle($PERSON_OPERATOR,
|
||||
"sys_op_eye.png", "",
|
||||
"sys_op_eye", "",
|
||||
"","","");
|
||||
ChatRoomMemberList.addStyle($PERSON_IGNORE,
|
||||
"", "mute_speaker.png",
|
||||
"", "mute_speaker",
|
||||
"","","");
|
||||
ChatRoomMemberList.addStyle($PERSON_IGNORE | $PERSON_OPERATOR,
|
||||
"sys_op_eye.png", "mute_speaker.png",
|
||||
"sys_op_eye", "mute_speaker",
|
||||
"","","");
|
||||
ChatRoomMemberList.addStyle($PERSON_AWAY,
|
||||
"", "",
|
||||
"128 128 128","","");
|
||||
ChatRoomMemberList.addStyle($PERSON_OPERATOR | $PERSON_AWAY,
|
||||
"sys_op_eye.png", "",
|
||||
"sys_op_eye", "",
|
||||
"128 128 128","","");
|
||||
ChatRoomMemberList.addStyle($PERSON_IGNORE | $PERSON_AWAY,
|
||||
"", "mute_speaker.png",
|
||||
"", "mute_speaker",
|
||||
"128 128 128","","");
|
||||
ChatRoomMemberList.addStyle($PERSON_IGNORE | $PERSON_OPERATOR | $PERSON_AWAY,
|
||||
"sys_op_eye.png", "mute_speaker.png",
|
||||
"sys_op_eye", "mute_speaker",
|
||||
"128 128 128","","");
|
||||
}
|
||||
|
||||
|
|
@ -332,7 +349,9 @@ function ChatRoomMemberList_refresh(%channel)
|
|||
|
||||
if(%add)
|
||||
{
|
||||
// get our gui list
|
||||
|
||||
|
||||
// get our gui list
|
||||
for(%i = 0; %i < %list.rowCount(); %i++)
|
||||
{
|
||||
%list.guiValue[%i] = %list.getRowId(%i);
|
||||
|
|
@ -356,24 +375,25 @@ function ChatRoomMemberList_refresh(%channel)
|
|||
}
|
||||
else
|
||||
{
|
||||
for(%i = 0; %i < %list.rowCount(); %i++)
|
||||
{
|
||||
%list.guiValue[%i] = %list.getRowId(%i);
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
for(%i = 0; %i < %list.rowCount; %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);
|
||||
%list.guiValue[%i] = "";
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -449,7 +469,6 @@ function ChatRoomMemberList::onRightMouseDown(%this,%column,%row,%mousePos)
|
|||
ChatMemberPopup.add("Mute",6);
|
||||
|
||||
ChatMemberPopup.add( "--------------------",-1);
|
||||
// ChatMemberPopup.add( "Instant Message", 9 );
|
||||
ChatMemberPopup.add( "TMail", 10 );
|
||||
ChatMemberPopup.add( "Add To Buddylist",11);
|
||||
|
||||
|
|
@ -507,14 +526,13 @@ function ChatMemberPopup::onSelect(%this,%id,%text)
|
|||
IRCClient::ignore(ChatMemberPopup.member,!(ChatMemberPopup.member.flags & $PERSON_IGNORE));
|
||||
case 7: // go to webbrowser page
|
||||
LinkBrowser(%member,"warrior");
|
||||
case 9: // Instant Message
|
||||
IRCClient::invite(ChatMemberPopup.member, %id);
|
||||
case 10: // TMail
|
||||
LinkEMail(%member);
|
||||
case 11: // Add To Buddylist
|
||||
MessageBoxYesNo("CONFIRM","Add " @ %member @ " to Buddy List?",
|
||||
"LinkAddBuddy(\"" @ %member @ "\",TWBText,\"addBuddy\");","");
|
||||
default: // Invite
|
||||
default: // Link
|
||||
// LinkBrowser(%member,"warrior");
|
||||
IRCClient::invite(ChatMemberPopup.member,%id);
|
||||
}
|
||||
}
|
||||
|
|
@ -523,13 +541,13 @@ function ChatMemberPopup::onSelect(%this,%id,%text)
|
|||
function ChannelBanList::onAdd(%this)
|
||||
{
|
||||
ChannelBanList.addStyle($PERSON_IGNORE,
|
||||
"", "mute_speaker.png",
|
||||
"", "mute_speaker",
|
||||
"","","");
|
||||
ChannelBanList.addStyle($PERSON_AWAY,
|
||||
"", "",
|
||||
"128 128 128","","");
|
||||
ChannelBanList.addStyle($PERSON_IGNORE | $PERSON_AWAY,
|
||||
"", "mute_speaker.png",
|
||||
"", "mute_speaker",
|
||||
"128 128 128","","");
|
||||
}
|
||||
|
||||
|
|
@ -853,10 +871,8 @@ function IRCClient::notify(%event)
|
|||
}
|
||||
ChatTabView.removeTab($IRCClient::deletedChannel);
|
||||
case IDIRC_INVITED: //invited to join existing channel.
|
||||
//MessageBoxOKCancel("Invite", "You have been invited to channel " @ IRCClient::displayChannel($IRCClient::invitechannel) @ " by " @ $IRCClient::inviteperson @ ".", "IRCClient::join($IRCClient::invitechannel);");
|
||||
IRCClient::newMessage($IRCClient::CurrentChannel, "You have been invited to channel " @ $IRCClient::invitechannel @ " by " @ $IRCClient::inviteperson @ ".");
|
||||
case IDIRC_INSTANTMSG:
|
||||
messageBoxOK("TESTING","This is a test of the Instant Messaging System. Sent By: " @ $IRCClient::inviteperson @ ".");
|
||||
//MessageBoxOKCancel("Invite", "You have been invited to channel " @ IRCClient::displayChannel($IRCClient::invitechannel) @ " by " @ $IRCClient::inviteperson @ ".", "IRCClient::join($IRCClient::invitechannel);");
|
||||
IRCClient::newMessage($IRCClient::CurrentChannel, "You have been invited to channel " @ $IRCClient::invitechannel @ " by " @ $IRCClient::inviteperson @ ".");
|
||||
case IDIRC_BAN_LIST:
|
||||
ChannelBannedList_refresh();
|
||||
case IDIRC_TOPIC:
|
||||
|
|
@ -1506,7 +1522,7 @@ function IRCClient::processLine(%line)
|
|||
if (!IRCClient::dispatch(%prefix,%command,%params))
|
||||
{
|
||||
//echo("IRCClient: " @ %command @ " not handled by dispatch!");
|
||||
//echo("(cmd:) " @ %prefix @ " " @ %command @ " " @ %params);
|
||||
echo("(cmd:) " @ %prefix @ " " @ %command @ " " @ %params);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1548,8 +1564,6 @@ function IRCClient::dispatch(%prefix,%command,%params)
|
|||
IRCClient::onAction(%prefix,%params);
|
||||
case "INVITE":
|
||||
IRCClient::onInvite(%prefix,%params);
|
||||
case "INSTANTMSG":
|
||||
IRCClient::onInstantMsg(%prefix,%params);
|
||||
case "301":
|
||||
IRCClient::onAwayReply(%prefix,%params);
|
||||
case "305":
|
||||
|
|
@ -1578,10 +1592,8 @@ function IRCClient::dispatch(%prefix,%command,%params)
|
|||
IRCClient::onNoTopic(%prefix,%params);
|
||||
case "332":
|
||||
IRCClient::onTopic(%prefix,%params);
|
||||
|
||||
case "341":
|
||||
IRCClient::onInviteReply(%prefix,%params);
|
||||
|
||||
case "352":
|
||||
IRCClient::onWhoReply(%prefix,%params);
|
||||
case "353":
|
||||
|
|
@ -2535,25 +2547,6 @@ function IRCClient::onChannelInviteOnly(%prefix,%params)
|
|||
IRCClient::notify(IDIRC_INVITE_ONLY);
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
function IRCClient::onInstantMsg(%prefix,%params)
|
||||
{
|
||||
%p = IRCClient::findPerson2(%prefix,true);
|
||||
if (%p)
|
||||
{
|
||||
%params = nextToken(%params,channel,":");
|
||||
%channel = %params;
|
||||
|
||||
// Only bother the user if they aren't ignoring this person
|
||||
if (!(%person.flags & $PERSON_IGNORE))
|
||||
{
|
||||
// Set vars and notify the responder
|
||||
$IRCClient::invitechannel = %channel;
|
||||
$IRCClient::inviteperson = IRCClient::displayNick(%p);
|
||||
IRCClient::notify(IDIRC_INSTANTMSG);
|
||||
}
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
function IRCClient::onInvite(%prefix,%params)
|
||||
{
|
||||
// Find or create the person (should never be NULL)
|
||||
|
|
@ -2573,7 +2566,6 @@ function IRCClient::onInvite(%prefix,%params)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function IRCClient::onInviteReply(%prefix,%params)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -337,13 +337,19 @@ function clearGameTypes()
|
|||
%text = FilterEditGameType.getText();
|
||||
FilterEditGameType.clear();
|
||||
FilterEditGameType.add( "Any", 0 );
|
||||
FilterEditGameType.add( "base", 1 );
|
||||
FilterEditGameType.add( "variant", 2 );
|
||||
FilterEditGameType.setText( %text );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function addGameType( %type )
|
||||
{
|
||||
FilterEditGameType.add( %type, 0 );
|
||||
if ( FilterEditGameType.findText( %type ) == -1 )
|
||||
{
|
||||
%id = FilterEditGameType.size();
|
||||
FilterEditGameType.add( %type, %id );
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
|
@ -353,17 +359,33 @@ function clearMissionTypes()
|
|||
FilterEditMissionType.clear();
|
||||
FilterEditMissionType.add( "Any", 0 );
|
||||
FilterEditMissionType.setText( %text );
|
||||
|
||||
|
||||
// Add all the mission types found on this machine:
|
||||
for ( %i = 0; %i < $HostTypeCount; %i++ )
|
||||
FilterEditMissionType.add( $HostTypeDisplayName[%i], %i );
|
||||
FilterEditMissionType.add( $HostTypeDisplayName[%i], %i + 1 );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function addMissionType(%type)
|
||||
{
|
||||
if ( %type !$= "" && FilterEditMissionType.findText( %type ) == -1 )
|
||||
FilterEditMissionType.add( %type, 0 );
|
||||
{
|
||||
%id = FilterEditMissionType.size();
|
||||
FilterEditMissionType.add( %type, %id );
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function sortGameAndMissionTypeLists()
|
||||
{
|
||||
FilterEditGameType.sort( true, 3 );
|
||||
%idx = FilterEditGameType.findText( FilterEditGameType.getText() );
|
||||
if ( %idx > -1 )
|
||||
FilterEditGameType.setSelected( %idx );
|
||||
FilterEditMissionType.sort( true, 1 );
|
||||
%idx = FilterEditMissionType.findText( FilterEditMissionType.getText() );
|
||||
if ( %idx > -1 )
|
||||
FilterEditMissionType.setSelected( %idx );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -90,8 +90,7 @@ function debriefDisconnect()
|
|||
//------------------------------------------------------------------------------
|
||||
function debriefContinue()
|
||||
{
|
||||
Canvas.setContent( LoadingGui );
|
||||
Canvas.repaint();
|
||||
checkGotLoadInfo();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -383,7 +383,7 @@ function EditChatCommandDlg::onWake( %this )
|
|||
if ( isObject( $ChatTable[%i] ) )
|
||||
EditChatCommandList.add( $ChatTable[%i].name, %i );
|
||||
}
|
||||
EditChatCommandList.sort();
|
||||
EditChatCommandList.sort( true );
|
||||
|
||||
// Select the current command:
|
||||
if ( isObject( $ChatTable[$ECI::command] ) )
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ function GameGui::onWake( %this )
|
|||
{
|
||||
Canvas.pushDialog( LaunchToolbarDlg );
|
||||
|
||||
if ( isDemo() || $PlayingOnline )
|
||||
if ( isDemo() || isDemoServer() || $PlayingOnline )
|
||||
GM_Frame.setTitle( "GAME" );
|
||||
else
|
||||
GM_Frame.setTitle( "LAN GAME" );
|
||||
|
|
@ -26,15 +26,23 @@ function GameGui::onWake( %this )
|
|||
// This is essentially an "isInitialized" flag...
|
||||
if ( GM_TabView.tabCount() == 0 )
|
||||
{
|
||||
GM_TabView.addTab( 1, "JOIN" );
|
||||
if ( !isDemo() )
|
||||
if ( isDemo() )
|
||||
{
|
||||
GM_TabView.addTab( 1, "JOIN" );
|
||||
%this.pane = "Join";
|
||||
}
|
||||
else if ( isDemoServer() )
|
||||
{
|
||||
GM_TabView.addTab( 2, "HOST" );
|
||||
%this.pane = "Host";
|
||||
}
|
||||
else
|
||||
{
|
||||
GM_TabView.addTab( 1, "JOIN" );
|
||||
GM_TabView.addTab( 2, "HOST" );
|
||||
GM_TabView.addTab( 3, "WARRIOR SETUP", 1 );
|
||||
queryMasterGameTypes();
|
||||
}
|
||||
else
|
||||
%this.pane = "Join";
|
||||
}
|
||||
|
||||
switch$ ( %this.pane )
|
||||
|
|
@ -130,7 +138,10 @@ function GM_JoinPane::onActivate( %this )
|
|||
BrowserMap.delete();
|
||||
}
|
||||
new ActionMap( BrowserMap );
|
||||
BrowserMap.bindCmd( keyboard, insert, "GMJ_Browser.insertIPAddress();", "" );
|
||||
if ( !isDemo() )
|
||||
BrowserMap.bindCmd( keyboard, insert, "GMJ_Browser.insertIPAddress();", "" );
|
||||
BrowserMap.bindCmd( keyboard, "ctrl f", "Canvas.pushDialog( FindServerDlg );", "" );
|
||||
BrowserMap.bindCmd( keyboard, F3, "GMJ_Browser.findNextServer();", "" );
|
||||
BrowserMap.push();
|
||||
|
||||
GM_VersionText.setVisible( !isDemo() );
|
||||
|
|
@ -142,8 +153,11 @@ function GM_JoinPane::onActivate( %this )
|
|||
//------------------------------------------------------------------------------
|
||||
function GM_JoinPane::onDeactivate( %this )
|
||||
{
|
||||
BrowserMap.pop();
|
||||
BrowserMap.delete();
|
||||
if ( isObject( BrowserMap ) )
|
||||
{
|
||||
BrowserMap.pop();
|
||||
BrowserMap.delete();
|
||||
}
|
||||
|
||||
GM_VersionText.setVisible( false );
|
||||
|
||||
|
|
@ -172,9 +186,12 @@ $BrowserColumnCount++;
|
|||
$BrowserColumnName[5] = "Mission Name";
|
||||
$BrowserColumnRange[5] = "25 300";
|
||||
$BrowserColumnCount++;
|
||||
$BrowserColumnName[6] = "Rules Set";
|
||||
$BrowserColumnRange[6] = "25 300";
|
||||
$BrowserColumnCount++;
|
||||
if ( !isDemo() )
|
||||
{
|
||||
$BrowserColumnName[6] = "Rules Set";
|
||||
$BrowserColumnRange[6] = "25 300";
|
||||
$BrowserColumnCount++;
|
||||
}
|
||||
$BrowserColumnName[7] = "# Players (Bots)";
|
||||
$BrowserColumnRange[7] = "25 150";
|
||||
$BrowserColumnCount++;
|
||||
|
|
@ -488,10 +505,37 @@ function EnterIPDlg::onDone( %this )
|
|||
%address = "IP:" @ %address;
|
||||
if ( strpos( %address, ":", 3 ) == -1 )
|
||||
%address = %address @ ":28000";
|
||||
|
||||
error( ">> address = \"" @ %address @ "\" <<" );
|
||||
|
||||
echo( "Starting ping to server " @ %address @ "..." );
|
||||
pushServerAddress( %address );
|
||||
GMJ_Browser.selectRowByAddress( %address );
|
||||
GMJ_Browser.selectRowByAddress( %address, true );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function FindServerDlg::onWake( %this )
|
||||
{
|
||||
FS_SearchPattern.validate();
|
||||
FS_SearchPattern.selectAll();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function FindServerDlg::onGo( %this )
|
||||
{
|
||||
%pattern = FS_SearchPattern.getValue();
|
||||
if ( %pattern !$= "" )
|
||||
{
|
||||
Canvas.popDialog( FindServerDlg );
|
||||
if ( !GMJ_Browser.findServer( %pattern ) )
|
||||
MessageBoxOK( "NOT FOUND", "No servers with \"" @ %pattern @ "\" in their name were found." );
|
||||
}
|
||||
else
|
||||
alxPlay( InputDeniedSound, 0, 0, 0 );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function FS_SearchPattern::validate( %this )
|
||||
{
|
||||
FS_GoBtn.setActive( %this.getValue() !$= "" );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
|
@ -558,7 +602,7 @@ function ServerInfoDlg::update( %this )
|
|||
%temp = getRecord( %info, 5 );
|
||||
if ( %temp !$= "" )
|
||||
%infoText = %infoText NL "<spush>" @ %this.headerStyle @ "MAP NAME:<spop><lmargin:70>" TAB %temp @ "<lmargin:0>";
|
||||
%temp = getRecord( %info, 6 );
|
||||
%temp = getRecords( %info, 6, 10 );
|
||||
if ( %temp !$= "" )
|
||||
%infoText = %infoText NL "<spush>" @ %this.headerStyle @ "SERVER INFO:<spop><lmargin:10>" TAB %temp @ "<lmargin:0>";
|
||||
|
||||
|
|
@ -607,22 +651,22 @@ function SI_ContentWindow::fill( %this, %content )
|
|||
%record++;
|
||||
if ( %teamCount > 1 )
|
||||
{
|
||||
%string = "<tab:110,220><spush>" @ ServerInfoDlg.headerStyle @ "TEAMS" TAB "SCORE<spop><tab:5,115,225>";
|
||||
%string = "<spush>" @ ServerInfoDlg.headerStyle @ "TEAMS<lmargin%:50>SCORE<spop>";
|
||||
for ( %i = 0; %i < %teamCount; %i++ )
|
||||
{
|
||||
%teamEntry = getRecord( %content, %record );
|
||||
%string = %string NL "<clip:110>\t" @ getField( %teamEntry, 0 ) @ "</clip>" TAB getField( %teamEntry, 1 );
|
||||
%string = %string NL "<lmargin:0><clip%:50>" SPC getField( %teamEntry, 0 ) @ "</clip><lmargin%:50>" SPC getField( %teamEntry, 1 );
|
||||
%record++;
|
||||
}
|
||||
|
||||
%playerCount = getRecord( %content, %record );
|
||||
%record++;
|
||||
%string = %string NL "\n<tab:110,220><spush>" @ ServerInfoDlg.headerStyle @ "PLAYERS" TAB "TEAM" TAB "SCORE<spop><tab:5,115,225>";
|
||||
%string = %string NL "\n<lmargin:0><spush>" @ ServerInfoDlg.headerStyle @ "PLAYERS<lmargin%:40>TEAM<lmargin%:75>SCORE<spop>";
|
||||
for ( %i = 0; %i < %playerCount; %i++ )
|
||||
{
|
||||
%playerEntry = getRecord( %content, %record );
|
||||
%string = %string NL "<clip:110>\t" @ getField( %playerEntry, 0 ) @ "</clip>"
|
||||
TAB "<clip:105>" @ getField( %playerEntry, 1 ) @ "</clip>" TAB getField( %playerEntry, 2 );
|
||||
%string = %string NL "<lmargin:0><clip%:40>" SPC getField( %playerEntry, 0 ) @ "</clip><lmargin%:40><clip%:35>"
|
||||
SPC getField( %playerEntry, 1 ) @ "</clip><lmargin%:75><clip%:25>" SPC getField( %playerEntry, 2 ) @ "</clip>";
|
||||
%record++;
|
||||
}
|
||||
}
|
||||
|
|
@ -631,11 +675,11 @@ function SI_ContentWindow::fill( %this, %content )
|
|||
%record++;
|
||||
%playerCount = getRecord( %content, %record );
|
||||
%record++;
|
||||
%string = "<tab:150><spush>" @ ServerInfoDlg.headerStyle @ "PLAYERS" TAB "SCORE<spop><tab:5,155>";
|
||||
%string = "<spush>" @ ServerInfoDlg.headerStyle @ "PLAYERS<lmargin%:60>SCORE<spop>";
|
||||
for ( %i = 0; %i < %playerCount; %i++ )
|
||||
{
|
||||
%playerEntry = getRecord( %content, %record );
|
||||
%string = %string NL "<clip:150>\t" @ getField( %playerEntry, 0 ) @ "</clip>" TAB getField( %playerEntry, 2 );
|
||||
%string = %string NL "<lmargin:0><clip%:60>" SPC getField( %playerEntry, 0 ) @ "</clip><lmargin%:60>" SPC getField( %playerEntry, 2 );
|
||||
%record++;
|
||||
}
|
||||
}
|
||||
|
|
@ -689,6 +733,7 @@ function JoinGame(%address)
|
|||
%playerSkin = getField( %playerPref, 2 );
|
||||
%playerVoice = getField( %playerPref, 3 );
|
||||
%playerVoicePitch = getField( %playerPref, 4 );
|
||||
LoadingGui.gotLoadInfo = "";
|
||||
connect( %address, $JoinGamePassword, %playerName, %playerRaceGender, %playerSkin, %playerVoice, %playerVoicePitch );
|
||||
}
|
||||
|
||||
|
|
@ -758,6 +803,7 @@ function buildMissionTypePopup( %popup )
|
|||
%popup.clear();
|
||||
for( %type = 0; %type < $HostTypeCount; %type++ )
|
||||
%popup.add( $HostTypeDisplayName[%type], %type );
|
||||
%popup.sort( true );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
|
@ -994,8 +1040,8 @@ function StartHostedGame()
|
|||
if ( $Host::Dedicated )
|
||||
{
|
||||
MessageBoxYesNo( "WARNING",
|
||||
"You are about to launch a dedicated server and leave Tribes 2. Do you want to continue?",
|
||||
"tryToLaunchDedicatedServer();" );
|
||||
"You are about to launch a dedicated server and quit Tribes 2. Do you want to continue?",
|
||||
"tryToLaunchDedicatedServer(" @ $Host::PureServer @ ");" );
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1023,10 +1069,10 @@ function StartHostedGame()
|
|||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function tryToLaunchDedicatedServer()
|
||||
function tryToLaunchDedicatedServer( %pure )
|
||||
{
|
||||
%numBots = $Host::BotsEnabled ? $Host::BotCount : 0;
|
||||
if ( launchDedicatedServer( $Host::MissionType, $Host::Map, %numBots ) )
|
||||
if ( launchDedicatedServer( $Host::MissionType, $Host::Map, %numBots, %pure ) )
|
||||
quit();
|
||||
else
|
||||
{
|
||||
|
|
@ -1162,6 +1208,7 @@ function AdvancedHostDlg::onWake( %this )
|
|||
// Set all of the controls to the current pref states:
|
||||
AH_HostPort.setText( $Host::Port );
|
||||
AH_DedicatedTgl.setValue( $Host::Dedicated );
|
||||
AH_DedicatedTgl.onAction();
|
||||
AH_TournamentTgl.setValue( $Host::TournamentMode );
|
||||
AH_AdminVoteTgl.setValue( $Host::allowAdminPlayerVotes );
|
||||
AH_AllowSmurfTgl.setValue( !$Host::NoSmurfs );
|
||||
|
|
@ -1180,6 +1227,8 @@ function AdvancedHostDlg::accept( %this )
|
|||
// Apply all of the changes:
|
||||
$Host::Port = AH_HostPort.getValue();
|
||||
$Host::Dedicated = AH_DedicatedTgl.getValue();
|
||||
if ( $Host::Dedicated )
|
||||
$Host::PureServer = AH_PureServerTgl.getValue();
|
||||
$Host::TournamentMode = AH_TournamentTgl.getValue();
|
||||
$Host::allowAdminPlayerVotes = AH_AdminVoteTgl.getValue();
|
||||
$Host::NoSmurfs = !AH_AllowSmurfTgl.getValue();
|
||||
|
|
@ -1197,6 +1246,21 @@ function AdvancedHostDlg::accept( %this )
|
|||
Canvas.popDialog( AdvancedHostDlg );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function AH_DedicatedTgl::onAction( %this )
|
||||
{
|
||||
if ( %this.getValue() )
|
||||
{
|
||||
AH_PureServerTgl.setValue( $Host::PureServer );
|
||||
AH_PureServerTgl.setActive( true );
|
||||
}
|
||||
else
|
||||
{
|
||||
AH_PureServerTgl.setValue( false );
|
||||
AH_PureServerTgl.setActive( false );
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function AH_VotePassText::update( %this )
|
||||
{
|
||||
|
|
@ -1522,6 +1586,8 @@ function GMW_SkinPopup::fillList( %this, %raceGender )
|
|||
%count++;
|
||||
}
|
||||
}
|
||||
|
||||
%this.sort( true );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -84,10 +84,16 @@ function HuntersGame::initGameVars(%game)
|
|||
|
||||
%game.teamMode = false;
|
||||
|
||||
%game.greedMode = $Host::HuntersGreedMode;
|
||||
if (!isDemo() && !isDemoServer())
|
||||
%game.greedMode = $Host::HuntersGreedMode;
|
||||
else
|
||||
%game.greedMode = false;
|
||||
%game.greedMinFlags = 8; //min number of flags you must have before you can cap
|
||||
|
||||
%game.hoardMode = $Host::HuntersHoardMode;
|
||||
if (!isDemo() && !isDemoServer())
|
||||
%game.hoardMode = $Host::HuntersHoardMode;
|
||||
else
|
||||
%game.hoardMode = false;
|
||||
%game.HoardStartTime = 5; //time left in the game at which hoard mode will start
|
||||
%game.HoardDuration = 3; //duration of the hoard period
|
||||
%game.HoardEndTime = %game.HoardStartTime - %game.HoardDuration;
|
||||
|
|
@ -607,7 +613,7 @@ function HuntersGame::playerTouchFlag(%game, %player, %flag)
|
|||
if (!%game.teamMode && !%client.couldSetRecord)
|
||||
{
|
||||
%numFlags = %client.flagCount - 1;
|
||||
if (%numFlags > 10 && %numFlags > $HuntersRecords::Count[$currentMission])
|
||||
if (%numFlags > 10 && %numFlags > $Host::HuntersRecords::Count[$currentMission])
|
||||
{
|
||||
//see if we have at least 4 non-AI players
|
||||
%humanCount = 0;
|
||||
|
|
@ -941,7 +947,7 @@ function Nexus::onCollision(%data, %obj, %colObj)
|
|||
}
|
||||
|
||||
//see if it's a record
|
||||
if (%numToScore > 10 && %numToScore > $HuntersRecords::Count[$currentMission])
|
||||
if (%numToScore > 10 && %numToScore > $Host::HuntersRecords::Count[$currentMission])
|
||||
{
|
||||
//see if we have at least 4 non-AI players
|
||||
%humanCount = 0;
|
||||
|
|
@ -957,15 +963,15 @@ function Nexus::onCollision(%data, %obj, %colObj)
|
|||
|
||||
if (%humanCount >= Game.numHumansForRecord)
|
||||
{
|
||||
$HuntersRecords::Count[$currentMission] = %numToScore;
|
||||
$HuntersRecords::Name[$currentMission] = getTaggedString(%client.name);
|
||||
$Host::HuntersRecords::Count[$currentMission] = %numToScore;
|
||||
$Host::HuntersRecords::Name[$currentMission] = getTaggedString(%client.name);
|
||||
|
||||
//send a message to everyone
|
||||
messageAllExcept(%client, -1, 'MsgHuntPlayerSetRecord', '\c2%1 set the record for this mission with a return of %2 flags!~wfx/misc/flag_return.wav', %client.name, %numToScore);
|
||||
messageClient(%client, 'MsgHuntYouSetRecord', '\c2You set the record for this mission with a return of %1 flags!~wfx/misc/flag_return.wav', %numToScore);
|
||||
|
||||
//update the records file...
|
||||
export( "$HuntersRecords::*", "prefs/HuntersRecords.cs", false );
|
||||
export( "$Host::HuntersRecords::*", "prefs/HuntersRecords.cs", false );
|
||||
|
||||
//once the record has been set, reset everyone's tag
|
||||
for (%i = 0; %i < %count; %i++)
|
||||
|
|
@ -1050,30 +1056,33 @@ function HuntersGame::sendGameVoteMenu( %game, %client, %key )
|
|||
// First send the common options:
|
||||
DefaultGame::sendGameVoteMenu( %game, %client, %key );
|
||||
|
||||
if(!%client.isAdmin)
|
||||
if (!isDemo() && !isDemoServer())
|
||||
{
|
||||
// Now send the Hunters-specific options:
|
||||
if ( %game.greedMode )
|
||||
messageClient( %client, 'MsgVoteItem', "", %key, 'VoteGreedMode', 'disable greed mode', 'Vote Disable GREED Mode' );
|
||||
else
|
||||
messageClient( %client, 'MsgVoteItem', "", %key, 'VoteGreedMode', 'enable greed mode', 'Vote Enable GREED Mode' );
|
||||
if(!%client.isAdmin)
|
||||
{
|
||||
// Now send the Hunters-specific options:
|
||||
if ( %game.greedMode )
|
||||
messageClient( %client, 'MsgVoteItem', "", %key, 'VoteGreedMode', 'disable greed mode', 'Vote Disable GREED Mode' );
|
||||
else
|
||||
messageClient( %client, 'MsgVoteItem', "", %key, 'VoteGreedMode', 'enable greed mode', 'Vote Enable GREED Mode' );
|
||||
|
||||
if ( %game.HoardMode )
|
||||
messageClient( %client, 'MsgVoteItem', "", %key, 'VoteHoardMode', 'disable hoard mode', 'Vote Disable HOARD Mode' );
|
||||
if ( %game.HoardMode )
|
||||
messageClient( %client, 'MsgVoteItem', "", %key, 'VoteHoardMode', 'disable hoard mode', 'Vote Disable HOARD Mode' );
|
||||
else
|
||||
messageClient( %client, 'MsgVoteItem', "", %key, 'VoteHoardMode', 'enable hoard mode', 'Vote Enable HOARD Mode' );
|
||||
}
|
||||
else
|
||||
messageClient( %client, 'MsgVoteItem', "", %key, 'VoteHoardMode', 'enable hoard mode', 'Vote Enable HOARD Mode' );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( %game.greedMode )
|
||||
messageClient( %client, 'MsgVoteItem', "", %key, 'VoteGreedMode', 'disable greed mode', 'Disable GREED Mode' );
|
||||
else
|
||||
messageClient( %client, 'MsgVoteItem', "", %key, 'VoteGreedMode', 'enable greed mode', 'Enable GREED Mode' );
|
||||
{
|
||||
if ( %game.greedMode )
|
||||
messageClient( %client, 'MsgVoteItem', "", %key, 'VoteGreedMode', 'disable greed mode', 'Disable GREED Mode' );
|
||||
else
|
||||
messageClient( %client, 'MsgVoteItem', "", %key, 'VoteGreedMode', 'enable greed mode', 'Enable GREED Mode' );
|
||||
|
||||
if ( %game.HoardMode )
|
||||
messageClient( %client, 'MsgVoteItem', "", %key, 'VoteHoardMode', 'disable hoard mode', 'Disable HOARD Mode' );
|
||||
else
|
||||
messageClient( %client, 'MsgVoteItem', "", %key, 'VoteHoardMode', 'enable hoard mode', 'Enable HOARD Mode' );
|
||||
if ( %game.HoardMode )
|
||||
messageClient( %client, 'MsgVoteItem', "", %key, 'VoteHoardMode', 'disable hoard mode', 'Disable HOARD Mode' );
|
||||
else
|
||||
messageClient( %client, 'MsgVoteItem', "", %key, 'VoteHoardMode', 'enable hoard mode', 'Enable HOARD Mode' );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1421,6 +1430,9 @@ function HuntersGame::dropFlag(%game, %player)
|
|||
|
||||
function HuntersGame::enterMissionArea(%game, %playerData, %player)
|
||||
{
|
||||
if(%player.getState() $= "Dead")
|
||||
return;
|
||||
|
||||
%client = %player.client;
|
||||
%client.outOfBounds = false;
|
||||
cancel(%client.oobSched);
|
||||
|
|
@ -1431,6 +1443,9 @@ function HuntersGame::enterMissionArea(%game, %playerData, %player)
|
|||
|
||||
function HuntersGame::leaveMissionArea(%game, %playerData, %player)
|
||||
{
|
||||
if(%player.getState() $= "Dead")
|
||||
return;
|
||||
|
||||
// strip flags and throw them back into the mission area
|
||||
%client = %player.client;
|
||||
%client.outOfBounds = true;
|
||||
|
|
@ -1671,14 +1686,14 @@ function HuntersGame::sendDebriefing( %game, %client )
|
|||
if ( %game.highestFlagReturnName !$= "" )
|
||||
messageClient( %client, 'MsgDebriefResult', "", '<spush><color:3cb4b4><font:univers condensed:18>%1 had the highest return count with %2 flags!<spop>', %game.highestFlagReturnName, %game.highestFlagReturnCount );
|
||||
|
||||
if ( $HuntersRecords::Count[$currentMission] !$= "" && $HuntersRecords::Name[$currentMission] !$= "" )
|
||||
messageClient( %client, 'MsgDebriefResult', "", '<spush><color:3cb4b4><font:univers condensed:18>%1 holds the record with a return count of %2 flags!<spop>', $HuntersRecords::Name[$currentMission], $HuntersRecords::Count[$currentMission] );
|
||||
if ( $Host::HuntersRecords::Count[$currentMission] !$= "" && $Host::HuntersRecords::Name[$currentMission] !$= "" )
|
||||
messageClient( %client, 'MsgDebriefResult', "", '<spush><color:3cb4b4><font:univers condensed:18>%1 holds the record with a return count of %2 flags!<spop>', $Host::HuntersRecords::Name[$currentMission], $Host::HuntersRecords::Count[$currentMission] );
|
||||
|
||||
if ( %game.greedFlagName !$= "" )
|
||||
messageClient( %client, 'MsgDebriefResult', "", '<spush><color:3cb4b4><font:univers condensed:18>%1 gets the honorary greed award for dropping %2 flags!<spop>', %game.greedFlagName, %game.greedFlagCount );
|
||||
|
||||
// Player scores:
|
||||
messageClient( %client, 'MsgDebriefAddLine', "", '<tab:150,210><spush><color:00dc00><font:univers condensed:18>PLAYER\tSCORE\tKILLS<spop>' );
|
||||
messageClient( %client, 'MsgDebriefAddLine', "", '<spush><color:00dc00><font:univers condensed:18>PLAYER<lmargin%%:60>SCORE<lmargin%%:80>KILLS<spop>' );
|
||||
%count = $TeamRank[0, count];
|
||||
for ( %i = 0; %i < %count; %i++ )
|
||||
{
|
||||
|
|
@ -1691,7 +1706,7 @@ function HuntersGame::sendDebriefing( %game, %client )
|
|||
%kills = 0;
|
||||
else
|
||||
%kills = %cl.kills;
|
||||
messageClient( %client, 'MsgDebriefAddLine', "", '<tab:5,155,215><clip:150>\t%1</clip>\t%2\t%3', %cl.name, %score, %kills );
|
||||
messageClient( %client, 'MsgDebriefAddLine', "", '<lmargin:0><clip%%:60> %1</clip><lmargin%%:60><clip%%:20> %2</clip><lmargin%%:80><clip%%:20> %3</clip>', %cl.name, %score, %kills );
|
||||
}
|
||||
|
||||
// Show observers:
|
||||
|
|
@ -1704,12 +1719,12 @@ function HuntersGame::sendDebriefing( %game, %client )
|
|||
{
|
||||
if ( !%header )
|
||||
{
|
||||
messageClient( %client, 'MsgDebriefAddLine', "", '\n<tab:150><spush><font:univers condensed:18><color:00dc00>OBSERVERS\tSCORE<spop>' );
|
||||
messageClient( %client, 'MsgDebriefAddLine', "", '\n<lmargin:0><spush><font:univers condensed:18><color:00dc00>OBSERVERS<lmargin%%:60>SCORE<spop>' );
|
||||
%header = true;
|
||||
}
|
||||
|
||||
%score = %cl.score $= "" ? 0 : %cl.score;
|
||||
messageClient( %client, 'MsgDebriefAddLine', "", '<tab:5,155><clip:150>\t%1</clip>\t%2', %cl.name, %score );
|
||||
messageClient( %client, 'MsgDebriefAddLine', "", '<lmargin:0><clip%%:60> %1</clip><lmargin%%:60><clip%%:40> %2</clip>', %cl.name, %score );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,6 +33,11 @@ function OnlineLogIn()
|
|||
queryMasterGameTypes();
|
||||
// Start the Email checking...
|
||||
EmailGui.checkSchedule = schedule( 5000, 0, CheckEmail, true );
|
||||
|
||||
// Load the player database...
|
||||
%guid = getField( WONGetAuthInfo(), 3 );
|
||||
if ( %guid > 0 )
|
||||
loadPlayerDatabase( "prefs/pyrdb" @ %guid );
|
||||
Canvas.setContent(LaunchGui);
|
||||
}
|
||||
|
||||
|
|
@ -62,7 +67,10 @@ function LaunchToolbarMenu::onSelect(%this, %id, %text)
|
|||
case 9: // Quit
|
||||
IRCClient::quit();
|
||||
LaunchTabView.closeAllTabs();
|
||||
quit();
|
||||
if (!isDemo())
|
||||
quit();
|
||||
else
|
||||
Canvas.setContent(DemoEndGui);
|
||||
//case 10: // Log Off
|
||||
// LaunchTabView.closeAllTabs();
|
||||
// PlayOffline();
|
||||
|
|
@ -88,10 +96,10 @@ function LaunchToolbarDlg::onWake(%this)
|
|||
LaunchToolbarMenu.add( 1, "TRAINING" );
|
||||
LaunchToolbarMenu.add( 0, "GAME" );
|
||||
LaunchToolbarMenu.add( 2, "NEWS" );
|
||||
//LaunchToolbarMenu.add( 3, "FORUMS" );
|
||||
//LaunchToolbarMenu.add( 4, "EMAIL" );
|
||||
//LaunchToolbarMenu.add( 5, "CHAT" );
|
||||
//LaunchToolbarMenu.add( 6, "BROWSER" );
|
||||
}
|
||||
else if ( isDemoServer() )
|
||||
{
|
||||
LaunchToolbarMenu.add( 0, "GAME" );
|
||||
}
|
||||
else if ( $PlayingOnline )
|
||||
{
|
||||
|
|
@ -156,6 +164,11 @@ function OpenLaunchTabs( %gotoWarriorSetup )
|
|||
LaunchTabView.addLaunchTab( "BROWSER", "", true );
|
||||
%launchGui = GameGui;
|
||||
}
|
||||
else if ( isDemoServer() )
|
||||
{
|
||||
LaunchTabView.addLaunchTab( "GAME", GameGui );
|
||||
%launchGui = GameGui;
|
||||
}
|
||||
else if ( $PlayingOnline )
|
||||
{
|
||||
LaunchTabView.addLaunchTab( "GAME", GameGui );
|
||||
|
|
@ -205,9 +218,12 @@ function LaunchTabView::onSelect( %this, %id, %text )
|
|||
// Ignore the ID - it can't be trusted.
|
||||
%tab = %this.getSelectedTab();
|
||||
|
||||
Canvas.setContent( %this.gui[%tab] );
|
||||
%this.gui[%tab].setKey( %this.key[%tab] );
|
||||
%this.lastTab = %tab;
|
||||
if ( isObject( %this.gui[%tab] ) )
|
||||
{
|
||||
Canvas.setContent( %this.gui[%tab] );
|
||||
%this.gui[%tab].setKey( %this.key[%tab] );
|
||||
%this.lastTab = %tab;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------
|
||||
|
|
@ -286,7 +302,8 @@ function LaunchTabView::closeAllTabs( %this )
|
|||
%tabCount = %this.tabCount();
|
||||
for ( %i = 0; %i < %tabCount; %i++ )
|
||||
{
|
||||
%this.gui[%i].onClose( %this.key[%i] );
|
||||
if ( isObject( %this.gui[%i] ) )
|
||||
%this.gui[%i].onClose( %this.key[%i] );
|
||||
%this.gui[%i] = "";
|
||||
%this.key[%i] = "";
|
||||
}
|
||||
|
|
@ -311,7 +328,7 @@ function LaunchGui::onWake(%this)
|
|||
if ( !$FirstLaunch )
|
||||
LaunchTabView.viewLastTab();
|
||||
|
||||
if ( !isDemo() )
|
||||
if ( !isDemo() && !isDemoServer() )
|
||||
checkNamesAndAliases();
|
||||
else
|
||||
OpenLaunchTabs();
|
||||
|
|
|
|||
|
|
@ -342,8 +342,6 @@ function togglePlayerMute(%client)
|
|||
function togglePlayerVoiceCom( %playerRep )
|
||||
{
|
||||
commandToServer( 'ListenTo', %playerRep.clientId, !%playerRep.voiceEnabled, true );
|
||||
//if ( !%playerRep.isSmurf )
|
||||
// update client pref
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -821,27 +821,27 @@ function SiegeGame::sendDebriefing( %game, %client )
|
|||
if ( $teamScore[1] > 0 )
|
||||
{
|
||||
%timeStr = %game.formatTime($teamScore[1], true);
|
||||
messageClient( %client, 'MsgDebriefAddLine', "", '<tab:5>\t%1 captured the base in %2.', $TeamName[1], %timeStr);
|
||||
messageClient( %client, 'MsgDebriefAddLine', "", ' %1 captured the base in %2.', $TeamName[1], %timeStr);
|
||||
}
|
||||
else
|
||||
messageClient( %client, 'MsgDebriefAddLine', "", '<tab:5>\t%1 failed to capture the base.', $TeamName[1]);
|
||||
messageClient( %client, 'MsgDebriefAddLine', "", ' %1 failed to capture the base.', $TeamName[1]);
|
||||
|
||||
if ( $teamScore[2] > 0 )
|
||||
{
|
||||
%timeStr = %game.formatTime($teamScore[2], true);
|
||||
messageClient( %client, 'MsgDebriefAddLine', "", '<tab:5>\t%1 captured the base in %2.', $TeamName[2], %timeStr);
|
||||
messageClient( %client, 'MsgDebriefAddLine', "", ' %1 captured the base in %2.', $TeamName[2], %timeStr);
|
||||
}
|
||||
else
|
||||
messageClient( %client, 'MsgDebriefAddLine', "", '<tab:5>\t%1 failed to capture the base.', $TeamName[2]);
|
||||
messageClient( %client, 'MsgDebriefAddLine', "", ' %1 failed to capture the base.', $TeamName[2]);
|
||||
|
||||
// List out the team rosters:
|
||||
messageClient( %client, 'MsgDebriefAddLine', "", '\n<tab:130><spush><color:00dc00><font:univers condensed:18>%1\t%2<spop>', $TeamName[1], $TeamName[2] );
|
||||
messageClient( %client, 'MsgDebriefAddLine', "", '\n<spush><color:00dc00><font:univers condensed:18>%1<lmargin%%:50>%2<spop>', $TeamName[1], $TeamName[2] );
|
||||
%max = $TeamRank[1, count] > $TeamRank[2, count] ? $TeamRank[1, count] : $TeamRank[2, count];
|
||||
for ( %line = 0; %line < %max; %line++ )
|
||||
{
|
||||
%plyr1 = $TeamRank[1, %line] $= "" ? "" : $TeamRank[1, %line].name;
|
||||
%plyr2 = $TeamRank[2, %line] $= "" ? "" : $TeamRank[2, %line].name;
|
||||
messageClient( %client, 'MsgDebriefAddLine', "", '<tab:5,135><clip:130>\t%1</clip>\t%2', %plyr1, %plyr2 );
|
||||
messageClient( %client, 'MsgDebriefAddLine', "", '<lmargin:0><clip%%:50> %1</clip><lmargin%%:50><clip%%:50> %2</clip>', %plyr1, %plyr2 );
|
||||
}
|
||||
|
||||
// Show observers:
|
||||
|
|
@ -854,11 +854,11 @@ function SiegeGame::sendDebriefing( %game, %client )
|
|||
{
|
||||
if ( !%header )
|
||||
{
|
||||
messageClient( %client, 'MsgDebriefAddLine', "", '\n<spush><color:00dc00><font:univers condensed:18>OBSERVERS<spop>' );
|
||||
messageClient( %client, 'MsgDebriefAddLine', "", '\n<lmargin:0><spush><color:00dc00><font:univers condensed:18>OBSERVERS<spop>' );
|
||||
%header = true;
|
||||
}
|
||||
|
||||
messageClient( %client, 'MsgDebriefAddLine', "", '<tab:5>\t%1', %cl.name );
|
||||
messageClient( %client, 'MsgDebriefAddLine', "", ' %1', %cl.name );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -552,6 +552,7 @@ function singlePlayerGame::gameOver(%game)
|
|||
|
||||
//disable the AI system
|
||||
AISystemEnabled(false);
|
||||
$AIDisableChatResponse = "";
|
||||
|
||||
game.deactivatePackages();
|
||||
|
||||
|
|
@ -566,6 +567,7 @@ function singlePlayerGame::gameOver(%game)
|
|||
|
||||
resetSinglePlayerGlobals();
|
||||
|
||||
$currentMissionType = "";
|
||||
DefaultGame::GameOver(%game);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -69,6 +69,21 @@ package Training1 {
|
|||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
//scriptlet
|
||||
//we have to jump through a lot of hoops to get those dead bodies in training1
|
||||
function deadArmor::onAdd(%this, %obj)
|
||||
{
|
||||
%skin = (%obj.trainingSkin == 1 ? 'swolf' : 'beagle');
|
||||
//echo("skin = " SPC %skin);
|
||||
createTarget(%obj, 'Dead Body', %skin, "", 'deadArmor', 0);
|
||||
}
|
||||
|
||||
function deadArmor::onRemove(%this, %obj)
|
||||
{
|
||||
//echo("singleplayerGame -- deadArmor::onRemove");
|
||||
freeTarget(%obj.getTarget());
|
||||
}
|
||||
|
||||
function MP3Audio::play(%this)
|
||||
{
|
||||
//too bad...no mp3 in training
|
||||
|
|
@ -524,6 +539,7 @@ function singlePlayerGame::playerSpawned(%game, %player)
|
|||
function singlePlayerGame::gameOver(%game)
|
||||
{
|
||||
//moveMap.bindCmd( keyboard, "backspace", "", game.returnBinding );
|
||||
$AIDisableChatResponse = "";
|
||||
cancel($Training1Blackout);
|
||||
cancel($Training1HitGround);
|
||||
LightMaleHumanArmor.minImpactSpeed = 45;
|
||||
|
|
@ -882,6 +898,7 @@ function beginTraining1Intro()
|
|||
//moveMap.bindCmd( keyboard, "backspace", "", "skipIntroCinematic();" );
|
||||
|
||||
//set the intro started bools
|
||||
$AIDisableChatResponse = true;
|
||||
game.playedIntro = true;
|
||||
game.trainingIntro = true;
|
||||
|
||||
|
|
@ -967,6 +984,7 @@ function trainingIntroFlightEnd()
|
|||
{
|
||||
//put the player back in his body, give him control back,
|
||||
//a little dramatic flash, start the rest of the mission
|
||||
$AIDisableChatResponse = "";
|
||||
game.trainingIntro = false;
|
||||
$player.player.invincible = false;
|
||||
serverConnection.setBlackout(false, 5000);
|
||||
|
|
|
|||
|
|
@ -158,7 +158,10 @@ function TrainingMissionList::onSelect( %this, %id, %text )
|
|||
else
|
||||
error( "Failed to open Single Player mission file " @ %fileName @ "!" );
|
||||
|
||||
%bmp = "gui/" @ %briefPic @ ".png";
|
||||
if (!isDemo() && !isDemoServer())
|
||||
%bmp = "gui/" @ %briefPic @ ".png";
|
||||
else
|
||||
%bmp = "gui/" @ %briefPic @ ".bm8";
|
||||
if ( isFile( "textures/" @ %bmp ) )
|
||||
{
|
||||
TrainingPic.setBitmap( %bmp );
|
||||
|
|
|
|||
|
|
@ -56,11 +56,9 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
|
|||
%actionMsg = $VoteMessage[ %typeName ];
|
||||
|
||||
if( !%client.canVote && !%isAdmin )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !%client.isAdmin || ( ( %arg1.isAdmin && ( %client != %arg1 ) ) ) )
|
||||
if ( !%isAdmin || ( ( %arg1.isAdmin && ( %client != %arg1 ) ) ) )
|
||||
{
|
||||
%teamSpecific = false;
|
||||
%gender = (%client.sex $= "Male" ? 'he' : 'she');
|
||||
|
|
@ -71,7 +69,7 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
|
|||
//send a message to everyone about the vote...
|
||||
if ( %playerVote )
|
||||
{
|
||||
%teamSpecific = ( %typeName $= "VoteKickPlayer" );
|
||||
%teamSpecific = ( %typeName $= "VoteKickPlayer" ) && ( Game.numTeams > 1 );
|
||||
%kickerIsObs = %client.team == 0;
|
||||
%kickeeIsObs = %arg1.team == 0;
|
||||
%sameTeam = %client.team == %arg1.team;
|
||||
|
|
@ -98,8 +96,10 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
|
|||
}
|
||||
|
||||
Game.kickClient = %arg1;
|
||||
Game.kickClientName = %arg1.name;
|
||||
Game.kickGuid = %arg1.guid;
|
||||
Game.kickTeam = %arg1.team;
|
||||
|
||||
if(%teamSpecific)
|
||||
{
|
||||
for ( %idx = 0; %idx < ClientGroup.getCount(); %idx++ )
|
||||
|
|
@ -261,7 +261,22 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
|
|||
if(%arg1 != %client)
|
||||
{
|
||||
if(!%arg1.isSuperAdmin)
|
||||
eval( "Game." @ %typeName @ "(true,\"" @ %arg1 @ "\",\"" @ %arg2 @ "\",\"" @ %arg3 @ "\",\"" @ %arg4 @ "\");" );
|
||||
{
|
||||
// Set up kick/ban values:
|
||||
if ( %typeName $= "VoteBanPlayer" || %typeName $= "VoteKickPlayer" )
|
||||
{
|
||||
Game.kickClient = %arg1;
|
||||
Game.kickClientName = %arg1.name;
|
||||
Game.kickGuid = %arg1.guid;
|
||||
Game.kickTeam = %arg1.team;
|
||||
}
|
||||
|
||||
//Tinman - PURE servers can't call "eval"
|
||||
if (!isPureServer())
|
||||
eval( "Game." @ %typeName @ "(true,\"" @ %arg1 @ "\",\"" @ %arg2 @ "\",\"" @ %arg3 @ "\",\"" @ %arg4 @ "\");" );
|
||||
else
|
||||
Game.evalVote(%typeName, true, %arg1, %arg2, %arg3, %arg4);
|
||||
}
|
||||
else
|
||||
messageClient(%client, '', '\c2You can not %1 %2, %3 is a Super Admin!', %actionMsg, %arg1.name, %gender);
|
||||
}
|
||||
|
|
@ -323,7 +338,11 @@ function calcVotes(%typeName, %arg1, %arg2, %arg3, %arg4)
|
|||
Game.totalVotesNone++;
|
||||
}
|
||||
}
|
||||
eval( "Game." @ %typeName @ "(false,\"" @ %arg1 @ "\",\"" @ %arg2 @ "\",\"" @ %arg3 @ "\",\"" @ %arg4 @ "\");" );
|
||||
//Tinman - PURE servers can't call "eval"
|
||||
if (!isPureServer())
|
||||
eval( "Game." @ %typeName @ "(false,\"" @ %arg1 @ "\",\"" @ %arg2 @ "\",\"" @ %arg3 @ "\",\"" @ %arg4 @ "\");" );
|
||||
else
|
||||
Game.evalVote(%typeName, false, %arg1, %arg2, %arg3, %arg4);
|
||||
Game.scheduleVote = "";
|
||||
Game.kickClient = "";
|
||||
clearVotes();
|
||||
|
|
|
|||
|
|
@ -405,6 +405,10 @@ function AIRespondToEvent(%client, %eventTag, %targetClient)
|
|||
//record the event time
|
||||
$EventTagTimeArray[%eventTag] = getSimTime();
|
||||
|
||||
//abort if AI chat has been disabled
|
||||
if ($AIDisableChatResponse)
|
||||
return;
|
||||
|
||||
%clientPos = %client.player.getWorldBoxCenter();
|
||||
switch$ (%eventTag)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,6 +6,17 @@ datablock CameraData(Observer)
|
|||
firstPersonOnly = true;
|
||||
};
|
||||
|
||||
datablock CameraData(CommanderCamera)
|
||||
{
|
||||
mode = "observerStatic";
|
||||
firstPersonOnly = true;
|
||||
};
|
||||
|
||||
function CommanderCamera::onTrigger( %data, %obj, %trigger, %state )
|
||||
{
|
||||
// no need to do anything here.
|
||||
}
|
||||
|
||||
function Observer::onTrigger(%data,%obj,%trigger,%state)
|
||||
{
|
||||
// state = 0 means that a trigger key was released
|
||||
|
|
@ -28,6 +39,9 @@ function Observer::onTrigger(%data,%obj,%trigger,%state)
|
|||
switch$ (%obj.mode)
|
||||
{
|
||||
case "justJoined":
|
||||
if ( isDemoServer() )
|
||||
clearCenterPrint( %client );
|
||||
|
||||
//press FIRE
|
||||
if (%trigger == 0)
|
||||
{
|
||||
|
|
@ -163,6 +177,8 @@ function Observer::onTrigger(%data,%obj,%trigger,%state)
|
|||
serverCmdObserveClient(%client, %client.observeFlyClient);
|
||||
else
|
||||
serverCmdObserveClient(%client, -1);
|
||||
|
||||
observerFollowUpdate( %client, %client.observeClient, false );
|
||||
displayObserverHud(%client, %client.observeClient);
|
||||
messageClient(%client.observeClient, 'Observer', '\c1%1 is now observing you.', %client.name);
|
||||
}
|
||||
|
|
@ -212,6 +228,10 @@ function Observer::onTrigger(%data,%obj,%trigger,%state)
|
|||
serverCmdObserveClient(%client, %client.observeFlyClient);
|
||||
else
|
||||
serverCmdObserveClient(%client, -1);
|
||||
|
||||
// update the observer list for this client
|
||||
observerFollowUpdate( %client, %client.observeClient, false );
|
||||
|
||||
displayObserverHud(%client, %client.observeClient);
|
||||
messageClient(%client.observeClient, 'Observer', '\c1%1 is now observing you.', %client.name);
|
||||
}
|
||||
|
|
@ -225,11 +245,28 @@ function Observer::onTrigger(%data,%obj,%trigger,%state)
|
|||
%prevObsClient = %client.observeClient;
|
||||
if (%nextClient > 0 && %nextClient != %client.observeClient)
|
||||
{
|
||||
// update the observer list for this client
|
||||
observerFollowUpdate( %client, %nextClient, true );
|
||||
|
||||
//set the new object
|
||||
%transform = %nextClient.player.getTransform();
|
||||
%obj.setOrbitMode(%nextClient.player, %transform, 0.5, 4.5, 4.5);
|
||||
%client.observeClient = %nextClient;
|
||||
|
||||
if( !%nextClient.isMounted() )
|
||||
{
|
||||
%obj.setOrbitMode(%nextClient.player, %transform, 0.5, 4.5, 4.5);
|
||||
%client.observeClient = %nextClient;
|
||||
}
|
||||
else
|
||||
{
|
||||
%mount = %nextClient.player.getObjectMount();
|
||||
if( %mount.getDataBlock().observeParameters $= "" )
|
||||
%params = %transform;
|
||||
else
|
||||
%params = %mount.getDataBlock().observeParameters;
|
||||
|
||||
%obj.setOrbitMode(%mount, %mount.getTransform(), getWord( %params, 0 ), getWord( %params, 1 ), getWord( %params, 2 ));
|
||||
%client.observeClient = %nextClient;
|
||||
}
|
||||
|
||||
//send the message(s)
|
||||
displayObserverHud(%client, %nextClient);
|
||||
messageClient(%nextClient, 'Observer', '\c1%1 is now observing you.', %client.name);
|
||||
|
|
@ -244,10 +281,27 @@ function Observer::onTrigger(%data,%obj,%trigger,%state)
|
|||
%prevObsClient = %client.observeClient;
|
||||
if (%prevClient > 0 && %prevClient != %client.observeClient)
|
||||
{
|
||||
// update the observer list for this client
|
||||
observerFollowUpdate( %client, %prevClient, true );
|
||||
|
||||
//set the new object
|
||||
%transform = %prevClient.player.getTransform();
|
||||
%obj.setOrbitMode(%prevClient.player, %transform, 0.5, 4.5, 4.5);
|
||||
%client.observeClient = %prevClient;
|
||||
if( !%prevClient.isMounted() )
|
||||
{
|
||||
%obj.setOrbitMode(%prevClient.player, %transform, 0.5, 4.5, 4.5);
|
||||
%client.observeClient = %prevClient;
|
||||
}
|
||||
else
|
||||
{
|
||||
%mount = %prevClient.player.getObjectMount();
|
||||
if( %mount.getDataBlock().observeParameters $= "" )
|
||||
%params = %transform;
|
||||
else
|
||||
%params = %mount.getDataBlock().observeParameters;
|
||||
|
||||
%obj.setOrbitMode(%mount, %mount.getTransform(), getWord( %params, 0 ), getWord( %params, 1 ), getWord( %params, 2 ));
|
||||
%client.observeClient = %prevClient;
|
||||
}
|
||||
|
||||
//send the message(s)
|
||||
displayObserverHud(%client, %prevClient);
|
||||
|
|
@ -259,6 +313,9 @@ function Observer::onTrigger(%data,%obj,%trigger,%state)
|
|||
//press JUMP
|
||||
else if (%trigger == 2)
|
||||
{
|
||||
// update the observer list for this client
|
||||
observerFollowUpdate( %client, -1, false );
|
||||
|
||||
//toggle back to observer fly mode
|
||||
%obj.mode = "observerFly";
|
||||
%obj.setFlyMode();
|
||||
|
|
@ -309,7 +366,7 @@ function Observer::setMode(%data, %obj, %mode, %targetObj)
|
|||
|
||||
case "pre-game":
|
||||
commandToClient(%client, 'setHudMode', 'Observer');
|
||||
%obj.setOrbitMode( %targetObj, %targetObj.getWorldBoxCenter() @ " 0.5 0.5 0.5 1", 0.5, 4.5, 4.5, true);
|
||||
%obj.setOrbitMode( %targetObj, %targetObj.getTransform(), 0.5, 4.5, 4.5);
|
||||
|
||||
case "observerFly":
|
||||
// Free-flying observer camera
|
||||
|
|
@ -328,7 +385,19 @@ function Observer::setMode(%data, %obj, %mode, %targetObj)
|
|||
case "observerFollow":
|
||||
// Observer attached to a moving object (assume player for now...)
|
||||
%transform = %targetObj.getTransform();
|
||||
%obj.setOrbitMode(%targetObj, %transform, 0.5, 4.5, 4.5);
|
||||
|
||||
if( !%targetObj.isMounted() )
|
||||
%obj.setOrbitMode(%targetObj, %transform, 0.5, 4.5, 4.5);
|
||||
else
|
||||
{
|
||||
%mount = %targetObj.getObjectMount();
|
||||
if( %mount.getDataBlock().observeParameters $= "" )
|
||||
%params = %transform;
|
||||
else
|
||||
%params = %mount.getDataBlock().observeParameters;
|
||||
|
||||
%obj.setOrbitMode(%mount, %mount.getTransform(), getWord( %params, 0 ), getWord( %params, 1 ), getWord( %params, 2 ));
|
||||
}
|
||||
|
||||
case "observerTimeout":
|
||||
commandToClient(%client, 'setHudMode', 'Observer');
|
||||
|
|
@ -518,6 +587,67 @@ function serverCmdObserveClient(%client, %target)
|
|||
%client.observeClient = %target;
|
||||
}
|
||||
|
||||
function observerFollowUpdate( %client, %nextClient, %cycle )
|
||||
{
|
||||
%Oclient = %client.observeClient;
|
||||
if( %Oclient $= "" )
|
||||
return;
|
||||
|
||||
// changed to observer fly...
|
||||
if( %nextClient == -1 )
|
||||
{
|
||||
// find us in their observer list and remove, then reshuffle the list...
|
||||
for( %i = 0; %i < %Oclient.observeCount; %i++ )
|
||||
{
|
||||
if( %Oclient.observers[%i] == %client )
|
||||
{
|
||||
%Oclient.observeCount--;
|
||||
%Oclient.observers[%i] = %Oclient.observers[%Oclient.observeCount];
|
||||
%Oclient.observers[%Oclient.observeCount] = "";
|
||||
break;
|
||||
}
|
||||
}
|
||||
return; // were done..
|
||||
}
|
||||
|
||||
// changed from observer fly to observer follow...
|
||||
if( !%cycle && %nextClient != -1 )
|
||||
{
|
||||
// if nobody is observing this guy, initialize their observer count...
|
||||
if( %nextClient.observeCount $= "" )
|
||||
%nextClient.observeCount = 0;
|
||||
|
||||
// add us to their list of observers...
|
||||
%nextClient.observers[%nextClient.observeCount] = %client;
|
||||
%nextClient.observeCount++;
|
||||
return; // were done.
|
||||
}
|
||||
|
||||
if( %nextClient != -1 )
|
||||
{
|
||||
// cycling to the next client...
|
||||
for( %i = 0; %i < %Oclient.observeCount; %i++ )
|
||||
{
|
||||
// first remove us from our prev client's list...
|
||||
if( %Oclient.observers[%i] == %client )
|
||||
{
|
||||
%Oclient.observeCount--;
|
||||
%Oclient.observers[%i] = %Oclient.observers[%Oclient.observeCount];
|
||||
%Oclient.observers[%Oclient.observeCount] = "";
|
||||
break; // screw you guys, i'm goin home!
|
||||
}
|
||||
}
|
||||
|
||||
// if nobody is observing this guy, initialize their observer count...
|
||||
if( %nextClient.observeCount $= "" )
|
||||
%nextClient.observeCount = 0;
|
||||
|
||||
// now add us to the new clients list...
|
||||
%nextClient.observeCount++;
|
||||
%nextClient.observers[%nextClient.observeCount - 1] = %client;
|
||||
}
|
||||
}
|
||||
|
||||
function updateObserverFlyHud(%client)
|
||||
{
|
||||
//just in case there are two threads going...
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ exec( "scripts/cannedChatItems.cs" );
|
|||
new SimSet( ChatMenuList ); // Store all of the chat menu maps here so that we can delete them later:
|
||||
function activateChatMenu( %filename )
|
||||
{
|
||||
if ( isFile( %filename ) )
|
||||
if ( isFile( %filename ) || isFile( %filename @ ".dso" ) )
|
||||
{
|
||||
// Clear the old chat menu:
|
||||
ChatMenuList.clear();
|
||||
|
|
@ -201,10 +201,8 @@ function serverCmdCannedChat( %client, %command, %fromAI )
|
|||
return;
|
||||
}
|
||||
|
||||
// Build the message string:
|
||||
%chatItem = $ChatTable[%cmdId];
|
||||
//%wavFile = "voice/" @ %client.voice @ "/" @ %chatItem.audioFile @ ".wav";
|
||||
|
||||
|
||||
//if there is text
|
||||
if (%chatItem.text !$= "" || !%chatItem.play3D)
|
||||
{
|
||||
|
|
@ -217,10 +215,10 @@ function serverCmdCannedChat( %client, %command, %fromAI )
|
|||
}
|
||||
|
||||
//if no text, see if the audio is to be played in 3D...
|
||||
else if (%chatItem.play3D)
|
||||
else if ( %chatItem.play3D && %client.player )
|
||||
playTargetAudio(%client.target, addTaggedString(%chatItem.audioFile), AudioClosest3d, true);
|
||||
|
||||
if( %chatItem.animation !$= "" )
|
||||
if ( %chatItem.animation !$= "" )
|
||||
serverCmdPlayAnim(%client, %chatItem.animation);
|
||||
|
||||
// Let the AI respond to the canned chat messages (from humans only)
|
||||
|
|
|
|||
|
|
@ -199,6 +199,24 @@ function toggleCursorControl()
|
|||
if ( $platform $= "linux" )
|
||||
GlobalActionMap.bindCmd(keyboard, "ctrl g", "", "toggleCursorControl();");
|
||||
|
||||
function toggleNetDisplayHud(%val)
|
||||
{
|
||||
if(%val)
|
||||
{
|
||||
if(NetGraphHudFrame.isVisible())
|
||||
{
|
||||
NetGraphHudFrame.setVisible(false);
|
||||
NetBarHudFrame.setVisible(true);
|
||||
}
|
||||
else if(NetBarHudFrame.isVisible())
|
||||
{
|
||||
NetBarHudFrame.setVisible(false);
|
||||
}
|
||||
else
|
||||
NetGraphHudFrame.setVisible(true);
|
||||
}
|
||||
}
|
||||
|
||||
function PlayGui::onWake(%this)
|
||||
{
|
||||
// Make sure the shell hum is off:
|
||||
|
|
@ -221,6 +239,9 @@ function PlayGui::onWake(%this)
|
|||
// hack city - these controls are floating around and need to be clamped
|
||||
schedule(0, 0, "refreshCenterTextCtrl");
|
||||
schedule(0, 0, "refreshBottomTextCtrl");
|
||||
|
||||
// update the network graph prefs
|
||||
NetGraphHud.getPrefs();
|
||||
}
|
||||
|
||||
function refreshBottomTextCtrl()
|
||||
|
|
@ -311,7 +332,9 @@ function onConnectionToServerTimedOut()
|
|||
function onConnectionToServerLost( %msg )
|
||||
{
|
||||
DisconnectedCleanup();
|
||||
MessageBoxOK( "DISCONNECT", "Your connection to the server was lost." NL %msg);
|
||||
if ( %msg $= "" )
|
||||
%msg = "Your connection to the server was lost.";
|
||||
MessageBoxOK( "DISCONNECTED", %msg );
|
||||
}
|
||||
|
||||
// Client voting functions:
|
||||
|
|
@ -347,11 +370,57 @@ function ClientCmdVoteSubmitted(%type)
|
|||
}
|
||||
// End client voting functions.
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Player pref functions:
|
||||
function getPlayerPrefs( %player )
|
||||
{
|
||||
%voiceMuted = false;
|
||||
if ( $PlayingOnline )
|
||||
{
|
||||
if ( !%player.isSmurf )
|
||||
{
|
||||
%record = queryPlayerDatabase( %player.guid );
|
||||
if ( %record !$= "" )
|
||||
{
|
||||
if ( firstWord( %record ) == 1 )
|
||||
{
|
||||
%player.chatMuted = true;
|
||||
commandToServer( 'TogglePlayerMute', %player.clientId );
|
||||
}
|
||||
|
||||
%voiceMuted = getWord( %record, 1 ) == 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
%voiceMuted = true; // For now, automatically mute smurfs
|
||||
}
|
||||
|
||||
commandToServer( 'ListenTo', %player.clientId, !%voiceMuted, false );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
function handlePlayerMuted( %msgType, %msgString, %name, %client, %mute )
|
||||
{
|
||||
if ( isObject( $PlayerList[%client] ) )
|
||||
{
|
||||
$PlayerList[%client].chatMuted = %mute;
|
||||
if ( $PlayingOnline && !$PlayerList[%client].isSmurf && $PlayerList[%client].guid > 0 )
|
||||
setPlayerTextMuted( $PlayerList[%client].guid, %mute );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
function clientCmdEndBomberSight()
|
||||
{
|
||||
PlayGui.remove($bombSightHud);
|
||||
}
|
||||
|
||||
function clientCmdRemoveReticle()
|
||||
{
|
||||
reticleHud.setBitmap("");
|
||||
reticleFrameHud.setVisible(false);
|
||||
}
|
||||
|
||||
function clientCmdSetBeaconNames(%target, %marker, %vehicle)
|
||||
{
|
||||
setBeaconNames(%target, %marker, %vehicle);
|
||||
|
|
@ -469,6 +538,103 @@ function clientCmdToggleDashHud(%val)
|
|||
dashboardHud.setVisible(%val);
|
||||
}
|
||||
|
||||
function addEnergyGauge( %vehType )
|
||||
{
|
||||
switch$ (%vehType)
|
||||
{
|
||||
case "Assault" or "Bomber":
|
||||
dashboardHud.nrgBar = new HudBitmapCtrl(vEnergyFrame) {
|
||||
profile = "GuiDashBoxProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "top";
|
||||
position = "160 80";
|
||||
extent = "118 19";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
bitmap = "gui/hud_veh_new_dashpiece_5";
|
||||
opacity = "0.8";
|
||||
|
||||
new HudEnergy(vEnergyBar) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "top";
|
||||
position = "0 0";
|
||||
extent = "118 19";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
fillColor = "0.353000 0.373000 0.933000 0.800000";
|
||||
frameColor = "0.000000 1.000000 0.000000 1.000000";
|
||||
autoCenter = "0";
|
||||
autoResize = "0";
|
||||
displayMounted = true;
|
||||
bitmap = "gui/hud_veh_new_dashpiece_5";
|
||||
verticalFill = false;
|
||||
subRegion = "4 5 98 5";
|
||||
pulseRate = "500";
|
||||
pulseThreshold = "0.3";
|
||||
//modColor = "1.000000 0.500000 0.000000 1.000000";
|
||||
};
|
||||
|
||||
new HudCapacitor(vCapBar) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "top";
|
||||
position = "0 8";
|
||||
extent = "118 8";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
fillColor = "1.000 0.729 0.301 0.800000";
|
||||
frameColor = "0.000000 1.000000 0.000000 1.000000";
|
||||
autoCenter = "0";
|
||||
autoResize = "0";
|
||||
displayMounted = true;
|
||||
bitmap = "gui/hud_veh_new_dashpiece_5";
|
||||
verticalFill = false;
|
||||
subRegion = "4 5 98 5";
|
||||
pulseRate = "500";
|
||||
pulseThreshold = "0.3";
|
||||
//modColor = "1.000000 0.500000 0.000000 1.000000";
|
||||
};
|
||||
};
|
||||
dashboardHud.add(dashboardHud.nrgBar);
|
||||
|
||||
default:
|
||||
dashboardHud.nrgBar = new HudBitmapCtrl(vEnergyFrame) {
|
||||
profile = "GuiDashBoxProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "top";
|
||||
position = "160 80";
|
||||
extent = "118 19";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
bitmap = "gui/hud_veh_new_dashpiece_5";
|
||||
opacity = "0.8";
|
||||
|
||||
new HudEnergy(vEnergyBar) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "top";
|
||||
position = "0 0";
|
||||
extent = "118 19";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
fillColor = "0.353000 0.373000 0.933000 0.800000";
|
||||
frameColor = "0.000000 1.000000 0.000000 1.000000";
|
||||
autoCenter = "0";
|
||||
autoResize = "0";
|
||||
displayMounted = true;
|
||||
bitmap = "gui/hud_veh_new_dashpiece_5";
|
||||
verticalFill = false;
|
||||
subRegion = "4 5 98 10";
|
||||
pulseRate = "500";
|
||||
pulseThreshold = "0.3";
|
||||
//modColor = "1.000000 0.500000 0.000000 1.000000";
|
||||
};
|
||||
};
|
||||
dashboardHud.add(dashboardHud.nrgBar);
|
||||
}
|
||||
}
|
||||
|
||||
function clientCmdShowVehicleGauges(%vehType, %node)
|
||||
{
|
||||
//if(!((%vehType $= "Bomber" || %vehType $= "Assault") && %node > 0))
|
||||
|
|
@ -483,7 +649,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
extent = "176 108";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
bitmap = "gui/hud_veh_new_dash.png";
|
||||
bitmap = "gui/hud_veh_new_dash";
|
||||
opacity = "0.8";
|
||||
};
|
||||
dashboardHud.add(dashboardHud.diagram);
|
||||
|
|
@ -501,39 +667,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
};
|
||||
dashboardHud.add(dashboardHud.vehDiagram);
|
||||
|
||||
dashboardHud.nrgBar = new HudBitmapCtrl(vEnergyFrame) {
|
||||
profile = "GuiDashBoxProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "top";
|
||||
position = "160 80";
|
||||
extent = "118 19";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
bitmap = "gui/hud_veh_new_dashpiece_5.png";
|
||||
opacity = "0.8";
|
||||
|
||||
new HudEnergy(vEnergyBar) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "top";
|
||||
position = "0 0";
|
||||
extent = "118 19";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
fillColor = "0.353000 0.373000 0.933000 0.800000";
|
||||
frameColor = "0.000000 1.000000 0.000000 1.000000";
|
||||
autoCenter = "0";
|
||||
autoResize = "0";
|
||||
displayMounted = true;
|
||||
bitmap = "gui/hud_veh_new_dashpiece_5.png";
|
||||
verticalFill = false;
|
||||
subRegion = "4 5 98 10";
|
||||
pulseRate = "500";
|
||||
pulseThreshold = "0.3";
|
||||
//modColor = "1.000000 0.500000 0.000000 1.000000";
|
||||
};
|
||||
};
|
||||
dashboardHud.add(dashboardHud.nrgBar);
|
||||
addEnergyGauge( %vehType );
|
||||
|
||||
dashboardHud.dmgBar = new HudBitmapCtrl(vDamageFrame) {
|
||||
profile = "GuiDashBoxProfile";
|
||||
|
|
@ -543,7 +677,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
extent = "118 19";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
bitmap = "gui/hud_veh_new_dashpiece_4.png";
|
||||
bitmap = "gui/hud_veh_new_dashpiece_4";
|
||||
opacity = "0.8";
|
||||
|
||||
new HudDamage(vDamageBar) {
|
||||
|
|
@ -556,7 +690,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
visible = "1";
|
||||
fillColor = "0.000000 1.0000 0.000000 0.800000";
|
||||
frameColor = "0.000000 1.000000 0.000000 0.000000";
|
||||
bitmap = "gui/hud_veh_new_dashpiece_4.png";
|
||||
bitmap = "gui/hud_veh_new_dashpiece_4";
|
||||
verticalFill = false;
|
||||
displayMounted = true;
|
||||
opacity = "0.8";
|
||||
|
|
@ -605,7 +739,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
|
||||
switch$ (%vehType) {
|
||||
case "Shrike" :
|
||||
vOverheadHud.setBitmap("gui/hud_veh_icon_shrike.png");
|
||||
vOverheadHud.setBitmap("gui/hud_veh_icon_shrike");
|
||||
// add altitude box for flying vehicles
|
||||
dashboardHud.altBox = new HudBitmapCtrl(vAltitudeBox) {
|
||||
profile = "GuiDashBoxProfile";
|
||||
|
|
@ -614,7 +748,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
position = "371 56";
|
||||
extent = "68 22";
|
||||
minExtent = "8 8";
|
||||
bitmap = "gui/hud_veh_new_dashpiece_1.png";
|
||||
bitmap = "gui/hud_veh_new_dashpiece_1";
|
||||
visible = "1";
|
||||
opacity = "0.8";
|
||||
|
||||
|
|
@ -658,7 +792,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
position = "0 0";
|
||||
extent = "82 40";
|
||||
minExtent = "8 8";
|
||||
bitmap = "gui/hud_veh_new_dashpiece_2.png";
|
||||
bitmap = "gui/hud_veh_new_dashpiece_2";
|
||||
visible = "1";
|
||||
opacity = "0.8";
|
||||
|
||||
|
|
@ -669,7 +803,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
position = "28 6";
|
||||
extent = "25 25";
|
||||
minExtent = "8 8";
|
||||
bitmap = "gui/hud_blaster.png";
|
||||
bitmap = "gui/hud_blaster";
|
||||
visible = "1";
|
||||
opacity = "0.8";
|
||||
};
|
||||
|
|
@ -677,7 +811,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
};
|
||||
dashboardHud.add(dashboardHud.weapon);
|
||||
// change to shrike reticle
|
||||
reticleHud.setBitmap("gui/hud_ret_shrike.png");
|
||||
reticleHud.setBitmap("gui/hud_ret_shrike");
|
||||
reticleFrameHud.setVisible(false);
|
||||
|
||||
case "Bomber" :
|
||||
|
|
@ -701,7 +835,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
extent = "80 44";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
bitmap = "gui/hud_veh_new_hilite_left.png";
|
||||
bitmap = "gui/hud_veh_new_hilite_left";
|
||||
opacity = "0.3";
|
||||
};
|
||||
new HudBitmapCtrl(vWeap2Hilite) {
|
||||
|
|
@ -712,7 +846,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
extent = "80 44";
|
||||
minExtent = "8 8";
|
||||
visible = "0";
|
||||
bitmap = "gui/hud_veh_new_hilite_right.png";
|
||||
bitmap = "gui/hud_veh_new_hilite_right";
|
||||
opacity = "0.3";
|
||||
};
|
||||
new HudBitmapCtrl(vWeap3Hilite) {
|
||||
|
|
@ -723,7 +857,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
extent = "40 44";
|
||||
minExtent = "8 8";
|
||||
visible = "0";
|
||||
bitmap = "gui/hud_veh_new_hilite_middle.png";
|
||||
bitmap = "gui/hud_veh_new_hilite_middle";
|
||||
opacity = "0.3";
|
||||
};
|
||||
|
||||
|
|
@ -735,7 +869,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
extent = "200 40";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
bitmap = "gui/hud_veh_new_bombardier_dash.png";
|
||||
bitmap = "gui/hud_veh_new_bombardier_dash";
|
||||
opacity = "1.0";
|
||||
|
||||
new HudBitmapCtrl(vWeaponOne) {
|
||||
|
|
@ -746,7 +880,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
extent = "25 25";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
bitmap = "gui/hud_blaster.png";
|
||||
bitmap = "gui/hud_blaster";
|
||||
};
|
||||
|
||||
new HudBitmapCtrl(vWeaponTwo) {
|
||||
|
|
@ -757,7 +891,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
extent = "25 25";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
bitmap = "gui/hud_targetlaser.png";
|
||||
bitmap = "gui/hud_targetlaser";
|
||||
};
|
||||
|
||||
new HudBitmapCtrl(vWeaponThree) {
|
||||
|
|
@ -768,7 +902,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
extent = "25 25";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
bitmap = "gui/hud_veh_bomb.png";
|
||||
bitmap = "gui/hud_veh_bomb";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -783,7 +917,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
flipVertical = true;
|
||||
bitmap = "gui/hud_veh_new_dashpiece_5.png";
|
||||
bitmap = "gui/hud_veh_new_dashpiece_5";
|
||||
opacity = "0.8";
|
||||
|
||||
new HudEnergy(vEnergyBar) {
|
||||
|
|
@ -799,9 +933,29 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
autoCenter = "0";
|
||||
autoResize = "0";
|
||||
displayMounted = true;
|
||||
bitmap = "gui/hud_veh_new_dashpiece_5.png";
|
||||
bitmap = "gui/hud_veh_new_dashpiece_5";
|
||||
verticalFill = false;
|
||||
subRegion = "4 5 98 10";
|
||||
subRegion = "4 5 98 5";
|
||||
pulseRate = "500";
|
||||
pulseThreshold = "0.3";
|
||||
//modColor = "1.000000 0.500000 0.000000 1.000000";
|
||||
};
|
||||
new HudCapacitor(vCapBar) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "top";
|
||||
position = "0 8";
|
||||
extent = "118 8";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
fillColor = "1.000 0.729 0.301 0.800000";
|
||||
frameColor = "0.000000 1.000000 0.000000 1.000000";
|
||||
autoCenter = "0";
|
||||
autoResize = "0";
|
||||
displayMounted = true;
|
||||
bitmap = "gui/hud_veh_new_dashpiece_5";
|
||||
verticalFill = false;
|
||||
subRegion = "4 5 98 5";
|
||||
pulseRate = "500";
|
||||
pulseThreshold = "0.3";
|
||||
//modColor = "1.000000 0.500000 0.000000 1.000000";
|
||||
|
|
@ -818,7 +972,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
flipVertical = true;
|
||||
bitmap = "gui/hud_veh_new_dashpiece_4.png";
|
||||
bitmap = "gui/hud_veh_new_dashpiece_4";
|
||||
opacity = "0.8";
|
||||
|
||||
new HudDamage(vDamageBar) {
|
||||
|
|
@ -831,7 +985,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
visible = "1";
|
||||
fillColor = "0.000000 1.0000 0.000000 0.800000";
|
||||
frameColor = "0.000000 1.000000 0.000000 0.000000";
|
||||
bitmap = "gui/hud_veh_new_dashpiece_4.png";
|
||||
bitmap = "gui/hud_veh_new_dashpiece_4";
|
||||
verticalFill = false;
|
||||
displayMounted = true;
|
||||
opacity = "0.8";
|
||||
|
|
@ -843,13 +997,13 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
};
|
||||
dashboardHud.add(dashboardHud.dmgBar);
|
||||
$numVWeapons = 3;
|
||||
reticleHud.setBitmap("gui/hud_ret_shrike.png");
|
||||
reticleHud.setBitmap("gui/hud_ret_shrike");
|
||||
reticleFrameHud.setVisible(false);
|
||||
}
|
||||
else if(%node == 0)
|
||||
{
|
||||
// pilot dashboard hud
|
||||
vOverheadHud.setBitmap("gui/hud_veh_icon_bomber.png");
|
||||
vOverheadHud.setBitmap("gui/hud_veh_icon_bomber");
|
||||
// add altitude box for flying vehicles
|
||||
dashboardHud.altBox = new HudBitmapCtrl(vAltitudeBox) {
|
||||
profile = "GuiDashBoxProfile";
|
||||
|
|
@ -858,7 +1012,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
position = "371 56";
|
||||
extent = "68 22";
|
||||
minExtent = "8 8";
|
||||
bitmap = "gui/hud_veh_new_dashpiece_1.png";
|
||||
bitmap = "gui/hud_veh_new_dashpiece_1";
|
||||
visible = "1";
|
||||
opacity = "0.8";
|
||||
|
||||
|
|
@ -897,7 +1051,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
extent = "128 128";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
bitmap = "gui/hud_veh_icon_bomber.png";
|
||||
bitmap = "gui/hud_veh_icon_bomber";
|
||||
opacity = "1.0";
|
||||
};
|
||||
dashboardHud.add(dashboardHud.vehDiagram);
|
||||
|
|
@ -910,7 +1064,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
extent = "118 19";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
bitmap = "gui/hud_veh_new_dashpiece_5.png";
|
||||
bitmap = "gui/hud_veh_new_dashpiece_5";
|
||||
flipVertical = true;
|
||||
opacity = "0.8";
|
||||
|
||||
|
|
@ -927,7 +1081,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
autoCenter = "0";
|
||||
autoResize = "0";
|
||||
displayMounted = true;
|
||||
bitmap = "gui/hud_veh_new_dashpiece_5.png";
|
||||
bitmap = "gui/hud_veh_new_dashpiece_5";
|
||||
verticalFill = false;
|
||||
subRegion = "4 5 98 10";
|
||||
pulseRate = "500";
|
||||
|
|
@ -944,7 +1098,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
extent = "118 19";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
bitmap = "gui/hud_veh_new_dashpiece_4.png";
|
||||
bitmap = "gui/hud_veh_new_dashpiece_4";
|
||||
flipVertical = true;
|
||||
opacity = "0.8";
|
||||
|
||||
|
|
@ -958,7 +1112,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
visible = "1";
|
||||
fillColor = "0.000000 1.0000 0.000000 0.800000";
|
||||
frameColor = "0.000000 1.000000 0.000000 0.000000";
|
||||
bitmap = "gui/hud_veh_new_dashpiece_4.png";
|
||||
bitmap = "gui/hud_veh_new_dashpiece_4";
|
||||
verticalFill = false;
|
||||
displayMounted = true;
|
||||
opacity = "0.8";
|
||||
|
|
@ -989,7 +1143,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
extent = "10 10";
|
||||
minExtent = "3 3";
|
||||
visible = "0";
|
||||
bitmap = "gui/hud_veh_seatdot.png";
|
||||
bitmap = "gui/hud_veh_seatdot";
|
||||
};
|
||||
new GuiBitmapCtrl(vPassenger1Slot) {
|
||||
profile = "GuiDashBoxProfile";
|
||||
|
|
@ -999,7 +1153,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
extent = "10 10";
|
||||
minExtent = "3 3";
|
||||
visible = "0";
|
||||
bitmap = "gui/hud_veh_seatdot.png";
|
||||
bitmap = "gui/hud_veh_seatdot";
|
||||
};
|
||||
new GuiBitmapCtrl(vPassenger2Slot) {
|
||||
profile = "GuiDashBoxProfile";
|
||||
|
|
@ -1009,7 +1163,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
extent = "10 10";
|
||||
minExtent = "3 3";
|
||||
visible = "0";
|
||||
bitmap = "gui/hud_veh_seatdot.png";
|
||||
bitmap = "gui/hud_veh_seatdot";
|
||||
};
|
||||
};
|
||||
vOverheadHud.add(vOverheadHud.passengerHud);
|
||||
|
|
@ -1017,7 +1171,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
case "HAPC" :
|
||||
if(%node == 0)
|
||||
{
|
||||
vOverheadHud.setBitmap("gui/hud_veh_icon_hapc.png");
|
||||
vOverheadHud.setBitmap("gui/hud_veh_icon_hapc");
|
||||
// add altitude box for flying vehicles
|
||||
dashboardHud.altBox = new HudBitmapCtrl(vAltitudeBox) {
|
||||
profile = "GuiDashBoxProfile";
|
||||
|
|
@ -1026,7 +1180,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
position = "371 56";
|
||||
extent = "68 22";
|
||||
minExtent = "8 8";
|
||||
bitmap = "gui/hud_veh_new_dashpiece_1.png";
|
||||
bitmap = "gui/hud_veh_new_dashpiece_1";
|
||||
visible = "1";
|
||||
opacity = "0.8";
|
||||
|
||||
|
|
@ -1067,7 +1221,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
extent = "128 128";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
bitmap = "gui/hud_veh_icon_hapc.png";
|
||||
bitmap = "gui/hud_veh_icon_hapc";
|
||||
opacity = "1.0";
|
||||
};
|
||||
dashboardHud.add(dashboardHud.vehDiagram);
|
||||
|
|
@ -1080,7 +1234,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
extent = "118 19";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
bitmap = "gui/hud_veh_new_dashpiece_5.png";
|
||||
bitmap = "gui/hud_veh_new_dashpiece_5";
|
||||
flipVertical = true;
|
||||
opacity = "0.8";
|
||||
|
||||
|
|
@ -1097,7 +1251,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
autoCenter = "0";
|
||||
autoResize = "0";
|
||||
displayMounted = true;
|
||||
bitmap = "gui/hud_veh_new_dashpiece_5.png";
|
||||
bitmap = "gui/hud_veh_new_dashpiece_5";
|
||||
verticalFill = false;
|
||||
subRegion = "4 5 98 10";
|
||||
pulseRate = "500";
|
||||
|
|
@ -1114,7 +1268,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
extent = "118 19";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
bitmap = "gui/hud_veh_new_dashpiece_4.png";
|
||||
bitmap = "gui/hud_veh_new_dashpiece_4";
|
||||
flipVertical = true;
|
||||
opacity = "0.8";
|
||||
|
||||
|
|
@ -1128,7 +1282,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
visible = "1";
|
||||
fillColor = "0.000000 1.0000 0.000000 0.800000";
|
||||
frameColor = "0.000000 1.000000 0.000000 0.000000";
|
||||
bitmap = "gui/hud_veh_new_dashpiece_4.png";
|
||||
bitmap = "gui/hud_veh_new_dashpiece_4";
|
||||
verticalFill = false;
|
||||
displayMounted = true;
|
||||
opacity = "0.8";
|
||||
|
|
@ -1162,7 +1316,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
visible = "0";
|
||||
setFirstResponder = "0";
|
||||
modal = "1";
|
||||
bitmap = "gui/hud_veh_seatdot.png";
|
||||
bitmap = "gui/hud_veh_seatdot";
|
||||
wrap = "0";
|
||||
};
|
||||
new GuiBitmapCtrl(vPassenger1Slot) {
|
||||
|
|
@ -1175,7 +1329,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
visible = "0";
|
||||
setFirstResponder = "0";
|
||||
modal = "1";
|
||||
bitmap = "gui/hud_veh_seatdot.png";
|
||||
bitmap = "gui/hud_veh_seatdot";
|
||||
wrap = "0";
|
||||
};
|
||||
new GuiBitmapCtrl(vPassenger2Slot) {
|
||||
|
|
@ -1188,7 +1342,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
visible = "0";
|
||||
setFirstResponder = "0";
|
||||
modal = "1";
|
||||
bitmap = "gui/hud_veh_seatdot.png";
|
||||
bitmap = "gui/hud_veh_seatdot";
|
||||
wrap = "0";
|
||||
};
|
||||
new GuiBitmapCtrl(vPassenger3Slot) {
|
||||
|
|
@ -1201,7 +1355,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
visible = "0";
|
||||
setFirstResponder = "0";
|
||||
modal = "1";
|
||||
bitmap = "gui/hud_veh_seatdot.png";
|
||||
bitmap = "gui/hud_veh_seatdot";
|
||||
wrap = "0";
|
||||
};
|
||||
new GuiBitmapCtrl(vPassenger4Slot) {
|
||||
|
|
@ -1214,7 +1368,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
visible = "0";
|
||||
setFirstResponder = "0";
|
||||
modal = "1";
|
||||
bitmap = "gui/hud_veh_seatdot.png";
|
||||
bitmap = "gui/hud_veh_seatdot";
|
||||
wrap = "0";
|
||||
};
|
||||
new GuiBitmapCtrl(vPassenger5Slot) {
|
||||
|
|
@ -1227,7 +1381,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
visible = "0";
|
||||
setFirstResponder = "0";
|
||||
modal = "1";
|
||||
bitmap = "gui/hud_veh_seatdot.png";
|
||||
bitmap = "gui/hud_veh_seatdot";
|
||||
wrap = "0";
|
||||
};
|
||||
};
|
||||
|
|
@ -1254,7 +1408,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
extent = "80 44";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
bitmap = "gui/hud_veh_new_hilite_left.png";
|
||||
bitmap = "gui/hud_veh_new_hilite_left";
|
||||
opacity = "0.4";
|
||||
};
|
||||
new HudBitmapCtrl(vWeap2Hilite) {
|
||||
|
|
@ -1265,7 +1419,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
extent = "80 44";
|
||||
minExtent = "8 8";
|
||||
visible = "0";
|
||||
bitmap = "gui/hud_veh_new_hilite_right.png";
|
||||
bitmap = "gui/hud_veh_new_hilite_right";
|
||||
opacity = "0.4";
|
||||
};
|
||||
|
||||
|
|
@ -1277,7 +1431,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
extent = "152 36";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
bitmap = "gui/hud_veh_new_tankgunner_dash.png";
|
||||
bitmap = "gui/hud_veh_new_tankgunner_dash";
|
||||
opacity = "0.8";
|
||||
|
||||
new HudBitmapCtrl(vWeaponOne) {
|
||||
|
|
@ -1288,7 +1442,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
extent = "25 25";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
bitmap = "gui/hud_chaingun.png";
|
||||
bitmap = "gui/hud_chaingun";
|
||||
};
|
||||
|
||||
new HudBitmapCtrl(vWeaponTwo) {
|
||||
|
|
@ -1299,7 +1453,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
extent = "25 25";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
bitmap = "gui/hud_mortor.png";
|
||||
bitmap = "gui/hud_mortor";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -1314,7 +1468,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
flipVertical = true;
|
||||
bitmap = "gui/hud_veh_new_dashpiece_5.png";
|
||||
bitmap = "gui/hud_veh_new_dashpiece_5";
|
||||
opacity = "0.8";
|
||||
|
||||
new HudEnergy(vEnergyBar) {
|
||||
|
|
@ -1330,9 +1484,29 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
autoCenter = "0";
|
||||
autoResize = "0";
|
||||
displayMounted = true;
|
||||
bitmap = "gui/hud_veh_new_dashpiece_5.png";
|
||||
bitmap = "gui/hud_veh_new_dashpiece_5";
|
||||
verticalFill = false;
|
||||
subRegion = "4 5 98 10";
|
||||
subRegion = "4 5 98 5";
|
||||
pulseRate = "500";
|
||||
pulseThreshold = "0.3";
|
||||
//modColor = "1.000000 0.500000 0.000000 1.000000";
|
||||
};
|
||||
new HudCapacitor(vCapBar) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "top";
|
||||
position = "0 8";
|
||||
extent = "118 8";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
fillColor = "1.000 0.729 0.301 0.800000";
|
||||
frameColor = "0.000000 1.000000 0.000000 1.000000";
|
||||
autoCenter = "0";
|
||||
autoResize = "0";
|
||||
displayMounted = true;
|
||||
bitmap = "gui/hud_veh_new_dashpiece_5";
|
||||
verticalFill = false;
|
||||
subRegion = "4 5 98 5";
|
||||
pulseRate = "500";
|
||||
pulseThreshold = "0.3";
|
||||
//modColor = "1.000000 0.500000 0.000000 1.000000";
|
||||
|
|
@ -1349,7 +1523,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
flipVertical = true;
|
||||
bitmap = "gui/hud_veh_new_dashpiece_4.png";
|
||||
bitmap = "gui/hud_veh_new_dashpiece_4";
|
||||
opacity = "0.8";
|
||||
|
||||
new HudDamage(vDamageBar) {
|
||||
|
|
@ -1362,7 +1536,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
visible = "1";
|
||||
fillColor = "0.000000 1.0000 0.000000 0.800000";
|
||||
frameColor = "0.000000 1.000000 0.000000 0.000000";
|
||||
bitmap = "gui/hud_veh_new_dashpiece_4.png";
|
||||
bitmap = "gui/hud_veh_new_dashpiece_4";
|
||||
verticalFill = false;
|
||||
displayMounted = true;
|
||||
opacity = "0.8";
|
||||
|
|
@ -1376,13 +1550,13 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
|
||||
$numVWeapons = 2;
|
||||
// add tank chaingun reticle
|
||||
reticleHud.setBitmap("gui/hud_ret_tankchaingun.png");
|
||||
reticleHud.setBitmap("gui/hud_ret_tankchaingun");
|
||||
reticleFrameHud.setVisible(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
// node 0 == driver
|
||||
vOverheadHud.setBitmap("gui/hud_veh_icon_assault.png");
|
||||
vOverheadHud.setBitmap("gui/hud_veh_icon_assault");
|
||||
// passenger slot "dots"
|
||||
vOverheadHud.passengerHud = new GuiControl(vPassengerHud) {
|
||||
profile = "GuiDashBoxProfile";
|
||||
|
|
@ -1401,7 +1575,7 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
extent = "10 10";
|
||||
minExtent = "3 3";
|
||||
visible = "0";
|
||||
bitmap = "gui/hud_veh_seatdot.png";
|
||||
bitmap = "gui/hud_veh_seatdot";
|
||||
};
|
||||
new GuiBitmapCtrl(vPassenger1Slot) {
|
||||
profile = "GuiDashBoxProfile";
|
||||
|
|
@ -1411,17 +1585,17 @@ function clientCmdShowVehicleGauges(%vehType, %node)
|
|||
extent = "10 10";
|
||||
minExtent = "3 3";
|
||||
visible = "0";
|
||||
bitmap = "gui/hud_veh_seatdot.png";
|
||||
bitmap = "gui/hud_veh_seatdot";
|
||||
};
|
||||
};
|
||||
vOverheadHud.add(vOverheadHud.passengerHud);
|
||||
}
|
||||
|
||||
case "Hoverbike" :
|
||||
vOverheadHud.setBitmap("gui/hud_veh_icon_hoverbike.png");
|
||||
vOverheadHud.setBitmap("gui/hud_veh_icon_hoverbike");
|
||||
|
||||
case "MPB" :
|
||||
vOverheadHud.setBitmap("gui/hud_veh_icon_mpb.png");
|
||||
vOverheadHud.setBitmap("gui/hud_veh_icon_mpb");
|
||||
|
||||
}
|
||||
if(%node == 0)
|
||||
|
|
@ -1519,6 +1693,7 @@ addMessageCallback( 'msgDeploySensorGrn', clientDeploySensorGrn );
|
|||
addMessageCallback( 'msgDeploySensorOff', clientDeploySensorOff );
|
||||
addMessageCallback( 'msgPackIconOff', clientPackIconOff );
|
||||
addMessageCallback( 'MsgForceObserver', HandleForceObserver );
|
||||
addMessageCallback( 'MsgPlayerMuted', handlePlayerMuted );
|
||||
|
||||
function HandleForceObserver( %msgType, %msgString )
|
||||
{
|
||||
|
|
@ -1528,13 +1703,11 @@ function HandleForceObserver( %msgType, %msgString )
|
|||
function handleIveBeenBanned(%msgType, %msgString)
|
||||
{
|
||||
DisconnectedCleanup();
|
||||
MessageBoxOk( "DISCONNECT", "You have been banned from this server.", "Disconnect();");
|
||||
}
|
||||
|
||||
function handleIveBeenKicked(%msgType, %msgString)
|
||||
{
|
||||
DisconnectedCleanup();
|
||||
MessageBoxOk( "DISCONNECT", "You have been kicked out of the game.", "Disconnect();");
|
||||
}
|
||||
|
||||
function clientDeploySensorRed()
|
||||
|
|
@ -1776,34 +1949,6 @@ function ClientReceivedDataBlock(%index, %total)
|
|||
Canvas.repaint();
|
||||
}
|
||||
|
||||
function GameConnection::setLagIcon(%conn, %state)
|
||||
{
|
||||
if(%conn.getAddress() $= "Local")
|
||||
return;
|
||||
|
||||
if (%state $= "true")
|
||||
$showLagIcon = true;
|
||||
else
|
||||
$showLagIcon = false;
|
||||
|
||||
//if both icons are not visible, then don't do anything... (probably the F2 score or inv screen is up...)
|
||||
if (!clockHud.isVisible() && !lagHudIndicator.isVisible())
|
||||
return;
|
||||
|
||||
if (%state $= "true")
|
||||
{
|
||||
clockHud.setVisible(false);
|
||||
lagHudIndicator.setVisible(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
clockHud.setVisible(true);
|
||||
lagHudIndicator.setVisible(false);
|
||||
}
|
||||
|
||||
sensorHud.update();
|
||||
}
|
||||
|
||||
function GameConnection::onTargetLocked( %con, %state )
|
||||
{
|
||||
if( %state $= "true" )
|
||||
|
|
|
|||
|
|
@ -93,14 +93,16 @@ function initAudio()
|
|||
// cap the codec levels
|
||||
if( $platform $= "linux" )
|
||||
{
|
||||
$pref::Audio::encodingLevel = -1;
|
||||
$pref::Audio::decodingMask = 0;
|
||||
if( $pref::Audio::encodingLevel != 3)
|
||||
$pref::Audio::encodingLevel = 3;
|
||||
$pref::Audio::decodingMask &= 8;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( $pref::Audio::encodingLevel > 2)
|
||||
$pref::Audio::encodingLevel = 2;
|
||||
$pref::Audio::decodingMask &= 7;
|
||||
}
|
||||
|
||||
if( $pref::Audio::encodingLevel > 2)
|
||||
$pref::Audio::encodingLevel = 2;
|
||||
|
||||
$pref::Audio::decodingMask &= 7;
|
||||
}
|
||||
|
||||
if($Audio::initialized)
|
||||
|
|
@ -429,3 +431,4 @@ new AudioProfile(ObjectiveCompleted)
|
|||
description = "AudioGui";
|
||||
preload = true;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ $pref::Audio::channels = 2;
|
|||
$pref::Audio::enableVoiceCapture = 1;
|
||||
$pref::Audio::voiceChannels = 1;
|
||||
if ( $platform $= "linux" ) {
|
||||
$pref::Audio::encodingLevel = -1;
|
||||
$pref::Audio::decodingMask = 0;
|
||||
$pref::Audio::encodingLevel = 3;
|
||||
$pref::Audio::decodingMask = 8;
|
||||
} else {
|
||||
$pref::Audio::encodingLevel = 0;
|
||||
$pref::Audio::decodingMask = 1;
|
||||
|
|
@ -102,6 +102,7 @@ $pref::Lobby::Column4 = 50;
|
|||
$pref::Lobby::Column5 = 50;
|
||||
$pref::Lobby::SortColumnKey = 3;
|
||||
$pref::Lobby::SortInc = 0;
|
||||
$pref::Net::graphFields = 43;
|
||||
$pref::Net::simPacketLoss = 0;
|
||||
$pref::Net::simPing = 0;
|
||||
$pref::Net::DisplayOnMaster = "Always";
|
||||
|
|
@ -109,6 +110,10 @@ $pref::Net::RegionMask = 2;
|
|||
$pref::Net::CheckEmail = 0;
|
||||
$pref::Net::DisconnectChat = 0;
|
||||
$pref::Net::LagThreshold = 400;
|
||||
$pref::Net::Preset = 1;
|
||||
$pref::Net::PacketRateToClient = 16;
|
||||
$pref::Net::PacketSize = 240;
|
||||
$pref::Net::PacketRateToServer = 20;
|
||||
$pref::News::PostWindowPos = "85 39";
|
||||
$pref::News::PostWindowExtent = "470 396";
|
||||
$pref::Player::Count = 0;
|
||||
|
|
@ -139,6 +144,7 @@ $pref::ServerBrowser::SortInc = 1;
|
|||
$pref::ServerBrowser::InfoWindowOpen = 0;
|
||||
$pref::ServerBrowser::InfoWindowPos = "145 105";
|
||||
$pref::ServerBrowser::InfoWindowExtent = "350 270";
|
||||
$pref::ServerBrowser::IgnoreCase = "1";
|
||||
$pref::Shell::lastBackground = 0;
|
||||
$pref::Terrain::DynamicLights = 1;
|
||||
$pref::toggleVehicleView = 0;
|
||||
|
|
@ -151,6 +157,8 @@ $pref::Topics::SortInc = 0;
|
|||
$pref::Video::displayDevice = "OpenGL";
|
||||
$pref::chatHudLength = 1;
|
||||
$pref::useImmersion = 1;
|
||||
if ( isDemo() )
|
||||
$pref::Video::fullScreen = 1;
|
||||
$pref::Video::allowOpenGL = 1;
|
||||
$pref::Video::allowD3D = 1;
|
||||
$pref::Video::preferOpenGL = 1;
|
||||
|
|
|
|||
|
|
@ -54,6 +54,10 @@ function escapeFromGame()
|
|||
|
||||
function toggleEditor(%make)
|
||||
{
|
||||
//editor should not be available in the demo version
|
||||
if (isDemo())
|
||||
return;
|
||||
|
||||
if(%make)
|
||||
{
|
||||
if(Canvas.getContent() == Editor.getId())
|
||||
|
|
@ -997,6 +1001,9 @@ moveMap.bind( keyboard, "backspace", fnDeclineTask );
|
|||
moveMap.bind( keyboard, "shift c", fnTaskCompleted );
|
||||
moveMap.bind( keyboard, "shift x", fnResetTaskList );
|
||||
|
||||
// misc:
|
||||
moveMap.bind( keyboard, "ctrl n", toggleNetDisplayHud );
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// VOTING FUNCTIONS:
|
||||
function voteYes( %val )
|
||||
|
|
@ -1026,6 +1033,7 @@ observerMap.bind( keyboard, space, jump );
|
|||
observerMap.bind( mouse, button0, mouseFire );
|
||||
observerMap.bind( mouse, button1, mouseJet );
|
||||
|
||||
|
||||
///////////////////////
|
||||
// Vehicle Keys
|
||||
///////////////////////
|
||||
|
|
@ -1126,6 +1134,7 @@ function clientCmdSetDefaultVehicleKeys(%inVehicle)
|
|||
passengerKeys.bindCmd( keyboard, escape, "", "escapeFromGame();" );
|
||||
passengerKeys.copyBind( moveMap, toggleHelpGui );
|
||||
passengerKeys.copyBind( moveMap, toggleScoreScreen );
|
||||
passengerKeys.copyBind( moveMap, toggleNetDisplayHud );
|
||||
|
||||
// Bind the weapon keys as well:
|
||||
passengerKeys.copyBind( moveMap, nextWeapon );
|
||||
|
|
|
|||
|
|
@ -33,22 +33,38 @@ function CreditsGui::onWake(%this)
|
|||
CreditsActionMap.bindCmd(keyboard, escape, "cancelCredits();", "");
|
||||
CreditsActionMap.bindCmd(mouse, button0, "$CreditsPaused = true;", "$CreditsPaused = false;");
|
||||
CreditsActionMap.bindCmd(mouse, button1, "$CreditsSpeedUp = true;", "$CreditsSpeedUp = false;");
|
||||
CreditsActionMap.bindCmd(mouse, button2, "creditsNextPic();", "");
|
||||
if (!isDemo())
|
||||
CreditsActionMap.bindCmd(mouse, button2, "creditsNextPic();", "");
|
||||
}
|
||||
CreditsActionMap.push();
|
||||
|
||||
//build the ML text ctrl...
|
||||
exec("scripts/creditsText.cs");
|
||||
|
||||
$CreditsPicIndex = 1;
|
||||
CREDITS_Pic.setBitmap("gui/Cred_" @ $CreditsPicIndex @ ".png");
|
||||
if (!isDemo() && !isDemoServer())
|
||||
{
|
||||
$CreditsPicIndex = 1;
|
||||
CREDITS_Pic.setBitmap("gui/Cred_" @ $CreditsPicIndex @ ".png");
|
||||
}
|
||||
else
|
||||
CREDITS_Pic.setBitmap("gui/Cred_1.bm8");
|
||||
|
||||
//music array
|
||||
$CreditsMusic[0] = "badlands";
|
||||
$CreditsMusic[1] = "desert";
|
||||
$CreditsMusic[2] = "ice";
|
||||
$CreditsMusic[3] = "lush";
|
||||
$CreditsMusic[4] = "volcanic";
|
||||
if (!isDemo())
|
||||
{
|
||||
$CreditsMusic[0] = "badlands";
|
||||
$CreditsMusic[1] = "desert";
|
||||
$CreditsMusic[2] = "ice";
|
||||
$CreditsMusic[3] = "lush";
|
||||
$CreditsMusic[4] = "volcanic";
|
||||
}
|
||||
else
|
||||
{
|
||||
$CreditsMusic[0] = "lush";
|
||||
$CreditsMusic[1] = "desert";
|
||||
$CreditsMusic[2] = "desert";
|
||||
$CreditsMusic[3] = "lush";
|
||||
$CreditsMusic[4] = "desert";
|
||||
}
|
||||
|
||||
//start the credits from the beginning
|
||||
$CreditsOffset = 0.0;
|
||||
|
|
@ -64,7 +80,8 @@ function CreditsGui::onWake(%this)
|
|||
$CreditsScrollSchedule = schedule(3000, 0, scrollTheCredits);
|
||||
|
||||
//start cycling the bitmaps
|
||||
$CreditsSlideShow = schedule(5000, 0, creditsNextPic);
|
||||
if (!isDemo())
|
||||
$CreditsSlideShow = schedule(5000, 0, creditsNextPic);
|
||||
|
||||
//start some music
|
||||
%chooseTrack = mFloor(getRandom() * 4.99);
|
||||
|
|
@ -107,6 +124,10 @@ function scrollTheCredits()
|
|||
|
||||
function creditsNextPic()
|
||||
{
|
||||
//no slide show in the demo...
|
||||
if (isDemo())
|
||||
return;
|
||||
|
||||
cancel($CreditsSlideShow);
|
||||
if (!$CreditsPaused)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -40,6 +40,8 @@ $DamageType::SatchelCharge = 31;
|
|||
$DamageType::MPBMissile = 32;
|
||||
$DamageType::Lightning = 33;
|
||||
$DamageType::VehicleSpawn = 34;
|
||||
$DamageType::ForceFieldPowerup = 35;
|
||||
$DamageType::Crash = 36;
|
||||
|
||||
// DMM -- added so MPBs that blow up under water get a message
|
||||
$DamageType::Water = 97;
|
||||
|
|
@ -86,6 +88,8 @@ $DamageTypeText[30] = "tank mortar";
|
|||
$DamageTypeText[31] = "satchel charge";
|
||||
$DamageTypeText[32] = "MPB missile";
|
||||
$DamageTypeText[33] = "lighting";
|
||||
$DamageTypeText[35] = "ForceField";
|
||||
$DamageTypeText[36] = "Crash";
|
||||
$DamageTypeText[98] = "nexus camping";
|
||||
$DamageTypeText[99] = "suicide";
|
||||
|
||||
|
|
@ -616,99 +620,99 @@ datablock SimDataBlock(StaticShapeDamageProfile)
|
|||
|
||||
datablock SimDataBlock(LightPlayerDamageProfile)
|
||||
{
|
||||
damageScale[$DamageType::Blaster] = 1.3;
|
||||
damageScale[$DamageType::Bullet] = 1.2;
|
||||
damageScale[$DamageType::ELF] = 0.75;
|
||||
damageScale[$DamageType::ShockLance] = 1.0;
|
||||
damageScale[$DamageType::Laser] = 1.12;
|
||||
damageScale[$DamageType::ShrikeBlaster] = 1.0;
|
||||
damageScale[$DamageType::BellyTurret] = 1.0;
|
||||
damageScale[$DamageType::AATurret] = 0.7;
|
||||
damageScale[$DamageType::IndoorDepTurret] = 1.3;
|
||||
damageScale[$DamageType::OutdoorDepTurret] = 1.3;
|
||||
damageScale[$DamageType::SentryTurret] = 1.0;
|
||||
damageScale[$DamageType::Disc] = 1.0;
|
||||
damageScale[$DamageType::Grenade] = 1.2;
|
||||
damageScale[$DamageType::Mine] = 1.2;
|
||||
damageScale[$DamageType::Missile] = 1.0;
|
||||
damageScale[$DamageType::Mortar] = 1.3;
|
||||
damageScale[$DamageType::Plasma] = 1.0;
|
||||
damageScale[$DamageType::BomberBombs] = 3.0;
|
||||
damageScale[$DamageType::TankChaingun] = 1.0;
|
||||
damageScale[$DamageType::TankMortar] = 1.0;
|
||||
damageScale[$DamageType::MissileTurret] = 1.0;
|
||||
damageScale[$DamageType::MortarTurret] = 1.3;
|
||||
damageScale[$DamageType::PlasmaTurret] = 1.0;
|
||||
damageScale[$DamageType::SatchelCharge] = 3.0;
|
||||
damageScale[$DamageType::Default] = 1.0;
|
||||
damageScale[$DamageType::Impact] = 1.2;
|
||||
damageScale[$DamageType::Ground] = 1.0;
|
||||
damageScale[$DamageType::Explosion] = 1.2;
|
||||
damageScale[$DamageType::Lightning] = 1.0;
|
||||
damageScale[$DamageType::Blaster] = 1.3;
|
||||
damageScale[$DamageType::Bullet] = 1.2;
|
||||
damageScale[$DamageType::ELF] = 0.75;
|
||||
damageScale[$DamageType::ShockLance] = 1.0;
|
||||
damageScale[$DamageType::Laser] = 1.12;
|
||||
damageScale[$DamageType::ShrikeBlaster] = 1.10;
|
||||
damageScale[$DamageType::BellyTurret] = 1.0;
|
||||
damageScale[$DamageType::AATurret] = 0.7;
|
||||
damageScale[$DamageType::IndoorDepTurret] = 1.3;
|
||||
damageScale[$DamageType::OutdoorDepTurret] = 1.3;
|
||||
damageScale[$DamageType::SentryTurret] = 1.0;
|
||||
damageScale[$DamageType::Disc] = 1.0;
|
||||
damageScale[$DamageType::Grenade] = 1.2;
|
||||
damageScale[$DamageType::Mine] = 1.2;
|
||||
damageScale[$DamageType::Missile] = 1.0;
|
||||
damageScale[$DamageType::Mortar] = 1.3;
|
||||
damageScale[$DamageType::Plasma] = 1.0;
|
||||
damageScale[$DamageType::BomberBombs] = 3.0;
|
||||
damageScale[$DamageType::TankChaingun] = 1.7;
|
||||
damageScale[$DamageType::TankMortar] = 1.0;
|
||||
damageScale[$DamageType::MissileTurret] = 1.0;
|
||||
damageScale[$DamageType::MortarTurret] = 1.3;
|
||||
damageScale[$DamageType::PlasmaTurret] = 1.0;
|
||||
damageScale[$DamageType::SatchelCharge] = 3.0;
|
||||
damageScale[$DamageType::Default] = 1.0;
|
||||
damageScale[$DamageType::Impact] = 1.2;
|
||||
damageScale[$DamageType::Ground] = 1.0;
|
||||
damageScale[$DamageType::Explosion] = 1.2;
|
||||
damageScale[$DamageType::Lightning] = 1.0;
|
||||
};
|
||||
|
||||
datablock SimDataBlock(MediumPlayerDamageProfile)
|
||||
{
|
||||
damageScale[$DamageType::Blaster] = 1.0;
|
||||
damageScale[$DamageType::Bullet] = 1.0;
|
||||
damageScale[$DamageType::ELF] = 0.75;
|
||||
damageScale[$DamageType::ShockLance] = 1.0;
|
||||
damageScale[$DamageType::Laser] = 1.1;
|
||||
damageScale[$DamageType::ShrikeBlaster] = 1.0;
|
||||
damageScale[$DamageType::BellyTurret] = 1.0;
|
||||
damageScale[$DamageType::AATurret] = 0.7;
|
||||
damageScale[$DamageType::IndoorDepTurret] = 1.0;
|
||||
damageScale[$DamageType::OutdoorDepTurret] = 1.0;
|
||||
damageScale[$DamageType::SentryTurret] = 1.0;
|
||||
damageScale[$DamageType::Disc] = 1.0;
|
||||
damageScale[$DamageType::Grenade] = 1.0;
|
||||
damageScale[$DamageType::Mine] = 1.0;
|
||||
damageScale[$DamageType::Missile] = 1.0;
|
||||
damageScale[$DamageType::Mortar] = 1.0;
|
||||
damageScale[$DamageType::Plasma] = 0.6;
|
||||
damageScale[$DamageType::BomberBombs] = 3.0;
|
||||
damageScale[$DamageType::TankChaingun] = 1.0;
|
||||
damageScale[$DamageType::TankMortar] = 1.0;
|
||||
damageScale[$DamageType::MissileTurret] = 1.0;
|
||||
damageScale[$DamageType::MortarTurret] = 1.0;
|
||||
damageScale[$DamageType::PlasmaTurret] = 1.0;
|
||||
damageScale[$DamageType::SatchelCharge] = 3.0;
|
||||
damageScale[$DamageType::Default] = 1.0;
|
||||
damageScale[$DamageType::Impact] = 1.0;
|
||||
damageScale[$DamageType::Ground] = 1.0;
|
||||
damageScale[$DamageType::Explosion] = 1.0;
|
||||
damageScale[$DamageType::Lightning] = 1.2;
|
||||
damageScale[$DamageType::Blaster] = 1.0;
|
||||
damageScale[$DamageType::Bullet] = 1.0;
|
||||
damageScale[$DamageType::ELF] = 0.75;
|
||||
damageScale[$DamageType::ShockLance] = 1.0;
|
||||
damageScale[$DamageType::Laser] = 1.1;
|
||||
damageScale[$DamageType::ShrikeBlaster] = 1.0;
|
||||
damageScale[$DamageType::BellyTurret] = 1.0;
|
||||
damageScale[$DamageType::AATurret] = 0.7;
|
||||
damageScale[$DamageType::IndoorDepTurret] = 1.0;
|
||||
damageScale[$DamageType::OutdoorDepTurret] = 1.0;
|
||||
damageScale[$DamageType::SentryTurret] = 1.0;
|
||||
damageScale[$DamageType::Disc] = 0.8;
|
||||
damageScale[$DamageType::Grenade] = 1.0;
|
||||
damageScale[$DamageType::Mine] = 1.0;
|
||||
damageScale[$DamageType::Missile] = 0.8;
|
||||
damageScale[$DamageType::Mortar] = 1.0;
|
||||
damageScale[$DamageType::Plasma] = 0.65;
|
||||
damageScale[$DamageType::BomberBombs] = 3.0;
|
||||
damageScale[$DamageType::TankChaingun] = 1.5;
|
||||
damageScale[$DamageType::TankMortar] = 0.85;
|
||||
damageScale[$DamageType::MissileTurret] = 0.8;
|
||||
damageScale[$DamageType::MortarTurret] = 1.0;
|
||||
damageScale[$DamageType::PlasmaTurret] = 0.65;
|
||||
damageScale[$DamageType::SatchelCharge] = 3.0;
|
||||
damageScale[$DamageType::Default] = 1.0;
|
||||
damageScale[$DamageType::Impact] = 1.0;
|
||||
damageScale[$DamageType::Ground] = 1.0;
|
||||
damageScale[$DamageType::Explosion] = 1.0;
|
||||
damageScale[$DamageType::Lightning] = 1.2;
|
||||
};
|
||||
|
||||
datablock SimDataBlock(HeavyPlayerDamageProfile)
|
||||
{
|
||||
damageScale[$DamageType::Blaster] = 0.7;
|
||||
damageScale[$DamageType::Bullet] = 0.6;
|
||||
damageScale[$DamageType::ELF] = 0.75;
|
||||
damageScale[$DamageType::ShockLance] = 1.0;
|
||||
damageScale[$DamageType::Laser] = 0.67;
|
||||
damageScale[$DamageType::ShrikeBlaster] = 1.0;
|
||||
damageScale[$DamageType::BellyTurret] = 1.0;
|
||||
damageScale[$DamageType::AATurret] = 0.7;
|
||||
damageScale[$DamageType::IndoorDepTurret] = 0.7;
|
||||
damageScale[$DamageType::OutdoorDepTurret] = 0.7;
|
||||
damageScale[$DamageType::SentryTurret] = 1.0;
|
||||
damageScale[$DamageType::Disc] = 0.6;
|
||||
damageScale[$DamageType::Grenade] = 0.8;
|
||||
damageScale[$DamageType::Mine] = 0.8;
|
||||
damageScale[$DamageType::Missile] = 0.6;
|
||||
damageScale[$DamageType::Mortar] = 0.7;
|
||||
damageScale[$DamageType::Plasma] = 0.4;
|
||||
damageScale[$DamageType::BomberBombs] = 3.0;
|
||||
damageScale[$DamageType::TankChaingun] = 1.0;
|
||||
damageScale[$DamageType::TankMortar] = 0.7;
|
||||
damageScale[$DamageType::MissileTurret] = 1.0;
|
||||
damageScale[$DamageType::MortarTurret] = 1.0;
|
||||
damageScale[$DamageType::PlasmaTurret] = 1.0;
|
||||
damageScale[$DamageType::SatchelCharge] = 3.0;
|
||||
damageScale[$DamageType::Default] = 1.0;
|
||||
damageScale[$DamageType::Impact] = 0.8;
|
||||
damageScale[$DamageType::Ground] = 1.0;
|
||||
damageScale[$DamageType::Explosion] = 0.6;
|
||||
damageScale[$DamageType::Lightning] = 1.4;
|
||||
damageScale[$DamageType::Blaster] = 0.7;
|
||||
damageScale[$DamageType::Bullet] = 0.6;
|
||||
damageScale[$DamageType::ELF] = 0.75;
|
||||
damageScale[$DamageType::ShockLance] = 1.0;
|
||||
damageScale[$DamageType::Laser] = 0.67;
|
||||
damageScale[$DamageType::ShrikeBlaster] = 0.8;
|
||||
damageScale[$DamageType::BellyTurret] = 0.8;
|
||||
damageScale[$DamageType::AATurret] = 0.6;
|
||||
damageScale[$DamageType::IndoorDepTurret] = 0.7;
|
||||
damageScale[$DamageType::OutdoorDepTurret] = 0.7;
|
||||
damageScale[$DamageType::SentryTurret] = 1.0;
|
||||
damageScale[$DamageType::Disc] = 0.6;
|
||||
damageScale[$DamageType::Grenade] = 0.8;
|
||||
damageScale[$DamageType::Mine] = 0.8;
|
||||
damageScale[$DamageType::Missile] = 0.6;
|
||||
damageScale[$DamageType::Mortar] = 0.7;
|
||||
damageScale[$DamageType::Plasma] = 0.4;
|
||||
damageScale[$DamageType::BomberBombs] = 3.0;
|
||||
damageScale[$DamageType::TankChaingun] = 1.3;
|
||||
damageScale[$DamageType::TankMortar] = 0.7;
|
||||
damageScale[$DamageType::MissileTurret] = 0.6;
|
||||
damageScale[$DamageType::MortarTurret] = 0.6;
|
||||
damageScale[$DamageType::PlasmaTurret] = 0.4;
|
||||
damageScale[$DamageType::SatchelCharge] = 3.0;
|
||||
damageScale[$DamageType::Default] = 1.0;
|
||||
damageScale[$DamageType::Impact] = 0.8;
|
||||
damageScale[$DamageType::Ground] = 1.0;
|
||||
damageScale[$DamageType::Explosion] = 0.6;
|
||||
damageScale[$DamageType::Lightning] = 1.4;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -39,6 +39,9 @@ $DeathMessageSuicide[4] = '\c0%1 self-destructs in a fit of ennui.';
|
|||
$DeathMessageVehPadCount = 1;
|
||||
$DeathMessageVehPad[0] = '\c0%1 got caught in a vehicle\'s spawn field.';
|
||||
|
||||
$DeathMessageFFPowerupCount = 1;
|
||||
$DeathMessageFFPowerup[0] = '\c0%1 got caught up in a forcefield during power up.';
|
||||
|
||||
$DeathMessageRogueMineCount = 1;
|
||||
$DeathMessageRogueMine[$DamageType::Mine, 0] = '\c0%1 is all mine.';
|
||||
|
||||
|
|
@ -348,9 +351,9 @@ $DeathMessageCTurretKill[$DamageType::TankChainGun, 0] = '\c0%1 enjoys the rich,
|
|||
$DeathMessageCTurretKill[$DamageType::TankChainGun, 1] = '\c0%4\'s tank chaingun plays sweet music all over %1.';
|
||||
$DeathMessageCTurretKill[$DamageType::TankChainGun, 2] = '\c0%1 receives a stellar exit wound from %4\'s tank slug.';
|
||||
|
||||
$DeathMessageCTurretKill[$DamageType::TankMortars, 0] = '\c0Whoops! %1 + %4\'s tank mortar = Dead %1.';
|
||||
$DeathMessageCTurretKill[$DamageType::TankMortars, 1] = '\c0%1 learns the happy explosion dance from %4\'s tank mortar.';
|
||||
$DeathMessageCTurretKill[$DamageType::TankMortars, 2] = '\c0%4\'s tank mortar has a blast with %1.';
|
||||
$DeathMessageCTurretKill[$DamageType::TankMortar, 0] = '\c0Whoops! %1 + %4\'s tank mortar = Dead %1.';
|
||||
$DeathMessageCTurretKill[$DamageType::TankMortar, 1] = '\c0%1 learns the happy explosion dance from %4\'s tank mortar.';
|
||||
$DeathMessageCTurretKill[$DamageType::TankMortar, 2] = '\c0%4\'s tank mortar has a blast with %1.';
|
||||
|
||||
$DeathMessageCTurretKill[$DamageType::ShrikeBlaster, 0] = '\c0%1 dines on a Shrike blaster sandwich, courtesy of %4.';
|
||||
$DeathMessageCTurretKill[$DamageType::ShrikeBlaster, 1] = '\c0The blaster of %4\'s Shrike turns %1 into finely shredded meat.';
|
||||
|
|
|
|||
|
|
@ -320,6 +320,7 @@ function DefaultGame::pickObserverSpawn(%game, %client, %next)
|
|||
{
|
||||
%group = nameToID("MissionGroup/ObserverDropPoints");
|
||||
%count = %group.getCount();
|
||||
|
||||
if(!%count || %group == -1)
|
||||
{
|
||||
echo("no observer spawn points found");
|
||||
|
|
@ -413,13 +414,14 @@ function DefaultGame::pickPlayerSpawn(%game, %client, %respawn)
|
|||
//------------------------------------------------------------
|
||||
function DefaultGame::createPlayer(%game, %client, %spawnLoc, %respawn)
|
||||
{
|
||||
// do not allow a new player if there is one (not destroyed) on this client
|
||||
if(isObject(%client.player) && (%client.player.getState() !$= "Dead"))
|
||||
return;
|
||||
|
||||
// clients and cameras can exist in team 0, but players should not
|
||||
if(%client.team == 0)
|
||||
error("Players should not be added to team0!");
|
||||
|
||||
if( %client.player > 0 )
|
||||
error( "Attempting to create an angus ghost!" );
|
||||
|
||||
// defaultplayerarmor is in 'players.cs'
|
||||
if(%spawnLoc == -1)
|
||||
%spawnLoc = "0 0 300 1 0 0 0";
|
||||
|
|
@ -574,6 +576,8 @@ function DefaultGame::gameOver( %game )
|
|||
%client.endMission();
|
||||
messageClient( %client, 'MsgClearDebrief', "" );
|
||||
%game.sendDebriefing( %client );
|
||||
if(%client.player.isBomber)
|
||||
commandToClient(%client, 'endBomberSight');
|
||||
|
||||
//clear the score hud...
|
||||
messageClient( %client, 'SetScoreHudHeader', "", "" );
|
||||
|
|
@ -600,7 +604,7 @@ function DefaultGame::sendDebriefing( %game, %client )
|
|||
|
||||
// Player scores:
|
||||
%count = $TeamRank[0, count];
|
||||
messageClient( %client, 'MsgDebriefAddLine', "", '<tab:150,210><spush><color:00dc00><font:univers condensed:18>PLAYER\tSCORE\tKILLS<spop>' );
|
||||
messageClient( %client, 'MsgDebriefAddLine', "", '<spush><color:00dc00><font:univers condensed:18>PLAYER<lmargin%%:60>SCORE<lmargin%%:80>KILLS<spop>' );
|
||||
for ( %i = 0; %i < %count; %i++ )
|
||||
{
|
||||
%cl = $TeamRank[0, %i];
|
||||
|
|
@ -612,7 +616,7 @@ function DefaultGame::sendDebriefing( %game, %client )
|
|||
%kills = 0;
|
||||
else
|
||||
%kills = %cl.kills;
|
||||
messageClient( %client, 'MsgDebriefAddLine', "", '<tab:5,155,215><clip:150>\t%1</clip>\t%2\t%3', %cl.name, %score, %kills );
|
||||
messageClient( %client, 'MsgDebriefAddLine', "", '<lmargin:0><clip%%:60> %1</clip><lmargin%%:60><clip%%:20> %2</clip><lmargin%%:80><clip%%:20> %3', %cl.name, %score, %kills );
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -643,18 +647,18 @@ function DefaultGame::sendDebriefing( %game, %client )
|
|||
messageClient( %client, 'MsgDebriefResult', "", '<just:center>The mission ended in a tie.' );
|
||||
|
||||
// Team scores:
|
||||
messageClient( %client, 'MsgDebriefAddLine', "", '<tab:150><spush><color:00dc00><font:univers condensed:18>TEAM\tSCORE<spop>' );
|
||||
messageClient( %client, 'MsgDebriefAddLine', "", '<spush><color:00dc00><font:univers condensed:18>TEAM<lmargin%%:60>SCORE<spop>' );
|
||||
for ( %team = 1; %team - 1 < %game.numTeams; %team++ )
|
||||
{
|
||||
if ( $TeamScore[%team] $= "" )
|
||||
%score = 0;
|
||||
else
|
||||
%score = $TeamScore[%team];
|
||||
messageClient( %client, 'MsgDebriefAddLine', "", '<tab:5,155><clip:150>\t%1</clip>\t%2', $TeamName[%team], %score );
|
||||
messageClient( %client, 'MsgDebriefAddLine', "", '<lmargin:0><clip%%:60> %1</clip><lmargin%%:60><clip%%:40> %2</clip>', $TeamName[%team], %score );
|
||||
}
|
||||
|
||||
// Player scores:
|
||||
messageClient( %client, 'MsgDebriefAddLine', "", '\n<tab:120,180,230><spush><color:00dc00><font:univers condensed:18>PLAYER\tTEAM\tSCORE\tKILLS<spop>' );
|
||||
messageClient( %client, 'MsgDebriefAddLine', "", '\n<lmargin:0><spush><color:00dc00><font:univers condensed:18>PLAYER<lmargin%%:40>TEAM<lmargin%%:70>SCORE<lmargin%%:87>KILLS<spop>' );
|
||||
for ( %team = 1; %team - 1 < %game.numTeams; %team++ )
|
||||
%count[%team] = 0;
|
||||
|
||||
|
|
@ -676,7 +680,7 @@ function DefaultGame::sendDebriefing( %game, %client )
|
|||
%cl = $TeamRank[%highTeam, %count[%highTeam]];
|
||||
%score = %cl.score $= "" ? 0 : %cl.score;
|
||||
%kills = %cl.kills $= "" ? 0 : %cl.kills;
|
||||
messageClient( %client, 'MsgDebriefAddLine', "", '<tab:5,125,185,235><clip:120>\t%1</clip>\t<clip:55>%2</clip>\t%3\t%4', %cl.name, $TeamName[%cl.team], %score, %kills );
|
||||
messageClient( %client, 'MsgDebriefAddLine', "", '<lmargin:0><clip%%:40> %1</clip><lmargin%%:40><clip%%:30> %2</clip><lmargin%%:70><clip%%:17> %3</clip><lmargin%%:87><clip%%:13> %4</clip>', %cl.name, $TeamName[%cl.team], %score, %kills );
|
||||
|
||||
%count[%highTeam]++;
|
||||
%notDone = false;
|
||||
|
|
@ -703,20 +707,17 @@ function DefaultGame::sendDebriefing( %game, %client )
|
|||
if (!%printedHeader)
|
||||
{
|
||||
%printedHeader = true;
|
||||
messageClient(%client, 'MsgDebriefAddLine', "", '\n<spush><color:00dc00><font:univers condensed:18><tab:150,210>OBSERVERS\tSCORE<spop>');
|
||||
messageClient(%client, 'MsgDebriefAddLine', "", '\n<lmargin:0><spush><color:00dc00><font:univers condensed:18>OBSERVERS<lmargin%%:60>SCORE<spop>');
|
||||
}
|
||||
|
||||
//print out the client
|
||||
%score = %cl.score $= "" ? 0 : %cl.score;
|
||||
messageClient( %client, 'MsgDebriefAddLine', "", '<tab:5,155,215><clip:150>\t%1</clip>\t%2', %cl.name, %score);
|
||||
messageClient( %client, 'MsgDebriefAddLine', "", '<lmargin:0><clip%%:60> %1</clip><lmargin%%:60><clip%%:40> %2</clip>', %cl.name, %score);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------
|
||||
// jff: 'numDeathMsgLines' is set in 'message.cs' which seems to conflict with this
|
||||
$numDeathMsgs = 2;
|
||||
|
||||
function DefaultGame::clearDeployableMaxes(%game)
|
||||
{
|
||||
for(%i = 0; %i <= %game.numTeams; %i++)
|
||||
|
|
@ -877,7 +878,6 @@ function DefaultGame::onClientKilled(%game, %clVictim, %clKiller, %damageType, %
|
|||
playDeathAnimation(%plVictim, %damageLocation, %damageType);
|
||||
playDeathCry(%plVictim);
|
||||
|
||||
//%ridx = mFloor(getRandom() * ($numDeathMsgs - 0.01));
|
||||
%victimName = %clVictim.name;
|
||||
|
||||
%game.displayDeathMessages(%clVictim, %clKiller, %damageType, %implement);
|
||||
|
|
@ -1038,7 +1038,7 @@ function DefaultGame::forceObserver( %game, %client, %reason )
|
|||
if( !%adminForce )
|
||||
messageAllExcept(%client, -1, 'MsgClientJoinTeam', '\c2%1 has become an observer.', %client.name, $teamName[0], %client, 0 );
|
||||
else
|
||||
messageAllExcept(%client, -1, 'MsgClientJoinTeam', '\c2The admin has forced %1 to become an observer.', %client.name, 0 );
|
||||
messageAllExcept(%client, -1, 'MsgClientJoinTeam', '\c2The admin has forced %1 to become an observer.', %client.name, $teamName[0], %client, 0 );
|
||||
|
||||
updateCanListenState( %client );
|
||||
|
||||
|
|
@ -1070,11 +1070,20 @@ function DefaultGame::displayDeathMessages(%game, %clVictim, %clKiller, %damageT
|
|||
{
|
||||
messageAll('msgVehicleSpawnKill', $DeathMessageVehPad[mFloor(getRandom() * $DeathMessageVehPadCount)], %victimName, %victimGender, %victimPoss, %killerName, %killerGender, %killerPoss, %damageType);
|
||||
logEcho(%clVictim.nameBase@" (pl "@%clVictim.player@"/cl "@%clVictim@") killed by vehicle spawn");
|
||||
}
|
||||
else if(%damageType == $DamageType::ForceFieldPowerup)
|
||||
{
|
||||
messageAll('msgVehicleSpawnKill', $DeathMessageFFPowerup[mFloor(getRandom() * $DeathMessageFFPowerupCount)], %victimName, %victimGender, %victimPoss, %killerName, %killerGender, %killerPoss, %damageType);
|
||||
logEcho(%clVictim.nameBase@" (pl "@%clVictim.player@"/cl "@%clVictim@") killed by Force Field Powerup");
|
||||
}
|
||||
else if(%damageType == $DamageType::Crash)
|
||||
{
|
||||
messageAll('msgVehicleCrash', $DeathMessageVehicleCrash[%damageType, mFloor(getRandom() * $DeathMessageVehicleCrashCount)], %victimName, %victimGender, %victimPoss, %killerName, %killerGender, %killerPoss, %damageType);
|
||||
logEcho(%clVictim.nameBase@" (pl "@%clVictim.player@"/cl "@%clVictim@") crashes a vehicle.");
|
||||
}
|
||||
else if(%damageType == $DamageType::Impact) // run down by vehicle
|
||||
{
|
||||
%controller = %implement.getControllingClient();
|
||||
if(%controller > 0)
|
||||
if( ( %controller = %implement.getControllingClient() ) > 0)
|
||||
{
|
||||
%killerGender = (%controller.sex $= "Male" ? 'him' : 'her');
|
||||
%killerPoss = (%controller.sex $= "Male" ? 'his' : 'her');
|
||||
|
|
@ -1162,7 +1171,7 @@ function DefaultGame::displayDeathMessages(%game, %clVictim, %clKiller, %damageT
|
|||
messageAll('msgLightningKill', $DeathMessageLightning[mFloor(getRandom() * $DeathMessageLightningCount)], %victimName, %victimGender, %victimPoss, %killerName, %killerGender, %killerPoss, %damageType);
|
||||
logEcho(%clVictim.nameBase@" (pl "@%clVictim.player@"/cl "@%clVictim@") killed by lightning");
|
||||
}
|
||||
else if ( %damageType == $DamageType::Mine && !isObject(%implement) )
|
||||
else if ( %damageType == $DamageType::Mine && !isObject(%clKiller) )
|
||||
{
|
||||
error("Mine kill w/o source");
|
||||
messageAll('MsgRogueMineKill', $DeathMessageRogueMine[%damageType, mFloor(getRandom() * $DeathMessageRogueMineCount)], %victimName, %victimGender, %victimPoss, %killerName, %killerGender, %killerPoss, %damageType);
|
||||
|
|
@ -1497,6 +1506,7 @@ function DefaultGame::clientMissionDropReady(%game, %client)
|
|||
if( %client.camera.mode $= "observerFly" || %client.camera.mode $= "justJoined")
|
||||
{
|
||||
%observer = true;
|
||||
%client.observerStartTime = getSimTime();
|
||||
commandToClient(%client, 'setHudMode', 'Observer');
|
||||
%client.setControlObject( %client.camera );
|
||||
//displayObserverHud( %client, 0 );
|
||||
|
|
@ -1527,7 +1537,24 @@ function DefaultGame::clientMissionDropReady(%game, %client)
|
|||
// set all players into obs mode. setting the control object will handle further procedures...
|
||||
%client.camera.getDataBlock().setMode( %client.camera, "ObserverFly" );
|
||||
commandToClient(%client, 'setHudMode', 'Observer');
|
||||
%client.setControlObject( %client.camera );
|
||||
%client.setControlObject( %client.camera );
|
||||
messageAll( 'MsgClientJoinTeam', "",%client.name, $teamName[0], %client, 0 );
|
||||
%client.team = 0;
|
||||
|
||||
if( !$MatchStarted && !$CountdownStarted)
|
||||
{
|
||||
if($TeamDamage)
|
||||
%damMess = "ENABLED";
|
||||
else
|
||||
%damMess = "DISABLED";
|
||||
|
||||
if(%game.numTeams > 1)
|
||||
BottomPrint(%client, "Server is Running in Tournament Mode.\nPick a Team\nTeam Damage is " @ %damMess, 0, 3 );
|
||||
}
|
||||
else
|
||||
{
|
||||
BottomPrint( %client, "\nServer is Running in Tournament Mode", 0, 3 );
|
||||
}
|
||||
}
|
||||
|
||||
//make sure the objective HUD indicates your team on top and in green...
|
||||
|
|
@ -1537,6 +1564,15 @@ function DefaultGame::clientMissionDropReady(%game, %client)
|
|||
// were ready to go.
|
||||
%client.matchStartReady = true;
|
||||
echo("Client" SPC %client SPC "is ready.");
|
||||
|
||||
if ( isDemoServer() )
|
||||
{
|
||||
if ( %client.demoJustJoined )
|
||||
{
|
||||
%client.demoJustJoined = false;
|
||||
centerPrint( %client, "Welcome to the Tribes 2 Demo." NL "You have been assigned the name \"" @ %client.nameBase @ "\"." NL "Press FIRE to join the game.", 0, 3 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function DefaultGame::sendClientTeamList(%game, %client)
|
||||
|
|
@ -1561,10 +1597,10 @@ function DefaultGame::setupClientHuds(%game, %client)
|
|||
for(%i =0; %i<$InventoryHudCount; %i++)
|
||||
%client.setInventoryHudBitmap($InventoryHudData[%i, slot], $InventoryHudData[%i, itemDataName], $InventoryHudData[%i, bitmapName]);
|
||||
|
||||
%client.setWeaponsHudBackGroundBmp("gui/hud_new_panel.png");
|
||||
%client.setWeaponsHudHighLightBmp("gui/hud_new_weaponselect.png");
|
||||
%client.setWeaponsHudInfiniteAmmoBmp("gui/hud_infinity.png");
|
||||
%client.setInventoryHudBackGroundBmp("gui/hud_new_panel.png");
|
||||
%client.setWeaponsHudBackGroundBmp("gui/hud_new_panel");
|
||||
%client.setWeaponsHudHighLightBmp("gui/hud_new_weaponselect");
|
||||
%client.setWeaponsHudInfiniteAmmoBmp("gui/hud_infinity");
|
||||
%client.setInventoryHudBackGroundBmp("gui/hud_new_panel");
|
||||
|
||||
// tell the client if we are protecting statics (so no health bar will be displayed)
|
||||
commandToClient(%client, 'protectingStaticObjects', %game.allowsProtectedStatics());
|
||||
|
|
@ -2311,12 +2347,18 @@ function DefaultGame::ShapeThrowWeapon(%game, %this)
|
|||
|
||||
function DefaultGame::leaveMissionArea(%game, %playerData, %player)
|
||||
{
|
||||
if(%player.getState() $= "Dead")
|
||||
return;
|
||||
|
||||
%player.client.outOfBounds = true;
|
||||
messageClient(%player.client, 'LeaveMissionArea', '\c1You left the mission area.~wfx/misc/warning_beep.wav');
|
||||
}
|
||||
|
||||
function DefaultGame::enterMissionArea(%game, %playerData, %player)
|
||||
{
|
||||
if(%player.getState() $= "Dead")
|
||||
return;
|
||||
|
||||
%player.client.outOfBounds = false;
|
||||
messageClient(%player.client, 'EnterMissionArea', '\c1You are back in the mission area.');
|
||||
}
|
||||
|
|
@ -2408,6 +2450,7 @@ function DefaultGame::sendGamePlayerPopupMenu( %game, %client, %targetClient, %k
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// Admin only options on players:
|
||||
else if ( %isAdmin && !isDemo() && !isDemoServer())
|
||||
{
|
||||
|
|
@ -2428,6 +2471,7 @@ function DefaultGame::sendGamePlayerPopupMenu( %game, %client, %targetClient, %k
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
if ( %isTargetSelf || %outrankTarget )
|
||||
{
|
||||
if ( %game.numTeams > 1 )
|
||||
|
|
@ -2586,6 +2630,46 @@ function DefaultGame::sendTimeLimitList( %game, %client, %key )
|
|||
|
||||
//------------------------------------------------------------------------------
|
||||
// all global votes here
|
||||
// this function was created to remove the call to "eval", which is non-functional in PURE servers...
|
||||
function DefaultGame::evalVote(%game, %typeName, %admin, %arg1, %arg2, %arg3, %arg4)
|
||||
{
|
||||
switch$ (%typeName)
|
||||
{
|
||||
case "voteChangeMission":
|
||||
%game.voteChangeMission(%admin, %arg1, %arg2, %arg3, %arg4);
|
||||
|
||||
case "voteTeamDamage":
|
||||
%game.voteTeamDamage(%admin, %arg1, %arg2, %arg3, %arg4);
|
||||
|
||||
case "voteTournamentMode":
|
||||
%game.voteTournamentMode(%admin, %arg1, %arg2, %arg3, %arg4);
|
||||
|
||||
case "voteMatchStart":
|
||||
%game.voteMatchStart(%admin, %arg1, %arg2, %arg3, %arg4);
|
||||
|
||||
case "voteFFAMode":
|
||||
%game.voteFFAMode(%admin, %arg1, %arg2, %arg3, %arg4);
|
||||
|
||||
case "voteChangeTimeLimit":
|
||||
%game.voteChangeTimeLimit(%admin, %arg1, %arg2, %arg3, %arg4);
|
||||
|
||||
case "voteResetServer":
|
||||
%game.voteResetServer(%admin, %arg1, %arg2, %arg3, %arg4);
|
||||
|
||||
case "voteKickPlayer":
|
||||
%game.voteKickPlayer(%admin, %arg1, %arg2, %arg3, %arg4);
|
||||
|
||||
case "voteAdminPlayer":
|
||||
%game.voteAdminPlayer(%admin, %arg1, %arg2, %arg3, %arg4);
|
||||
|
||||
case "voteGreedMode":
|
||||
%game.voteGreedMode(%admin, %arg1, %arg2, %arg3, %arg4);
|
||||
|
||||
case "voteHoardMode":
|
||||
%game.voteHoardMode(%admin, %arg1, %arg2, %arg3, %arg4);
|
||||
}
|
||||
}
|
||||
|
||||
function DefaultGame::voteChangeMission(%game, %admin, %missionDisplayName, %typeDisplayName, %missionId, %missionTypeId)
|
||||
{
|
||||
%mission = $HostMissionFile[%missionId];
|
||||
|
|
@ -2860,8 +2944,7 @@ function DefaultGame::voteResetServer( %game, %admin, %client )
|
|||
function DefaultGame::voteKickPlayer(%game, %admin, %client)
|
||||
{
|
||||
%cause = "";
|
||||
%name = %client.nameBase;
|
||||
|
||||
|
||||
if(%admin)
|
||||
{
|
||||
kick(%client, %admin, %client.guid );
|
||||
|
|
@ -2873,7 +2956,7 @@ function DefaultGame::voteKickPlayer(%game, %admin, %client)
|
|||
%totalVotes = %game.votesFor[%game.kickTeam] + %game.votesAgainst[%game.kickTeam];
|
||||
if(%totalVotes > 0 && (%game.votesFor[%game.kickTeam] / %totalVotes) > ($Host::VotePasspercent / 100))
|
||||
{
|
||||
kick(%client, %admin, Game.kickGuid);
|
||||
kick(%client, %admin, %game.kickGuid);
|
||||
%cause = "(vote)";
|
||||
}
|
||||
else
|
||||
|
|
@ -2882,9 +2965,10 @@ function DefaultGame::voteKickPlayer(%game, %admin, %client)
|
|||
|
||||
%game.kickTeam = "";
|
||||
%game.kickGuid = "";
|
||||
%game.kickClientName = "";
|
||||
|
||||
if(%cause !$= "")
|
||||
logEcho(%name@" (cl "@%client@") kicked "@%cause);
|
||||
logEcho(%name@" (cl " @ %game.kickClient @ ") kicked " @ %cause);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -33,10 +33,10 @@ $NotDeployableReason::NoInteriorFound = 7;
|
|||
$NotDeployableReason::TurretTooClose = 8;
|
||||
$NotDeployableReason::TurretSaturation = 9;
|
||||
$NotDeployableReason::SurfaceTooNarrow = 10;
|
||||
$NotDeployableReason::InventoryTooClose = 11;
|
||||
$NotDeployableReason::InventoryTooClose = 11;
|
||||
|
||||
$MinDeployableDistance = 0.5;
|
||||
$MaxDeployableDistance = 4.0; //meters from body
|
||||
$MinDeployableDistance = 2.5;
|
||||
$MaxDeployableDistance = 5.0; //meters from body
|
||||
|
||||
|
||||
// --------------------------------------------
|
||||
|
|
@ -159,6 +159,12 @@ datablock ShapeBaseImageData(InventoryDeployableImage)
|
|||
isLarge = true;
|
||||
maxDepSlope = 30;
|
||||
deploySound = StationDeploySound;
|
||||
|
||||
flatMinDeployDis = 1.0;
|
||||
flatMaxDeployDis = 5.0;
|
||||
|
||||
minDeployDis = 2.5;
|
||||
maxDeployDis = 5.0;
|
||||
};
|
||||
|
||||
datablock ItemData(InventoryDeployable)
|
||||
|
|
@ -241,6 +247,9 @@ datablock ShapeBaseImageData(MotionSensorDeployableImage)
|
|||
deploySound = MotionSensorDeploySound;
|
||||
emap = true;
|
||||
heatSignature = 1;
|
||||
|
||||
minDeployDis = 0.5;
|
||||
maxDeployDis = 5.0; //meters from body
|
||||
};
|
||||
|
||||
datablock ItemData(MotionSensorDeployable)
|
||||
|
|
@ -323,6 +332,9 @@ datablock ShapeBaseImageData(PulseSensorDeployableImage)
|
|||
maxDepSlope = 40;
|
||||
emap = true;
|
||||
heatSignature = 0;
|
||||
|
||||
minDeployDis = 0.5;
|
||||
maxDeployDis = 5.0; //meters from body
|
||||
};
|
||||
|
||||
datablock ItemData(PulseSensorDeployable)
|
||||
|
|
@ -373,6 +385,9 @@ datablock ShapeBaseImageData(TurretOutdoorDeployableImage)
|
|||
|
||||
maxDepSlope = 40;
|
||||
deploySound = TurretDeploySound;
|
||||
|
||||
minDeployDis = 0.5;
|
||||
maxDeployDis = 5.0; //meters from body
|
||||
};
|
||||
|
||||
datablock ItemData(TurretOutdoorDeployable)
|
||||
|
|
@ -417,6 +432,9 @@ datablock ShapeBaseImageData(TurretIndoorDeployableImage)
|
|||
|
||||
maxDepSlope = 360;
|
||||
deploySound = TurretDeploySound;
|
||||
|
||||
minDeployDis = 0.5;
|
||||
maxDeployDis = 5.0; //meters from body
|
||||
};
|
||||
|
||||
datablock ItemData(TurretIndoorDeployable)
|
||||
|
|
@ -521,7 +539,7 @@ function ShapeBaseImageData::testMaxDeployed(%item, %plyr)
|
|||
//-------------------------------------------------
|
||||
function ShapeBaseImageData::testNoSurfaceInRange(%item, %plyr)
|
||||
{
|
||||
return ! Deployables::searchView(%plyr, $MaxDeployableDistance, $TypeMasks::TerrainObjectType | $TypeMasks::InteriorObjectType);
|
||||
return ! Deployables::searchView(%plyr, $MaxDeployDistance, $TypeMasks::TerrainObjectType | $TypeMasks::InteriorObjectType);
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
|
|
@ -536,7 +554,7 @@ function ShapeBaseImageData::testSlopeTooGreat(%item)
|
|||
//-------------------------------------------------
|
||||
function ShapeBaseImageData::testSelfTooClose(%item, %plyr)
|
||||
{
|
||||
InitContainerRadiusSearch(%item.surfacePt, $MinDeployableDistance, $TypeMasks::PlayerObjectType);
|
||||
InitContainerRadiusSearch(%item.surfacePt, $MinDeployDistance, $TypeMasks::PlayerObjectType);
|
||||
|
||||
return containerSearchNext() == %plyr;
|
||||
}
|
||||
|
|
@ -544,12 +562,14 @@ function ShapeBaseImageData::testSelfTooClose(%item, %plyr)
|
|||
//-------------------------------------------------
|
||||
function ShapeBaseImageData::testObjectTooClose(%item)
|
||||
{
|
||||
return !ContainerBoxEmpty (
|
||||
InitContainerRadiusSearch( %item.surfacePt, $MinDeployDistance,
|
||||
$TypeMasks::VehicleObjectType | $TypeMasks::MoveableObjectType |
|
||||
$TypeMasks::StaticShapeObjectType | $TypeMasks::StaticTSObjectType |
|
||||
$TypeMasks::ForceFieldObjectType | $TypeMasks::ItemObjectType |
|
||||
$TypeMasks::PlayerObjectType | $TypeMasks::TurretObjectType,
|
||||
%item.surfacePt, $MinDeployableDistance);
|
||||
$TypeMasks::PlayerObjectType | $TypeMasks::TurretObjectType);
|
||||
|
||||
%test = containerSearchNext();
|
||||
return %test;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -741,9 +761,11 @@ function ShapeBaseImageData::testInvalidDeployConditions(%item, %plyr, %slot)
|
|||
{
|
||||
cancel(%plyr.deployCheckThread);
|
||||
%disqualified = $NotDeployableReason::None; //default
|
||||
$MaxDeployDistance = %item.maxDeployDis;
|
||||
$MinDeployDistance = %item.minDeployDis;
|
||||
|
||||
%surface = Deployables::searchView(%plyr,
|
||||
$MaxDeployableDistance,
|
||||
$MaxDeployDistance,
|
||||
($TypeMasks::TerrainObjectType |
|
||||
$TypeMasks::InteriorObjectType));
|
||||
if (%surface)
|
||||
|
|
@ -764,7 +786,7 @@ function ShapeBaseImageData::testInvalidDeployConditions(%item, %plyr, %slot)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (%surfacePt $= posFromRaycast(%searchResult))
|
||||
if(checkPositions(%surfacePT, posFromRaycast(%searchResult)))
|
||||
{
|
||||
%item.surface = %surface;
|
||||
%item.surfacePt = %surfacePt;
|
||||
|
|
@ -776,33 +798,53 @@ function ShapeBaseImageData::testInvalidDeployConditions(%item, %plyr, %slot)
|
|||
%disqualified = $NotDeployableReason::ObjectTooClose;
|
||||
}
|
||||
}
|
||||
if(!getTerrainAngle(%surfaceNrm) && %item.flatMaxDeployDis !$= "")
|
||||
{
|
||||
$MaxDeployDistance = %item.flatMaxDeployDis;
|
||||
$MinDeployDistance = %item.flatMinDeployDis;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (%item.testMaxDeployed(%plyr))
|
||||
{
|
||||
%disqualified = $NotDeployableReason::MaxDeployed;
|
||||
}
|
||||
else if (%item.testNoSurfaceInRange(%plyr))
|
||||
{
|
||||
%disqualified = $NotDeployableReason::NoSurfaceFound;
|
||||
}
|
||||
else if (%item.testNoTerrainFound(%surface))
|
||||
{
|
||||
%disqualified = $NotDeployableReason::NoTerrainFound;
|
||||
}
|
||||
else if (%item.testNoInteriorFound())
|
||||
{
|
||||
%disqualified = $NotDeployableReason::NoInteriorFound;
|
||||
}
|
||||
else if (%item.testSlopeTooGreat(%surface, %surfaceNrm))
|
||||
{
|
||||
%disqualified = $NotDeployableReason::SlopeTooGreat;
|
||||
}
|
||||
else if (%item.testSelfTooClose(%plyr, %surfacePt))
|
||||
{
|
||||
%disqualified = $NotDeployableReason::SelfTooClose;
|
||||
}
|
||||
else if (%item.testObjectTooClose(%surfacePt))
|
||||
{
|
||||
%disqualified = $NotDeployableReason::ObjectTooClose;
|
||||
}
|
||||
else if (%item.testTurretTooClose(%plyr))
|
||||
{
|
||||
%disqualified = $NotDeployableReason::TurretTooClose;
|
||||
}
|
||||
else if (%item.testInventoryTooClose(%plyr))
|
||||
{
|
||||
%disqualified = $NotDeployableReason::InventoryTooClose;
|
||||
}
|
||||
else if (%item.testTurretSaturation())
|
||||
{
|
||||
%disqualified = $NotDeployableReason::TurretSaturation;
|
||||
}
|
||||
else if (%disqualified == $NotDeployableReason::None)
|
||||
{
|
||||
// Test that there are no objstructing objects that this object
|
||||
|
|
@ -810,10 +852,14 @@ function ShapeBaseImageData::testInvalidDeployConditions(%item, %plyr, %slot)
|
|||
//
|
||||
%rot = %item.getInitialRotation(%plyr);
|
||||
if(%item.deployed.className $= "DeployedTurret")
|
||||
{
|
||||
%xform = %item.deployed.getDeployTransform(%item.surfacePt, %item.surfaceNrm);
|
||||
}
|
||||
else
|
||||
{
|
||||
%xform = %surfacePt SPC %rot;
|
||||
|
||||
}
|
||||
|
||||
if (!%item.deployed.checkDeployPos(%xform))
|
||||
{
|
||||
%disqualified = $NotDeployableReason::ObjectTooClose;
|
||||
|
|
@ -834,12 +880,26 @@ function ShapeBaseImageData::testInvalidDeployConditions(%item, %plyr, %slot)
|
|||
if (%plyr.client.deployPack == true)
|
||||
%item.attemptDeploy(%plyr, %slot, %disqualified);
|
||||
else
|
||||
%plyr.deployCheckThread = %item.schedule(50, "testInvalidDeployConditions", %plyr, %slot); //update checks every 50 milliseconds
|
||||
{
|
||||
%plyr.deployCheckThread = %item.schedule(25, "testInvalidDeployConditions", %plyr, %slot); //update checks every 50 milliseconds
|
||||
}
|
||||
}
|
||||
else
|
||||
deactivateDeploySensor(%plyr);
|
||||
}
|
||||
|
||||
function checkPositions(%pos1, %pos2)
|
||||
{
|
||||
%passed = true;
|
||||
if((mFloor(getWord(%pos1, 0)) - mFloor(getWord(%pos2,0))))
|
||||
%passed = false;
|
||||
if((mFloor(getWord(%pos1, 1)) - mFloor(getWord(%pos2,1))))
|
||||
%passed = false;
|
||||
if((mFloor(getWord(%pos1, 2)) - mFloor(getWord(%pos2,2))))
|
||||
%passed = false;
|
||||
return %passed;
|
||||
}
|
||||
|
||||
function ShapeBaseImageData::attemptDeploy(%item, %plyr, %slot, %disqualified)
|
||||
{
|
||||
deactivateDeploySensor(%plyr);
|
||||
|
|
@ -1228,7 +1288,8 @@ function DeployedMotionSensor::onDestroyed(%this, %obj, %prevState)
|
|||
//--------------------------------------------------------------------------
|
||||
function PulseSensorDeployableImage::onActivate(%data, %obj, %slot)
|
||||
{
|
||||
%data.testInvalidDeployConditions(%obj, %slot);
|
||||
Parent::onActivate( %data, %obj, %slot );
|
||||
//%data.testInvalidDeployConditions(%obj, %slot);
|
||||
}
|
||||
|
||||
function DeployedPulseSensor::onDestroyed(%this, %obj, %prevState)
|
||||
|
|
|
|||
|
|
@ -168,12 +168,45 @@ function ForceFieldBareData::gainPower(%data, %obj)
|
|||
}
|
||||
if(%ffp > 0) {
|
||||
%ffp.activate();
|
||||
if( %data.getName() $= "defaultForceFieldBare" )
|
||||
{
|
||||
killAllPlayersWithinZone( %data, %obj );
|
||||
}
|
||||
else if( %data.getName() $= "defaultTeamSlowFieldBare" )
|
||||
{
|
||||
%team = %obj.team;
|
||||
killAllPlayersWithinZone( %data, %obj, %team );
|
||||
}
|
||||
}
|
||||
}
|
||||
//else
|
||||
// error("No PZones group to search!");
|
||||
}
|
||||
|
||||
function killAllPlayersWithinZone( %data, %obj, %team )
|
||||
{
|
||||
for( %c = 0; %c < ClientGroup.getCount(); %c++ )
|
||||
{
|
||||
%client = ClientGroup.getObject(%c);
|
||||
if( isObject( %client.player ) )
|
||||
{
|
||||
if( %forceField = %client.player.isInForceField() )// isInForceField() will return the id of the ff or zero
|
||||
{
|
||||
if( %forceField == %obj )
|
||||
{
|
||||
if( %team !$= "" && %team == %client.team )
|
||||
return;
|
||||
else
|
||||
{
|
||||
%client.player.blowup(); // chunkOrama!
|
||||
%client.player.scriptkill($DamageType::ForceFieldPowerup);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function ForceFieldBareData::losePower(%data, %obj)
|
||||
{
|
||||
Parent::losePower(%data, %obj);
|
||||
|
|
|
|||
|
|
@ -94,14 +94,6 @@ function GameConnection::sensorJammed(%this, %jam)
|
|||
|
||||
function SensorHud::update(%this)
|
||||
{
|
||||
// dont change anything if lag is up
|
||||
if(lagHudIndicator.isVisible())
|
||||
{
|
||||
%this.setVisible(false);
|
||||
sensorHudBack.setVisible(false);
|
||||
return;
|
||||
}
|
||||
|
||||
if(!%this.ping && !%this.jam)
|
||||
{
|
||||
%this.setVisible(false);
|
||||
|
|
@ -123,7 +115,6 @@ function clientCmdResetHud()
|
|||
{
|
||||
deploySensor.setVisible(false);
|
||||
controlObjectText.setVisible(false);
|
||||
lagHudIndicator.setVisible(false);
|
||||
|
||||
sensorHud.jam = false;
|
||||
sensorHud.ping = false;
|
||||
|
|
@ -142,16 +133,16 @@ function clientCmdSyncHudClock(%time)
|
|||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
$vehicleReticle[AssaultVehicle, 1, bitmap] = "gui/hud_ret_tankchaingun.png";
|
||||
$vehicleReticle[AssaultVehicle, 1, bitmap] = "gui/hud_ret_tankchaingun";
|
||||
$vehicleReticle[AssaultVehicle, 1, frame] = true;
|
||||
$vehicleReticle[AssaultVehicle, 2, bitmap] = "gui/hud_ret_tankmortar.png";
|
||||
$vehicleReticle[AssaultVehicle, 2, bitmap] = "gui/hud_ret_tankmortar";
|
||||
$vehicleReticle[AssaultVehicle, 2, frame] = true;
|
||||
|
||||
$vehicleReticle[BomberFlyer, 1, bitmap] = "gui/hud_ret_shrike.png";
|
||||
$vehicleReticle[BomberFlyer, 1, bitmap] = "gui/hud_ret_shrike";
|
||||
$vehicleReticle[BomberFlyer, 1, frame] = false;
|
||||
$vehicleReticle[BomberFlyer, 2, bitmap] = "";
|
||||
$vehicleReticle[BomberFlyer, 2, frame] = false;
|
||||
$vehicleReticle[BomberFlyer, 3, bitmap] = "gui/hud_ret_targlaser.png";
|
||||
$vehicleReticle[BomberFlyer, 3, bitmap] = "gui/hud_ret_targlaser";
|
||||
$vehicleReticle[BomberFlyer, 3, frame] = false;
|
||||
|
||||
function GameConnection::setVWeaponsHudActive(%client, %slot)
|
||||
|
|
@ -298,44 +289,44 @@ function clientCmdSetWeaponsHudActive(%slot)
|
|||
switch$($WeaponNames[%slot])
|
||||
{
|
||||
case "Blaster":
|
||||
reticleHud.setBitmap("gui/ret_blaster.png");
|
||||
reticleHud.setBitmap("gui/ret_blaster");
|
||||
reticleFrameHud.setVisible(true);
|
||||
case "Plasma":
|
||||
reticleHud.setBitmap("gui/ret_plasma.png");
|
||||
reticleHud.setBitmap("gui/ret_plasma");
|
||||
reticleFrameHud.setVisible(true);
|
||||
case "Chaingun":
|
||||
reticleHud.setBitmap("gui/ret_chaingun.png");
|
||||
reticleHud.setBitmap("gui/ret_chaingun");
|
||||
reticleFrameHud.setVisible(true);
|
||||
case "Disc":
|
||||
reticleHud.setBitmap("gui/ret_disc.png");
|
||||
reticleHud.setBitmap("gui/ret_disc");
|
||||
reticleFrameHud.setVisible(true);
|
||||
case "GrenadeLauncher":
|
||||
reticleHud.setBitmap("gui/ret_grenade.png");
|
||||
reticleHud.setBitmap("gui/ret_grenade");
|
||||
reticleFrameHud.setVisible(true);
|
||||
case "SniperRifle":
|
||||
reticleHud.setBitmap("gui/hud_ret_sniper.png");
|
||||
reticleHud.setBitmap("gui/hud_ret_sniper");
|
||||
reticleFrameHud.setVisible(false);
|
||||
case "ELFGun":
|
||||
reticleHud.setBitmap("gui/ret_elf.png");
|
||||
reticleHud.setBitmap("gui/ret_elf");
|
||||
reticleFrameHud.setVisible(true);
|
||||
case "Mortar":
|
||||
reticleHud.setBitmap("gui/ret_mortor.png");
|
||||
reticleHud.setBitmap("gui/ret_mortor");
|
||||
reticleFrameHud.setVisible(true);
|
||||
case "MissileLauncher":
|
||||
reticleHud.setBitmap("gui/ret_missile.png");
|
||||
reticleHud.setBitmap("gui/ret_missile");
|
||||
reticleFrameHud.setVisible(true);
|
||||
case "ShockLance":
|
||||
reticleHud.setBitmap("gui/hud_ret_shocklance.png");
|
||||
reticleHud.setBitmap("gui/hud_ret_shocklance");
|
||||
reticleFrameHud.setVisible(false);
|
||||
case "TargetingLaser":
|
||||
reticleHud.setBitmap("gui/hud_ret_targlaser.png");
|
||||
reticleHud.setBitmap("gui/hud_ret_targlaser");
|
||||
reticleFrameHud.setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
function clientCmdSetRepairReticle()
|
||||
{
|
||||
reticleHud.setBitmap("gui/ret_chaingun.png");
|
||||
reticleHud.setBitmap("gui/ret_chaingun");
|
||||
reticleFrameHud.setVisible(true);
|
||||
}
|
||||
|
||||
|
|
@ -413,41 +404,41 @@ function clientCmdSetAmmoHudCount(%amount)
|
|||
//----------------------------------------------------------------------------
|
||||
|
||||
$BackpackHudData[0, itemDataName] = "AmmoPack";
|
||||
$BackpackHudData[0, bitmapName] = "gui/hud_new_packammo.png";
|
||||
$BackpackHudData[0, bitmapName] = "gui/hud_new_packammo";
|
||||
$BackpackHudData[1, itemDataName] = "CloakingPack";
|
||||
$BackpackHudData[1, bitmapName] = "gui/hud_new_packcloak.png";
|
||||
$BackpackHudData[1, bitmapName] = "gui/hud_new_packcloak";
|
||||
$BackpackHudData[2, itemDataName] = "EnergyPack";
|
||||
$BackpackHudData[2, bitmapName] = "gui/hud_new_packenergy.png";
|
||||
$BackpackHudData[2, bitmapName] = "gui/hud_new_packenergy";
|
||||
$BackpackHudData[3, itemDataName] = "RepairPack";
|
||||
$BackpackHudData[3, bitmapName] = "gui/hud_new_packrepair.png";
|
||||
$BackpackHudData[3, bitmapName] = "gui/hud_new_packrepair";
|
||||
$BackpackHudData[4, itemDataName] = "SatchelCharge";
|
||||
$BackpackHudData[4, bitmapName] = "gui/hud_new_packsatchel.png";
|
||||
$BackpackHudData[4, bitmapName] = "gui/hud_new_packsatchel";
|
||||
$BackpackHudData[5, itemDataName] = "ShieldPack";
|
||||
$BackpackHudData[5, bitmapName] = "gui/hud_new_packshield.png";
|
||||
$BackpackHudData[5, bitmapName] = "gui/hud_new_packshield";
|
||||
$BackpackHudData[6, itemDataName] = "InventoryDeployable";
|
||||
$BackpackHudData[6, bitmapName] = "gui/hud_new_packinventory.png";
|
||||
$BackpackHudData[6, bitmapName] = "gui/hud_new_packinventory";
|
||||
$BackpackHudData[7, itemDataName] = "MotionSensorDeployable";
|
||||
$BackpackHudData[7, bitmapName] = "gui/hud_new_packmotionsens.png";
|
||||
$BackpackHudData[7, bitmapName] = "gui/hud_new_packmotionsens";
|
||||
$BackpackHudData[8, itemDataName] = "PulseSensorDeployable";
|
||||
$BackpackHudData[8, bitmapName] = "gui/hud_new_packradar.png";
|
||||
$BackpackHudData[8, bitmapName] = "gui/hud_new_packradar";
|
||||
$BackpackHudData[9, itemDataName] = "TurretOutdoorDeployable";
|
||||
$BackpackHudData[9, bitmapName] = "gui/hud_new_packturretout.png";
|
||||
$BackpackHudData[9, bitmapName] = "gui/hud_new_packturretout";
|
||||
$BackpackHudData[10, itemDataName] = "TurretIndoorDeployable";
|
||||
$BackpackHudData[10, bitmapName] = "gui/hud_new_packturretin.png";
|
||||
$BackpackHudData[10, bitmapName] = "gui/hud_new_packturretin";
|
||||
$BackpackHudData[11, itemDataName] = "SensorJammerPack";
|
||||
$BackpackHudData[11, bitmapName] = "gui/hud_new_packsensjam.png";
|
||||
$BackpackHudData[11, bitmapName] = "gui/hud_new_packsensjam";
|
||||
$BackpackHudData[12, itemDataName] = "AABarrelPack";
|
||||
$BackpackHudData[12, bitmapName] = "gui/hud_new_packturret.png";
|
||||
$BackpackHudData[12, bitmapName] = "gui/hud_new_packturret";
|
||||
$BackpackHudData[13, itemDataName] = "FusionBarrelPack";
|
||||
$BackpackHudData[13, bitmapName] = "gui/hud_new_packturret.png";
|
||||
$BackpackHudData[13, bitmapName] = "gui/hud_new_packturret";
|
||||
$BackpackHudData[14, itemDataName] = "MissileBarrelPack";
|
||||
$BackpackHudData[14, bitmapName] = "gui/hud_new_packturret.png";
|
||||
$BackpackHudData[14, bitmapName] = "gui/hud_new_packturret";
|
||||
$BackpackHudData[15, itemDataName] = "PlasmaBarrelPack";
|
||||
$BackpackHudData[15, bitmapName] = "gui/hud_new_packturret.png";
|
||||
$BackpackHudData[15, bitmapName] = "gui/hud_new_packturret";
|
||||
$BackpackHudData[16, itemDataName] = "ELFBarrelPack";
|
||||
$BackpackHudData[16, bitmapName] = "gui/hud_new_packturret.png";
|
||||
$BackpackHudData[16, bitmapName] = "gui/hud_new_packturret";
|
||||
$BackpackHudData[17, itemDataName] = "MortarBarrelPack";
|
||||
$BackpackHudData[17, bitmapName] = "gui/hud_new_packturret.png";
|
||||
$BackpackHudData[17, bitmapName] = "gui/hud_new_packturret";
|
||||
|
||||
$BackpackHudCount = 18;
|
||||
|
||||
|
|
@ -493,35 +484,35 @@ function clientCmdUpdatePackText(%num)
|
|||
|
||||
//----------------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------------
|
||||
$InventoryHudData[0, bitmapName] = "gui/hud_handgren.png";
|
||||
$InventoryHudData[0, bitmapName] = "gui/hud_handgren";
|
||||
$InventoryHudData[0, itemDataName] = Grenade;
|
||||
$InventoryHudData[0, ammoDataName] = Grenade;
|
||||
$InventoryHudData[0, slot] = 0;
|
||||
$InventoryHudData[1, bitmapName] = "gui/hud_mine.png";
|
||||
$InventoryHudData[1, bitmapName] = "gui/hud_mine";
|
||||
$InventoryHudData[1, itemDataName] = Mine;
|
||||
$InventoryHudData[1, ammoDataName] = Mine;
|
||||
$InventoryHudData[1, slot] = 1;
|
||||
$InventoryHudData[2, bitmapName] = "gui/hud_medpack.png";
|
||||
$InventoryHudData[2, bitmapName] = "gui/hud_medpack";
|
||||
$InventoryHudData[2, itemDataName] = RepairKit;
|
||||
$InventoryHudData[2, ammoDataName] = RepairKit;
|
||||
$InventoryHudData[2, slot] = 3;
|
||||
$InventoryHudData[3, bitmapName] = "gui/hud_handgren.png";
|
||||
$InventoryHudData[3, bitmapName] = "gui/hud_handgren";
|
||||
$InventoryHudData[3, itemDataName] = FlashGrenade;
|
||||
$InventoryHudData[3, ammoDataName] = FlashGrenade;
|
||||
$InventoryHudData[3, slot] = 0;
|
||||
$InventoryHudData[4, bitmapName] = "gui/hud_handgren.png";
|
||||
$InventoryHudData[4, bitmapName] = "gui/hud_handgren";
|
||||
$InventoryHudData[4, itemDataName] = ConcussionGrenade;
|
||||
$InventoryHudData[4, ammoDataName] = ConcussionGrenade;
|
||||
$InventoryHudData[4, slot] = 0;
|
||||
$InventoryHudData[5, bitmapName] = "gui/hud_handgren.png";
|
||||
$InventoryHudData[5, bitmapName] = "gui/hud_handgren";
|
||||
$InventoryHudData[5, itemDataName] = FlareGrenade;
|
||||
$InventoryHudData[5, ammoDataName] = FlareGrenade;
|
||||
$InventoryHudData[5, slot] = 0;
|
||||
$InventoryHudData[6, bitmapName] = "gui/hud_handgren.png";
|
||||
$InventoryHudData[6, bitmapName] = "gui/hud_handgren";
|
||||
$InventoryHudData[6, itemDataName] = CameraGrenade;
|
||||
$InventoryHudData[6, ammoDataName] = CameraGrenade;
|
||||
$InventoryHudData[6, slot] = 0;
|
||||
$InventoryHudData[7, bitmapName] = "gui/hud_beacon.png";
|
||||
$InventoryHudData[7, bitmapName] = "gui/hud_beacon";
|
||||
$InventoryHudData[7, itemDataName] = Beacon;
|
||||
$InventoryHudData[7, ammoDataName] = Beacon;
|
||||
$InventoryHudData[7, slot] = 2;
|
||||
|
|
@ -941,6 +932,9 @@ function updateActionMaps()
|
|||
observerBlockMap.pop();
|
||||
if ( isObject( observerMap ) )
|
||||
observerMap.pop();
|
||||
if ( isObject( pickTeamMap ) )
|
||||
pickTeamMap.pop();
|
||||
|
||||
//if (isObject(flyingCameraMove))
|
||||
// flyingCameraMove.pop();
|
||||
if (isObject(ControlActionMap))
|
||||
|
|
@ -977,7 +971,13 @@ function updateActionMaps()
|
|||
observerMap.copyBind( moveMap, mouseFire );
|
||||
|
||||
case "PickTeam":
|
||||
// no mapping
|
||||
////////////////////////
|
||||
// pickTeam Keys
|
||||
//////////////////////
|
||||
if( !isObject( pickTeamMap ) )
|
||||
new ActionMap( pickTeamMap );
|
||||
pickTeamMap.copyBind( moveMap, toggleMessageHud );
|
||||
pickTeamMap.push();
|
||||
|
||||
//case 'Standard':
|
||||
default:
|
||||
|
|
@ -994,8 +994,9 @@ function ClientCmdDisplayHuds()
|
|||
// only update action maps if playGui is current content
|
||||
%content = Canvas.getContent();
|
||||
if(isObject(%content) && (%content.getName() $= "PlayGui"))
|
||||
{
|
||||
updateActionMaps();
|
||||
|
||||
}
|
||||
ammoHud.setVisible(false);
|
||||
objectiveHud.setVisible(false);
|
||||
inventoryHud.setVisible(false);
|
||||
|
|
@ -1005,7 +1006,6 @@ function ClientCmdDisplayHuds()
|
|||
HudClusterBack.setVisible(false);
|
||||
outerChatHud.setVisible(false);
|
||||
clockHud.setVisible(false);
|
||||
lagHudIndicator.setVisible(false);
|
||||
controlObjectText.setVisible(false);
|
||||
clientCmdToggleDashHud(false);
|
||||
|
||||
|
|
@ -1017,10 +1017,7 @@ function ClientCmdDisplayHuds()
|
|||
retCenterHud.setVisible(true);
|
||||
HudClusterBack.setVisible(true);
|
||||
outerChatHud.setVisible(true);
|
||||
if (!$showLagIcon)
|
||||
clockHud.setVisible(true);
|
||||
else
|
||||
lagHudIndicator.setVisible(true);
|
||||
clockHud.setVisible(true);
|
||||
|
||||
case "Passenger":
|
||||
clientCmdShowVehicleGauges($HudModeType, $HudModeNode);
|
||||
|
|
@ -1034,21 +1031,14 @@ function ClientCmdDisplayHuds()
|
|||
retCenterHud.setVisible(true);
|
||||
HudClusterBack.setVisible(true);
|
||||
outerChatHud.setVisible(true);
|
||||
if (!$showLagIcon)
|
||||
clockHud.setVisible(true);
|
||||
else
|
||||
lagHudIndicator.setVisible(true);
|
||||
clientCmdSetWeaponsHudActive(0);
|
||||
clockHud.setVisible(true);
|
||||
|
||||
case "Object":
|
||||
ammoHud.setVisible(true);
|
||||
HudClusterBack.setVisible(true);
|
||||
outerChatHud.setVisible(true);
|
||||
controlObjectText.setVisible(true);
|
||||
if (!$showLagIcon)
|
||||
clockHud.setVisible(true);
|
||||
else
|
||||
lagHudIndicator.setVisible(true);
|
||||
clockHud.setVisible(true);
|
||||
|
||||
setControlObjectReticle($HudModeType);
|
||||
|
||||
|
|
@ -1056,10 +1046,7 @@ function ClientCmdDisplayHuds()
|
|||
objectiveHud.setVisible(true);
|
||||
HudClusterBack.setVisible(true);
|
||||
outerChatHud.setVisible(true);
|
||||
if (!$showLagIcon)
|
||||
clockHud.setVisible(true);
|
||||
else
|
||||
lagHudIndicator.setVisible(true);
|
||||
clockHud.setVisible(true);
|
||||
|
||||
case "PickTeam":
|
||||
ammoHud.setVisible(false);
|
||||
|
|
@ -1069,7 +1056,7 @@ function ClientCmdDisplayHuds()
|
|||
weaponsHud.setVisible(false);
|
||||
retCenterHud.setVisible(false);
|
||||
HudClusterBack.setVisible(false);
|
||||
outerChatHud.setVisible(false);
|
||||
outerChatHud.setVisible(true);
|
||||
controlObjectText.setVisible(false);
|
||||
clockHud.setVisible(false);
|
||||
|
||||
|
|
@ -1084,10 +1071,7 @@ function ClientCmdDisplayHuds()
|
|||
retCenterHud.setVisible(true);
|
||||
HudClusterBack.setVisible(true);
|
||||
outerChatHud.setVisible(true);
|
||||
if (!$showLagIcon)
|
||||
clockHud.setVisible(true);
|
||||
else
|
||||
lagHudIndicator.setVisible(true);
|
||||
clockHud.setVisible(true);
|
||||
|
||||
if(voteHud.voting)
|
||||
mainVoteHud.setVisible(1);
|
||||
|
|
@ -1108,19 +1092,7 @@ function clientcmdTogglePlayHuds(%val)
|
|||
retCenterHud.setVisible(%val);
|
||||
HudClusterBack.setVisible(%val);
|
||||
outerChatHud.setVisible(%val);
|
||||
|
||||
if (%val)
|
||||
{
|
||||
if (!$showLagIcon)
|
||||
clockHud.setVisible(true);
|
||||
else
|
||||
lagHudIndicator.setVisible(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
clockHud.setVisible(false);
|
||||
lagHudIndicator.setVisible(false);
|
||||
}
|
||||
clockHud.setVisible(%val);
|
||||
|
||||
if(%val)
|
||||
{
|
||||
|
|
@ -1756,4 +1728,20 @@ function testChatHud()
|
|||
$testCount++;
|
||||
messageAll( '', "This is test number " @ $testCount );
|
||||
$tester = schedule( 50, 0, "testChatHud");
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
function HudNetDisplay::getPrefs(%this)
|
||||
{
|
||||
for(%i = 0; %i < 6; %i++)
|
||||
%this.renderField[%i] = ($pref::Net::graphFields >> %i) & 1;
|
||||
}
|
||||
|
||||
function NetBarHud::infoUpdate(%this, %ping, %packetLoss, %sendPackets, %sendBytes, %receivePackets, %receiveBytes)
|
||||
{
|
||||
NetBarHudPingText.setText(mFormatFloat(%ping, "%4.0f") @ "ms");
|
||||
NetBarHudPacketLossText.setText(mFormatFloat(%packetLoss, "%3.0f") @ "%");
|
||||
|
||||
NetBarHudSendBar.value = %sendPackets / $pref::Net::PacketRateToServer;
|
||||
NetBarHudReceiveBar.value = %receivePackets / $pref::Net::PacketRateToClient;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ function serverCmdEndThrowCount(%client, %data)
|
|||
return;
|
||||
|
||||
// throwStrength will be how many seconds the key was held
|
||||
%throwStrength = (getSimTime() - %client.player.throwStart) / 300;
|
||||
%throwStrength = (getSimTime() - %client.player.throwStart) / 150;
|
||||
// trim the time to fit between 0.5 and 1.5
|
||||
if(%throwStrength > 1.5)
|
||||
%throwStrength = 1.5;
|
||||
|
|
@ -126,6 +126,13 @@ function ShapeBase::throwPack(%this)
|
|||
function ShapeBase::throw(%this,%data)
|
||||
{
|
||||
if (%this.inv[%data.getName()] > 0) {
|
||||
|
||||
// save off the ammo count on this item
|
||||
if( %this.getInventory( %data ) < $AmmoIncrement[%data.getName()] )
|
||||
%data.ammoStore = %this.getInventory( %data );
|
||||
else
|
||||
%data.ammoStore = $AmmoIncrement[%data.getName()];
|
||||
|
||||
// Throw item first...
|
||||
%this.throwItem(%data);
|
||||
if($AmmoIncrement[%data.getName()] !$= "")
|
||||
|
|
@ -183,6 +190,7 @@ function ShapeBase::pickup(%this,%obj,%amount)
|
|||
{
|
||||
%data = %obj.getDatablock();
|
||||
%delta = %this.incInventory(%data,%amount);
|
||||
|
||||
if (%delta)
|
||||
%data.onPickup(%obj,%this,%delta);
|
||||
return %delta;
|
||||
|
|
@ -357,6 +365,8 @@ function ShapeBase::throwItem(%this,%data)
|
|||
dataBlock = %data;
|
||||
rotation = "0 0 1 " @ (getRandom() * 360);
|
||||
};
|
||||
|
||||
%item.ammoStore = %data.ammoStore;
|
||||
MissionCleanup.add(%item);
|
||||
%this.throwObject(%item);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -505,12 +505,19 @@ function buyFavorites(%client)
|
|||
%newArmor = %client.player.getDataBlock();
|
||||
|
||||
%client.player.setDamageLevel(%curDmgPct * %newArmor.maxDamage);
|
||||
|
||||
%weaponCount = 0;
|
||||
|
||||
// weapons
|
||||
for(%i = 0; %i < getFieldCount( %client.weaponIndex ); %i++)
|
||||
{
|
||||
%inv = $NameToInv[%client.favorites[getField( %client.weaponIndex, %i )]];
|
||||
%client.player.setInventory( %inv, 1 );
|
||||
|
||||
if( %inv !$= "" )
|
||||
{
|
||||
%weaponCount++;
|
||||
%client.player.setInventory( %inv, 1 );
|
||||
}
|
||||
|
||||
switch$ ( %inv )
|
||||
{
|
||||
case Plasma:
|
||||
|
|
@ -527,7 +534,7 @@ function buyFavorites(%client)
|
|||
%client.player.setInventory( ChaingunAmmo, 400 );
|
||||
}
|
||||
}
|
||||
%client.player.weaponCount = getFieldCount( %client.weaponIndex );
|
||||
%client.player.weaponCount = %weaponCount;
|
||||
|
||||
// pack
|
||||
%pCh = $NameToInv[%client.favorites[%client.packIndex]];
|
||||
|
|
|
|||
|
|
@ -295,8 +295,7 @@ datablock ItemData(Flag)
|
|||
shapefile = "flag.dts";
|
||||
mass = 55;
|
||||
elasticity = 0.2;
|
||||
//friction = 0.6;
|
||||
friction = 5.6;
|
||||
friction = 0.6;
|
||||
pickupRadius = 3;
|
||||
pickUpName = "a flag";
|
||||
computeCRC = true;
|
||||
|
|
@ -382,8 +381,7 @@ datablock ItemData(HuntersFlag1)
|
|||
shapefile = "Huntersflag.dts";
|
||||
mass = 75;
|
||||
elasticity = 0.2;
|
||||
//friction = 0.6;
|
||||
friction = 5.6;
|
||||
friction = 0.6;
|
||||
pickupRadius = 3;
|
||||
isInvincible = true;
|
||||
pickUpName = "a flag";
|
||||
|
|
@ -617,7 +615,7 @@ function Beacon::onUse(%data, %obj)
|
|||
{
|
||||
// look for 3 meters along player's viewpoint for interior or terrain
|
||||
%searchRange = 3.0;
|
||||
%mask = $TypeMasks::TerrainObjectType | $TypeMasks::InteriorObjectType | $TypeMasks::StaticShapeObjectType;
|
||||
%mask = $TypeMasks::TerrainObjectType | $TypeMasks::InteriorObjectType | $TypeMasks::StaticShapeObjectType | $TypeMasks::ForceFieldObjectType;
|
||||
// get the eye vector and eye transform of the player
|
||||
%eyeVec = %obj.getEyeVector();
|
||||
%eyeTrans = %obj.getEyeTransform();
|
||||
|
|
@ -641,7 +639,7 @@ function Beacon::onUse(%data, %obj)
|
|||
else
|
||||
{
|
||||
%searchObj = GetWord(%searchResult, 0);
|
||||
if(%searchObj.getType() & $TypeMasks::StaticShapeObjectType)
|
||||
if(%searchObj.getType() & ($TypeMasks::StaticShapeObjectType | $TypeMasks::ForceFieldObjectType) )
|
||||
{
|
||||
// if there's already a beacon where player is aiming, switch its type
|
||||
// otherwise, player can't deploy a beacon there
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ function LoadingGui::onSleep(%this)
|
|||
}
|
||||
%this.qLineCount = 0;
|
||||
|
||||
LOAD_MapPic.setBitmap( "gui/Loading.png" );
|
||||
LOAD_MapPic.setBitmap( "gui/Loading" );
|
||||
LOAD_MapName.setText( "" );
|
||||
LOAD_MapText.setText( "" );
|
||||
LOAD_MissionType.setText( "" );
|
||||
|
|
@ -279,9 +279,12 @@ function handleLoadInfoMessage( %msgType, %msgString, %bitmapName, %mapName, %mi
|
|||
LobbyGui.objLine[%line] = "";
|
||||
LobbyGui.objLineCount = 0;
|
||||
|
||||
%loadBmp = "gui/load_" @ %bitmapName @ ".png";
|
||||
if (!isDemo() && !isDemoServer())
|
||||
%loadBmp = "gui/load_" @ %bitmapName @ ".png";
|
||||
else
|
||||
%loadBmp = "gui/load_" @ %bitmapName @ ".bm8";
|
||||
if ( !isFile( "textures/" @ %loadBmp ) )
|
||||
%loadBmp = "gui/loading.png";
|
||||
%loadBmp = "gui/loading";
|
||||
LOAD_MapPic.setBitmap( %loadBmp );
|
||||
LOAD_MapName.setText( %mapName );
|
||||
LOAD_MissionType.setText( %missionType );
|
||||
|
|
@ -338,5 +341,5 @@ function handleLoadRulesLineMessage( %msgType, %msgString, %line, %bulletStyle )
|
|||
//------------------------------------------------------------------------------
|
||||
function handleLoadInfoDoneMessage( %msgType, %msgString )
|
||||
{
|
||||
// TODO - make this signal the game that it's okay to go to the Loading screen now.
|
||||
LoadingGui.gotLoadInfo = true;
|
||||
}
|
||||
|
|
@ -1,6 +1,3 @@
|
|||
$numDeathMsgLines = 10;
|
||||
$currentDeathMsgLine = 0;
|
||||
$deathMsgTimeOut = 5 * 1000;
|
||||
$MaxMessageWavLength = 5200;
|
||||
|
||||
function addMessageCallback(%msgType, %func)
|
||||
|
|
@ -56,27 +53,6 @@ function defaultMessageCallback(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %
|
|||
}
|
||||
else
|
||||
addMessageHudLine( %message );
|
||||
//else if (strstr(%message, "~x") != -1)
|
||||
//{
|
||||
// %mess = getSubStr(%message, 2, 1000);
|
||||
// addDeathMsgHudLine(%mess);
|
||||
//}
|
||||
}
|
||||
|
||||
function getPlayerPrefs( %player )
|
||||
{
|
||||
// test against %player.guid
|
||||
|
||||
// For now, mute smurfs and listen to real players:
|
||||
commandToServer( 'ListenTo', %player.clientId, !%player.isSmurf, false );
|
||||
|
||||
// MES -- queryClientPlayerDatabase function call causes console error
|
||||
|
||||
//if(queryClientPlayerDatabase(%player.guid, "muted"))
|
||||
//{
|
||||
// %player.chatMuted = true;
|
||||
// addMessageHudLine("Spamming punk \c3" @ %player.name @ "\cr joined and has been auto muted!");
|
||||
//}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
|
@ -146,7 +122,10 @@ function handleClientNameChanged( %msgType, %msgString, %oldName, %newName, %cli
|
|||
{
|
||||
%player = $PlayerList[%clientId];
|
||||
if( %player )
|
||||
{
|
||||
%player.name = detag( %newName );
|
||||
lobbyUpdatePlayer( %clientId );
|
||||
}
|
||||
}
|
||||
|
||||
addMessageCallback("", defaultMessageCallback);
|
||||
|
|
@ -421,192 +400,3 @@ function messageAllExcept(%client, %team, %msgtype, %msgString, %a1, %a2, %a3, %
|
|||
// }
|
||||
//}
|
||||
//#####################################################
|
||||
|
||||
//modified defaultgame and added deathmessages.cs to handle this - EL
|
||||
// addMessageCallback('MsgSuicide', suicideMessage);
|
||||
//
|
||||
// function suicideMessage(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10)
|
||||
// {
|
||||
// %victim = detag(%a1);
|
||||
// %suicideMsg = %victim @ " hits CTRL-K. What a wimp!";
|
||||
// addDeathMsgHudLine(%suicideMsg);
|
||||
// }
|
||||
|
||||
//modified defaultgame and added deathmessages.cs to handle this - EL
|
||||
// addMessageCallback('MsgSelfKill', selfKillMessage);
|
||||
//
|
||||
// function selfKillMessage(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10)
|
||||
// {
|
||||
// %victim = detag(%a1);
|
||||
// %gender = detag(%a2);
|
||||
// // gender will be HIM or HER
|
||||
// %poss = detag(%a3);
|
||||
// // poss will be HIS or HER (possessive)
|
||||
// %damageType = detag(%a4);
|
||||
// switch$ (%damageType) {
|
||||
// case $DamageType::Plasma :
|
||||
// %suicideMsg = %victim @ " gets a taste of " @ %poss @ " own plasma.";
|
||||
// case $DamageType::Bullet :
|
||||
// %suicideMsg = %victim @ " shoots " @ %gender @ "self in the foot.";
|
||||
// case $DamageType::Disc :
|
||||
// %suicideMsg = %victim @ " blasts " @ %gender @ "self with a disc.";
|
||||
// case $DamageType::Grenade :
|
||||
// %suicideMsg = %victim @ " eats " @ %poss @ " own grenade.";
|
||||
// case $DamageType::Mortar :
|
||||
// %suicideMsg = %victim @ " launches a mortar too close to home.";
|
||||
// case $DamageType::Missile :
|
||||
// %suicideMsg = %victim @ " blows " @ %gender @ "self up with a missile.";
|
||||
// case $DamageType::Explosion :
|
||||
// %suicideMsg = %victim @ " gets too close to an explosion.";
|
||||
// case $DamageType::Ground :
|
||||
// %suicideMsg = %victim @ " hits the ground hard.";
|
||||
// default:
|
||||
// %suicideMsg = %victim @ " kills " @ %gender @ "self.";
|
||||
// }
|
||||
// addDeathMsgHudLine(%suicideMsg);
|
||||
// }
|
||||
|
||||
//modified defaultgame and added deathmessages.cs to handle this - EL
|
||||
// addMessageCallback('MsgPlayerTeamKill', playerTeamKillMessage);
|
||||
//
|
||||
// function playerTeamKillMessage(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10)
|
||||
// {
|
||||
// %victim = detag(%a1);
|
||||
// %killer = detag(%a2);
|
||||
// %killPoss = detag(%a3);
|
||||
// %teamKillMsg = %killer @ " mows down " @ %killPoss @ " teammate " @ %victim @ ".";
|
||||
// addDeathMsgHudLine(%teamKillMsg);
|
||||
// }
|
||||
|
||||
//modified defaultgame and added deathmessages.cs to handle this - EL
|
||||
// addMessageCallback('MsgPlayerIsKilled', playerIsKilledMessage);
|
||||
//
|
||||
// function playerIsKilledMessage(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10)
|
||||
// {
|
||||
// %victim = detag(%a1);
|
||||
// %killer = detag(%a2);
|
||||
// %vicGen = detag(%a3);
|
||||
// %vicPoss = detag(%a4);
|
||||
// //%kilGen = detag(%a5);
|
||||
// //%kilPoss = detag(%a6);
|
||||
// // vicGen and kilGen will be HIM or HER
|
||||
// // vicPoss and kilPoss will be HIS or HER
|
||||
// %damType = detag(%a5);
|
||||
// switch$ (%damType) {
|
||||
// case $DamageType::Blaster :
|
||||
// %dMsg = %killer @ " blasts the life out of " @ %victim @ ".";
|
||||
// case $DamageType::Plasma :
|
||||
// %dMsg = %killer @ " gives " @ %victim @ " a plasma transfusion.";
|
||||
// case $DamageType::Bullet :
|
||||
// %dMsg = %killer @ " gives " @ %victim @ " " @ %vicPoss @ " daily dose of lead.";
|
||||
// case $DamageType::Disc :
|
||||
// %dMsg = %killer @ " gives " @ %victim @ " a Stormhammer salute.";
|
||||
// case $DamageType::Grenade :
|
||||
// %dMsg = %killer @ " takes " @ %victim @ " out with a grenade.";
|
||||
// case $DamageType::Laser :
|
||||
// %dMsg = %killer @ " picks off " @ %victim @ " with a sniper shot.";
|
||||
// case $DamageType::ELF :
|
||||
// %dMsg = %killer @ " drains " @ %victim @ "\'s life force.";
|
||||
// case $DamageType::Mortar :
|
||||
// %dMsg = %killer @ " mortars " @ %victim @ " into oblivion.";
|
||||
// case $DamageType::Missile :
|
||||
// %dMsg = %killer @ "\'s missile catches up with " @ %victim @ ".";
|
||||
// case $DamageType::ShockLance :
|
||||
// %dMsg = %killer @ " assassinates " @ %victim @ ".";
|
||||
// case $DamageType::Mine :
|
||||
// %dMsg = %killer @ "\'s mine takes out " @ %victim @ ".";
|
||||
// case $DamageType::Explosion :
|
||||
// %dMsg = %killer @ " blows up " @ %victim @ ".";
|
||||
// case $DamageType::Impact :
|
||||
// %dMsg = %killer @ " runs over " @ %victim @ ".";
|
||||
// case $DamageType::Turret :
|
||||
// %dMsg = %killer @ "\'s turret kills " @ %victim @ ".";
|
||||
// default:
|
||||
// %dMsg = %victim @ " falls victim to " @ %killer @ ".";
|
||||
// }
|
||||
// addDeathMsgHudLine(%dMsg);
|
||||
// }
|
||||
|
||||
//function addDeathMsgHudLine(%msg)
|
||||
//{
|
||||
// if(!isObject(deathMsgHud)){
|
||||
// %dmHudX = firstWord(getResolution()) - 245;
|
||||
// %dmHudY = (getWord(objectiveHud.extent, 1) + getWord(objectiveHud.position, 1)) + 10;
|
||||
// %dmhPos = %dmHudX @ " " @ %dmHudY;
|
||||
// //error("y coords = " @ getWord(objectiveHud.extent, 1) @ " + " @ getWord(objectiveHud.position, 1) @ " + 10");
|
||||
// %dmHud = new GuiControl(deathMsgHud) {
|
||||
// profile = "GuiDeathMsgHudProfile";
|
||||
// horizSizing = "left";
|
||||
// vertSizing = "bottom";
|
||||
// position = %dmhPos;
|
||||
// extent = "240 170";
|
||||
// visible = "1";
|
||||
// modal = "0";
|
||||
// };
|
||||
// PlayGui.add(%dmHud);
|
||||
// }
|
||||
// %msgName = "deathMsg" @ $currentDeathMsgLine;
|
||||
// if(nameToId(%msgName) > 0)
|
||||
// %msgName.delete();
|
||||
// %msgYCoord = ($currentDeathMsgLine * 15);
|
||||
// %msgCoords = "3 " @ %msgYCoord;
|
||||
// // calculate how many lines the message will need to use
|
||||
// %multiLine = false;
|
||||
// if(strLen(%msg) > 52) {
|
||||
// %multiLine = true;
|
||||
// // find first space before character 52 and break the line there
|
||||
// %lBr = -1;
|
||||
// for(%i = 51; %i > 0; %i--)
|
||||
// if(getSubStr(%msg, %i, 1) $= " ") {
|
||||
// %lBr = %i;
|
||||
// break;
|
||||
// }
|
||||
// if(%lBr > -1) {
|
||||
// %msg1 = getSubStr(%msg, 0, %lBr);
|
||||
// %msg2 = getSubStr(%msg, %lBr + 1, strLen(%msg));
|
||||
// //error("Message line 1: |" @ %msg1 @ "|");
|
||||
// //error("Message line 2: |" @ %msg2 @ "|");
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// %msg1 = %msg;
|
||||
// %addDeathMsg = new GuiTextCtrl(%msgName) {
|
||||
// profile = "DeathMsgTextProfile";
|
||||
// horizSizing = "left";
|
||||
// vertSizing = "bottom";
|
||||
// position = %msgCoords;
|
||||
// extent = "235 15";
|
||||
// minExtent = "8 8";
|
||||
// visible = "1";
|
||||
// helpTag = "0";
|
||||
// text = "";
|
||||
// };
|
||||
// deathMsgHud.add(%msgName);
|
||||
// %msgName.setValue(%msg1);
|
||||
// $currentDeathMsgLine++;
|
||||
// %msgName.schedule($deathMsgTimeOut, "delete");
|
||||
// if(%multiLine) {
|
||||
// %msgName2 = "deathMsg" @ ($currentDeathMsgLine + 1);
|
||||
// if(nameToId(%msgName2) > 0)
|
||||
// %msgName2.delete();
|
||||
// %msgYCoord = ($currentDeathMsgLine * 15);
|
||||
// %msgCoords = "3 " @ %msgYCoord;
|
||||
// %addDeathMsg2 = new GuiTextCtrl(%msgName2) {
|
||||
// profile = "DeathMsgTextProfile";
|
||||
// horizSizing = "left";
|
||||
// vertSizing = "bottom";
|
||||
// position = %msgCoords;
|
||||
// extent = "235 15";
|
||||
// minExtent = "8 8";
|
||||
// visible = "1";
|
||||
// helpTag = "0";
|
||||
// text = "";
|
||||
// };
|
||||
// deathMsgHud.add(%msgName2);
|
||||
// %msgName2.setValue(%msg2);
|
||||
// $currentDeathMsgLine++;
|
||||
// %msgName2.schedule($deathMsgTimeOut, "delete");
|
||||
// }
|
||||
// if($currentDeathMsgLine >= $numDeathMsgLines)
|
||||
// $currentDeathMsgLine = 0;
|
||||
//}
|
||||
|
|
@ -1,16 +1,16 @@
|
|||
//----------------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
$InvincibleTime = 6;
|
||||
// Load dts shapes and merge animations
|
||||
exec("shapes/light_male.cs");
|
||||
exec("shapes/medium_male.cs");
|
||||
exec("shapes/heavy_male.cs");
|
||||
exec("shapes/light_female.cs");
|
||||
exec("shapes/medium_female.cs");
|
||||
exec("shapes/bioderm_light.cs");
|
||||
exec("shapes/bioderm_medium.cs");
|
||||
exec("shapes/bioderm_heavy.cs");
|
||||
exec("scripts/light_male.cs");
|
||||
exec("scripts/medium_male.cs");
|
||||
exec("scripts/heavy_male.cs");
|
||||
exec("scripts/light_female.cs");
|
||||
exec("scripts/medium_female.cs");
|
||||
exec("scripts/bioderm_light.cs");
|
||||
exec("scripts/bioderm_medium.cs");
|
||||
exec("scripts/bioderm_heavy.cs");
|
||||
|
||||
$CorpseTimeoutValue = 22 * 1000;
|
||||
|
||||
|
|
@ -954,7 +954,7 @@ datablock ParticleData(HumanArmorJetParticle)
|
|||
gravityCoefficient = 0;
|
||||
inheritedVelFactor = 0.2;
|
||||
constantAcceleration = 0.0;
|
||||
lifetimeMS = 50;
|
||||
lifetimeMS = 100;
|
||||
lifetimeVarianceMS = 0;
|
||||
textureName = "particleTest";
|
||||
colors[0] = "0.32 0.47 0.47 1.0";
|
||||
|
|
@ -1175,8 +1175,8 @@ datablock PlayerData(LightMaleHumanArmor) : LightPlayerDamageProfile
|
|||
cmdIcon = CMDPlayerIcon;
|
||||
cmdMiniIconName = "commander/MiniIcons/com_player_grey";
|
||||
|
||||
hudImageNameFriendly[0] = "gui/hud_playertriangle.png";
|
||||
hudImageNameEnemy[0] = "gui/hud_playertriangle_enemy.png";
|
||||
hudImageNameFriendly[0] = "gui/hud_playertriangle";
|
||||
hudImageNameEnemy[0] = "gui/hud_playertriangle_enemy";
|
||||
hudRenderModulated[0] = true;
|
||||
|
||||
hudImageNameFriendly[1] = "commander/MiniIcons/com_flag_grey";
|
||||
|
|
@ -1216,8 +1216,8 @@ datablock PlayerData(LightMaleHumanArmor) : LightPlayerDamageProfile
|
|||
energyPerDamagePoint = 75.0; // shield energy required to block one point of damage
|
||||
|
||||
rechargeRate = 0.256;
|
||||
jetForce = 28.2 * 90;
|
||||
underwaterJetForce = 26.2 * 90 * 2.0;
|
||||
jetForce = 27.51 * 90;
|
||||
underwaterJetForce = 27.51 * 90 * 2.0;
|
||||
underwaterVertJetFactor = 1.5;
|
||||
jetEnergyDrain = 0.8;
|
||||
underwaterJetEnergyDrain = 0.5;
|
||||
|
|
@ -1227,9 +1227,9 @@ datablock PlayerData(LightMaleHumanArmor) : LightPlayerDamageProfile
|
|||
runForce = 55.20 * 90;
|
||||
runEnergyDrain = 0;
|
||||
minRunEnergy = 0;
|
||||
maxForwardSpeed = 15;
|
||||
maxBackwardSpeed = 14;
|
||||
maxSideSpeed = 14;
|
||||
maxForwardSpeed = 14;
|
||||
maxBackwardSpeed = 13;
|
||||
maxSideSpeed = 13;
|
||||
|
||||
maxUnderwaterForwardSpeed = 8.4;
|
||||
maxUnderwaterBackwardSpeed = 7.8;
|
||||
|
|
@ -1440,8 +1440,8 @@ datablock PlayerData(MediumMaleHumanArmor) : MediumPlayerDamageProfile
|
|||
cmdIcon = CMDPlayerIcon;
|
||||
cmdMiniIconName = "commander/MiniIcons/com_player_grey";
|
||||
|
||||
hudImageNameFriendly[0] = "gui/hud_playertriangle.png";
|
||||
hudImageNameEnemy[0] = "gui/hud_playertriangle_enemy.png";
|
||||
hudImageNameFriendly[0] = "gui/hud_playertriangle";
|
||||
hudImageNameEnemy[0] = "gui/hud_playertriangle_enemy";
|
||||
hudRenderModulated[0] = true;
|
||||
|
||||
hudImageNameFriendly[1] = "commander/MiniIcons/com_flag_grey";
|
||||
|
|
@ -1474,8 +1474,8 @@ datablock PlayerData(MediumMaleHumanArmor) : MediumPlayerDamageProfile
|
|||
energyPerDamagePoint = 75.0; // shield energy required to block one point of damage
|
||||
|
||||
rechargeRate = 0.256;
|
||||
jetForce = 27.06 * 130;
|
||||
underwaterJetForce = 24.6 * 130 * 2.0;
|
||||
jetForce = 25.83 * 130;
|
||||
underwaterJetForce = 25.83 * 130 * 2.0;
|
||||
underwaterVertJetFactor = 1.5;
|
||||
jetEnergyDrain = 1.0;
|
||||
underwaterJetEnergyDrain = 0.5;
|
||||
|
|
@ -1485,9 +1485,9 @@ datablock PlayerData(MediumMaleHumanArmor) : MediumPlayerDamageProfile
|
|||
runForce = 46 * 130;
|
||||
runEnergyDrain = 0;
|
||||
minRunEnergy = 0;
|
||||
maxForwardSpeed = 12;
|
||||
maxBackwardSpeed = 11;
|
||||
maxSideSpeed = 11;
|
||||
maxForwardSpeed = 11;
|
||||
maxBackwardSpeed = 10;
|
||||
maxSideSpeed = 10;
|
||||
|
||||
maxUnderwaterForwardSpeed = 6.6;
|
||||
maxUnderwaterBackwardSpeed = 6;
|
||||
|
|
@ -1696,8 +1696,8 @@ datablock PlayerData(HeavyMaleHumanArmor) : HeavyPlayerDamageProfile
|
|||
cmdIcon = CMDPlayerIcon;
|
||||
cmdMiniIconName = "commander/MiniIcons/com_player_grey";
|
||||
|
||||
hudImageNameFriendly[0] = "gui/hud_playertriangle.png";
|
||||
hudImageNameEnemy[0] = "gui/hud_playertriangle_enemy.png";
|
||||
hudImageNameFriendly[0] = "gui/hud_playertriangle";
|
||||
hudImageNameEnemy[0] = "gui/hud_playertriangle_enemy";
|
||||
hudRenderModulated[0] = true;
|
||||
|
||||
hudImageNameFriendly[1] = "commander/MiniIcons/com_flag_grey";
|
||||
|
|
@ -1730,8 +1730,8 @@ datablock PlayerData(HeavyMaleHumanArmor) : HeavyPlayerDamageProfile
|
|||
energyPerDamagePoint = 75.0; // shield energy required to block one point of damage
|
||||
|
||||
rechargeRate = 0.256;
|
||||
jetForce = 23.54 * 180;
|
||||
underwaterJetForce = 21.4 * 180 * 2.0;
|
||||
jetForce = 22.47 * 180;
|
||||
underwaterJetForce = 22.47 * 180 * 2.0;
|
||||
underwaterVertJetFactor = 1.5;
|
||||
jetEnergyDrain = 1.1;
|
||||
underwaterJetEnergyDrain = 0.55;
|
||||
|
|
@ -1741,9 +1741,9 @@ datablock PlayerData(HeavyMaleHumanArmor) : HeavyPlayerDamageProfile
|
|||
runForce = 40.25 * 180;
|
||||
runEnergyDrain = 0;
|
||||
minRunEnergy = 0;
|
||||
maxForwardSpeed = 7.5;
|
||||
maxBackwardSpeed = 6;
|
||||
maxSideSpeed = 6;
|
||||
maxForwardSpeed = 6.5;
|
||||
maxBackwardSpeed = 5;
|
||||
maxSideSpeed = 5;
|
||||
|
||||
maxUnderwaterForwardSpeed = 3.9;
|
||||
maxUnderwaterBackwardSpeed = 3;
|
||||
|
|
@ -2073,8 +2073,12 @@ function Armor::onMount(%this,%obj,%vehicle,%node)
|
|||
// Node 0 is the pilot's pos.
|
||||
%obj.setTransform("0 0 0 0 0 1 0");
|
||||
%obj.setActionThread(%vehicle.getDatablock().mountPose[%node],true,true);
|
||||
%obj.lastWeapon = %obj.getMountedImage($WeaponSlot);
|
||||
%obj.unmountImage($WeaponSlot);
|
||||
|
||||
if(!%obj.inStation)
|
||||
%obj.lastWeapon = (%obj.getMountedImage($WeaponSlot) == 0 ) ? "" : %obj.getMountedImage($WeaponSlot).getName().item;
|
||||
|
||||
%obj.unmountImage($WeaponSlot);
|
||||
|
||||
if(!%obj.client.isAIControlled())
|
||||
{
|
||||
%obj.setControlObject(%vehicle);
|
||||
|
|
@ -2136,7 +2140,14 @@ function Armor::onUnmount( %this, %obj, %vehicle, %node )
|
|||
if ( %node == 0 )
|
||||
{
|
||||
commandToClient( %obj.client, 'VehicleDismount' );
|
||||
%obj.mountImage(%obj.lastWeapon, $WeaponSlot);
|
||||
commandToClient(%obj.client, 'removeReticle');
|
||||
|
||||
if(%obj.inv[%obj.lastWeapon])
|
||||
%obj.use(%obj.lastWeapon);
|
||||
|
||||
if(%obj.getMountedImage($WeaponSlot) == 0)
|
||||
%obj.selectWeaponSlot( 0 );
|
||||
|
||||
//Inform gunner position when pilot leaves...
|
||||
//if(%vehicle.getDataBlock().showPilotInfo !$= "")
|
||||
// if((%gunner = %vehicle.getMountNodeObject(1)) != 0)
|
||||
|
|
@ -2172,7 +2183,7 @@ function Armor::onCollision(%this,%obj,%col,%forceVehicleNode)
|
|||
// player collided with a vehicle
|
||||
%node = -1;
|
||||
if (%forceVehicleNode !$= "" || (%className $= WheeledVehicleData || %className $= FlyingVehicleData || %className $= HoverVehicleData) &&
|
||||
%obj.mountVehicle && %obj.getState() $= "Move" && %col.mountable) {
|
||||
%obj.mountVehicle && %obj.getState() $= "Move" && %col.mountable && !%obj.inStation && %col.getDamageState() !$= "Destroyed") {
|
||||
|
||||
//if the player is an AI, he should snap to the mount points in node order,
|
||||
//to ensure they mount the turret before the passenger seat, regardless of where they collide...
|
||||
|
|
@ -2206,7 +2217,12 @@ function Armor::onCollision(%this,%obj,%col,%forceVehicleNode)
|
|||
// check to see if attempting to enter a "sitting" node
|
||||
if(nodeIsSitting(%datablock, %node)) {
|
||||
// send the player a message -- can't sit here with large pack
|
||||
messageClient(%obj.client, 'MsgCantSitHere', '\c2Pack too large, can\'t occupy this seat.~wfx/misc/misc.error.wav');
|
||||
if(!%obj.noSitMessage)
|
||||
{
|
||||
%obj.noSitMessage = true;
|
||||
%obj.schedule(2000, "resetSitMessage");
|
||||
messageClient(%obj.client, 'MsgCantSitHere', '\c2Pack too large, can\'t occupy this seat.~wfx/misc/misc.error.wav');
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -2220,7 +2236,11 @@ function Armor::onCollision(%this,%obj,%col,%forceVehicleNode)
|
|||
else
|
||||
commandToClient(%obj.client,'SetPassengerVehicleKeys', true);
|
||||
|
||||
%col.lastWeapon = %col.getMountedImage($WeaponSlot);
|
||||
if(!%obj.inStation)
|
||||
%col.lastWeapon = ( %col.getMountedImage($WeaponSlot) == 0 ) ? "" : %col.getMountedImage($WeaponSlot).getName().item;
|
||||
else
|
||||
%col.lastWeapon = %obj.lastWeapon;
|
||||
|
||||
%col.mountObject(%obj,%node);
|
||||
%col.playAudio(0, MountVehicleSound);
|
||||
%obj.mVehicle = %col;
|
||||
|
|
@ -2377,6 +2397,11 @@ function Armor::onCollision(%this,%obj,%col,%forceVehicleNode)
|
|||
}
|
||||
}
|
||||
|
||||
function Player::resetSitMessage(%obj)
|
||||
{
|
||||
%obj.noSitMessage = false;
|
||||
}
|
||||
|
||||
function Player::setInvincible(%this, %val)
|
||||
{
|
||||
%this.invincible = %val;
|
||||
|
|
@ -2485,13 +2510,14 @@ function Armor::doDismount(%this, %obj, %forced)
|
|||
%obj.unmount();
|
||||
if(%obj.mVehicle)
|
||||
%obj.mVehicle.getDataBlock().playerDismounted(%obj.mVehicle, %obj);
|
||||
|
||||
// bots don't change their control objects when in vehicles
|
||||
if(!%obj.client.isAIControlled())
|
||||
{
|
||||
%vehicle = %obj.getControlObject();
|
||||
%obj.setControlObject(0);
|
||||
}
|
||||
|
||||
|
||||
%obj.mountVehicle = false;
|
||||
%obj.schedule(4000, "setMountVehicle", true);
|
||||
|
||||
|
|
@ -2503,6 +2529,37 @@ function Armor::doDismount(%this, %obj, %forced)
|
|||
%obj.vehicleTurret = "";
|
||||
}
|
||||
|
||||
function resetObserveFollow( %client, %dismount )
|
||||
{
|
||||
if( %dismount )
|
||||
{
|
||||
if( !isObject( %client.player ) )
|
||||
return;
|
||||
|
||||
for( %i = 0; %i < %client.observeCount; %i++ )
|
||||
{
|
||||
%client.observers[%i].camera.setOrbitMode( %client.player, %client.player.getTransform(), 0.5, 4.5, 4.5);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( !%client.player.isMounted() )
|
||||
return;
|
||||
|
||||
// grab the vehicle...
|
||||
%mount = %client.player.getObjectMount();
|
||||
if( %mount.getDataBlock().observeParameters $= "" )
|
||||
%params = %client.player.getTransform();
|
||||
else
|
||||
%params = %mount.getDataBlock().observeParameters;
|
||||
|
||||
for( %i = 0; %i < %client.observeCount; %i++ )
|
||||
{
|
||||
%client.observers[%i].camera.setOrbitMode(%mount, %mount.getTransform(), getWord( %params, 0 ), getWord( %params, 1 ), getWord( %params, 2 ));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
|
|
@ -2513,7 +2570,7 @@ function Player::scriptKill(%player, %damageType)
|
|||
%player.damage(0, %player.getPosition(), 10000, %damageType);
|
||||
}
|
||||
|
||||
function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %amount, %damageType, %momVec)
|
||||
function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %amount, %damageType, %momVec, %mineSC)
|
||||
{
|
||||
//error("Armor::damageObject( "@%data@", "@%targetObject@", "@%sourceObject@", "@%position@", "@%amount@", "@%damageType@", "@%momVec@" )");
|
||||
if(%targetObject.invincible || %targetObject.getState() $= "Dead")
|
||||
|
|
@ -2546,7 +2603,10 @@ function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %am
|
|||
}
|
||||
|
||||
%targetClient = %targetObject.getOwnerClient();
|
||||
%sourceClient = isObject(%sourceObject) ? %sourceObject.getOwnerClient() : 0;
|
||||
if(isObject(%mineSC))
|
||||
%sourceClient = %mineSC;
|
||||
else
|
||||
%sourceClient = isObject(%sourceObject) ? %sourceObject.getOwnerClient() : 0;
|
||||
|
||||
%targetTeam = %targetClient.team;
|
||||
|
||||
|
|
|
|||
|
|
@ -76,7 +76,15 @@ function ShapeBaseImageData::onFire(%data, %obj, %slot)
|
|||
}
|
||||
else
|
||||
%energy = %obj.getEnergyLevel();
|
||||
if(%energy < %data.minEnergy)
|
||||
|
||||
if(%data.useCapacitor && %data.usesEnergy)
|
||||
{
|
||||
if( %useEnergyObj.turretObject.getCapacitorLevel() < %data.minEnergy )
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if(%energy < %data.minEnergy)
|
||||
return;
|
||||
}
|
||||
if(%data.projectileSpread)
|
||||
|
|
@ -123,7 +131,14 @@ function ShapeBaseImageData::onFire(%data, %obj, %slot)
|
|||
if(%data.usesEnergy)
|
||||
{
|
||||
if(%data.useMountEnergy)
|
||||
%useEnergyObj.setEnergyLevel(%energy - %data.fireEnergy);
|
||||
{
|
||||
if( %data.useCapacitor )
|
||||
{
|
||||
%vehicle.turretObject.setCapacitorLevel( %vehicle.turretObject.getCapacitorLevel() - %data.fireEnergy );
|
||||
}
|
||||
else
|
||||
%useEnergyObj.setEnergyLevel(%energy - %data.fireEnergy);
|
||||
}
|
||||
else
|
||||
%obj.setEnergyLevel(%energy - %data.fireEnergy);
|
||||
}
|
||||
|
|
@ -374,11 +389,16 @@ function ELFProjectileData::zapTarget(%data, %projectile, %target, %targeter)
|
|||
{
|
||||
%oldERate = %target.getRechargeRate();
|
||||
%target.teamDamageStateOnZap = $teamDamage;
|
||||
%teammates = %target.client.team == %targeter.client.team;
|
||||
|
||||
echo("targeter team: " @ %targeter.team );
|
||||
echo("target team: " @ %target.team );
|
||||
|
||||
if(!%target.teamDamageStateOnZap && %target.team == %targeter.team)
|
||||
%target.setRechargeRate(%oldERate);
|
||||
else
|
||||
if( %target.teamDamageStateOnZap || !%teammates )
|
||||
%target.setRechargeRate(%oldERate - %data.drainEnergy);
|
||||
else
|
||||
%target.setRechargeRate(%oldERate);
|
||||
|
||||
%projectile.checkELFStatus(%data, %target, %targeter);
|
||||
}
|
||||
|
||||
|
|
@ -389,14 +409,15 @@ function ELFProjectileData::unzapTarget(%data, %projectile, %target, %targeter)
|
|||
%targeter.stopAudio($ELFFireSound);
|
||||
%target.zapSound = false;
|
||||
%targeter.zappingSound = false;
|
||||
%teammates = %target.client.team == %targeter.client.team;
|
||||
|
||||
if(!%target.isDisabled())
|
||||
if(!%target.isDestroyed())
|
||||
{
|
||||
%oldERate = %target.getRechargeRate();
|
||||
if(!%target.teamDamageStateOnZap && %target.team == %targeter.team)
|
||||
%target.setRechargeRate(%oldERate);
|
||||
else
|
||||
if( %target.teamDamageStateOnZap || !%teammates )
|
||||
%target.setRechargeRate(%oldERate + %data.drainEnergy);
|
||||
else
|
||||
%target.setRechargeRate(%oldERate);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -506,7 +527,13 @@ function RadiusExplosion(%explosionSource, %position, %radius, %damage, %impulse
|
|||
if (%coverage == 0)
|
||||
continue;
|
||||
|
||||
%amount = (1.0 - (%dist / %radius)) * %coverage * %damage;
|
||||
//if ( $splashTest )
|
||||
%amount = (1.0 - ((%dist / %radius) * 0.75)) * %coverage * %damage;
|
||||
//else
|
||||
//%amount = (1.0 - (%dist / %radius)) * %coverage * %damage;
|
||||
|
||||
//error( "damage: " @ %amount @ " at distance: " @ %dist @ " radius: " @ %radius @ " maxDamage: " @ %damage );
|
||||
|
||||
%data = %targetObject.getDataBlock();
|
||||
%className = %data.className;
|
||||
|
||||
|
|
@ -541,7 +568,7 @@ function RadiusExplosion(%explosionSource, %position, %radius, %damage, %impulse
|
|||
}
|
||||
|
||||
if(%amount > 0)
|
||||
%data.damageObject(%targetObject, %sourceObject, %position, %amount, %damageType, %momVec);
|
||||
%data.damageObject(%targetObject, %sourceObject, %position, %amount, %damageType, %momVec, %explosionSource.theClient, %explosionSource);
|
||||
else if( %explosionSource.getDataBlock().getName() $= "ConcussionGrenadeThrown" && %data.getClassName() $= "PlayerData" )
|
||||
{
|
||||
%data.applyConcussion( %dist, %radius, %sourceObject, %targetObject );
|
||||
|
|
|
|||
|
|
@ -63,12 +63,20 @@ function CreateServer(%mission, %missionType)
|
|||
exec("prefs/banlist.cs");
|
||||
|
||||
//automatically load any mission type that follows naming convention typeGame.name.cs
|
||||
%search = "scripts/*Game.cs";
|
||||
|
||||
for(%file = findFirstFile(%search); %file !$= ""; %file = findNextFile(%search))
|
||||
if (!isDemo())
|
||||
{
|
||||
%type = fileBase(%file); // get the name of the script
|
||||
exec("scripts/" @ %type @ ".cs");
|
||||
%search = "scripts/*Game.cs";
|
||||
for(%file = findFirstFile(%search); %file !$= ""; %file = findNextFile(%search))
|
||||
{
|
||||
%type = fileBase(%file); // get the name of the script
|
||||
exec("scripts/" @ %type @ ".cs");
|
||||
}
|
||||
}
|
||||
//the DEMO version only uses DefaultGame.cs and SinglePlayerGame.cs
|
||||
else
|
||||
{
|
||||
exec("scripts/DefaultGame.cs");
|
||||
exec("scripts/SinglePlayerGame.cs");
|
||||
}
|
||||
|
||||
$missionSequence = 0;
|
||||
|
|
@ -179,8 +187,10 @@ function DestroyServer()
|
|||
$missionRunning = false;
|
||||
allowConnections(false);
|
||||
stopHeartbeat();
|
||||
MissionGroup.delete();
|
||||
MissionCleanup.delete();
|
||||
if ( isObject( MissionGroup ) )
|
||||
MissionGroup.delete();
|
||||
if ( isObject( MissionCleanup ) )
|
||||
MissionCleanup.delete();
|
||||
if(isObject(game))
|
||||
{
|
||||
game.deactivatePackages();
|
||||
|
|
@ -221,6 +231,9 @@ function Disconnect()
|
|||
|
||||
function DisconnectedCleanup()
|
||||
{
|
||||
// Make sure we're not still waiting for the loading info:
|
||||
cancelLoadInfoCheck();
|
||||
|
||||
// clear the chat hud message vector
|
||||
HudMessageVector.clear();
|
||||
if ( isObject( PlayerListGroup ) )
|
||||
|
|
@ -248,48 +261,76 @@ function DisconnectedCleanup()
|
|||
clearTextureHolds();
|
||||
purgeResources();
|
||||
|
||||
// Restart the email check:
|
||||
if ( !EmailGui.checkingEmail && EmailGui.checkSchedule $= "" )
|
||||
CheckEmail( true );
|
||||
if ( $PlayingOnline )
|
||||
{
|
||||
// Restart the email check:
|
||||
if ( !EmailGui.checkingEmail && EmailGui.checkSchedule $= "" )
|
||||
CheckEmail( true );
|
||||
|
||||
IRCClient::onLeaveGame();
|
||||
IRCClient::onLeaveGame();
|
||||
}
|
||||
}
|
||||
|
||||
// we pass the guid as well, in case this guy leaves the server.
|
||||
function kick( %client, %admin, %guid )
|
||||
{
|
||||
{
|
||||
if(%admin)
|
||||
messageAll( 'MsgAdminForce', '\c2The Admin has kicked %1.', %client.name );
|
||||
messageAll( 'MsgAdminForce', '\c2The Admin has kicked %1.', Game.kickClientName );
|
||||
else
|
||||
messageAll( 'MsgVotePassed', '\c2%1 was kicked by vote.', %client.name );
|
||||
messageAll( 'MsgVotePassed', '\c2%1 was kicked by vote.', Game.kickClientName );
|
||||
|
||||
messageClient(%client, 'onClientKicked', "");
|
||||
messageAllExcept( %client, -1, 'MsgClientDrop', "", %client.name, %client );
|
||||
|
||||
if( %client.isAIControlled() )
|
||||
{
|
||||
messageAllExcept( %client, -1, 'MsgClientDrop', "", Game.kickClientName, %client );
|
||||
|
||||
if( %client.isAIControlled() )
|
||||
{
|
||||
$HostGameBotCount--;
|
||||
%client.drop();
|
||||
}
|
||||
else
|
||||
{
|
||||
%count = ClientGroup.getCount();
|
||||
for( %i = 0; %i < %count; %i++ )
|
||||
%client.drop();
|
||||
}
|
||||
else
|
||||
{
|
||||
if( $playingOnline ) // won games
|
||||
{
|
||||
%cl = ClientGroup.getObject( %i );
|
||||
if( %cl.guid == %guid )
|
||||
%count = ClientGroup.getCount();
|
||||
%found = false;
|
||||
for( %i = 0; %i < %count; %i++ ) // see if this guy is still here...
|
||||
{
|
||||
// kill and delete this client
|
||||
if( isObject( %cl.player ) )
|
||||
%cl.player.scriptKill(0);
|
||||
%cl = ClientGroup.getObject( %i );
|
||||
if( %cl.guid == %guid )
|
||||
{
|
||||
%found = true;
|
||||
|
||||
// kill and delete this client, their done in this server.
|
||||
if( isObject( %cl.player ) )
|
||||
%cl.player.scriptKill(0);
|
||||
|
||||
%cl.schedule(700, "delete");
|
||||
|
||||
BanList::add( %guid, "0", $Host::KickBanTime );
|
||||
Game.kickGuid = "";
|
||||
}
|
||||
if ( isObject( %cl ) )
|
||||
{
|
||||
%cl.setDisconnectReason( "You have been kicked out of the game." );
|
||||
%cl.schedule(700, "delete");
|
||||
}
|
||||
|
||||
BanList::add( %guid, "0", $Host::KickBanTime );
|
||||
}
|
||||
}
|
||||
if( !%found )
|
||||
BanList::add( %guid, "0", $Host::KickBanTime ); // keep this guy out for a while since he left.
|
||||
}
|
||||
}
|
||||
else // lan games
|
||||
{
|
||||
// kill and delete this client
|
||||
if( isObject( %client.player ) )
|
||||
%client.player.scriptKill(0);
|
||||
|
||||
if ( isObject( %client ) )
|
||||
{
|
||||
%client.setDisconnectReason( "You have been kicked out of the game." );
|
||||
%client.schedule(700, "delete");
|
||||
}
|
||||
|
||||
BanList::add( 0, %client.getAddress(), $Host::KickBanTime );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function ban( %client, %admin )
|
||||
|
|
@ -306,7 +347,11 @@ function ban( %client, %admin )
|
|||
if( isObject(%client.player) )
|
||||
%client.player.scriptKill(0);
|
||||
|
||||
%client.schedule(700, "delete");
|
||||
if ( isObject( %client ) )
|
||||
{
|
||||
%client.setDisconnectReason( "You have been banned from this server." );
|
||||
%client.schedule(700, "delete");
|
||||
}
|
||||
|
||||
BanList::add(%client.guid, %client.getAddress(), $Host::BanTime);
|
||||
}
|
||||
|
|
@ -332,161 +377,256 @@ function getValidVoicePitch(%voice, %voicePitch)
|
|||
return 1.0;
|
||||
}
|
||||
|
||||
$DemoNameCount = 0;
|
||||
function addDemoAlias( %name )
|
||||
{
|
||||
$DemoName[$DemoNameCount] = %name;
|
||||
$DemoNameCount++;
|
||||
}
|
||||
|
||||
addDemoAlias( "Amateur" );
|
||||
addDemoAlias( "Bullseye" );
|
||||
addDemoAlias( "Casualty" );
|
||||
addDemoAlias( "Dogfood" );
|
||||
addDemoAlias( "Extinct" );
|
||||
addDemoAlias( "Fodder" );
|
||||
addDemoAlias( "Grunt" );
|
||||
addDemoAlias( "Helpless" );
|
||||
addDemoAlias( "Itchy" );
|
||||
addDemoAlias( "Joker" );
|
||||
addDemoAlias( "Kibble" );
|
||||
addDemoAlias( "Learner" );
|
||||
addDemoAlias( "Meat" );
|
||||
addDemoAlias( "Newbie" );
|
||||
addDemoAlias( "Owned" );
|
||||
addDemoAlias( "Poser" );
|
||||
addDemoAlias( "Quaker" );
|
||||
addDemoAlias( "Roadkill" );
|
||||
addDemoAlias( "Skid Mark" );
|
||||
addDemoAlias( "Easy Target" );
|
||||
addDemoAlias( "Underdog" );
|
||||
addDemoAlias( "Vegetable" );
|
||||
addDemoAlias( "Weakling" );
|
||||
addDemoAlias( "Flatline" );
|
||||
addDemoAlias( "Yo-yo" );
|
||||
addDemoAlias( "Zero" );
|
||||
addDemoAlias( "Apprentice" );
|
||||
addDemoAlias( "Bonehead" );
|
||||
addDemoAlias( "Clown" );
|
||||
addDemoAlias( "Dodo" );
|
||||
addDemoAlias( "Endangered" );
|
||||
addDemoAlias( "Feeble" );
|
||||
|
||||
function pickDemoName()
|
||||
{
|
||||
// Pick a unique name if possible:
|
||||
%idx = mFloor( getRandom() * $DemoNameCount );
|
||||
for ( %i = 0; %i < $DemoNameCount; %i++ )
|
||||
{
|
||||
%name = $DemoName[mMod( %idx + %i, $DemoNameCount )];
|
||||
%isUnique = true;
|
||||
%count = ClientGroup.getCount();
|
||||
for ( %ci = 0; %ci < %count; %ci++ )
|
||||
{
|
||||
if ( strcmp( %name, detag( getTaggedString( ClientGroup.getObject( %ci ).name ) ) ) == 0 )
|
||||
{
|
||||
%isUnique = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( %isUnique )
|
||||
break;
|
||||
}
|
||||
|
||||
// Append a number to make the alias unique:
|
||||
if ( !%isUnique )
|
||||
{
|
||||
%suffix = 1;
|
||||
while ( !%isUnique )
|
||||
{
|
||||
%nameTry = %name @ "." @ %suffix;
|
||||
%isUnique = true;
|
||||
|
||||
%count = ClientGroup.getCount();
|
||||
for ( %i = 0; %i < %count; %i++ )
|
||||
{
|
||||
if ( strcmp( %nameTry, detag( getTaggedString( ClientGroup.getObject( %i ).name ) ) ) == 0 )
|
||||
{
|
||||
%isUnique = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
%suffix++;
|
||||
}
|
||||
|
||||
// Success!
|
||||
%name = %nameTry;
|
||||
}
|
||||
|
||||
return( %name );
|
||||
}
|
||||
|
||||
function GameConnection::onConnect( %client, %name, %raceGender, %skin, %voice, %voicePitch )
|
||||
{
|
||||
%client.setMissionCRC($missionCRC);
|
||||
sendLoadInfoToClient( %client );
|
||||
|
||||
//%client.setSimulatedNetParams(0.1, 30);
|
||||
if ( isDemo() )
|
||||
{
|
||||
%client.armor = "Light";
|
||||
if ( isDemoServer() )
|
||||
{
|
||||
%client.armor = "Light";
|
||||
%client.sex = "Male";
|
||||
%client.race = "Human";
|
||||
%client.name = addTaggedString( "DemoGuy" );
|
||||
%client.nameBase = "DemoGuy";
|
||||
%client.voice = "Male1";
|
||||
%client.voiceTag = addtaggedString( "Male1" );
|
||||
}
|
||||
else
|
||||
{
|
||||
// if hosting this server, set this client to superAdmin
|
||||
if(%client.getAddress() $= "Local")
|
||||
{
|
||||
%client.isAdmin = true;
|
||||
%client.isSuperAdmin = true;
|
||||
}
|
||||
|
||||
// Get the client's unique id:
|
||||
%authInfo = %client.getAuthInfo();
|
||||
%client.guid = getField( %authInfo, 3 );
|
||||
|
||||
// check admin and super admin list, and set status accordingly
|
||||
if ( !%client.isSuperAdmin )
|
||||
{
|
||||
if ( isOnSuperAdminList( %client ) )
|
||||
{
|
||||
%client.isAdmin = true;
|
||||
%client.isSuperAdmin = true;
|
||||
}
|
||||
else if( isOnAdminList( %client ) )
|
||||
{
|
||||
%client.isAdmin = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Sex/Race defaults
|
||||
switch$ ( %raceGender )
|
||||
{
|
||||
case "Human Male":
|
||||
%client.sex = "Male";
|
||||
%client.race = "Human";
|
||||
case "Human Female":
|
||||
%client.sex = "Female";
|
||||
%client.race = "Human";
|
||||
case "Bioderm":
|
||||
%client.sex = "Male";
|
||||
%client.race = "Bioderm";
|
||||
default:
|
||||
error("Invalid race/gender combo passed: " @ %raceGender);
|
||||
%client.sex = "Male";
|
||||
%client.race = "Human";
|
||||
}
|
||||
%client.armor = "Light";
|
||||
|
||||
// Override the connect name if this server does not allow smurfs:
|
||||
%realName = getField( %authInfo, 0 );
|
||||
if ( $PlayingOnline && $Host::NoSmurfs )
|
||||
%name = %realName;
|
||||
|
||||
if ( strcmp( %name, %realName ) == 0 )
|
||||
{
|
||||
%client.isSmurf = false;
|
||||
|
||||
// Add the tribal tag:
|
||||
%tag = getField( %authInfo, 1 );
|
||||
%append = getField( %authInfo, 2 );
|
||||
if ( %append )
|
||||
%name = "\cp\c6" @ %name @ "\c7" @ %tag @ "\co";
|
||||
else
|
||||
%name = "\cp\c7" @ %tag @ "\c6" @ %name @ "\co";
|
||||
|
||||
%client.sendGuid = %client.guid;
|
||||
}
|
||||
%client.nameBase = pickDemoName();
|
||||
%client.name = addTaggedString( %client.nameBase );
|
||||
%client.voice = "Male1";
|
||||
%client.voiceTag = addTaggedString( "Male1" );
|
||||
if ( %client & 1 )
|
||||
%client.skin = addTaggedString( "swolf" );
|
||||
else
|
||||
{
|
||||
%client.isSmurf = true;
|
||||
%client.sendGuid = 0;
|
||||
%name = stripTrailingSpaces( strToPlayerName( %name ) );
|
||||
if ( strlen( %name ) < 3 )
|
||||
%name = "Poser";
|
||||
|
||||
// Make sure the alias is unique:
|
||||
%isUnique = true;
|
||||
%count = ClientGroup.getCount();
|
||||
for ( %i = 0; %i < %count; %i++ )
|
||||
{
|
||||
%test = ClientGroup.getObject( %i );
|
||||
%rawName = stripChars( detag( getTaggedString( %test.name ) ), "\cp\co\c6\c7\c8\c9" );
|
||||
if ( strcmp( %name, %rawName ) == 0 )
|
||||
{
|
||||
%isUnique = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
%client.skin = addTaggedString( "beagle" );
|
||||
}
|
||||
else
|
||||
{
|
||||
// if hosting this server, set this client to superAdmin
|
||||
if(%client.getAddress() $= "Local")
|
||||
{
|
||||
%client.isAdmin = true;
|
||||
%client.isSuperAdmin = true;
|
||||
}
|
||||
|
||||
// Append a number to make the alias unique:
|
||||
if ( !%isUnique )
|
||||
{
|
||||
%suffix = 1;
|
||||
while ( !%isUnique )
|
||||
{
|
||||
%nameTry = %name @ "." @ %suffix;
|
||||
%isUnique = true;
|
||||
// Get the client's unique id:
|
||||
%authInfo = %client.getAuthInfo();
|
||||
%client.guid = getField( %authInfo, 3 );
|
||||
|
||||
// check admin and super admin list, and set status accordingly
|
||||
if ( !%client.isSuperAdmin )
|
||||
{
|
||||
if ( isOnSuperAdminList( %client ) )
|
||||
{
|
||||
%client.isAdmin = true;
|
||||
%client.isSuperAdmin = true;
|
||||
}
|
||||
else if( isOnAdminList( %client ) )
|
||||
{
|
||||
%client.isAdmin = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Sex/Race defaults
|
||||
switch$ ( %raceGender )
|
||||
{
|
||||
case "Human Male":
|
||||
%client.sex = "Male";
|
||||
%client.race = "Human";
|
||||
case "Human Female":
|
||||
%client.sex = "Female";
|
||||
%client.race = "Human";
|
||||
case "Bioderm":
|
||||
%client.sex = "Male";
|
||||
%client.race = "Bioderm";
|
||||
default:
|
||||
error("Invalid race/gender combo passed: " @ %raceGender);
|
||||
%client.sex = "Male";
|
||||
%client.race = "Human";
|
||||
}
|
||||
%client.armor = "Light";
|
||||
|
||||
%count = ClientGroup.getCount();
|
||||
for ( %i = 0; %i < %count; %i++ )
|
||||
{
|
||||
%test = ClientGroup.getObject( %i );
|
||||
%rawName = stripChars( detag( getTaggedString( %test.name ) ), "\cp\co\c6\c7\c8\c9" );
|
||||
if ( strcmp( %nameTry, %rawName ) == 0 )
|
||||
{
|
||||
%isUnique = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// Override the connect name if this server does not allow smurfs:
|
||||
%realName = getField( %authInfo, 0 );
|
||||
if ( $PlayingOnline && $Host::NoSmurfs )
|
||||
%name = %realName;
|
||||
|
||||
%suffix++;
|
||||
}
|
||||
if ( strcmp( %name, %realName ) == 0 )
|
||||
{
|
||||
%client.isSmurf = false;
|
||||
|
||||
// Success!
|
||||
%name = %nameTry;
|
||||
}
|
||||
// Add the tribal tag:
|
||||
%tag = getField( %authInfo, 1 );
|
||||
%append = getField( %authInfo, 2 );
|
||||
if ( %append )
|
||||
%name = "\cp\c6" @ %name @ "\c7" @ %tag @ "\co";
|
||||
else
|
||||
%name = "\cp\c7" @ %tag @ "\c6" @ %name @ "\co";
|
||||
|
||||
%smurfName = %name;
|
||||
// Tag the name with the "smurf" color:
|
||||
%name = "\cp\c8" @ %name @ "\co";
|
||||
}
|
||||
%client.sendGuid = %client.guid;
|
||||
}
|
||||
else
|
||||
{
|
||||
%client.isSmurf = true;
|
||||
%client.sendGuid = 0;
|
||||
%name = stripTrailingSpaces( strToPlayerName( %name ) );
|
||||
if ( strlen( %name ) < 3 )
|
||||
%name = "Poser";
|
||||
|
||||
// Make sure the alias is unique:
|
||||
%isUnique = true;
|
||||
%count = ClientGroup.getCount();
|
||||
for ( %i = 0; %i < %count; %i++ )
|
||||
{
|
||||
%test = ClientGroup.getObject( %i );
|
||||
%rawName = stripChars( detag( getTaggedString( %test.name ) ), "\cp\co\c6\c7\c8\c9" );
|
||||
if ( strcmp( %name, %rawName ) == 0 )
|
||||
{
|
||||
%isUnique = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
%client.name = addTaggedString(%name);
|
||||
if(%client.isSmurf)
|
||||
%client.nameBase = %smurfName;
|
||||
else
|
||||
%client.nameBase = %realName;
|
||||
// Append a number to make the alias unique:
|
||||
if ( !%isUnique )
|
||||
{
|
||||
%suffix = 1;
|
||||
while ( !%isUnique )
|
||||
{
|
||||
%nameTry = %name @ "." @ %suffix;
|
||||
%isUnique = true;
|
||||
|
||||
// Make sure that the connecting client is not trying to use a bot skin:
|
||||
%temp = detag( %skin );
|
||||
if ( %temp $= "basebot" || %temp $= "basebbot" )
|
||||
%client.skin = addTaggedString( "base" );
|
||||
else
|
||||
%client.skin = addTaggedString( %skin );
|
||||
%count = ClientGroup.getCount();
|
||||
for ( %i = 0; %i < %count; %i++ )
|
||||
{
|
||||
%test = ClientGroup.getObject( %i );
|
||||
%rawName = stripChars( detag( getTaggedString( %test.name ) ), "\cp\co\c6\c7\c8\c9" );
|
||||
if ( strcmp( %nameTry, %rawName ) == 0 )
|
||||
{
|
||||
%isUnique = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
%client.voice = %voice;
|
||||
%client.voiceTag = addtaggedString(%voice);
|
||||
|
||||
//set the voice pitch based on a lookup table from their chosen voice
|
||||
%client.voicePitch = getValidVoicePitch(%voice, %voicePitch);
|
||||
}
|
||||
%suffix++;
|
||||
}
|
||||
|
||||
// Success!
|
||||
%name = %nameTry;
|
||||
}
|
||||
|
||||
%smurfName = %name;
|
||||
// Tag the name with the "smurf" color:
|
||||
%name = "\cp\c8" @ %name @ "\co";
|
||||
}
|
||||
|
||||
%client.name = addTaggedString(%name);
|
||||
if(%client.isSmurf)
|
||||
%client.nameBase = %smurfName;
|
||||
else
|
||||
%client.nameBase = %realName;
|
||||
|
||||
// Make sure that the connecting client is not trying to use a bot skin:
|
||||
%temp = detag( %skin );
|
||||
if ( %temp $= "basebot" || %temp $= "basebbot" )
|
||||
%client.skin = addTaggedString( "base" );
|
||||
else
|
||||
%client.skin = addTaggedString( %skin );
|
||||
|
||||
%client.voice = %voice;
|
||||
%client.voiceTag = addtaggedString(%voice);
|
||||
|
||||
//set the voice pitch based on a lookup table from their chosen voice
|
||||
%client.voicePitch = getValidVoicePitch(%voice, %voicePitch);
|
||||
}
|
||||
|
||||
%client.justConnected = true;
|
||||
%client.isReady = false;
|
||||
|
|
@ -567,6 +707,7 @@ function GameConnection::onConnect( %client, %name, %raceGender, %skin, %voice,
|
|||
if($missionRunning)
|
||||
%client.startMission();
|
||||
$HostGamePlayerCount++;
|
||||
%client.demoJustJoined = true;
|
||||
}
|
||||
|
||||
function GameConnection::onDrop(%client, %reason)
|
||||
|
|
@ -588,7 +729,7 @@ function GameConnection::onDrop(%client, %reason)
|
|||
$HostGamePlayerCount--;
|
||||
|
||||
// reset the server if everyone has left the game
|
||||
if( $HostGamePlayerCount - $HostGameBotCount == 0 && $Host::Dedicated)
|
||||
if( $HostGamePlayerCount - $HostGameBotCount == 0 && $Host::Dedicated && !$resettingServer && !$LoadingMission )
|
||||
schedule(0, 0, "resetServerDefaults");
|
||||
}
|
||||
|
||||
|
|
@ -609,8 +750,12 @@ function dismountPlayers()
|
|||
|
||||
function loadMission( %missionName, %missionType, %firstMission )
|
||||
{
|
||||
$LoadingMission = true;
|
||||
disableCyclingConnections(true);
|
||||
if (!$pref::NoClearConsole)
|
||||
cls();
|
||||
if ( isObject( LoadingGui ) )
|
||||
LoadingGui.gotLoadInfo = "";
|
||||
buildLoadInfo( %missionName, %missionType );
|
||||
|
||||
// reset all of these
|
||||
|
|
@ -626,9 +771,7 @@ function loadMission( %missionName, %missionType, %firstMission )
|
|||
{
|
||||
%client = ClientGroup.getObject( %cl );
|
||||
if ( !%client.isAIControlled() )
|
||||
{
|
||||
sendLoadInfoToClient( %client );
|
||||
}
|
||||
}
|
||||
|
||||
// allow load condition to exit out
|
||||
|
|
@ -779,7 +922,8 @@ function loadMissionStage2()
|
|||
if( $LaunchMode $= "SpnBuild" )
|
||||
buildNavigationGraph( "Spn" );
|
||||
purgeResources();
|
||||
|
||||
disableCyclingConnections(false);
|
||||
$LoadingMission = false;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -974,23 +1118,8 @@ function serverSetClientTeamState( %client )
|
|||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
%client.camera.getDataBlock().setMode( %client.camera, "ObserverFly" );
|
||||
|
||||
if( !$MatchStarted && !$CountdownStarted)
|
||||
{
|
||||
if($TeamDamage)
|
||||
%damMess = "ENABLED";
|
||||
else
|
||||
%damMess = "DISABLED";
|
||||
|
||||
if(Game.numTeams > 1)
|
||||
BottomPrint(%client, "Server is Running in Tournament Mode.\nPick a Team\nTeam Damage is " @ %damMess, 0, 3 );
|
||||
}
|
||||
else
|
||||
{
|
||||
BottomPrint( %client, "\nServer is Running in Tournament Mode", 0, 3 );
|
||||
}
|
||||
{
|
||||
// don't need to do anything. MissionDrop will handle things from here.
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1022,7 +1151,6 @@ function HideHudHACK(%visible)
|
|||
hudClusterBack.setVisible(%visible);
|
||||
inventoryHud.setVisible(%visible);
|
||||
clockHUD.setVisible(%visible);
|
||||
lagHudIndicator.setVisible(false);
|
||||
}
|
||||
|
||||
function ServerPlay2D(%profile)
|
||||
|
|
@ -1291,15 +1419,15 @@ function serverCmdClientAddToGame( %client, %targetClient )
|
|||
}
|
||||
else
|
||||
{
|
||||
%client.notReady = true;
|
||||
%client.camera.getDataBlock().setMode( %client.camera, "pre-game", %client.player );
|
||||
%client.setControlObject( %client.camera );
|
||||
%targetClient.notReady = true;
|
||||
%targetClient.camera.getDataBlock().setMode( %targetClient.camera, "pre-game", %targetClient.player );
|
||||
%targetClient.setControlObject( %targetClient.camera );
|
||||
}
|
||||
|
||||
if($Host::TournamentMode && !$CountdownStarted)
|
||||
{
|
||||
%client.notReady = true;
|
||||
centerprint( %client, "\nPress FIRE when ready.", 0, 3 );
|
||||
%targetClient.notReady = true;
|
||||
centerprint( %targetClient, "\nPress FIRE when ready.", 0, 3 );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1323,10 +1451,6 @@ function serverCmdChangePlayersTeam( %clientRequesting, %client, %team)
|
|||
{
|
||||
if( isObject( Game ) && %client != Game.kickClient && %clientRequesting.isAdmin)
|
||||
{
|
||||
// clear the pickteam menu
|
||||
if( !$MatchStarted && $Host::TournamentMode && !$CountdownStarted && %client.camera.Mode $= "pickingTeam" )
|
||||
commandToClient( %client, 'processPickTeam' );
|
||||
|
||||
serverCmdClientJoinTeam(%client, %team);
|
||||
|
||||
if(!$MatchStarted)
|
||||
|
|
@ -1372,12 +1496,12 @@ function serverCmdTogglePlayerMute(%client, %who)
|
|||
if (%client.muted[%who])
|
||||
{
|
||||
%client.muted[%who] = false;
|
||||
messageClient(%client, 'MsgPlayerUnmuted', '%1 has been unmuted.', %who.name);
|
||||
messageClient(%client, 'MsgPlayerMuted', '%1 has been unmuted.', %who.name, %who, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
%client.muted[%who] = true;
|
||||
messageClient(%client, 'MsgPlayerMuted', '%1 has been muted.', %who.name);
|
||||
messageClient(%client, 'MsgPlayerMuted', '%1 has been muted.', %who.name, %who, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1874,18 +1998,38 @@ function CancelEndCountdown()
|
|||
|
||||
function resetServerDefaults()
|
||||
{
|
||||
$resettingServer = true;
|
||||
echo( "Resetting server defaults..." );
|
||||
|
||||
allowConnections( false );// no connections when resetting the server
|
||||
|
||||
if( isObject( Game ) )
|
||||
Game.gameOver();
|
||||
else
|
||||
schedule( 500, 0, "resetServerDefaults" );
|
||||
|
||||
// Override server defaults with prefs:
|
||||
exec( "scripts/ServerDefaults.cs" );
|
||||
exec( "prefs/ServerPrefs.cs" );
|
||||
exec( $serverprefs );
|
||||
|
||||
//convert the team skin and name vars to tags...
|
||||
%index = 0;
|
||||
while ($Host::TeamSkin[%index] !$= "")
|
||||
{
|
||||
$TeamSkin[%index] = addTaggedString($Host::TeamSkin[%index]);
|
||||
%index++;
|
||||
}
|
||||
|
||||
%index = 0;
|
||||
while ($Host::TeamName[%index] !$= "")
|
||||
{
|
||||
$TeamName[%index] = addTaggedString($Host::TeamName[%index]);
|
||||
%index++;
|
||||
}
|
||||
|
||||
// Get the hologram names from the prefs...
|
||||
%index = 1;
|
||||
while ( $Host::holoName[%index] !$= "" )
|
||||
{
|
||||
$holoName[%index] = $Host::holoName[%index];
|
||||
%index++;
|
||||
}
|
||||
|
||||
// kick all bots...
|
||||
removeAllBots();
|
||||
|
|
@ -1894,20 +2038,19 @@ function resetServerDefaults()
|
|||
if( $Host::botsEnabled )
|
||||
initGameBots( $Host::Map, $Host::MissionType );
|
||||
|
||||
// load the mission
|
||||
// load the missions
|
||||
loadMission( $Host::Map, $Host::MissionType );
|
||||
|
||||
// allow connections since were ready to go.
|
||||
allowConnections( true );
|
||||
$resettingServer = false;
|
||||
echo( "Server reset complete." );
|
||||
}
|
||||
|
||||
function removeAllBots()
|
||||
{
|
||||
while( ClientGroup.getCount() )
|
||||
{
|
||||
%client = ClientGroup.getObject(0);
|
||||
if(%client.isAIControlled())
|
||||
%client.drop();
|
||||
{
|
||||
%client = ClientGroup.getObject(0);
|
||||
if(%client.isAIControlled())
|
||||
%client.drop();
|
||||
else
|
||||
%client.delete();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ datablock AudioDescription(ProjectileLooping3d)
|
|||
minDistance= 5.0;
|
||||
MaxDistance= 20.0;
|
||||
type = $EffectAudioType;
|
||||
environmentLevel = 1.0;
|
||||
};
|
||||
|
||||
datablock AudioDescription(ClosestLooping3d)
|
||||
|
|
@ -34,6 +35,7 @@ datablock AudioDescription(ClosestLooping3d)
|
|||
minDistance= 5.0;
|
||||
MaxDistance= 30.0;
|
||||
type = $EffectAudioType;
|
||||
environmentLevel = 1.0;
|
||||
};
|
||||
|
||||
datablock AudioDescription(CloseLooping3d)
|
||||
|
|
@ -45,6 +47,7 @@ datablock AudioDescription(CloseLooping3d)
|
|||
minDistance= 10.0;
|
||||
MaxDistance= 50.0;
|
||||
type = $EffectAudioType;
|
||||
environmentLevel = 1.0;
|
||||
};
|
||||
|
||||
datablock AudioDescription(AudioDefaultLooping3d)
|
||||
|
|
@ -56,6 +59,7 @@ datablock AudioDescription(AudioDefaultLooping3d)
|
|||
minDistance= 20.0;
|
||||
MaxDistance= 100.0;
|
||||
type = $EffectAudioType;
|
||||
environmentLevel = 1.0;
|
||||
};
|
||||
|
||||
datablock AudioDescription(AudioClosest3d)
|
||||
|
|
@ -67,6 +71,7 @@ datablock AudioDescription(AudioClosest3d)
|
|||
minDistance= 5.0;
|
||||
MaxDistance= 30.0;
|
||||
type = $EffectAudioType;
|
||||
environmentLevel = 1.0;
|
||||
};
|
||||
|
||||
datablock AudioDescription(AudioClose3d)
|
||||
|
|
@ -78,6 +83,7 @@ datablock AudioDescription(AudioClose3d)
|
|||
minDistance= 10.0;
|
||||
MaxDistance= 60.0;
|
||||
type = $EffectAudioType;
|
||||
environmentLevel = 1.0;
|
||||
};
|
||||
|
||||
datablock AudioDescription(AudioDefault3d)
|
||||
|
|
@ -89,6 +95,7 @@ datablock AudioDescription(AudioDefault3d)
|
|||
minDistance= 20.0;
|
||||
MaxDistance= 100.0;
|
||||
type = $EffectAudioType;
|
||||
environmentLevel = 1.0;
|
||||
};
|
||||
|
||||
datablock AudioDescription(AudioExplosion3d)
|
||||
|
|
@ -101,6 +108,7 @@ datablock AudioDescription(AudioExplosion3d)
|
|||
minDistance= 20.0;
|
||||
MaxDistance= 150.0;
|
||||
type = $EffectAudioType;
|
||||
environmentLevel = 1.0;
|
||||
};
|
||||
|
||||
datablock AudioDescription(AudioBomb3d)
|
||||
|
|
@ -113,6 +121,7 @@ datablock AudioDescription(AudioBomb3d)
|
|||
minDistance= 80.0;
|
||||
MaxDistance= 250.0;
|
||||
type = $EffectAudioType;
|
||||
environmentLevel = 1.0;
|
||||
};
|
||||
|
||||
datablock AudioDescription(AudioBIGExplosion3d)
|
||||
|
|
@ -125,6 +134,7 @@ datablock AudioDescription(AudioBIGExplosion3d)
|
|||
minDistance= 50.0;
|
||||
MaxDistance= 250.0;
|
||||
type = $EffectAudioType;
|
||||
environmentLevel = 1.0;
|
||||
};
|
||||
|
||||
datablock AudioDescription(AudioLooping2D)
|
||||
|
|
@ -134,6 +144,7 @@ datablock AudioDescription(AudioLooping2D)
|
|||
isLooping = true;
|
||||
is3D = false;
|
||||
type = $EffectAudioType;
|
||||
environmentLevel = 1.0;
|
||||
};
|
||||
|
||||
datablock AudioDescription(Audio2D)
|
||||
|
|
@ -143,6 +154,26 @@ datablock AudioDescription(Audio2D)
|
|||
isLooping = false;
|
||||
is3D = false;
|
||||
type = $EffectAudioType;
|
||||
environmentLevel = 1.0;
|
||||
};
|
||||
|
||||
// Audio Environment Settings --- Used for EAX and EAX2 sounds //
|
||||
|
||||
datablock AudioEnvironment(Underwater)
|
||||
{
|
||||
useRoom = true;
|
||||
room = UNDERWATER;
|
||||
};
|
||||
|
||||
datablock AudioEnvironment(BigRoom)
|
||||
{
|
||||
useRoom = true;
|
||||
room = CAVE;
|
||||
};
|
||||
|
||||
datablock AudioEnvironment(SmallRoom)
|
||||
{
|
||||
useRoom = true;
|
||||
room = HALLWAY;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -101,7 +101,10 @@ function serverCmdControlObject(%client, %targetId)
|
|||
//------------------------------------------------------------------------------
|
||||
function resetControlObject(%client)
|
||||
{
|
||||
if((%client.player != 0) && !%client.player.isDestroyed() && $MatchStarted)
|
||||
if( isObject( %client.comCam ) )
|
||||
%client.comCam.delete();
|
||||
|
||||
if(isObject(%client.player) && !%client.player.isDestroyed() && $MatchStarted)
|
||||
%client.setControlObject(%client.player);
|
||||
else
|
||||
%client.setControlObject(%client.camera);
|
||||
|
|
@ -111,14 +114,27 @@ function serverCmdResetControlObject(%client)
|
|||
{
|
||||
resetControlObject(%client);
|
||||
commandToClient(%client, 'ControlObjectReset');
|
||||
commandToClient(%client, 'RemoveReticle');
|
||||
|
||||
if(isObject(%client.player))
|
||||
{
|
||||
%weapon = %client.player.getMountedImage($WeaponSlot);
|
||||
%client.setWeaponsHudActive(%weapon.item);
|
||||
}
|
||||
}
|
||||
|
||||
function serverCmdAttachCommanderCamera(%client, %target)
|
||||
{
|
||||
// dont allow observing until match has started
|
||||
if(!$MatchStarted)
|
||||
{
|
||||
commandToClient(%client, 'CameraAttachResponse', false);
|
||||
return;
|
||||
}
|
||||
|
||||
%obj = getTargetObject(%target);
|
||||
if((%obj == -1) || (%target == -1))
|
||||
{
|
||||
resetControlObject(%client);
|
||||
commandToClient(%client, 'CameraAttachResponse', false);
|
||||
return;
|
||||
}
|
||||
|
|
@ -129,7 +145,7 @@ function serverCmdAttachCommanderCamera(%client, %target)
|
|||
commandToClient(%client, 'CameraAttachResponse', false);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// can be observed?
|
||||
if(!%obj.getDataBlock() || !%obj.getDataBlock().canObserve)
|
||||
{
|
||||
|
|
@ -157,8 +173,9 @@ function serverCmdAttachCommanderCamera(%client, %target)
|
|||
%player = %obj.player;
|
||||
if(%obj == %client)
|
||||
{
|
||||
if((%player != 0) && !%player.isDestroyed())
|
||||
if(isObject(%player) && !%player.isDestroyed())
|
||||
{
|
||||
|
||||
%client.setControlObject(%player);
|
||||
commandToClient(%client, 'CameraAttachResponse', true);
|
||||
return;
|
||||
|
|
@ -168,7 +185,7 @@ function serverCmdAttachCommanderCamera(%client, %target)
|
|||
%obj = %player;
|
||||
}
|
||||
|
||||
if((%obj == 0) || %obj.isDestroyed())
|
||||
if(!isObject(%obj) || %obj.isDestroyed())
|
||||
{
|
||||
commandToClient(%client, 'CameraAttachResponse', false);
|
||||
return;
|
||||
|
|
@ -182,9 +199,22 @@ function serverCmdAttachCommanderCamera(%client, %target)
|
|||
|
||||
// don't set the camera mode so that it does not interfere with spawning
|
||||
%transform = %obj.getTransform();
|
||||
%client.camera.setTransform(%transform);
|
||||
%client.camera.setOrbitMode(%obj, %transform, %obsX, %obsY, %obsZ);
|
||||
%client.setControlObject(%client.camera);
|
||||
|
||||
// create a fresh camera to observe through... (could add to a list on
|
||||
// the observed camera to be removed when that object dies/...)
|
||||
if( !isObject( %client.comCam ) )
|
||||
{
|
||||
%client.comCam = new Camera()
|
||||
{
|
||||
dataBlock = CommanderCamera;
|
||||
};
|
||||
MissionCleanup.add(%client.comCam);
|
||||
}
|
||||
|
||||
%client.comCam.setTransform(%transform);
|
||||
%client.comCam.setOrbitMode(%obj, %transform, %obsX, %obsY, %obsZ);
|
||||
|
||||
%client.setControlObject(%client.comCam);
|
||||
commandToClient(%client, 'CameraAttachResponse', true);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,26 +1,26 @@
|
|||
$teamSkin[0] = 'blank';
|
||||
$teamSkin[1] = 'base';
|
||||
$teamSkin[2] = 'baseb';
|
||||
$teamSkin[3] = 'swolf';
|
||||
$teamSkin[4] = 'dsword';
|
||||
$teamSkin[5] = 'beagle';
|
||||
$teamSkin[6] = 'cotp';
|
||||
$Host::teamSkin[0] = "blank";
|
||||
$Host::teamSkin[1] = "base";
|
||||
$Host::teamSkin[2] = "baseb";
|
||||
$Host::teamSkin[3] = "swolf";
|
||||
$Host::teamSkin[4] = "dsword";
|
||||
$Host::teamSkin[5] = "beagle";
|
||||
$Host::teamSkin[6] = "cotp";
|
||||
|
||||
$teamName[0] = 'Unassigned';
|
||||
$teamName[1] = 'Storm';
|
||||
$teamName[2] = 'Inferno';
|
||||
$teamName[3] = 'Star Wolf';
|
||||
$teamName[4] = 'Diamond Sword';
|
||||
$teamName[5] = 'Blood Eagle';
|
||||
$teamName[6] = 'Phoenix';
|
||||
$Host::teamName[0] = "Unassigned";
|
||||
$Host::teamName[1] = "Storm";
|
||||
$Host::teamName[2] = "Inferno";
|
||||
$Host::teamName[3] = "Star Wolf";
|
||||
$Host::teamName[4] = "Diamond Sword";
|
||||
$Host::teamName[5] = "Blood Eagle";
|
||||
$Host::teamName[6] = "Phoenix";
|
||||
|
||||
$holoName[0] = "";
|
||||
$holoName[1] = "Storm";
|
||||
$holoName[2] = "Inferno";
|
||||
$holoName[3] = "Starwolf";
|
||||
$holoName[4] = "DSword";
|
||||
$holoName[5] = "BloodEagle";
|
||||
$holoName[6] = "Harbinger";
|
||||
$Host::holoName[0] = "";
|
||||
$Host::holoName[1] = "Storm";
|
||||
$Host::holoName[2] = "Inferno";
|
||||
$Host::holoName[3] = "Starwolf";
|
||||
$Host::holoName[4] = "DSword";
|
||||
$Host::holoName[5] = "BloodEagle";
|
||||
$Host::holoName[6] = "Harbinger";
|
||||
|
||||
$Host::AdminList = ""; // all players that will be automatically an admin upon joining server
|
||||
$Host::SuperAdminList = ""; // all players that will be automatically a super admin upon joining server
|
||||
|
|
@ -29,9 +29,13 @@ $Host::Port = 28000;
|
|||
$Host::GameName = "Tribes 2 Server";
|
||||
$Host::Password = "";
|
||||
$Host::AdminPassword = "";
|
||||
$Host::PureServer = 1;
|
||||
$Host::Dedicated = 0;
|
||||
$Host::MissionType = "CTF";
|
||||
$Host::Map = "Katabatic";
|
||||
if (!isDemo())
|
||||
$Host::Map = "Katabatic";
|
||||
else
|
||||
$Host::Map = "SlapDash";
|
||||
$Host::MaxPlayers = 64;
|
||||
$Host::TimeLimit = 30;
|
||||
$Host::BotCount = 2;
|
||||
|
|
@ -40,7 +44,7 @@ $Host::MinBotDifficulty = 0.5;
|
|||
$Host::MaxBotDifficulty = 0.75;
|
||||
$Host::Info = "This is a Tribes 2 Server.";
|
||||
$Host::NoSmurfs = 0;
|
||||
$Host::VoteTime = 20; // amount of time before votes are calculated
|
||||
$Host::VoteTime = 30; // amount of time before votes are calculated
|
||||
$Host::VotePassPercent = 60; // percent needed to pass a vote
|
||||
$Host::KickBanTime = 300; // specified in seconds
|
||||
$Host::BanTime = 1800; // specified in seconds
|
||||
|
|
@ -56,7 +60,8 @@ $Host::TeamDamageOn = 0;
|
|||
$MasterServerAddress = "IP:198.74.40.152:28000";
|
||||
|
||||
// 0: .v12 (1.2 kbits/sec), 1: .v24 (2.4 kbits/sec), 2: .v29 (2.9kbits/sec)
|
||||
$Audio::maxEncodingLevel = 2;
|
||||
// 3: GSM (6.6 kbits/sec)
|
||||
$Audio::maxEncodingLevel = 3;
|
||||
$Audio::maxVoiceChannels = 2;
|
||||
|
||||
$Host::MapPlayerLimits["Abominable", "CnH"] = "-1 32";
|
||||
|
|
|
|||
|
|
@ -769,9 +769,18 @@ function StaticShapeData::damageObject(%data, %targetObject, %sourceObject, %pos
|
|||
|
||||
if(%sourceObject)
|
||||
{
|
||||
%targetObject.lastDamagedBy = %sourceObject.client;
|
||||
%targetObject.lastDamagedByTeam = %sourceObject.client.team;
|
||||
%targetObject.damageTimeMS = GetSimTime();
|
||||
if(%sourceObject.client)
|
||||
{
|
||||
%targetObject.lastDamagedBy = %sourceObject.client;
|
||||
%targetObject.lastDamagedByTeam = %sourceObject.client.team;
|
||||
%targetObject.damageTimeMS = GetSimTime();
|
||||
}
|
||||
else
|
||||
{
|
||||
%targetObject.lastDamagedBy = %sourceObject;
|
||||
%targetObject.lastDamagedByTeam = %sourceObject.team;
|
||||
%targetObject.damageTimeMS = GetSimTime();
|
||||
}
|
||||
}
|
||||
|
||||
// Scale damage type & include shield calculations...
|
||||
|
|
@ -786,17 +795,17 @@ function StaticShapeData::damageObject(%data, %targetObject, %sourceObject, %pos
|
|||
if (!$TeamDamage && !%targetObject.getDataBlock().deployedObject)
|
||||
{
|
||||
//see if the object is being shot by a friendly
|
||||
%srcClient = %sourceObject.client;
|
||||
if (isObject(%srcClient))
|
||||
{
|
||||
if (isTargetFriendly(%targetObject.getTarget() , %srcClient.getSensorGroup()))
|
||||
{
|
||||
%curDamage = %targetObject.getDamageLevel();
|
||||
%availableDamage = %targetObject.getDataBlock().disabledLevel - %curDamage - 0.05;
|
||||
if (%amount > %availableDamage)
|
||||
%amount = %availableDamage;
|
||||
}
|
||||
}
|
||||
if(%sourceObject.getDataBlock().catagory $= "Vehicles")
|
||||
%attackerTeam = getVehicleAttackerTeam(%sourceObject);
|
||||
else %attackerTeam = %sourceObject.team;
|
||||
|
||||
if (isTargetFriendly(%targetObject.getTarget(), %attackerTeam))
|
||||
{
|
||||
%curDamage = %targetObject.getDamageLevel();
|
||||
%availableDamage = %targetObject.getDataBlock().disabledLevel - %curDamage - 0.05;
|
||||
if (%amount > %availableDamage)
|
||||
%amount = %availableDamage;
|
||||
}
|
||||
}
|
||||
|
||||
// if there's still damage to apply
|
||||
|
|
@ -804,6 +813,22 @@ function StaticShapeData::damageObject(%data, %targetObject, %sourceObject, %pos
|
|||
%targetObject.applyDamage(%amount);
|
||||
}
|
||||
|
||||
// little special casing for the above function
|
||||
function getVehicleAttackerTeam(%vehicleId)
|
||||
{
|
||||
%name = %vehicleId.getDataBlock().getName();
|
||||
if(%name $= "BomberFlyer" || %name $= "AssaultVehicle")
|
||||
%gunner = %vehicleId.getMountNodeObject(1);
|
||||
else
|
||||
%gunner = %vehicleId.getMountNodeObject(0);
|
||||
|
||||
if(%gunner)
|
||||
return %gunner.team;
|
||||
|
||||
return %vehicleId.team;
|
||||
}
|
||||
|
||||
|
||||
function StaticShapeData::onDamage(%this,%obj)
|
||||
{
|
||||
// Set damage state based on current damage level
|
||||
|
|
|
|||
|
|
@ -232,40 +232,28 @@ function TurretData::selectTarget(%this, %turret)
|
|||
|
||||
function TurretData::replaceCallback(%this, %turret, %engineer)
|
||||
{
|
||||
// First, is the player in range?
|
||||
%pos = %turret.getWorldBoxCenter();
|
||||
%engineerPos = %engineer.getWorldBoxCenter();
|
||||
%len = VectorLen(VectorSub(%pos, %engineerPos));
|
||||
|
||||
if (%len < 5)
|
||||
// This is a valid replacement. First, let's see if the engineer
|
||||
// still has the correct pack in place...
|
||||
if (%engineer.getMountedImage($BackPackSlot) != 0)
|
||||
{
|
||||
// This is a valid replacement. First, let's see if the engineer
|
||||
// still has the correct pack in place...
|
||||
if (%engineer.getMountedImage($BackPackSlot) != 0)
|
||||
%barrel = %engineer.getMountedImage($BackPackSlot).turretBarrel;
|
||||
if (%barrel !$= "")
|
||||
{
|
||||
%barrel = %engineer.getMountedImage($BackPackSlot).turretBarrel;
|
||||
if (%barrel !$= "")
|
||||
{
|
||||
// if there was a barrel there before, get rid of it
|
||||
%turret.unmountImage(0);
|
||||
// remove the turret barrel pack
|
||||
%engineer.setInventory(%engineer.getMountedImage($BackPackSlot).item, 0);
|
||||
// mount new barrel on base
|
||||
%turret.mountImage(%barrel, 0, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Player doesn't have the correct pack on...
|
||||
}
|
||||
// if there was a barrel there before, get rid of it
|
||||
%turret.unmountImage(0);
|
||||
// remove the turret barrel pack
|
||||
%engineer.setInventory(%engineer.getMountedImage($BackPackSlot).item, 0);
|
||||
// mount new barrel on base
|
||||
%turret.mountImage(%barrel, 0, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Player doesn't have any pack on...
|
||||
// Player doesn't have the correct pack on...
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Player is too far away to replace the barrel...
|
||||
// Player doesn't have any pack on...
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -74,6 +74,8 @@ datablock TurretImageData(ELFBarrelLarge)
|
|||
degPerSecPhi = 960;
|
||||
attackRadius = 75;
|
||||
|
||||
yawVariance = 30.0; // these will smooth out the elf tracking code.
|
||||
pitchVariance = 30.0; // more or less just tolerances
|
||||
|
||||
// State transiltions
|
||||
stateName[0] = "Activate";
|
||||
|
|
|
|||
|
|
@ -180,12 +180,21 @@ function createVehicle(%client, %station, %blockName, %team , %pos, %rot, %angle
|
|||
//------------------------------------------------------------------------------
|
||||
function VehicleData::mountDriver(%data, %obj, %player)
|
||||
{
|
||||
%player.startFade(1000, 0, true);
|
||||
|
||||
%player.getDataBlock().schedule(1000,"onCollision",%player, %obj, 0);
|
||||
%player.schedule(1500,"startFade",1000, 0, false);
|
||||
if(isObject(%obj) && %obj.getDamageState() !$= "Destroyed")
|
||||
{
|
||||
%player.startFade(1000, 0, true);
|
||||
schedule(1000, 0, "testVehicleForMount", %player, %obj);
|
||||
%player.schedule(1500,"startFade",1000, 0, false);
|
||||
}
|
||||
}
|
||||
|
||||
function testVehicleForMount(%player, %obj)
|
||||
{
|
||||
if(isObject(%obj) && %obj.getDamageState() !$= "Destroyed")
|
||||
%player.getDataBlock().onCollision(%player, %obj, 0);
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function VehicleData::checkIfPlayersMounted(%data, %obj)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -79,7 +79,8 @@ function VehicleData::onDamage(%this,%obj)
|
|||
|
||||
function VehicleData::playerDismounted(%data, %obj, %player)
|
||||
{
|
||||
//this function is declared to prevent console error msg spam...
|
||||
if( %player.client.observeCount > 0 )
|
||||
resetObserveFollow( %player.client, true );
|
||||
}
|
||||
|
||||
function HoverVehicle::useCreateHeight()
|
||||
|
|
@ -219,12 +220,20 @@ function VehicleData::onLeaveLiquid(%data, %obj, %type)
|
|||
|
||||
function VehicleData::onDestroyed(%data, %obj, %prevState)
|
||||
{
|
||||
if(%obj.lastDamagedBy)
|
||||
{
|
||||
%destroyer = %obj.lastDamagedBy;
|
||||
game.vehicleDestroyed(%obj, %destroyer);
|
||||
//error("vehicleDestroyed( "@ %obj @", "@ %destroyer @")");
|
||||
}
|
||||
|
||||
radiusVehicleExplosion(%data, %obj);
|
||||
if(%obj.turretObject)
|
||||
if(%obj.turretObject.getControllingClient())
|
||||
%obj.turretObject.getDataBlock().playerDismount(%obj.turretObject);
|
||||
for(%i = 0; %i < %obj.getDatablock().numMountPoints; %i++)
|
||||
{
|
||||
echo("damaging objects...");
|
||||
if (%obj.getMountNodeObject(%i)) {
|
||||
%flingee = %obj.getMountNodeObject(%i);
|
||||
%flingee.getDataBlock().doDismount(%flingee, true);
|
||||
|
|
@ -233,9 +242,12 @@ function VehicleData::onDestroyed(%data, %obj, %prevState)
|
|||
%zVel = (getRandom() * 100.0) + 50.0;
|
||||
%flingVel = %xVel @ " " @ %yVel @ " " @ %zVel;
|
||||
%flingee.applyImpulse(%flingee.getTransform(), %flingVel);
|
||||
%flingee.damage(0, %obj.getPosition(), 0.4, $DamageType::Explosion);
|
||||
echo("got player..." @ %flingee.getClassName());
|
||||
%flingee.damage(0, %obj.getPosition(), 0.4, $DamageType::Crash);
|
||||
}
|
||||
}
|
||||
|
||||
%data.deleteAllMounted(%obj);
|
||||
%obj.schedule(2000, "delete");
|
||||
}
|
||||
|
||||
|
|
@ -356,6 +368,7 @@ function BomberFlyer::onAdd(%this, %obj)
|
|||
%turret.mountImage(BomberBombPairImage, 5);
|
||||
%turret.mountImage(BomberTargetingImage, 6);
|
||||
%obj.turretObject = %turret;
|
||||
%turret.setCapacitorRechargeRate( %turret.getDataBlock().capacitorRechargeRate );
|
||||
%turret.vehicleMounted = %obj;
|
||||
|
||||
//vehicle turrets should not auto fire at targets
|
||||
|
|
@ -396,8 +409,9 @@ function AssaultVehicle::onAdd(%this, %obj)
|
|||
%obj.mountObject(%turret, 10);
|
||||
%turret.mountImage(AssaultPlasmaTurretBarrel, 2);
|
||||
%turret.mountImage(AssaultMortarTurretBarrel, 4);
|
||||
%turret.setCapacitorRechargeRate( %turret.getDataBlock().capacitorRechargeRate );
|
||||
%obj.turretObject = %turret;
|
||||
|
||||
|
||||
//vehicle turrets should not auto fire at targets
|
||||
%turret.setAutoFire(false);
|
||||
|
||||
|
|
@ -471,6 +485,7 @@ function BomberFlyer::deleteAllMounted(%data, %obj)
|
|||
%client.player.mountVehicle = false;
|
||||
|
||||
%client.player.bomber = false;
|
||||
%client.player.isBomber = false;
|
||||
}
|
||||
%turret.delete();
|
||||
}
|
||||
|
|
@ -522,6 +537,10 @@ function ScoutFlyer::playerMounted(%data, %obj, %player, %node)
|
|||
// scout flyer == SUV (single-user vehicle)
|
||||
commandToClient(%player.client, 'setHudMode', 'Pilot', "Shrike", %node);
|
||||
$numVWeapons = 1;
|
||||
|
||||
// update observers who are following this guy...
|
||||
if( %player.client.observeCount > 0 )
|
||||
resetObserveFollow( %player.client, false );
|
||||
}
|
||||
|
||||
//----------------------------
|
||||
|
|
@ -556,6 +575,7 @@ function BomberFlyer::playerMounted(%data, %obj, %player, %node)
|
|||
commandToClient(%player.client,'SetWeaponryVehicleKeys', true);
|
||||
|
||||
commandToClient(%player.client, 'setHudMode', 'Pilot', "Bomber", %node);
|
||||
%player.isBomber = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -569,6 +589,10 @@ function BomberFlyer::playerMounted(%data, %obj, %player, %node)
|
|||
for(%i = 0; %i < %data.numMountPoints; %i++)
|
||||
if(%obj.getMountNodeObject(%i) > 0)
|
||||
commandToClient(%obj.getMountNodeObject(%i).client, 'checkPassengers', %passString);
|
||||
|
||||
// update observers who are following this guy...
|
||||
if( %player.client.observeCount > 0 )
|
||||
resetObserveFollow( %player.client, false );
|
||||
}
|
||||
|
||||
//----------------------------
|
||||
|
|
@ -592,6 +616,10 @@ function HAPCFlyer::playerMounted(%data, %obj, %player, %node)
|
|||
for(%i = 0; %i < %data.numMountPoints; %i++)
|
||||
if(%obj.getMountNodeObject(%i) > 0)
|
||||
commandToClient(%obj.getMountNodeObject(%i).client, 'checkPassengers', %passString);
|
||||
|
||||
// update observers who are following this guy...
|
||||
if( %player.client.observeCount > 0 )
|
||||
resetObserveFollow( %player.client, false );
|
||||
}
|
||||
|
||||
//----------------------------
|
||||
|
|
@ -602,6 +630,10 @@ function ScoutVehicle::playerMounted(%data, %obj, %player, %node)
|
|||
{
|
||||
// scout vehicle == SUV (single-user vehicle)
|
||||
commandToClient(%player.client, 'setHudMode', 'Pilot', "Hoverbike", %node);
|
||||
|
||||
// update observers who are following this guy...
|
||||
if( %player.client.observeCount > 0 )
|
||||
resetObserveFollow( %player.client, false );
|
||||
}
|
||||
|
||||
//----------------------------
|
||||
|
|
@ -613,7 +645,7 @@ function AssaultVehicle::playerMounted(%data, %obj, %player, %node)
|
|||
if(%node == 0) {
|
||||
// driver position
|
||||
// is there someone manning the turret?
|
||||
%turreteer = %obj.getMountedNodeObject(1);
|
||||
//%turreteer = %obj.getMountedNodeObject(1);
|
||||
commandToClient(%player.client, 'setHudMode', 'Pilot', "Assault", %node);
|
||||
}
|
||||
else if(%node == 1)
|
||||
|
|
@ -639,6 +671,11 @@ function AssaultVehicle::playerMounted(%data, %obj, %player, %node)
|
|||
%obj.getMountNodeObject(10).selectedWeapon = 1;
|
||||
commandToClient(%player.client, 'setHudMode', 'Pilot', "Assault", %node);
|
||||
}
|
||||
|
||||
// update observers who are following this guy...
|
||||
if( %player.client.observeCount > 0 )
|
||||
resetObserveFollow( %player.client, false );
|
||||
|
||||
// build a space-separated string representing passengers
|
||||
// 0 = no passenger; 1 = passenger (e.g. "1 0 ")
|
||||
%passString = buildPassengerString(%obj);
|
||||
|
|
@ -673,9 +710,15 @@ function MobileBaseVehicle::playerMounted(%data, %obj, %player, %node)
|
|||
%obj.station.goingOut=false;
|
||||
%obj.station.notDeployed = 1;
|
||||
%obj.station.playAudio($DeploySound, MobileBaseStationUndeploySound);
|
||||
|
||||
if((%turretClient = %obj.turret.getControllingClient()) !$= "")
|
||||
{
|
||||
CommandToServer( 'resetControlObject', %turretClient );
|
||||
}
|
||||
|
||||
%obj.turret.setThreadDir($DeployThread, false);
|
||||
%obj.turret.clearTarget();
|
||||
%obj.turret.setTarget(-1);
|
||||
%obj.turret.setTargetObject(-1);
|
||||
|
||||
%obj.turret.playAudio($DeploySound, MobileBaseTurretUndeploySound);
|
||||
%obj.shield.open();
|
||||
|
|
@ -690,6 +733,10 @@ function MobileBaseVehicle::playerMounted(%data, %obj, %player, %node)
|
|||
%obj.noEnemyControl = 0;
|
||||
}
|
||||
%obj.deployed = 0;
|
||||
|
||||
// update observers who are following this guy...
|
||||
if( %player.client.observeCount > 0 )
|
||||
resetObserveFollow( %player.client, false );
|
||||
}
|
||||
|
||||
function buildPassengerString(%vehicle)
|
||||
|
|
@ -709,6 +756,7 @@ function buildPassengerString(%vehicle)
|
|||
function MobileBaseVehicle::playerDismounted(%data, %obj, %player)
|
||||
{
|
||||
%obj.schedule(500, "deployVehicle", %data, %player);
|
||||
Parent::playerDismounted( %data, %obj, %player );
|
||||
}
|
||||
|
||||
function WheeledVehicle::deployVehicle(%obj, %data, %player)
|
||||
|
|
@ -782,8 +830,9 @@ function MobileBaseVehicle::vehicleDeploy(%data, %obj, %player, %force)
|
|||
if(%deployMessage $= "" || %force)
|
||||
{
|
||||
if(%obj.turret.getTarget() == -1)
|
||||
{
|
||||
%obj.turret.setTarget(%obj.turret.target);
|
||||
|
||||
}
|
||||
%obj.turret.setThreadDir($DeployThread, true);
|
||||
%obj.turret.playThread($DeployThread,"deploy");
|
||||
%obj.turret.playAudio($DeploySound, MobileBaseTurretDeploySound);
|
||||
|
|
@ -866,9 +915,12 @@ function MobileInvStation::onEndSequence(%data, %obj, %thread)
|
|||
{
|
||||
%obj.notDeployed = 0;
|
||||
%obj.vehicle.fullyDeployed = 1;
|
||||
%obj.vehicle.teleporter.setThreadDir($ActivateThread, TRUE);
|
||||
%obj.vehicle.teleporter.playThread($ActivateThread,"activate");
|
||||
%obj.vehicle.teleporter.playAudio($ActivateSound, StationTeleportAcitvateSound);
|
||||
if(isObject(%obj.vehicle.teleporter))
|
||||
{
|
||||
%obj.vehicle.teleporter.setThreadDir($ActivateThread, TRUE);
|
||||
%obj.vehicle.teleporter.playThread($ActivateThread,"activate");
|
||||
%obj.vehicle.teleporter.playAudio($ActivateSound, StationTeleportAcitvateSound);
|
||||
}
|
||||
}
|
||||
Parent::onEndSequence(%data, %obj, %thread);
|
||||
}
|
||||
|
|
@ -1076,7 +1128,12 @@ function findEmptySeat(%vehicle, %player, %forceNode)
|
|||
%message = '\c2Only Scout or Assault Armors can use that position.~wfx/misc/misc.error.wav';
|
||||
}
|
||||
|
||||
messageClient(%player.client, 'MsgArmorCantMountVehicle', %message);
|
||||
if(!%player.noSitMessage)
|
||||
{
|
||||
%player.noSitMessage = true;
|
||||
%player.schedule(2000, "resetSitMessage");
|
||||
messageClient(%player.client, 'MsgArmorCantMountVehicle', %message);
|
||||
}
|
||||
%node = -1;
|
||||
}
|
||||
return %node;
|
||||
|
|
@ -1094,8 +1151,21 @@ function findFirstHeavyNode(%data)
|
|||
//* DAMAGE FUNCTIONS
|
||||
//**************************************************************
|
||||
|
||||
function VehicleData::damageObject(%data, %targetObject, %sourceObject, %position, %amount, %damageType, %momVec)
|
||||
function VehicleData::damageObject(%data, %targetObject, %sourceObject, %position, %amount, %damageType, %momVec, %theClient, %proj)
|
||||
{
|
||||
if(%proj !$= "")
|
||||
{
|
||||
if(%amount > 0 && %targetObject.lastDamageProj !$= %proj)
|
||||
{
|
||||
%targetObject.lastDamageProj = %proj;
|
||||
%targetObject.lastDamageAmount = %amount;
|
||||
}
|
||||
else if(%targetObject.lastDamageAmount < %amount)
|
||||
%amount = %amount - %targetObject.lastDamageAmount;
|
||||
else
|
||||
return;
|
||||
}
|
||||
|
||||
// check for team damage
|
||||
%sourceClient = %sourceObject ? %sourceObject.getOwnerClient() : 0;
|
||||
%targetTeam = getTargetSensorGroup(%targetObject.getTarget());
|
||||
|
|
@ -1107,8 +1177,18 @@ function VehicleData::damageObject(%data, %targetObject, %sourceObject, %positio
|
|||
else
|
||||
%sourceTeam = %sourceObject ? getTargetSensorGroup(%sourceObject.getTarget()) : -1;
|
||||
|
||||
if(!$teamDamage && (%targetTeam == %sourceTeam) && %targetObject.getDamagePercent() > 0.5)
|
||||
return;
|
||||
// vehicles no longer obey team damage -JR
|
||||
// if(!$teamDamage && (%targetTeam == %sourceTeam) && %targetObject.getDamagePercent() > 0.5)
|
||||
// return;
|
||||
//but we do want to track the destroyer
|
||||
if(%sourceObject)
|
||||
{
|
||||
%targetObject.lastDamagedBy = %sourceObject;
|
||||
%targetObject.lastDamageType = %damageType;
|
||||
}
|
||||
else
|
||||
%targetObject.lastDamagedBy = 0;
|
||||
|
||||
|
||||
// Scale damage type & include shield calculations...
|
||||
if (%data.isShielded)
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ datablock FlyingVehicleData(BomberFlyer) : BomberDamageProfile
|
|||
maxSteeringAngle = 5; // Max radiens you can rotate the wheel. Smaller number is more maneuverable.
|
||||
horizontalSurfaceForce = 5; // Horizontal center "wing" (provides "bite" into the wind for climbing/diving and turning)
|
||||
verticalSurfaceForce = 8; // Vertical center "wing" (controls side slip. lower numbers make MORE slide.)
|
||||
maneuveringForce = 4700; // Horizontal jets (W,S,D,A key thrust)
|
||||
maneuveringForce = 4500; // Horizontal jets (W,S,D,A key thrust)
|
||||
steeringForce = 1100; // Steering jets (force applied when you move the mouse)
|
||||
steeringRollForce = 300; // Steering jets (how much you heel over when you turn)
|
||||
rollForce = 8; // Auto-roll (self-correction to right you after you roll/invert)
|
||||
|
|
@ -165,10 +165,10 @@ datablock FlyingVehicleData(BomberFlyer) : BomberDamageProfile
|
|||
createHoverHeight = 3; // Height off the ground when created
|
||||
|
||||
// Turbo Jet
|
||||
jetForce = 3000; // Afterburner thrust (this is in addition to normal thrust)
|
||||
jetForce = 2000; // Afterburner thrust (this is in addition to normal thrust)
|
||||
minJetEnergy = 40.0; // Afterburner can't be used if below this threshhold.
|
||||
jetEnergyDrain = 3.0; // Energy use of the afterburners (low number is less drain...can be fractional)
|
||||
vertThrustMultiple = 2.0;
|
||||
vertThrustMultiple = 3.0;
|
||||
|
||||
dustEmitter = LargeVehicleLiftoffDustEmitter;
|
||||
triggerDustHeight = 4.0;
|
||||
|
|
@ -327,31 +327,31 @@ datablock ExplosionData(BomberFusionBoltExplosion)
|
|||
|
||||
datablock LinearFlareProjectileData(BomberFusionBolt)
|
||||
{
|
||||
projectileShapeName = "";
|
||||
directDamage = 0.35;
|
||||
directDamageType = $DamageType::BellyTurret;
|
||||
hasDamageRadius = false;
|
||||
explosion = BomberFusionBoltExplosion;
|
||||
sound = BlasterProjectileSound;
|
||||
projectileShapeName = "";
|
||||
directDamage = 0.35;
|
||||
directDamageType = $DamageType::BellyTurret;
|
||||
hasDamageRadius = false;
|
||||
explosion = BomberFusionBoltExplosion;
|
||||
sound = BlasterProjectileSound;
|
||||
|
||||
dryVelocity = 200.0;
|
||||
wetVelocity = 200.0;
|
||||
velInheritFactor = 1.0;
|
||||
fizzleTimeMS = 2000;
|
||||
lifetimeMS = 3000;
|
||||
explodeOnDeath = false;
|
||||
reflectOnWaterImpactAngle = 0.0;
|
||||
explodeOnWaterImpact = true;
|
||||
deflectionOnWaterImpact = 0.0;
|
||||
fizzleUnderwaterMS = -1;
|
||||
dryVelocity = 200.0;
|
||||
wetVelocity = 200.0;
|
||||
velInheritFactor = 1.0;
|
||||
fizzleTimeMS = 2000;
|
||||
lifetimeMS = 3000;
|
||||
explodeOnDeath = false;
|
||||
reflectOnWaterImpactAngle = 0.0;
|
||||
explodeOnWaterImpact = true;
|
||||
deflectionOnWaterImpact = 0.0;
|
||||
fizzleUnderwaterMS = -1;
|
||||
|
||||
activateDelayMS = 100;
|
||||
activateDelayMS = 100;
|
||||
|
||||
numFlares = 0;
|
||||
size = 0.15;
|
||||
flareColor = "0.7 0.3 1.0";
|
||||
flareModTexture = "flaremod";
|
||||
flareBaseTexture = "flarebase";
|
||||
numFlares = 0;
|
||||
size = 0.15;
|
||||
flareColor = "0.7 0.3 1.0";
|
||||
flareModTexture = "flaremod";
|
||||
flareBaseTexture = "flarebase";
|
||||
};
|
||||
|
||||
//-------------------------------------
|
||||
|
|
@ -360,119 +360,178 @@ datablock LinearFlareProjectileData(BomberFusionBolt)
|
|||
|
||||
datablock TurretData(BomberTurret) : TurretDamageProfile
|
||||
{
|
||||
className = VehicleTurret;
|
||||
catagory = "Turrets";
|
||||
shapeFile = "turret_belly_base.dts";
|
||||
preload = true;
|
||||
className = VehicleTurret;
|
||||
catagory = "Turrets";
|
||||
shapeFile = "turret_belly_base.dts";
|
||||
preload = true;
|
||||
|
||||
mass = 1.0; // Not really relevant
|
||||
repairRate = 0;
|
||||
maxDamage = BomberFlyer.maxDamage;
|
||||
destroyedLevel = BomberFlyer.destroyedLevel;
|
||||
mass = 1.0; // Not really relevant
|
||||
repairRate = 0;
|
||||
maxDamage = BomberFlyer.maxDamage;
|
||||
destroyedLevel = BomberFlyer.destroyedLevel;
|
||||
|
||||
thetaMin = 90;
|
||||
thetaMax = 180;
|
||||
thetaMin = 90;
|
||||
thetaMax = 180;
|
||||
|
||||
// capacitor
|
||||
maxCapacitorEnergy = 250;
|
||||
capacitorRechargeRate = 0.8;
|
||||
|
||||
inheritEnergyFromMount = true;
|
||||
firstPersonOnly = true;
|
||||
useEyePoint = true;
|
||||
numWeapons = 3;
|
||||
inheritEnergyFromMount = true;
|
||||
firstPersonOnly = true;
|
||||
useEyePoint = true;
|
||||
numWeapons = 3;
|
||||
|
||||
targetNameTag = 'Thundersword Belly';
|
||||
targetTypeTag = 'Turret';
|
||||
targetNameTag = 'Thundersword Belly';
|
||||
targetTypeTag = 'Turret';
|
||||
};
|
||||
|
||||
datablock TurretImageData(BomberTurretBarrelPair)
|
||||
datablock TurretImageData(BomberTurretBarrel)
|
||||
{
|
||||
shapeFile = "turret_belly_barrell.dts";
|
||||
mountPoint = 0;
|
||||
shapeFile = "turret_belly_barrell.dts";
|
||||
mountPoint = 0;
|
||||
|
||||
projectile = BomberFusionBolt;
|
||||
projectileType = LinearFlareProjectile;
|
||||
projectile = BomberFusionBolt;
|
||||
projectileType = LinearFlareProjectile;
|
||||
|
||||
usesEnergy = true;
|
||||
useMountEnergy = true;
|
||||
fireEnergy = 6.25;
|
||||
minEnergy = 25.0;
|
||||
usesEnergy = true;
|
||||
useCapacitor = true;
|
||||
useMountEnergy = true;
|
||||
fireEnergy = 16.0;
|
||||
minEnergy = 16.0;
|
||||
|
||||
// Turret parameters
|
||||
activationMS = 1000;
|
||||
deactivateDelayMS = 1500;
|
||||
thinkTimeMS = 200;
|
||||
degPerSecTheta = 360;
|
||||
degPerSecPhi = 360;
|
||||
activationMS = 1000;
|
||||
deactivateDelayMS = 1500;
|
||||
thinkTimeMS = 200;
|
||||
degPerSecTheta = 360;
|
||||
degPerSecPhi = 360;
|
||||
|
||||
attackRadius = 75;
|
||||
attackRadius = 75;
|
||||
|
||||
// State transitions
|
||||
stateName[0] = "Activate";
|
||||
stateTransitionOnTimeout[0] = "WaitFire";
|
||||
stateTimeoutValue[0] = 0.5;
|
||||
stateSequence[0] = "Activate";
|
||||
stateSound[0] = BomberTurretActivateSound;
|
||||
stateName[0] = "Activate";
|
||||
stateTransitionOnTimeout[0] = "WaitFire1";
|
||||
stateTimeoutValue[0] = 0.5;
|
||||
stateSequence[0] = "Activate";
|
||||
stateSound[0] = BomberTurretActivateSound;
|
||||
|
||||
stateName[1] = "WaitFire";
|
||||
stateTransitionOnTriggerDown[1] = "InitFire";
|
||||
stateTransitionOnNoAmmo[1] = "NoAmmo";
|
||||
// stateSound[1] = BomberTurretIdleSound;
|
||||
stateName[1] = "WaitFire1";
|
||||
stateTransitionOnTriggerDown[1] = "Fire1";
|
||||
stateTransitionOnNoAmmo[1] = "NoAmmo1";
|
||||
|
||||
stateName[2] = "InitFire";
|
||||
stateWaitForTimeout[2] = false;
|
||||
stateTransitionOnTimeout[2] = "Fire";
|
||||
|
||||
stateName[3] = "Fire";
|
||||
stateTransitionOnTimeout[3] = "Reload";
|
||||
stateTimeoutValue[3] = 0.35;
|
||||
stateFire[3] = true;
|
||||
stateRecoil[3] = LightRecoil;
|
||||
stateAllowImageChange[3] = false;
|
||||
stateSequence[3] = "Fire";
|
||||
stateScript[3] = "onFire";
|
||||
stateSound[3] = BomberTurretFireSound;
|
||||
stateName[2] = "Fire1";
|
||||
stateTransitionOnTimeout[2] = "Reload1";
|
||||
stateTimeoutValue[2] = 0.13;
|
||||
stateFire[2] = true;
|
||||
stateRecoil[2] = LightRecoil;
|
||||
stateAllowImageChange[2] = false;
|
||||
stateSequence[2] = "Fire";
|
||||
stateScript[2] = "onFire";
|
||||
stateSound[2] = BomberTurretFireSound;
|
||||
|
||||
stateName[4] = "Reload";
|
||||
stateTimeoutValue[4] = 0.05;
|
||||
stateAllowImageChange[4] = false;
|
||||
stateSequence[4] = "Reload";
|
||||
stateTransitionOnTimeout[4] = "WaitFire";
|
||||
stateTransitionOnNotLoaded[4] = "NoAmmo";
|
||||
// stateSound[4] = BomberTurretReloadSound;
|
||||
stateName[3] = "Reload1";
|
||||
stateSequence[3] = "Reload";
|
||||
stateTimeoutValue[3] = 0.1;
|
||||
stateAllowImageChange[3] = false;
|
||||
stateTransitionOnTimeout[3] = "WaitFire2";
|
||||
stateTransitionOnNoAmmo[3] = "NoAmmo1";
|
||||
|
||||
stateName[5] = "NoAmmo";
|
||||
stateTransitionOnAmmo[5] = "Reload";
|
||||
stateSequence[5] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[5] = "DryFire";
|
||||
stateName[4] = "NoAmmo1";
|
||||
stateTransitionOnAmmo[4] = "Reload1";
|
||||
stateSequence[4] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[4] = "DryFire1";
|
||||
|
||||
stateName[6] = "DryFire";
|
||||
stateSound[6] = BomberTurretDryFireSound;
|
||||
stateTimeoutValue[6] = 1.5;
|
||||
stateTransitionOnTimeout[6] = "NoAmmo";
|
||||
stateName[5] = "DryFire1";
|
||||
stateSound[5] = BomberTurretDryFireSound;
|
||||
stateTimeoutValue[5] = 0.5;
|
||||
stateTransitionOnTimeout[5] = "NoAmmo1";
|
||||
|
||||
stateName[6] = "WaitFire2";
|
||||
stateTransitionOnTriggerDown[6] = "Fire2";
|
||||
stateTransitionOnNoAmmo[6] = "NoAmmo";
|
||||
|
||||
stateName[7] = "Fire2";
|
||||
stateTransitionOnTimeout[7] = "Reload2";
|
||||
stateTimeoutValue[7] = 0.13;
|
||||
stateScript[7] = "FirePair";
|
||||
|
||||
stateName[8] = "Reload2";
|
||||
stateSequence[8] = "Reload";
|
||||
stateTimeoutValue[8] = 0.1;
|
||||
stateAllowImageChange[8] = false;
|
||||
stateTransitionOnTimeout[8] = "WaitFire1";
|
||||
stateTransitionOnNoAmmo[8] = "NoAmmo2";
|
||||
|
||||
stateName[9] = "NoAmmo2";
|
||||
stateTransitionOnAmmo[9] = "Reload2";
|
||||
stateSequence[9] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[9] = "DryFire2";
|
||||
|
||||
stateName[10] = "DryFire2";
|
||||
stateSound[10] = BomberTurretDryFireSound;
|
||||
stateTimeoutValue[10] = 0.5;
|
||||
stateTransitionOnTimeout[10] = "NoAmmo2";
|
||||
|
||||
};
|
||||
|
||||
datablock TurretImageData(BomberTurretBarrel) : BomberTurretBarrelPair
|
||||
datablock TurretImageData(BomberTurretBarrelPair)
|
||||
{
|
||||
shapeFile = "turret_belly_barrelr.dts";
|
||||
mountPoint = 1;
|
||||
stateScript[2] = "onTriggerDown";
|
||||
stateScript[4] = "onTriggerUp";
|
||||
shapeFile = "turret_belly_barrelr.dts";
|
||||
mountPoint = 1;
|
||||
|
||||
projectile = BomberFusionBolt;
|
||||
projectileType = LinearFlareProjectile;
|
||||
|
||||
usesEnergy = true;
|
||||
useCapacitor = true;
|
||||
useMountEnergy = true;
|
||||
fireEnergy = 16.0;
|
||||
minEnergy = 16.0;
|
||||
|
||||
// Turret parameters
|
||||
activationMS = 1000;
|
||||
deactivateDelayMS = 1500;
|
||||
thinkTimeMS = 200;
|
||||
degPerSecTheta = 360;
|
||||
degPerSecPhi = 360;
|
||||
|
||||
attackRadius = 75;
|
||||
|
||||
stateName[0] = "WaitFire";
|
||||
stateTransitionOnTriggerDown[0] = "Fire";
|
||||
|
||||
stateName[1] = "Fire";
|
||||
stateTransitionOnTimeout[1] = "StopFire";
|
||||
stateTimeoutValue[1] = 0.13;
|
||||
stateFire[1] = true;
|
||||
stateRecoil[1] = LightRecoil;
|
||||
stateAllowImageChange[1] = false;
|
||||
stateSequence[1] = "Fire";
|
||||
stateScript[1] = "onFire";
|
||||
stateSound[1] = BomberTurretFireSound;
|
||||
|
||||
stateName[2] = "StopFire";
|
||||
stateTimeoutValue[2] = 0.1;
|
||||
stateTransitionOnTimeout[2] = "WaitFire";
|
||||
stateScript[2] = "stopFire";
|
||||
};
|
||||
|
||||
datablock TurretImageData(AIAimingTurretBarrel)
|
||||
{
|
||||
shapeFile = "turret_muzzlepoint.dts";
|
||||
mountPoint = 3;
|
||||
shapeFile = "turret_muzzlepoint.dts";
|
||||
mountPoint = 3;
|
||||
|
||||
projectile = BomberFusionBolt;
|
||||
projectile = BomberFusionBolt;
|
||||
|
||||
// Turret parameters
|
||||
activationMS = 1000;
|
||||
deactivateDelayMS = 1500;
|
||||
thinkTimeMS = 200;
|
||||
degPerSecTheta = 500;
|
||||
degPerSecPhi = 800;
|
||||
activationMS = 1000;
|
||||
deactivateDelayMS = 1500;
|
||||
thinkTimeMS = 200;
|
||||
degPerSecTheta = 500;
|
||||
degPerSecPhi = 800;
|
||||
|
||||
attackRadius = 75;
|
||||
attackRadius = 75;
|
||||
};
|
||||
|
||||
//-------------------------------------
|
||||
|
|
@ -481,29 +540,29 @@ datablock TurretImageData(AIAimingTurretBarrel)
|
|||
|
||||
datablock BombProjectileData(BomberBomb)
|
||||
{
|
||||
projectileShapeName = "bomb.dts";
|
||||
emitterDelay = -1;
|
||||
directDamage = 0.0;
|
||||
hasDamageRadius = true;
|
||||
indirectDamage = 1.1;
|
||||
damageRadius = 30;
|
||||
radiusDamageType = $DamageType::BomberBombs;
|
||||
kickBackStrength = 2500;
|
||||
projectileShapeName = "bomb.dts";
|
||||
emitterDelay = -1;
|
||||
directDamage = 0.0;
|
||||
hasDamageRadius = true;
|
||||
indirectDamage = 1.1;
|
||||
damageRadius = 30;
|
||||
radiusDamageType = $DamageType::BomberBombs;
|
||||
kickBackStrength = 2500;
|
||||
|
||||
explosion = "VehicleBombExplosion";
|
||||
velInheritFactor = 1.0;
|
||||
explosion = "VehicleBombExplosion";
|
||||
velInheritFactor = 1.0;
|
||||
|
||||
grenadeElasticity = 0.25;
|
||||
grenadeFriction = 0.4;
|
||||
armingDelayMS = 2000;
|
||||
muzzleVelocity = 0.1;
|
||||
drag = 0.3;
|
||||
grenadeElasticity = 0.25;
|
||||
grenadeFriction = 0.4;
|
||||
armingDelayMS = 2000;
|
||||
muzzleVelocity = 0.1;
|
||||
drag = 0.3;
|
||||
|
||||
minRotSpeed = "60.0 0.0 0.0";
|
||||
maxRotSpeed = "80.0 0.0 0.0";
|
||||
scale = "1.0 1.0 1.0";
|
||||
minRotSpeed = "60.0 0.0 0.0";
|
||||
maxRotSpeed = "80.0 0.0 0.0";
|
||||
scale = "1.0 1.0 1.0";
|
||||
|
||||
sound = BomberBombProjectileSound;
|
||||
sound = BomberBombProjectileSound;
|
||||
};
|
||||
|
||||
//-------------------------------------
|
||||
|
|
@ -512,95 +571,134 @@ datablock BombProjectileData(BomberBomb)
|
|||
|
||||
datablock ItemData(BombAmmo)
|
||||
{
|
||||
className = Ammo;
|
||||
catagory = "Ammo";
|
||||
shapeFile = "repair_kit.dts";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 1;
|
||||
computeCRC = true;
|
||||
className = Ammo;
|
||||
catagory = "Ammo";
|
||||
shapeFile = "repair_kit.dts";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 1;
|
||||
computeCRC = true;
|
||||
};
|
||||
|
||||
datablock StaticShapeData(DropBombs)
|
||||
{
|
||||
catagory = "Turrets";
|
||||
shapeFile = "bombers_eye.dts";
|
||||
maxDamage = 1.0;
|
||||
disabledLevel = 0.6;
|
||||
destroyedLevel = 0.8;
|
||||
catagory = "Turrets";
|
||||
shapeFile = "bombers_eye.dts";
|
||||
maxDamage = 1.0;
|
||||
disabledLevel = 0.6;
|
||||
destroyedLevel = 0.8;
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(BomberBombPairImage)
|
||||
datablock TurretImageData(BomberBombImage)
|
||||
{
|
||||
className = WeaponImage;
|
||||
shapeFile = "turret_muzzlepoint.dts";
|
||||
// ammo = BombAmmo;
|
||||
offset = "2 -4 -0.5";
|
||||
mountPoint = 10;
|
||||
shapeFile = "turret_muzzlepoint.dts";
|
||||
offset = "2 -4 -0.5";
|
||||
mountPoint = 10;
|
||||
|
||||
projectile = BomberBomb;
|
||||
projectileType = BombProjectile;
|
||||
usesEnergy = true;
|
||||
useMountEnergy = true;
|
||||
projectile = BomberBomb;
|
||||
projectileType = BombProjectile;
|
||||
usesEnergy = true;
|
||||
useMountEnergy = true;
|
||||
useCapacitor = true;
|
||||
|
||||
fireEnergy = 37.50;
|
||||
minEnergy = 37.50;
|
||||
fireEnergy = 53.0;
|
||||
minEnergy = 53.0;
|
||||
|
||||
stateName[0] = "Activate";
|
||||
// stateTransitionOnTimeout[0] = "ActivateReady";
|
||||
stateTransitionOnTimeout[0] = "WaitFire";
|
||||
stateTimeoutValue[0] = 0.5;
|
||||
stateSequence[0] = "Activate";
|
||||
// stateSound[0] = MortarSwitchSound;
|
||||
|
||||
stateName[1] = "ActivateReady";
|
||||
stateTransitionOnLoaded[1] = "WaitFire";
|
||||
// stateTransitionOnNoAmmo[1] = "NoAmmo";
|
||||
|
||||
stateName[2] = "WaitFire";
|
||||
// stateSound[2] = BomberBombIdleSound;
|
||||
stateTransitionOnNoAmmo[2] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[2] = "InitFire";
|
||||
|
||||
stateName[3] = "InitFire";
|
||||
stateWaitForTimeout[3] = false;
|
||||
stateTransitionOnTimeout[3] = "Fire";
|
||||
|
||||
stateName[4] = "Fire";
|
||||
stateTransitionOnTimeout[4] = "Reload";
|
||||
stateTimeoutValue[4] = 0.35;
|
||||
stateFire[4] = true;
|
||||
stateRecoil[4] = LightRecoil;
|
||||
stateAllowImageChange[4] = false;
|
||||
stateScript[4] = "onFire";
|
||||
stateSound[4] = BomberBombFireSound;
|
||||
stateName[0] = "Activate";
|
||||
stateTransitionOnTimeout[0] = "WaitFire1";
|
||||
stateTimeoutValue[0] = 0.5;
|
||||
stateSequence[0] = "Activate";
|
||||
|
||||
stateName[5] = "Reload";
|
||||
stateTransitionOnNoAmmo[5] = "NoAmmo";
|
||||
stateTransitionOnTimeout[5] = "WaitFire";
|
||||
stateTimeoutValue[5] = 0.5;
|
||||
stateAllowImageChange[5] = false;
|
||||
stateSequence[5] = "Reload";
|
||||
// stateSound[5] = BomberBombReloadSound;
|
||||
|
||||
stateName[6] = "NoAmmo";
|
||||
stateTransitionOnAmmo[6] = "Reload";
|
||||
stateSequence[6] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[6] = "DryFire";
|
||||
stateName[1] = "WaitFire1";
|
||||
stateTransitionOnTriggerDown[1] = "Fire1";
|
||||
stateTransitionOnNoAmmo[1] = "NoAmmo1";
|
||||
|
||||
stateName[7] = "DryFire";
|
||||
stateSound[7] = BomberBombDryFireSound;
|
||||
stateTimeoutValue[7] = 1.5;
|
||||
stateTransitionOnTimeout[7] = "NoAmmo";
|
||||
stateName[2] = "Fire1";
|
||||
stateTransitionOnTimeout[2] = "Reload1";
|
||||
stateTimeoutValue[2] = 0.32;
|
||||
stateFire[2] = true;
|
||||
stateAllowImageChange[2] = false;
|
||||
stateSequence[2] = "Fire";
|
||||
stateScript[2] = "onFire";
|
||||
stateSound[2] = BomberBombFireSound;
|
||||
|
||||
stateName[3] = "Reload1";
|
||||
stateSequence[3] = "Reload";
|
||||
stateTimeoutValue[3] = 0.1;
|
||||
stateAllowImageChange[3] = false;
|
||||
stateTransitionOnTimeout[3] = "WaitFire2";
|
||||
stateTransitionOnNoAmmo[3] = "NoAmmo1";
|
||||
|
||||
stateName[4] = "NoAmmo1";
|
||||
stateTransitionOnAmmo[4] = "Reload1";
|
||||
stateSequence[4] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[4] = "DryFire1";
|
||||
|
||||
stateName[5] = "DryFire1";
|
||||
stateSound[5] = BomberBombDryFireSound;
|
||||
stateTimeoutValue[5] = 0.5;
|
||||
stateTransitionOnTimeout[5] = "NoAmmo1";
|
||||
|
||||
stateName[6] = "WaitFire2";
|
||||
stateTransitionOnTriggerDown[6] = "Fire2";
|
||||
stateTransitionOnNoAmmo[6] = "NoAmmo";
|
||||
|
||||
stateName[7] = "Fire2";
|
||||
stateTransitionOnTimeout[7] = "Reload2";
|
||||
stateTimeoutValue[7] = 0.32;
|
||||
stateScript[7] = "FirePair";
|
||||
|
||||
stateName[8] = "Reload2";
|
||||
stateSequence[8] = "Reload";
|
||||
stateTimeoutValue[8] = 0.1;
|
||||
stateAllowImageChange[8] = false;
|
||||
stateTransitionOnTimeout[8] = "WaitFire1";
|
||||
stateTransitionOnNoAmmo[8] = "NoAmmo2";
|
||||
|
||||
stateName[9] = "NoAmmo2";
|
||||
stateTransitionOnAmmo[9] = "Reload2";
|
||||
stateSequence[9] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[9] = "DryFire2";
|
||||
|
||||
stateName[10] = "DryFire2";
|
||||
stateSound[10] = BomberBombDryFireSound;
|
||||
stateTimeoutValue[10] = 0.5;
|
||||
stateTransitionOnTimeout[10] = "NoAmmo2";
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(BomberBombImage) : BomberBombPairImage
|
||||
datablock TurretImageData(BomberBombPairImage)
|
||||
{
|
||||
offset = "-2 -4 -0.5";
|
||||
stateScript[3] = "onTriggerDown";
|
||||
stateScript[5] = "onTriggerUp";
|
||||
shapeFile = "turret_muzzlepoint.dts";
|
||||
offset = "-2 -4 -0.5";
|
||||
mountPoint = 10;
|
||||
|
||||
projectile = BomberBomb;
|
||||
projectileType = BombProjectile;
|
||||
usesEnergy = true;
|
||||
useMountEnergy = true;
|
||||
useCapacitor = true;
|
||||
fireEnergy = 53.0;
|
||||
minEnergy = 53.0;
|
||||
|
||||
stateName[0] = "WaitFire";
|
||||
stateTransitionOnTriggerDown[0] = "Fire";
|
||||
|
||||
stateName[1] = "Fire";
|
||||
stateTransitionOnTimeout[1] = "StopFire";
|
||||
stateTimeoutValue[1] = 0.13;
|
||||
stateFire[1] = true;
|
||||
stateAllowImageChange[1] = false;
|
||||
stateSequence[1] = "Fire";
|
||||
stateScript[1] = "onFire";
|
||||
stateSound[1] = BomberBombFireSound;
|
||||
|
||||
stateName[2] = "StopFire";
|
||||
stateTimeoutValue[2] = 0.1;
|
||||
stateTransitionOnTimeout[2] = "WaitFire";
|
||||
stateScript[2] = "stopFire";
|
||||
|
||||
};
|
||||
|
||||
//**************************************************************
|
||||
|
|
@ -620,35 +718,35 @@ datablock ParticleData(FusionExplosionParticle)
|
|||
lifetimeMS = 750;
|
||||
lifetimeVarianceMS = 150;
|
||||
textureName = "particleTest";
|
||||
colors[0] = "0.56 0.36 0.26 1.0";
|
||||
colors[1] = "0.56 0.36 0.26 0.0";
|
||||
sizes[0] = 1;
|
||||
sizes[1] = 2;
|
||||
colors[0] = "0.56 0.36 0.26 1.0";
|
||||
colors[1] = "0.56 0.36 0.26 0.0";
|
||||
sizes[0] = 1;
|
||||
sizes[1] = 2;
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(FusionExplosionEmitter)
|
||||
{
|
||||
ejectionPeriodMS = 7;
|
||||
periodVarianceMS = 0;
|
||||
ejectionVelocity = 12;
|
||||
velocityVariance = 1.75;
|
||||
ejectionOffset = 0.0;
|
||||
thetaMin = 0;
|
||||
thetaMax = 60;
|
||||
phiReferenceVel = 0;
|
||||
phiVariance = 360;
|
||||
overrideAdvances = false;
|
||||
particles = "FusionExplosionParticle";
|
||||
ejectionPeriodMS = 7;
|
||||
periodVarianceMS = 0;
|
||||
ejectionVelocity = 12;
|
||||
velocityVariance = 1.75;
|
||||
ejectionOffset = 0.0;
|
||||
thetaMin = 0;
|
||||
thetaMax = 60;
|
||||
phiReferenceVel = 0;
|
||||
phiVariance = 360;
|
||||
overrideAdvances = false;
|
||||
particles = "FusionExplosionParticle";
|
||||
};
|
||||
|
||||
datablock ExplosionData(FusionBoltExplosion)
|
||||
{
|
||||
explosionShape = "effect_plasma_explosion.dts";
|
||||
soundProfile = FusionExpSound;
|
||||
particleEmitter = FusionExplosionEmitter;
|
||||
particleDensity = 250;
|
||||
particleRadius = 1.25;
|
||||
faceViewer = true;
|
||||
explosionShape = "effect_plasma_explosion.dts";
|
||||
soundProfile = FusionExpSound;
|
||||
particleEmitter = FusionExplosionEmitter;
|
||||
particleDensity = 250;
|
||||
particleRadius = 1.25;
|
||||
faceViewer = true;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
|
@ -659,14 +757,14 @@ datablock AudioProfile(BomberTargetingSwitchSound)
|
|||
{
|
||||
filename = "fx/weapons/generic_switch.wav";
|
||||
description = AudioClosest3d;
|
||||
preload = true;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock AudioProfile(BomberTargetingPaintSound)
|
||||
{
|
||||
filename = "fx/weapons/targetinglaser_paint.wav";
|
||||
description = CloseLooping3d;
|
||||
preload = true;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
//--------------------------------------
|
||||
|
|
@ -704,50 +802,48 @@ datablock TargetProjectileData(BomberTargeter)
|
|||
//-------------------------------------
|
||||
datablock ShapeBaseImageData(BomberTargetingImage)
|
||||
{
|
||||
className = WeaponImage;
|
||||
className = WeaponImage;
|
||||
|
||||
shapeFile = "turret_muzzlepoint.dts";
|
||||
offset = "0 -0.04 -0.01";
|
||||
mountPoint = 2;
|
||||
shapeFile = "turret_muzzlepoint.dts";
|
||||
offset = "0 -0.04 -0.01";
|
||||
mountPoint = 2;
|
||||
|
||||
projectile = BomberTargeter;
|
||||
projectileType = TargetProjectile;
|
||||
deleteLastProjectile = true;
|
||||
projectile = BomberTargeter;
|
||||
projectileType = TargetProjectile;
|
||||
deleteLastProjectile = true;
|
||||
|
||||
usesEnergy = true;
|
||||
minEnergy = 3;
|
||||
usesEnergy = true;
|
||||
minEnergy = 3;
|
||||
|
||||
stateName[0] = "Activate";
|
||||
stateSequence[0] = "Activate";
|
||||
stateSound[0] = BomberTargetingSwitchSound;
|
||||
stateTimeoutValue[0] = 0.5;
|
||||
stateTransitionOnTimeout[0] = "ActivateReady";
|
||||
stateName[0] = "Activate";
|
||||
stateSequence[0] = "Activate";
|
||||
stateSound[0] = BomberTargetingSwitchSound;
|
||||
stateTimeoutValue[0] = 0.5;
|
||||
stateTransitionOnTimeout[0] = "ActivateReady";
|
||||
|
||||
stateName[1] = "ActivateReady";
|
||||
stateTransitionOnAmmo[1] = "Ready";
|
||||
stateTransitionOnNoAmmo[1] = "NoAmmo";
|
||||
stateName[1] = "ActivateReady";
|
||||
stateTransitionOnAmmo[1] = "Ready";
|
||||
stateTransitionOnNoAmmo[1] = "NoAmmo";
|
||||
|
||||
stateName[2] = "Ready";
|
||||
stateTransitionOnNoAmmo[2] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[2] = "Fire";
|
||||
stateName[2] = "Ready";
|
||||
stateTransitionOnNoAmmo[2] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[2] = "Fire";
|
||||
|
||||
stateName[3] = "Fire";
|
||||
stateEnergyDrain[3] = 3;
|
||||
stateFire[3] = true;
|
||||
stateAllowImageChange[3] = false;
|
||||
stateScript[3] = "onFire";
|
||||
stateTransitionOnTriggerUp[3] = "Deconstruction";
|
||||
stateTransitionOnNoAmmo[3] = "Deconstruction";
|
||||
stateSound[3] = BomberTargetingPaintSound;
|
||||
stateName[3] = "Fire";
|
||||
stateEnergyDrain[3] = 3;
|
||||
stateFire[3] = true;
|
||||
stateAllowImageChange[3] = false;
|
||||
stateScript[3] = "onFire";
|
||||
stateTransitionOnTriggerUp[3] = "Deconstruction";
|
||||
stateTransitionOnNoAmmo[3] = "Deconstruction";
|
||||
stateSound[3] = BomberTargetingPaintSound;
|
||||
|
||||
stateName[4] = "NoAmmo";
|
||||
stateTransitionOnAmmo[4] = "Ready";
|
||||
stateName[4] = "NoAmmo";
|
||||
stateTransitionOnAmmo[4] = "Ready";
|
||||
|
||||
stateName[5] = "Deconstruction";
|
||||
// Deconstruct is now being called from weapTurretCode.cs
|
||||
// stateScript[5] = "deconstruct";
|
||||
stateTransitionOnTimeout[5] = "ActivateReady";
|
||||
stateTimeoutValue[5] = 0.05;
|
||||
stateName[5] = "Deconstruction";
|
||||
stateTransitionOnTimeout[5] = "ActivateReady";
|
||||
stateTimeoutValue[5] = 0.05;
|
||||
};
|
||||
|
||||
function BomberTargetingImage::onFire(%data,%obj,%slot)
|
||||
|
|
@ -801,4 +897,3 @@ datablock StaticShapeData(BomberBeacon)
|
|||
|
||||
dynamicType = $TypeMasks::SensorObjectType;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ datablock FlyingVehicleData(HAPCFlyer) : HavocDamageProfile
|
|||
jetForce = 5000;
|
||||
minJetEnergy = 55;
|
||||
jetEnergyDrain = 3.6;
|
||||
vertThrustMultiple = 2.0;
|
||||
vertThrustMultiple = 3.0;
|
||||
|
||||
|
||||
dustEmitter = LargeVehicleLiftoffDustEmitter;
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ datablock WheeledVehicleData(MobileBaseVehicle) : MPBDamageProfile
|
|||
isShielded = true;
|
||||
energyPerDamagePoint = 125;
|
||||
maxEnergy = 600;
|
||||
jetForce = 2000;
|
||||
jetForce = 2800;
|
||||
minJetEnergy = 60;
|
||||
jetEnergyDrain = 2.75;
|
||||
rechargeRate = 1.0;
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ datablock FlyingVehicleData(ScoutFlyer) : ShrikeDamageProfile
|
|||
jetForce = 1750; // Afterburner thrust (this is in addition to normal thrust)
|
||||
minJetEnergy = 28; // Afterburner can't be used if below this threshhold.
|
||||
jetEnergyDrain = 2.8; // Energy use of the afterburners (low number is less drain...can be fractional) // Auto stabilize speed
|
||||
vertThrustMultiple = 2.5;
|
||||
vertThrustMultiple = 3.0;
|
||||
|
||||
// Rigid body
|
||||
mass = 150; // Mass of the vehicle
|
||||
|
|
|
|||
|
|
@ -951,8 +951,8 @@ datablock ParticleData(VehicleBombExplosionParticle)
|
|||
gravityCoefficient = 0.2;
|
||||
inheritedVelFactor = 0.2;
|
||||
constantAcceleration = 0.0;
|
||||
lifetimeMS = 1050;
|
||||
lifetimeVarianceMS = 250;
|
||||
lifetimeMS = 900;
|
||||
lifetimeVarianceMS = 225;
|
||||
textureName = "particleTest";
|
||||
colors[0] = "0.56 0.36 0.26 1.0";
|
||||
colors[1] = "0.56 0.36 0.26 0.0";
|
||||
|
|
@ -1016,7 +1016,7 @@ datablock ExplosionData(VehicleBombSubExplosion1)
|
|||
playSpeed = 1.5;
|
||||
|
||||
sizes[0] = "1.5 1.5 1.5";
|
||||
sizes[1] = "2.0 2.0 2.0";
|
||||
sizes[1] = "3.0 3.0 3.0";
|
||||
times[0] = 0.0;
|
||||
times[1] = 1.0;
|
||||
|
||||
|
|
@ -1031,10 +1031,10 @@ datablock ExplosionData(VehicleBombSubExplosion2)
|
|||
|
||||
offset = 7.0;
|
||||
|
||||
playSpeed = 1.0;
|
||||
playSpeed = 1.1;
|
||||
|
||||
sizes[0] = "3.0 3.0 3.0";
|
||||
sizes[1] = "4.0 4.0 4.0";
|
||||
sizes[0] = "5.0 5.0 5.0";
|
||||
sizes[1] = "8.0 8.0 8.0";
|
||||
times[0] = 0.0;
|
||||
times[1] = 1.0;
|
||||
};
|
||||
|
|
@ -1048,11 +1048,11 @@ datablock ExplosionData(VehicleBombSubExplosion3)
|
|||
|
||||
offset = 0.0;
|
||||
|
||||
playSpeed = 0.7;
|
||||
playSpeed = 0.9;
|
||||
|
||||
|
||||
sizes[0] = "3.0 3.0 3.0";
|
||||
sizes[1] = "7.0 7.0 7.0";
|
||||
sizes[0] = "7.0 7.0 7.0";
|
||||
sizes[1] = "10.0 10.0 10.0";
|
||||
times[0] = 0.0;
|
||||
times[1] = 1.0;
|
||||
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@ datablock HoverVehicleData(AssaultVehicle) : TankDamageProfile
|
|||
mainThrustForce = 50;
|
||||
reverseThrustForce = 40;
|
||||
strafeThrustForce = 40;
|
||||
turboFactor = 1.25;
|
||||
turboFactor = 1.7;
|
||||
|
||||
brakingForce = 25;
|
||||
brakingActivationSpeed = 4;
|
||||
|
|
@ -357,10 +357,14 @@ datablock TurretData(AssaultPlasmaTurret) : TurretDamageProfile
|
|||
|
||||
mass = 1.0; // Not really relevant
|
||||
|
||||
maxEnergy = 1;
|
||||
maxDamage = AssaultVehicle.maxDamage;
|
||||
destroyedLevel = AssaultVehicle.destroyedLevel;
|
||||
repairRate = 0;
|
||||
maxEnergy = 1;
|
||||
maxDamage = AssaultVehicle.maxDamage;
|
||||
destroyedLevel = AssaultVehicle.destroyedLevel;
|
||||
repairRate = 0;
|
||||
|
||||
// capacitor
|
||||
maxCapacitorEnergy = 250;
|
||||
capacitorRechargeRate = 1.0;
|
||||
|
||||
thetaMin = 0;
|
||||
thetaMax = 100;
|
||||
|
|
@ -394,10 +398,11 @@ datablock TurretImageData(AssaultPlasmaTurretBarrel)
|
|||
|
||||
projectileSpread = 12.0 / 1000.0;
|
||||
|
||||
useCapacitor = true;
|
||||
usesEnergy = true;
|
||||
useMountEnergy = true;
|
||||
fireEnergy = 3.75;
|
||||
minEnergy = 20.0;
|
||||
fireEnergy = 7.5;
|
||||
minEnergy = 15.0;
|
||||
|
||||
// Turret parameters
|
||||
activationMS = 4000;
|
||||
|
|
@ -408,65 +413,62 @@ datablock TurretImageData(AssaultPlasmaTurretBarrel)
|
|||
attackRadius = 75;
|
||||
|
||||
// State transitions
|
||||
stateName[0] = "Activate";
|
||||
stateTransitionOnNotLoaded[0] = "Dead";
|
||||
stateTransitionOnLoaded[0] = "ActivateReady";
|
||||
stateSound[0] = AssaultTurretActivateSound;
|
||||
stateName[0] = "Activate";
|
||||
stateTransitionOnNotLoaded[0] = "Dead";
|
||||
stateTransitionOnLoaded[0] = "ActivateReady";
|
||||
stateSound[0] = AssaultTurretActivateSound;
|
||||
|
||||
stateName[1] = "ActivateReady";
|
||||
stateSequence[1] = "Activate";
|
||||
stateSound[1] = AssaultTurretActivateSound;
|
||||
stateTimeoutValue[1] = 1;
|
||||
stateTransitionOnTimeout[1] = "Ready";
|
||||
stateTransitionOnNotLoaded[1] = "Deactivate";
|
||||
stateName[1] = "ActivateReady";
|
||||
stateSequence[1] = "Activate";
|
||||
stateSound[1] = AssaultTurretActivateSound;
|
||||
stateTimeoutValue[1] = 1;
|
||||
stateTransitionOnTimeout[1] = "Ready";
|
||||
stateTransitionOnNotLoaded[1] = "Deactivate";
|
||||
|
||||
stateName[2] = "Ready";
|
||||
stateTransitionOnNotLoaded[2] = "Deactivate";
|
||||
stateTransitionOnTriggerDown[2] = "Fire";
|
||||
// stateSound[2] = AssaultChaingunIdleSound;
|
||||
stateName[2] = "Ready";
|
||||
stateTransitionOnNotLoaded[2] = "Deactivate";
|
||||
stateTransitionOnTriggerDown[2] = "Fire";
|
||||
stateTransitionOnNoAmmo[2] = "NoAmmo";
|
||||
|
||||
stateName[3] = "Fire";
|
||||
stateSequence[3] = "Fire";
|
||||
stateSequenceRandomFlash[3] = true;
|
||||
stateFire[3] = true;
|
||||
// stateRecoil[3] = LightRecoil;
|
||||
stateAllowImageChange[3] = false;
|
||||
stateSound[3] = AssaultChaingunFireSound;
|
||||
stateScript[3] = "onFire";
|
||||
stateTimeoutValue[3] = 0.15;
|
||||
stateTransitionOnTimeout[3] = "Fire";
|
||||
stateTransitionOnTriggerUp[3] = "Reload";
|
||||
stateTransitionOnNoAmmo[3] = "Reload";
|
||||
stateName[3] = "Fire";
|
||||
stateSequence[3] = "Fire";
|
||||
stateSequenceRandomFlash[3] = true;
|
||||
stateFire[3] = true;
|
||||
stateAllowImageChange[3] = false;
|
||||
stateSound[3] = AssaultChaingunFireSound;
|
||||
stateScript[3] = "onFire";
|
||||
stateTimeoutValue[3] = 0.1;
|
||||
stateTransitionOnTimeout[3] = "Fire";
|
||||
stateTransitionOnTriggerUp[3] = "Reload";
|
||||
stateTransitionOnNoAmmo[3] = "noAmmo";
|
||||
|
||||
stateName[4] = "Reload";
|
||||
stateTimeoutValue[4] = 0.1;
|
||||
stateAllowImageChange[4] = false;
|
||||
stateSequence[4] = "Reload";
|
||||
stateTransitionOnTimeout[4] = "Ready";
|
||||
stateTransitionOnNotLoaded[4] = "Deactivate";
|
||||
// stateSound[4] = AssaultChaingunReloadSound;
|
||||
|
||||
stateName[5] = "Deactivate";
|
||||
stateSequence[5] = "Activate";
|
||||
stateDirection[5] = false;
|
||||
stateTimeoutValue[5] = 30;
|
||||
// stateTransitionOnLoaded[5] = "ActivateReady";
|
||||
// stateTransitionOnTimeout[5] = "Dead";
|
||||
stateTransitionOnTimeout[5] = "ActivateReady";
|
||||
stateName[4] = "Reload";
|
||||
stateSequence[4] = "Reload";
|
||||
stateTimeoutValue[4] = 0.1;
|
||||
stateAllowImageChange[4] = false;
|
||||
stateTransitionOnTimeout[4] = "Ready";
|
||||
stateTransitionOnNoAmmo[4] = "NoAmmo";
|
||||
stateWaitForTimeout[4] = true;
|
||||
|
||||
stateName[6] = "Dead";
|
||||
stateTransitionOnLoaded[6] = "ActivateReady";
|
||||
stateTransitionOnTriggerDown[6] = "DryFire";
|
||||
stateName[5] = "Deactivate";
|
||||
stateSequence[5] = "Activate";
|
||||
stateDirection[5] = false;
|
||||
stateTimeoutValue[5] = 30;
|
||||
stateTransitionOnTimeout[5] = "ActivateReady";
|
||||
|
||||
stateName[7] = "DryFire";
|
||||
stateSound[7] = AssaultChaingunDryFireSound;
|
||||
stateTimeoutValue[7] = 0.5;
|
||||
stateTransitionOnTimeout[7] = "NoAmmo";
|
||||
stateName[6] = "Dead";
|
||||
stateTransitionOnLoaded[6] = "ActivateReady";
|
||||
stateTransitionOnTriggerDown[6] = "DryFire";
|
||||
|
||||
stateName[8] = "NoAmmo";
|
||||
stateTransitionOnAmmo[8] = "Reload";
|
||||
stateSequence[8] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[8] = "DryFire";
|
||||
stateName[7] = "DryFire";
|
||||
stateSound[7] = AssaultChaingunDryFireSound;
|
||||
stateTimeoutValue[7] = 0.5;
|
||||
stateTransitionOnTimeout[7] = "NoAmmo";
|
||||
|
||||
stateName[8] = "NoAmmo";
|
||||
stateTransitionOnAmmo[8] = "Reload";
|
||||
stateSequence[8] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[8] = "DryFire";
|
||||
|
||||
};
|
||||
|
||||
|
|
@ -530,75 +532,73 @@ datablock TurretImageData(AssaultMortarTurretBarrel)
|
|||
|
||||
usesEnergy = true;
|
||||
useMountEnergy = true;
|
||||
fireEnergy = 50.00;
|
||||
minEnergy = 50.00;
|
||||
fireEnergy = 77.00;
|
||||
minEnergy = 77.00;
|
||||
useCapacitor = true;
|
||||
|
||||
// Turret parameters
|
||||
activationMS = 4000;
|
||||
deactivateDelayMS = 1500;
|
||||
thinkTimeMS = 200;
|
||||
degPerSecTheta = 360;
|
||||
degPerSecPhi = 360;
|
||||
attackRadius = 75;
|
||||
activationMS = 4000;
|
||||
deactivateDelayMS = 1500;
|
||||
thinkTimeMS = 200;
|
||||
degPerSecTheta = 360;
|
||||
degPerSecPhi = 360;
|
||||
attackRadius = 75;
|
||||
|
||||
// State transitions
|
||||
stateName[0] = "Activate";
|
||||
stateTransitionOnNotLoaded[0] = "Dead";
|
||||
stateTransitionOnLoaded[0] = "ActivateReady";
|
||||
//stateSound[0] = AssaultTurretActivateSound;
|
||||
stateName[0] = "Activate";
|
||||
stateTransitionOnNotLoaded[0] = "Dead";
|
||||
stateTransitionOnLoaded[0] = "ActivateReady";
|
||||
|
||||
stateName[1] = "ActivateReady";
|
||||
stateSequence[1] = "Activate";
|
||||
stateSound[1] = AssaultTurretActivateSound;
|
||||
stateTimeoutValue[1] = 1;
|
||||
stateTransitionOnTimeout[1] = "Ready";
|
||||
stateTransitionOnNotLoaded[1] = "Deactivate";
|
||||
stateName[1] = "ActivateReady";
|
||||
stateSequence[1] = "Activate";
|
||||
stateSound[1] = AssaultTurretActivateSound;
|
||||
stateTimeoutValue[1] = 1.0;
|
||||
stateTransitionOnTimeout[1] = "Ready";
|
||||
stateTransitionOnNotLoaded[1] = "Deactivate";
|
||||
|
||||
stateName[2] = "Ready";
|
||||
stateTransitionOnNotLoaded[2] = "Deactivate";
|
||||
stateTransitionOnNoAmmo[2] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[2] = "Fire";
|
||||
// stateSound[2] = AssaultMortarIdleSound;
|
||||
stateName[2] = "Ready";
|
||||
stateTransitionOnNotLoaded[2] = "Deactivate";
|
||||
stateTransitionOnNoAmmo[2] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[2] = "Fire";
|
||||
|
||||
stateName[3] = "Fire";
|
||||
stateTransitionOnTimeout[3] = "Reload";
|
||||
stateTimeoutValue[3] = 0.3;
|
||||
stateFire[3] = true;
|
||||
stateRecoil[3] = LightRecoil;
|
||||
stateAllowImageChange[3] = false;
|
||||
stateSequence[3] = "Fire";
|
||||
stateSound[3] = AssaultMortarFireSound;
|
||||
stateScript[3] = "onFire";
|
||||
stateName[3] = "Fire";
|
||||
stateSequence[3] = "Fire";
|
||||
stateTransitionOnTimeout[3] = "Reload";
|
||||
stateTimeoutValue[3] = 1.0;
|
||||
stateFire[3] = true;
|
||||
stateRecoil[3] = LightRecoil;
|
||||
stateAllowImageChange[3] = false;
|
||||
stateSound[3] = AssaultMortarFireSound;
|
||||
stateScript[3] = "onFire";
|
||||
|
||||
stateName[4] = "Reload";
|
||||
stateTimeoutValue[4] = 1.5;
|
||||
stateAllowImageChange[4] = false;
|
||||
stateSequence[4] = "Reload";
|
||||
stateTransitionOnTimeout[4] = "Ready";
|
||||
stateTransitionOnNoAmmo[4] = "NoAmmo";
|
||||
// stateSound[4] = AssaultMortarReloadSound;
|
||||
// stateTransitionOnNotLoaded[4] = "Deactivate";
|
||||
stateName[4] = "Reload";
|
||||
stateSequence[4] = "Reload";
|
||||
stateTimeoutValue[4] = 1.0;
|
||||
stateAllowImageChange[4] = false;
|
||||
stateTransitionOnTimeout[4] = "Ready";
|
||||
//stateTransitionOnNoAmmo[4] = "NoAmmo";
|
||||
stateWaitForTimeout[4] = true;
|
||||
|
||||
stateName[5] = "Deactivate";
|
||||
stateDirection[5] = false;
|
||||
stateSequence[5] = "Activate";
|
||||
stateTimeoutValue[5] = 1;
|
||||
stateTransitionOnLoaded[5] = "ActivateReady";
|
||||
stateTransitionOnTimeout[5] = "Dead";
|
||||
stateName[5] = "Deactivate";
|
||||
stateDirection[5] = false;
|
||||
stateSequence[5] = "Activate";
|
||||
stateTimeoutValue[5] = 1.0;
|
||||
stateTransitionOnLoaded[5] = "ActivateReady";
|
||||
stateTransitionOnTimeout[5] = "Dead";
|
||||
|
||||
stateName[6] = "Dead";
|
||||
stateTransitionOnLoaded[6] = "ActivateReady";
|
||||
stateTransitionOnTriggerDown[6] = "DryFire";
|
||||
stateName[6] = "Dead";
|
||||
stateTransitionOnLoaded[6] = "ActivateReady";
|
||||
stateTransitionOnTriggerDown[6] = "DryFire";
|
||||
|
||||
stateName[7] = "DryFire";
|
||||
stateSound[7] = AssaultMortarDryFireSound;
|
||||
stateTimeoutValue[7] = 1.5;
|
||||
stateTransitionOnTimeout[7] = "NoAmmo";
|
||||
stateName[7] = "DryFire";
|
||||
stateSound[7] = AssaultMortarDryFireSound;
|
||||
stateTimeoutValue[7] = 1.0;
|
||||
stateTransitionOnTimeout[7] = "NoAmmo";
|
||||
|
||||
stateName[8] = "NoAmmo";
|
||||
stateTransitionOnAmmo[8] = "Reload";
|
||||
stateSequence[8] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[8] = "DryFire";
|
||||
stateName[8] = "NoAmmo";
|
||||
stateSequence[8] = "NoAmmo";
|
||||
stateTransitionOnAmmo[8] = "Reload";
|
||||
stateTransitionOnTriggerDown[8] = "DryFire";
|
||||
};
|
||||
|
||||
datablock TurretImageData(AssaultTurretParam)
|
||||
|
|
@ -609,6 +609,9 @@ datablock TurretImageData(AssaultTurretParam)
|
|||
projectile = AssaultChaingunBullet;
|
||||
projectileType = TracerProjectile;
|
||||
|
||||
useCapacitor = true;
|
||||
usesEnergy = true;
|
||||
|
||||
// Turret parameters
|
||||
activationMS = 1000;
|
||||
deactivateDelayMS = 1500;
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ function addGreenVoiceLine(%client, %line)
|
|||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
bitmap = "gui/hud_chat_button_on.png";
|
||||
bitmap = "gui/hud_chat_button_on";
|
||||
position = "0 0";
|
||||
extent = "15 15";
|
||||
visible = true;
|
||||
|
|
@ -108,7 +108,7 @@ function addRedVoiceLine(%client, %line)
|
|||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
bitmap = "gui/hud_chat_button_off.png";
|
||||
bitmap = "gui/hud_chat_button_off";
|
||||
position = "0 0";
|
||||
extent = "15 15";
|
||||
visible = true;
|
||||
|
|
@ -232,7 +232,8 @@ function voiceCapStart()
|
|||
{
|
||||
case 0: %level = "Codec .v12";
|
||||
case 1: %level = "Codec .v24";
|
||||
default: %level = "Codec .v29";
|
||||
case 2: %level = "Codec .v29";
|
||||
default: %level = "Codec GSM";
|
||||
}
|
||||
|
||||
addMessageHudLine("\c2System:\cr server has voice level capped at [\c1" @ %level @ "\cr].");
|
||||
|
|
@ -317,6 +318,8 @@ function handleVoiceEnableMessage( %msgType, %msgString, %enabled, %who )
|
|||
{
|
||||
$PlayerList[%who].voiceEnabled = %enabled;
|
||||
lobbyUpdatePlayer( %who );
|
||||
if ( $PlayingOnline && !$PlayerList[%who].isSmurf && $PlayerList[%who].guid > 0 )
|
||||
setPlayerVoiceMuted( $PlayerList[%who].guid, !%enabled );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -342,4 +345,4 @@ function handleListenStateMessage( %msgType, %msgString, %isListening, %who )
|
|||
$PlayerList[%who].isListening = %isListening;
|
||||
lobbyUpdatePlayer( %who );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ function Ammo::onCollision(%data, %obj, %col)
|
|||
{
|
||||
%ammoName = %data.getName();
|
||||
%ammoStore = %col.inv[%ammoName];
|
||||
|
||||
|
||||
// if player has ammo pack, increase max amount of ammo
|
||||
if(%col.getMountedImage($BackpackSlot) != 0)
|
||||
{
|
||||
|
|
@ -22,7 +22,10 @@ function Ammo::onCollision(%data, %obj, %col)
|
|||
|
||||
if(%col.inv[%ammoName] < %aMax)
|
||||
{
|
||||
%col.incInventory(%ammoName, $AmmoIncrement[%ammoName]);
|
||||
if( %obj.ammoStore $= "" )
|
||||
%obj.ammoStore = $AmmoIncrement[ %ammoName ];
|
||||
|
||||
%col.incInventory(%ammoName, %obj.ammoStore);
|
||||
serverPlay3D(ItemPickupSound, %col.getTransform());
|
||||
%obj.respawn();
|
||||
if (%col.client > 0)
|
||||
|
|
@ -155,6 +158,9 @@ function ScoutFlyer::playerDismounted(%data, %obj, %player)
|
|||
%obj.setImageTrigger(2, false);
|
||||
%obj.setImageTrigger(3, false);
|
||||
setTargetSensorGroup(%obj.getTarget(), %obj.team);
|
||||
|
||||
if( %player.client.observeCount > 0 )
|
||||
resetObserveFollow( %player.client, true );
|
||||
}
|
||||
|
||||
function ScoutChaingunImage::onFire(%data,%obj,%slot)
|
||||
|
|
@ -235,11 +241,12 @@ function BomberTurret::onDamage(%data, %obj)
|
|||
%obj.lastDamageVal = %newDamageVal;
|
||||
}
|
||||
|
||||
function BomberTurret::damageObject(%this, %damageObj, %projectile, %amount, %damageType)
|
||||
function BomberTurret::damageObject(%this, %targetObject, %sourceObject, %position, %amount, %damageType ,%vec, %client, %projectile)
|
||||
{
|
||||
//If vehicle turret is hit then apply damage to the vehicle
|
||||
%vehicle = %damageObj.getObjectMount();
|
||||
%vehicle.getDataBlock().damageObject(%vehicle, %projectile, %amount, %damageType);
|
||||
%vehicle = %targetObject.getObjectMount();
|
||||
if(%vehicle)
|
||||
%vehicle.getDataBlock().damageObject(%vehicle, %sourceObject, %position, %amount, %damageType, %vec, %client, %projectile);
|
||||
}
|
||||
|
||||
function VehicleTurret::onEndSequence(%data, %obj, %thread)
|
||||
|
|
@ -315,6 +322,7 @@ function BomberTurret::playerDismount(%data, %obj)
|
|||
ShapeBaseImageData::deconstruct(%obj.getMountedImage(6), %obj);
|
||||
}
|
||||
%client = %obj.getControllingClient();
|
||||
%client.player.isBomber = false;
|
||||
commandToClient(%client, 'endBomberSight');
|
||||
// %client.player.setControlObject(%client.player);
|
||||
%client.player.mountVehicle = false;
|
||||
|
|
@ -345,14 +353,13 @@ function BomberBombPairImage::onUnmount(%this,%obj,%slot)
|
|||
{
|
||||
}
|
||||
|
||||
function BomberTurretBarrel::onTriggerDown(%this, %obj, %slot)
|
||||
function BomberTurretBarrel::firePair(%this, %obj, %slot)
|
||||
{
|
||||
%obj.turretBarrelSchedule = %obj.schedule(300, "setImageTrigger", 3, true);
|
||||
%obj.setImageTrigger( 3, true);
|
||||
}
|
||||
|
||||
function BomberTurretBarrel::onTriggerUp(%this, %obj, %slot)
|
||||
function BomberTurretBarrelPair::stopFire(%this, %obj, %slot)
|
||||
{
|
||||
cancel(%obj.turretBarrelSchedule);
|
||||
%obj.setImageTrigger( 3, false);
|
||||
}
|
||||
|
||||
|
|
@ -366,15 +373,14 @@ function BomberTurretBarrel::onMount(%this, %obj, %slot)
|
|||
// %obj.setImageAmmo(%slot,true);
|
||||
}
|
||||
|
||||
|
||||
function BomberBombImage::onTriggerDown(%this, %obj, %slot)
|
||||
function BomberBombImage::firePair(%this, %obj, %slot)
|
||||
{
|
||||
%obj.schedule(500, "setImageTrigger", 5, true);
|
||||
%obj.setImageTrigger( 5, true);
|
||||
}
|
||||
|
||||
function BomberBombImage::onTriggerUp(%this, %obj, %slot)
|
||||
function BomberBombPairImage::stopFire(%this, %obj, %slot)
|
||||
{
|
||||
%obj.schedule(600, "setImageTrigger", 5, false);
|
||||
%obj.setImageTrigger( 5, false);
|
||||
}
|
||||
|
||||
function BomberBombPairImage::onMount(%this, %obj, %slot)
|
||||
|
|
@ -410,12 +416,12 @@ function MobileTurretBase::onDamage(%data, %obj)
|
|||
%obj.lastDamageVal = %newDamageVal;
|
||||
}
|
||||
|
||||
function MobileTurretBase::damageObject(%this, %targetObject, %sourceObject, %position, %amount, %damageType)
|
||||
function MobileTurretBase::damageObject(%this, %targetObject, %sourceObject, %position, %amount, %damageType ,%vec, %client, %projectile)
|
||||
{
|
||||
//If vehicle turret is hit then apply damage to the vehicle
|
||||
%vehicle = %targetObject.getObjectMount();
|
||||
if(%vehicle)
|
||||
%vehicle.getDataBlock().damageObject(%vehicle, %sourceObject, %position, %amount, %damageType);
|
||||
%vehicle.getDataBlock().damageObject(%vehicle, %sourceObject, %position, %amount, %damageType, %vec, %client, %projectile);
|
||||
}
|
||||
|
||||
function MobileTurretBase::onEndSequence(%data, %obj, %thread)
|
||||
|
|
@ -432,11 +438,12 @@ function AssaultPlasmaTurret::onDamage(%data, %obj)
|
|||
%obj.lastDamageVal = %newDamageVal;
|
||||
}
|
||||
|
||||
function AssaultPlasmaTurret::damageObject(%this, %damageObj, %projectile, %amount, %damageType)
|
||||
function AssaultPlasmaTurret::damageObject(%this, %targetObject, %sourceObject, %position, %amount, %damageType ,%vec, %client, %projectile)
|
||||
{
|
||||
//If vehicle turret is hit then apply damage to the vehicle
|
||||
%vehicle = %damageObj.getObjectMount();
|
||||
%vehicle.getDataBlock().damageObject(%vehicle, %projectile, %amount, %damageType);
|
||||
%vehicle = %targetObject.getObjectMount();
|
||||
if(%vehicle)
|
||||
%vehicle.getDataBlock().damageObject(%vehicle, %sourceObject, %position, %amount, %damageType, %vec, %client, %projectile);
|
||||
}
|
||||
|
||||
function AssaultPlasmaTurret::onTrigger(%data, %obj, %trigger, %state)
|
||||
|
|
@ -747,6 +754,7 @@ function MineDeployed::onThrow(%this, %mine, %thrower)
|
|||
%mine.damaged = 0;
|
||||
%mine.detonated = false;
|
||||
%mine.depCount = 0;
|
||||
%mine.theClient = %thrower.client;
|
||||
schedule(1500, %mine, "deployMineCheck", %mine, %thrower);
|
||||
}
|
||||
|
||||
|
|
@ -881,7 +889,7 @@ function MineDeployed::damageObject(%data, %targetObject, %sourceObject, %positi
|
|||
function MineDeployed::onDestroyed(%data, %obj, %lastState)
|
||||
{
|
||||
%obj.boom = true;
|
||||
%mineTeam = %obj.sourceObject.team;
|
||||
%mineTeam = %obj.team;
|
||||
$TeamDeployedCount[%mineTeam, MineDeployed]--;
|
||||
// %noDamage is a boolean flag -- don't want to set off all other mines in
|
||||
// vicinity if there's a "mine overload", so apply no damage/impulse if true
|
||||
|
|
|
|||
|
|
@ -1,40 +1,40 @@
|
|||
$HandInvThrowTimeout = 0.8 * 1000; // 1/2 second between throwing grenades or mines
|
||||
|
||||
$WeaponsHudData[0, bitmapName] = "gui/hud_blaster.png";
|
||||
$WeaponsHudData[0, bitmapName] = "gui/hud_blaster";
|
||||
$WeaponsHudData[0, itemDataName] = "Blaster";
|
||||
//$WeaponsHudData[0, ammoDataName] = "";
|
||||
$WeaponsHudData[1, bitmapName] = "gui/hud_plasma.png";
|
||||
$WeaponsHudData[1, bitmapName] = "gui/hud_plasma";
|
||||
$WeaponsHudData[1, itemDataName] = "Plasma";
|
||||
$WeaponsHudData[1, ammoDataName] = "PlasmaAmmo";
|
||||
$WeaponsHudData[2, bitmapName] = "gui/hud_chaingun.png";
|
||||
$WeaponsHudData[2, bitmapName] = "gui/hud_chaingun";
|
||||
$WeaponsHudData[2, itemDataName] = "Chaingun";
|
||||
$WeaponsHudData[2, ammoDataName] = "ChaingunAmmo";
|
||||
$WeaponsHudData[3, bitmapName] = "gui/hud_disc.png";
|
||||
$WeaponsHudData[3, bitmapName] = "gui/hud_disc";
|
||||
$WeaponsHudData[3, itemDataName] = "Disc";
|
||||
$WeaponsHudData[3, ammoDataName] = "DiscAmmo";
|
||||
$WeaponsHudData[4, bitmapName] = "gui/hud_grenlaunch.png";
|
||||
$WeaponsHudData[4, bitmapName] = "gui/hud_grenlaunch";
|
||||
$WeaponsHudData[4, itemDataName] = "GrenadeLauncher";
|
||||
$WeaponsHudData[4, ammoDataName] = "GrenadeLauncherAmmo";
|
||||
$WeaponsHudData[5, bitmapName] = "gui/hud_sniper.png";
|
||||
$WeaponsHudData[5, bitmapName] = "gui/hud_sniper";
|
||||
$WeaponsHudData[5, itemDataName] = "SniperRifle";
|
||||
//$WeaponsHudData[5, ammoDataName] = "";
|
||||
$WeaponsHudData[6, bitmapName] = "gui/hud_elfgun.png";
|
||||
$WeaponsHudData[6, bitmapName] = "gui/hud_elfgun";
|
||||
$WeaponsHudData[6, itemDataName] = "ELFGun";
|
||||
//$WeaponsHudData[6, ammoDataName] = "";
|
||||
$WeaponsHudData[7, bitmapName] = "gui/hud_mortor.png";
|
||||
$WeaponsHudData[7, bitmapName] = "gui/hud_mortor";
|
||||
$WeaponsHudData[7, itemDataName] = "Mortar";
|
||||
$WeaponsHudData[7, ammoDataName] = "MortarAmmo";
|
||||
$WeaponsHudData[8, bitmapName] = "gui/hud_missiles.png";
|
||||
$WeaponsHudData[8, bitmapName] = "gui/hud_missiles";
|
||||
$WeaponsHudData[8, itemDataName] = "MissileLauncher";
|
||||
$WeaponsHudData[8, ammoDataName] = "MissileLauncherAmmo";
|
||||
// WARNING!!! If you change the weapon index of the targeting laser,
|
||||
// you must change the HudWeaponInvBase::addWeapon function to test
|
||||
// for the new value!
|
||||
$WeaponsHudData[9, bitmapName] = "gui/hud_targetlaser.png";
|
||||
$WeaponsHudData[9, bitmapName] = "gui/hud_targetlaser";
|
||||
$WeaponsHudData[9, itemDataName] = "TargetingLaser";
|
||||
//$WeaponsHudData[9, ammoDataName] = "";
|
||||
//
|
||||
$WeaponsHudData[10, bitmapName] = "gui/hud_shocklance.png";
|
||||
$WeaponsHudData[10, bitmapName] = "gui/hud_shocklance";
|
||||
$WeaponsHudData[10, itemDataName] = "ShockLance";
|
||||
//$WeaponsHudData[10, ammoDataName] = "";
|
||||
|
||||
|
|
@ -123,6 +123,7 @@ function WeaponImage::onUnmount(%this,%obj,%slot)
|
|||
{
|
||||
%obj.client.setWeaponsHudActive(%this.item, 1);
|
||||
%obj.client.setAmmoHudCount(-1);
|
||||
commandToClient(%obj.client,'removeReticle');
|
||||
// try to avoid running around with sniper/missile arm thread and no weapon
|
||||
%obj.setArmThread(look);
|
||||
Parent::onUnmount(%this, %obj, %slot);
|
||||
|
|
@ -141,7 +142,8 @@ function Ammo::onInventory(%this,%obj,%amount)
|
|||
}
|
||||
}
|
||||
ItemData::onInventory(%this,%obj,%amount);
|
||||
if(%obj.getClassname() $= "Player")
|
||||
// Uh, don't update the hud ammo counters if this is a corpse...that's bad.
|
||||
if ( %obj.getClassname() $= "Player" && %obj.getState() !$= "Dead" )
|
||||
{
|
||||
%obj.client.setWeaponsHudAmmo(%this.getName(), %amount);
|
||||
if(%obj.getMountedImage($WeaponSlot).ammo $= %this.getName())
|
||||
|
|
@ -153,7 +155,9 @@ function Weapon::onInventory(%this,%obj,%amount)
|
|||
{
|
||||
if(Game.weaponOnInventory(%this, %obj, %amount))
|
||||
{
|
||||
%obj.client.setWeaponsHudItem(%this.getName(), 0, 1);
|
||||
// Do not update the hud if this object is a corpse:
|
||||
if ( %obj.getState() !$= "Dead" )
|
||||
%obj.client.setWeaponsHudItem(%this.getName(), 0, 1);
|
||||
ItemData::onInventory(%this,%obj,%amount);
|
||||
// if a player threw a weapon (which means that player isn't currently
|
||||
// holding a weapon), set armthread to "no weapon"
|
||||
|
|
@ -217,6 +221,7 @@ function HandInventory::onUse(%data, %obj)
|
|||
|
||||
|
||||
%thrownItem.sourceObject = %obj;
|
||||
%thrownItem.team = %obj.team;
|
||||
%thrownItem.setTransform(%pos);
|
||||
|
||||
%thrownItem.applyImpulse(%pos, %vec);
|
||||
|
|
|
|||
|
|
@ -186,6 +186,11 @@ datablock ExplosionData(DiscExplosion)
|
|||
camShakeAmp = "20.0 20.0 20.0";
|
||||
camShakeDuration = 0.5;
|
||||
camShakeRadius = 10.0;
|
||||
|
||||
sizes[0] = "1.0 1.0 1.0";
|
||||
sizes[1] = "1.0 1.0 1.0";
|
||||
times[0] = 0.0;
|
||||
times[1] = 1.0;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -147,6 +147,10 @@ datablock ExplosionData(PlasmaBoltExplosion)
|
|||
particleRadius = 1.25;
|
||||
faceViewer = true;
|
||||
|
||||
sizes[0] = "1.0 1.0 1.0";
|
||||
sizes[1] = "1.0 1.0 1.0";
|
||||
times[0] = 0.0;
|
||||
times[1] = 1.5;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -280,9 +280,7 @@ datablock ShapeBaseImageData(ShockLanceImage)
|
|||
stateSound[4] = ShockLanceReloadSound;
|
||||
|
||||
stateName[5] = "NoAmmo";
|
||||
stateTransitionOnAmmo[5] = "Reload";
|
||||
stateSequence[5] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[5] = "DryFire";
|
||||
stateTransitionOnAmmo[5] = "Ready";
|
||||
|
||||
stateName[6] = "DryFire";
|
||||
stateSound[6] = ShockLanceDryFireSound;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -13,6 +13,7 @@
|
|||
//echo("Added email: " @ %tag SPC %text);
|
||||
|
||||
$EmailCachePath = "webcache/" @ getField(getRecord(wonGetAuthInfo(),0),3) @ "/";
|
||||
$EmailFileName = "email1";
|
||||
$EmailColumnCount = 0;
|
||||
$EmailColumnName[0] = "Status";
|
||||
$EmailColumnRange[0] = "50 75";
|
||||
|
|
@ -41,13 +42,13 @@ function LaunchEmail()
|
|||
//-----------------------------------------------------------------------------
|
||||
function EmailMessageNew()
|
||||
{
|
||||
$EmailToAddress = "";
|
||||
$EmailCCAddress = "";
|
||||
Email_ToEdit.setText("");
|
||||
Email_CCEdit.setText("");
|
||||
$EmailSubject = "";
|
||||
EmailBodyText.setValue("");
|
||||
|
||||
EMailComposeDlg.state = "sendMail";
|
||||
Canvas.pushDialog(EmailComposeDlg);
|
||||
EmailBodyText.setValue("");
|
||||
Email_ToEdit.makeFirstResponder(1);
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -55,12 +56,12 @@ function EmailMessageReply()
|
|||
{
|
||||
EMailComposeDlg.state = "replyMail";
|
||||
%text = EmailMessageVector.getLineTextByTag( EM_Browser.getSelectedId() );
|
||||
$EmailToAddress = getField(getRecord(%text, 1), 0);
|
||||
$EmailCCAddress = "";
|
||||
Email_ToEdit.setText(getField(getRecord(%text, 1), 0));
|
||||
Email_CCEdit.setText("");
|
||||
$EmailSubject = "RE: " @ getRecord(%text, 6);
|
||||
%date = getRecord(%text, 3);
|
||||
Canvas.pushDialog(EmailComposeDlg);
|
||||
EmailBodyText.setValue("\n\n----------------------------------\n On " @ %date SPC $EmailToAddress @ " wrote:\n\n" @ EmailGetBody(%text) );
|
||||
EmailBodyText.setValue("\n\n----------------------------------\n On " @ %date SPC Email_toEdit.getValue() @ " wrote:\n\n" @ EmailGetBody(%text) );
|
||||
EmailBodyText.SetCursorPosition(0);
|
||||
EmailBodyText.makeFirstResponder(1);
|
||||
}
|
||||
|
|
@ -68,8 +69,8 @@ function EmailMessageReply()
|
|||
function EmailMessageForward()
|
||||
{
|
||||
%text = EmailMessageVector.getLineTextByTag( EM_Browser.getSelectedId() );
|
||||
$EmailToAddress = "";
|
||||
$EmailCCAddress = "";
|
||||
Email_ToEdit.setText("");
|
||||
Email_CCEdit.setText("");
|
||||
$EmailSubject = "FW: " @ getRecord(%text, 6);
|
||||
Canvas.pushDialog(EmailComposeDlg);
|
||||
EmailBodyText.setValue("\n\n\n--- Begin Forwarded Message ---\n\n" @ EmailGetTextDisplay(%text));
|
||||
|
|
@ -82,12 +83,12 @@ function EmailMessageReplyAll()
|
|||
{
|
||||
EMailComposeDlg.state = "replyAll";
|
||||
%text = EmailMessageVector.getLineTextByTag( EM_Browser.getSelectedId() );
|
||||
$EmailToAddress = getField(getRecord(%text, 1), 0);
|
||||
$EmailCCAddress = getRecord(%text, 4) @ getRecord(%text,5);
|
||||
Email_ToEdit.setText(getField(getRecord(%text, 1), 0));
|
||||
Email_CCEdit.setText(getRecord(%text, 4) @ getRecord(%text,5));
|
||||
$EmailSubject = "RE: " @ getRecord(%text, 6);
|
||||
%date = getRecord(%text, 3);
|
||||
Canvas.pushDialog(EmailComposeDlg);
|
||||
EmailBodyText.setValue("\n\n===========================\n On " @ %date SPC $EmailToAddress @ " wrote:\n\n" @ EmailGetBody(%text) );
|
||||
EmailBodyText.setValue("\n\n===========================\n On " @ %date SPC Email_ToEdit.getValue() @ " wrote:\n\n" @ EmailGetBody(%text) );
|
||||
EmailBodyText.makeFirstResponder(1);
|
||||
EmailBodyText.SetCursorPosition(0);
|
||||
}
|
||||
|
|
@ -144,10 +145,14 @@ function DoEmailDelete(%qnx, %mid, %owner, %key, %row)
|
|||
function EmailSend()
|
||||
{
|
||||
EMailComposeDlg.key = LaunchGui.key++;
|
||||
CheckEmailNames();
|
||||
EMailComposeDlg.state = "sendMail";
|
||||
%text = $EMailToAddress TAB $EMailCCAddress TAB $EmailSubject TAB EMailBodyText.getValue();
|
||||
DatabaseQuery(5,getsubstr(%text,0,3600),EMailComposeDlg,EMailComposeDlg.key);
|
||||
CheckEmailNames();
|
||||
%to = Email_ToEdit.getValue();
|
||||
%cc = Email_CCEdit.getValue();
|
||||
%subj = $EmailSubject;
|
||||
%text = EMailBodyText.getValue();
|
||||
%lenny = strLen(%to @ %cc @ %subj);
|
||||
DatabaseQuery(5, %to TAB %cc TAB %subj TAB getSubStr(%text,0,4000-%lenny),EMailComposeDlg,EMailComposeDlg.key);
|
||||
Canvas.popDialog(EmailComposeDlg);
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -203,37 +208,38 @@ function getLinkNameList(%line)
|
|||
//-----------------------------------------------------------------------------
|
||||
function CheckEmailNames()
|
||||
{
|
||||
$EmailTOAddress = strUpr(trim($EmailTOAddress));
|
||||
$EmailCCAddress = strUpr(trim($EmailCCAddress));
|
||||
%toLength = strLen($EmailTOAddress);
|
||||
%ccLength = strLen($EmailCCAddress);
|
||||
%EmailTOAddress = strUpr(trim(Email_ToEdit.getValue()));
|
||||
%EmailCCAddress = strUpr(trim(Email_CCEdit.getValue()));
|
||||
%toLength = strLen(%EmailTOAddress);
|
||||
%ccLength = strLen(%EmailCCAddress);
|
||||
%checkList = "";
|
||||
if(%toLength > 0)
|
||||
{
|
||||
if(trim(getSubStr($EmailTOAddress,%toLength-1,1)) !$= "," || trim(getSubStr($EmailTOAddress,%toLength,1)) !$= ",")
|
||||
$EmailTOAddress = $EmailTOAddress @ ",";
|
||||
if(trim(getSubStr(%EmailTOAddress,%toLength-1,1)) !$= "," || trim(getSubStr(%EmailTOAddress,%toLength,1)) !$= ",")
|
||||
%EmailTOAddress = %EmailTOAddress @ ",";
|
||||
}
|
||||
else
|
||||
$EmailTOAddress = ",";
|
||||
%EmailTOAddress = ",";
|
||||
|
||||
if(%ccLength > 0)
|
||||
{
|
||||
if(trim(getSubStr($EmailCCAddress,%ccLength-1,1)) !$= "," || trim(getSubStr($EmailCCAddress,%ccLength,1)) !$= ",")
|
||||
$EmailCCAddress = $EmailCCAddress @ ",";
|
||||
if(trim(getSubStr(%EmailCCAddress,%ccLength-1,1)) !$= "," || trim(getSubStr(%EmailCCAddress,%ccLength,1)) !$= ",")
|
||||
%EmailCCAddress = %EmailCCAddress @ ",";
|
||||
}
|
||||
else
|
||||
%ccList = ",";
|
||||
|
||||
for(%x=0;%x<2;%x++)
|
||||
{
|
||||
%pos = 0;
|
||||
%start = 0;
|
||||
|
||||
if(%x == 0)
|
||||
%nList = $EmailTOAddress;
|
||||
%nList = %EmailTOAddress;
|
||||
else if(%x == 1)
|
||||
{
|
||||
$EmailTOAddress = %nList;
|
||||
%nList = $EmailCCAddress;
|
||||
%EmailTOAddress = %nList;
|
||||
%nList = %EmailCCAddress;
|
||||
}
|
||||
|
||||
if(strLen(%nList)>1)
|
||||
|
|
@ -283,7 +289,9 @@ function CheckEmailNames()
|
|||
}
|
||||
}
|
||||
}
|
||||
$EmailCCAddress = %nList;
|
||||
%EmailCCAddress = %nList;
|
||||
Email_ToEdit.setText(%EMailToAddress);
|
||||
Email_CCEdit.setText(%EmailCCAddress);
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
function EmailGetTextDisplay(%text)
|
||||
|
|
@ -500,14 +508,14 @@ function EmailComposeDlg::Cancel(%this)
|
|||
//-----------------------------------------------------------------------------
|
||||
function EmailComposeDlg::SendMail(%this)
|
||||
{
|
||||
$EmailToAddress = Email_ToEdit.getValue();
|
||||
$EmailSubject = EMail_Subject.getValue();
|
||||
%EmailToAddress = Email_ToEdit.getValue();
|
||||
%EmailSubject = EMail_Subject.getValue();
|
||||
// NEED TO CHECK FOR DUPLICATES
|
||||
if(trim($EmailToAddress) $= "")
|
||||
if(trim(%EmailToAddress) $= "")
|
||||
MessageBoxOK("No Address","TO Address may not be left blank. Please enter a player name to send this message to.");
|
||||
else
|
||||
{
|
||||
if(trim($EmailSubject) $= "")
|
||||
if(trim(%EmailSubject) $= "")
|
||||
MessageBoxOK("No Subject","Please enter a Subject for your message.");
|
||||
else
|
||||
EMailSend();
|
||||
|
|
@ -633,12 +641,6 @@ function StrToList(%listName, %str, %delim)
|
|||
}
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
// NOTE: This control is not a ShellFancyTextList, so the addStyle method is not valid
|
||||
// function LC_BigList::onAdd(%this)
|
||||
// {
|
||||
// LC_BigList.addStyle( 1, "Univers", 12 , "150 150 150", "200 200 200", "60 60 60" );
|
||||
// }
|
||||
//-----------------------------------------------------------------------------
|
||||
function LC_BigList::GetOnlineStatus(%this)
|
||||
{
|
||||
%this.key = LaunchGui.key++;
|
||||
|
|
@ -657,14 +659,14 @@ function LC_BigList::onDatabaseQueryResult(%this,%status,%resultString,%key)
|
|||
{
|
||||
if(%key != %this.key)
|
||||
return;
|
||||
switch$(%this.status)
|
||||
{
|
||||
case "getOnline": if(getField(%status,0) == 0)
|
||||
for(%str=0;%str<strLen(%resultString);%str++)
|
||||
{
|
||||
%this.setRowStyle( %str, !getSubStr(%resultString,%str,1) );
|
||||
}
|
||||
}
|
||||
// switch$(%this.status)
|
||||
// {
|
||||
// case "getOnline": if(getField(%status,0) == 0)
|
||||
// for(%str=0;%str<strLen(%resultString);%str++)
|
||||
// {
|
||||
// %this.setRowStyle( %str, !getSubStr(%resultString,%str,1) );
|
||||
// }
|
||||
// }
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
function AddressDlg::onDatabaseQueryResult(%this,%status,%resultString,%key)
|
||||
|
|
@ -976,8 +978,8 @@ function AddressDlg::onWake(%this)
|
|||
LC_ListBox.Add("Buddy List",1);
|
||||
LC_ListBox.setSelected(0);
|
||||
LC_Search.clear();
|
||||
StrToList(LC_ToList,$EmailToAddress,",");
|
||||
StrToList(LC_CCList,$EmailCCAddress,",");
|
||||
StrToList(LC_ToList,Email_ToEdit.getValue(),",");
|
||||
StrToList(LC_CCList,Email_CCEdit.getValue(),",");
|
||||
%info = WONGetAuthInfo();
|
||||
%tribeCount = getField( getRecord( %info, 1 ), 0 ); //%cert
|
||||
for ( %i = 0; %i < %tribeCount; %i++ )
|
||||
|
|
@ -998,15 +1000,10 @@ function EmailGui::onWake(%this)
|
|||
%selId = EM_Browser.getSelectedId();
|
||||
Canvas.pushDialog(LaunchToolbarDlg);
|
||||
|
||||
// Set the minimum extent of the frame panes:
|
||||
%minExtent = EM_BrowserPane.getMinExtent();
|
||||
EM_Frame.frameMinExtent( 0, firstWord( %minExtent ), restWords( %minExtent ) );
|
||||
%minExtent = EM_MessagePane.getMinExtent();
|
||||
EM_Frame.frameMinExtent( 1, firstWord( %minExtent ), restWords( %minExtent ) );
|
||||
|
||||
if(!%this.cacheFile)
|
||||
{
|
||||
%this.cacheFile = "email1";
|
||||
%this.cacheFile = $EmailFileName;
|
||||
EmailGui.getCache();
|
||||
}
|
||||
if ( !EmailGui.cacheLoaded || EM_Browser.rowCount() == 0 )
|
||||
|
|
@ -1193,7 +1190,7 @@ function EmailGui::getCache(%this)
|
|||
EM_Browser.clear();
|
||||
EMailMessageVector.clear();
|
||||
EmailInboxBodyText.setText("");
|
||||
%fileName = $EmailCachePath @ "email1";
|
||||
%fileName = $EmailCachePath @ $EmailFileName;
|
||||
%file = new FileObject();
|
||||
if ( %this.cacheFile $= "" )
|
||||
{
|
||||
|
|
@ -1203,7 +1200,7 @@ function EmailGui::getCache(%this)
|
|||
if ( %guid $= getField( WonGetAuthInfo(), 3 ) )
|
||||
{
|
||||
// This is the right one!
|
||||
%this.cacheFile = "email1";
|
||||
%this.cacheFile = $EmailFileName;
|
||||
%this.messageCount = %file.readLine();
|
||||
while( !%file.isEOF() )
|
||||
{
|
||||
|
|
@ -1248,7 +1245,7 @@ function EmailGui::loadCache( %this )
|
|||
EM_Browser.clear();
|
||||
EMailMessageVector.clear();
|
||||
EMailInboxBodyText.setText("");
|
||||
%fileName = $EmailCachePath @ "email1";
|
||||
%fileName = $EmailCachePath @ $EmailFileName;
|
||||
%file = new FileObject();
|
||||
if ( %this.cacheFile $= "" )
|
||||
{
|
||||
|
|
@ -1258,7 +1255,7 @@ function EmailGui::loadCache( %this )
|
|||
if ( %guid $= getField( WonGetAuthInfo(), 3 ) )
|
||||
{
|
||||
// This is the right one!
|
||||
%this.cacheFile = "email1";
|
||||
%this.cacheFile = $EmailFileName;
|
||||
%this.messageCount = %file.readLine();
|
||||
while( !%file.isEOF() )
|
||||
{
|
||||
|
|
@ -1291,7 +1288,7 @@ function EmailGui::loadCache( %this )
|
|||
function EmailGui::dumpCache( %this )
|
||||
{
|
||||
%guid = getField( WONGetAuthInfo(), 3 );
|
||||
if ( %this.cacheFile $= "" ) %this.cacheFile = "email1";
|
||||
if ( %this.cacheFile $= "" ) %this.cacheFile = $EmailFileName;
|
||||
EmailMessageVector.dump( $EmailCachePath @ %this.cacheFile, %guid );
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -1307,15 +1304,30 @@ function EMailGui::getEmail(%this,%fromSchedule)
|
|||
function EmailGui::setKey( %this, %key )
|
||||
{
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
function EmailGui::onClose( %this, %key )
|
||||
{
|
||||
}
|
||||
//-- EM_Browser --------------------------------------------------------------
|
||||
function EM_Browser::onAdd( %this )
|
||||
{
|
||||
// Add the columns with widths from the prefs:
|
||||
for ( %i = 0; %i < $EmailColumnCount; %i++ )
|
||||
%this.addColumn( %i, $EmailColumnName[%i], $pref::Email::Column[%i], firstWord( $EmailColumnRange[%i] ), getWord( $EmailColumnRange[%i], 1 ) );
|
||||
if ( !EMailGui.initialized )
|
||||
{
|
||||
// Add the columns with widths from the prefs:
|
||||
for ( %i = 0; %i < $EmailColumnCount; %i++ )
|
||||
EM_Browser.addColumn( %i, $EmailColumnName[%i], $pref::Email::Column[%i], firstWord( $EmailColumnRange[%i] ), getWord( $EmailColumnRange[%i], 1 ) );
|
||||
|
||||
%this.setSortColumn( $pref::Email::SortColumnKey );
|
||||
%this.setSortIncreasing( $pref::Email::SortInc );
|
||||
EM_Browser.setSortColumn( $pref::Email::SortColumnKey );
|
||||
EM_Browser.setSortIncreasing( $pref::Email::SortInc );
|
||||
|
||||
// Set the minimum extent of the frame panes:
|
||||
%minExtent = EM_BrowserPane.getMinExtent();
|
||||
EM_Frame.frameMinExtent( 0, firstWord( %minExtent ), restWords( %minExtent ) );
|
||||
%minExtent = EM_MessagePane.getMinExtent();
|
||||
EM_Frame.frameMinExtent( 1, firstWord( %minExtent ), restWords( %minExtent ) );
|
||||
|
||||
EmailGui.initialized = true;
|
||||
}
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
function EM_Browser::onSelect( %this, %id )
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ $TopicColumnRange[1] = "25 100";
|
|||
$TopicColumnFlags[1] = "numeric center";
|
||||
$TopicColumnCount++;
|
||||
$TopicColumnName[2] = "Last Poster";
|
||||
$TopicColumnRange[2] = "50 300";
|
||||
$TopicColumnRange[2] = "50 500";
|
||||
$TopicColumnCount++;
|
||||
$TopicColumnName[3] = "Last Post Date";
|
||||
$TopicColumnRange[3] = "50 300";
|
||||
|
|
@ -29,13 +29,13 @@ $TopicColumnCount++;
|
|||
|
||||
$ForumColumnCount = 0;
|
||||
$ForumColumnName[0] = "Message Tree";
|
||||
$ForumColumnRange[0] = "50 1000";
|
||||
$ForumColumnRange[0] = "50 800";
|
||||
$ForumColumnCount++;
|
||||
$ForumColumnName[1] = "Posted By";
|
||||
$ForumColumnRange[1] = "50 300";
|
||||
$ForumColumnRange[1] = "50 500";
|
||||
$ForumColumnCount++;
|
||||
$ForumColumnName[2] = "Date Posted";
|
||||
$ForumColumnRange[2] = "50 300";
|
||||
$ForumColumnRange[2] = "50 500";
|
||||
$ForumColumnCount++;
|
||||
|
||||
$GuidTribes = 0;
|
||||
|
|
@ -72,6 +72,22 @@ if(!isObject(ForumsMessageVector))
|
|||
new MessageVector(ForumsMessageVector);
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
function LaunchForums( %forum, %topic )
|
||||
{
|
||||
ForumsGui.setVisible(false);
|
||||
ForumsGui.launchForum = %forum;
|
||||
ForumsGui.launchTopic = %topic;
|
||||
forumsList.clear();
|
||||
|
||||
if(trim(ForumsGui.launchTopic) $= "")
|
||||
{
|
||||
ForumsThreadPane.setVisible(false);
|
||||
ForumsTopicsPane.setVisible(true);
|
||||
}
|
||||
|
||||
LaunchTabView.viewTab( "FORUMS", ForumsGui, 0 );
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
function isModerator()
|
||||
{
|
||||
if(!$GuidTribes)
|
||||
|
|
@ -248,7 +264,7 @@ function CacheForumTopic()
|
|||
ForumsMessageList.highestUpdate = 0;
|
||||
|
||||
%newGroup = TopicsListGroup.getObject(ForumsTopicsList.getSelectedRow());
|
||||
ForumsMessageList.lastID = %newGroup.updateid-1;
|
||||
ForumsMessageList.lastID = %newGroup.updateid;
|
||||
%latest = GetField(ForumsTopicsList.getRowTextbyID(ForumsTopicsList.getSelectedID()),3);
|
||||
ForumsMessageVector.dump( $ForumCachePath @ "tpc" @ ForumsMessageVector.tid , ForumsMessageList.lastID TAB $ForumCacheVersion TAB %allRead TAB %latest);
|
||||
}
|
||||
|
|
@ -393,6 +409,8 @@ function ForumsMessageAddRow(%text)
|
|||
break;
|
||||
|
||||
%row = ForumsMessageList.getRowTextById(%rowParent);
|
||||
if(%rowParent == %row)
|
||||
break;
|
||||
}
|
||||
if(%row $= "")
|
||||
break;
|
||||
|
|
@ -568,21 +586,6 @@ function GetQuotedText()
|
|||
// ForumsBodyText.setCursorPosition(strLen(ForumsBodyTExt.getText())+5);
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
function LaunchForums( %forum, %topic )
|
||||
{
|
||||
ForumsGui.setVisible(false);
|
||||
ForumsGui.launchForum = %forum;
|
||||
ForumsGui.launchTopic = %topic;
|
||||
forumsList.clear();
|
||||
if(trim(ForumsGui.launchTopic) $= "")
|
||||
{
|
||||
ForumsThreadPane.setVisible(false);
|
||||
ForumsTopicsPane.setVisible(true);
|
||||
}
|
||||
|
||||
LaunchTabView.viewTab( "FORUMS", ForumsGui, 0 );
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
function GetForumsList()
|
||||
{
|
||||
ForumsList.clear();
|
||||
|
|
@ -644,6 +647,29 @@ function ForumsGui::onWake(%this)
|
|||
// First time only:
|
||||
if ( !%this.initialized )
|
||||
{
|
||||
// Add the columns from the prefs:TopicsList
|
||||
for ( %i = 0; %i < $TopicColumnCount; %i++ )
|
||||
{
|
||||
ForumsTopicsList.addColumn( %i,
|
||||
$TopicColumnName[%i],
|
||||
$pref::Topics::Column[%i],
|
||||
firstWord( $TopicColumnRange[%i] ),
|
||||
getWord( $TopicColumnRange[%i], 1 ),
|
||||
$TopicColumnFlags[%i] );
|
||||
}
|
||||
ForumsTopicsList.setSortColumn( $pref::Topics::SortColumnKey );
|
||||
ForumsTopicsList.setSortIncreasing( $pref::Topics::SortInc );
|
||||
|
||||
// Add columns from the prefs:MessageList
|
||||
for ( %i = 0; %i < $ForumColumnCount; %i++ )
|
||||
ForumsMessageList.addColumn( %i,
|
||||
$ForumColumnName[%i],
|
||||
$pref::Forum::Column[%i],
|
||||
firstWord( $ForumColumnRange[%i] ),
|
||||
getWord( $ForumColumnRange[%i], 1 ) );
|
||||
// We want no sorting done on this list -- leave them in the order that they are entered.
|
||||
|
||||
|
||||
FM_NewTopic.setActive(false);
|
||||
ForumsThreadPane.setVisible(false);
|
||||
ForumsTopicsPane.setVisible(true);
|
||||
|
|
@ -713,6 +739,7 @@ function ForumsGui::onDatabaseQueryResult(%this,%status,%resultString,%key)
|
|||
case "getTopicList":
|
||||
if(getField(%resultString,0)>0)
|
||||
{
|
||||
%this.txid = 0;
|
||||
ForumShell.setTitle($ForumsGetTopics @ ": " @ getField(%resultString,0));
|
||||
%this.state = "TopicList";
|
||||
%recordCount = getField(%resultString,0);
|
||||
|
|
@ -785,7 +812,6 @@ function ForumsGui::onDatabaseRow(%this,%row,%isLastRow,%key)
|
|||
{
|
||||
if(%this.key != %key)
|
||||
return;
|
||||
echo("RECV: " @ %row);
|
||||
%forumTID = getField(ForumsList.getRowTextbyId(ForumsList.getSelectedID()),2);
|
||||
switch$(%this.state)
|
||||
{
|
||||
|
|
@ -809,6 +835,7 @@ function ForumsGui::onDatabaseRow(%this,%row,%isLastRow,%key)
|
|||
ForumsList.setSelectedRow( 1 );
|
||||
}
|
||||
case "TopicList":
|
||||
|
||||
%id = getField(%row, 1);
|
||||
%topic = getField(%row, 2);
|
||||
%postCount = getField(%row, 3);
|
||||
|
|
@ -816,13 +843,15 @@ function ForumsGui::onDatabaseRow(%this,%row,%isLastRow,%key)
|
|||
%name = getField(%row, 8);
|
||||
%hasDeletes = getField(%row,12);
|
||||
%slevel = getField(%row,13);
|
||||
%maxUpdateId = getField(%row,14)-1;
|
||||
ForumsTopicsList.addTopic( %id, %topic, %date, %maxUpdateID, %slevel, %row);
|
||||
ForumsTopicsList.addRow( %id, %topic TAB %postCount TAB %name TAB %date TAB %hasDeletes);
|
||||
%maxUpdateId = getField(%row,14);
|
||||
ForumsTopicsList.addTopic( %this.txid, %id, %topic, %date, %maxUpdateID, %slevel, %row);
|
||||
ForumsTopicsList.addRow( %id, %topic TAB %postCount TAB %name TAB %date TAB %hasDeletes TAB %this.txid);
|
||||
%this.txid++;
|
||||
if ( %isLastRow ) //is last line
|
||||
{
|
||||
%this.state = "done";
|
||||
ForumShell.setTitle("FORUMS: " @ getField(ForumsList.getRowTextbyID(ForumsList.getSelectedID()),0));
|
||||
// ForumsTopicsList.sort();
|
||||
ForumsTopicsList.updateReadStatus();
|
||||
%this.refreshFlag = false;
|
||||
if ( ForumsGui.LaunchTopic !$= "" )
|
||||
|
|
@ -873,7 +902,7 @@ function ForumsGui::onDatabaseRow(%this,%row,%isLastRow,%key)
|
|||
{
|
||||
ForumsMessageVector.tid = ForumsTopicsList.getSelectedID();
|
||||
ForumsTopicsList.thread = TopicsListGroup.getObject(ForumsTopicsList.getSelectedRow());
|
||||
ForumsTopicsList.thread.updateID = %high-1;
|
||||
ForumsTopicsList.thread.updateID = %high;
|
||||
CacheForumTopic();
|
||||
ForumsMessageList.loadCache(ForumsTopicsList.getSelectedID());
|
||||
}
|
||||
|
|
@ -971,19 +1000,6 @@ function ForumsTopicsList::onAdd( %this )
|
|||
};
|
||||
};
|
||||
|
||||
// Add the columns from the prefs:
|
||||
for ( %i = 0; %i < $TopicColumnCount; %i++ )
|
||||
{
|
||||
%this.addColumn( %i,
|
||||
$TopicColumnName[%i],
|
||||
$pref::Topics::Column[%i],
|
||||
firstWord( $TopicColumnRange[%i] ),
|
||||
getWord( $TopicColumnRange[%i], 1 ),
|
||||
$TopicColumnFlags[%i] );
|
||||
}
|
||||
|
||||
%this.setSortColumn( $pref::Topics::SortColumnKey );
|
||||
%this.setSortIncreasing( $pref::Topics::SortInc );
|
||||
// Add the "Unread" style:
|
||||
%this.addStyle( 1, $ShellBoldFont, $ShellFontSize, "80 220 200", "30 255 225", "10 60 40" );
|
||||
// Add the "Ignored" style:
|
||||
|
|
@ -992,19 +1008,20 @@ function ForumsTopicsList::onAdd( %this )
|
|||
%this.addStyle( 3, $ShellFont, $ShellFontSize, "200 50 50", "200 100 100", "200 50 50" );
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
function ForumsTopicsList::AddTopic(%this, %id, %topicname, %date, %mid, %slevel, %vline)
|
||||
function ForumsTopicsList::AddTopic(%this, %iRow, %id, %topicname, %date, %mid, %slevel, %vline)
|
||||
{
|
||||
if(!isObject(TopicsListGroup))
|
||||
new SimGroup(TopicsListGroup);
|
||||
%topic = new scriptObject()
|
||||
{
|
||||
className = "TTopic";
|
||||
rowID = %iRow;
|
||||
Id = %id;
|
||||
name = %topicname;
|
||||
date = %date;
|
||||
updateid = %mid-1;
|
||||
updateid = %mid;
|
||||
slevel = %slevel;
|
||||
rcvrec = %vline;
|
||||
rcvrec = %vline;
|
||||
};
|
||||
TopicsListGroup.Add(%topic);
|
||||
}
|
||||
|
|
@ -1017,8 +1034,12 @@ function ForumsTopicsList::ClearList()
|
|||
//-----------------------------------------------------------------------------
|
||||
function ForumsTopicsList::onRightMouseDown( %this, %column, %row, %mousePos )
|
||||
{
|
||||
ForumsTopicsList.setSelectedRow(%row);
|
||||
TopicsPopupMenu.topic = TopicsListGroup.getObject(%row);
|
||||
ForumsTopicsList.setSelectedRow(%row);
|
||||
// for(%i=0;%i<ForumsTopicsList.rowCount();%i++)
|
||||
// {
|
||||
// ForumsTopicsList.
|
||||
TopicsPopupMenu.topic = TopicsListGroup.getObject(getField(ForumsTopicsList.getRowText(ForumsTopicsList.getSelectedRow()),5));
|
||||
// }
|
||||
if ( trim(TopicsPopupMenu.topic.name) !$= "")
|
||||
{
|
||||
Canvas.pushDialog(TopicsPopupDlg);
|
||||
|
|
@ -1076,7 +1097,7 @@ function TopicsPopupMenu::onSelect( %this, %id, %text )
|
|||
ForumsTopicsList.UpdateReadStatus();
|
||||
// ForumsRefreshTopics();
|
||||
case 2: // 2 Flag To ALL Read
|
||||
ForumsMessageVector.updateID = 99999999;
|
||||
ForumsMessageVector.updateID = 100;
|
||||
%cacheFile = $ForumCachePath @ "tpc" @ TopicsPopupMenu.topic.id;
|
||||
if(ForumsMessageVector.tid == TopicsPopupMenu.topic.id)
|
||||
{
|
||||
|
|
@ -1229,8 +1250,8 @@ function TopicsPopupDlg::onDatabaseQueryResult(%this,%status,%recordCount,%key)
|
|||
if(getField(%status,0)==0)
|
||||
if (%this.state $= "adminRemoveTopicPlus")
|
||||
{
|
||||
$EmailToAddress = getField(%status,3);
|
||||
$EmailCCAddress = "";
|
||||
Email_TOEdit.setText(getField(%status,3));
|
||||
Email_CCEdit.setText("");
|
||||
switch(getField(%status,2))
|
||||
{
|
||||
case 1: $EmailSubject = "Policy Violation Warning";
|
||||
|
|
@ -1312,7 +1333,7 @@ function ForumsTopicsList::updateReadStatus( %this )
|
|||
{
|
||||
%header = %file.readLine();
|
||||
%topicDate = getField( %this.getRowText( %row ), 3 );
|
||||
%updateID = getField(%header,0)-1;
|
||||
%updateID = getField(%header,0);
|
||||
if ( getField( %header, 1 ) == $ForumCacheVersion // Must have same cache version
|
||||
&& getField( %header, 2 ) == 1 // "all read" flag must be set
|
||||
&& strcmp( getField( %header, 3 ), %topicDate ) >= 0
|
||||
|
|
@ -1354,14 +1375,6 @@ function ForumsMessageList::onAdd( %this )
|
|||
};
|
||||
};
|
||||
|
||||
// Add columns from the prefs:
|
||||
for ( %i = 0; %i < $ForumColumnCount; %i++ )
|
||||
%this.addColumn( %i,
|
||||
$ForumColumnName[%i],
|
||||
$pref::Forum::Column[%i],
|
||||
firstWord( $ForumColumnRange[%i] ),
|
||||
getWord( $ForumColumnRange[%i], 1 ) );
|
||||
// We want no sorting done on this list -- leave them in the order that they are entered.
|
||||
// Add the "Unread" style:
|
||||
%this.addStyle( 1, $ShellBoldFont, $ShellFontSize, "80 220 200", "30 255 225", "0 0 0" );
|
||||
}
|
||||
|
|
@ -1378,7 +1391,7 @@ function ForumsMessageList::AddPost(%this, %id, %postname, %authorID, %authorNam
|
|||
author = %authorName;
|
||||
authorID = %authorID;
|
||||
date = %date;
|
||||
updateid = %mid-1;
|
||||
updateid = %mid;
|
||||
slevel = %slevel;
|
||||
rcvrec = %vline;
|
||||
};
|
||||
|
|
@ -1453,16 +1466,21 @@ function PostsPopupMenu::onSelect( %this, %id, %text )
|
|||
PostsPopupDlg.key = LaunchGui.key++;
|
||||
PostsPopupDlg.state = "requestPostReview";
|
||||
%fieldData = ForumsList.getSelectedID() TAB ForumsTopicsList.getSelectedID() TAB ForumsMessageList.getSelectedID() TAB PostsPopupMenu.post.authorID;
|
||||
databaseQuery(61, %fieldData, PostsPopupDlg, PostsPopupDlg.key);
|
||||
MessageBoxYesNo("CONFIRM","Request Admin Review?","PostsPopupMenu.adminCall(61,\"" @ %fieldData @ "\");","");
|
||||
case 10: //Remove Post
|
||||
PostsPopupDlg.key = LaunchGui.key++;
|
||||
PostsPopupDlg.state = "adminRemovePost";
|
||||
%fieldData = 0 TAB ForumsList.getSelectedID() TAB ForumsTopicsList.getSelectedID() TAB ForumsMessageList.getSelectedID() TAB PostsPopupMenu.post.authorID;
|
||||
databaseQuery(63, %fieldData, PostsPopupDlg, PostsPopupDlg.key);
|
||||
MessageBoxYesNo("CONFIRM","Remove Post?","PostsPopupMenu.adminCall(63,\"" @ %fieldData @ "\");","");
|
||||
}
|
||||
canvas.popDialog(PostsPopupDlg);
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
function PostsPopupMenu::AdminCall(%this, %ord, %fields)
|
||||
{
|
||||
databaseQuery(%ord, %fields, PostsPopupDlg, PostsPopupDlg.key);
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
function PostsPopupDlg::onSleep(%this)
|
||||
{
|
||||
ForumsGui.TDialogOpen = false;
|
||||
|
|
@ -1481,8 +1499,8 @@ function PostsPopupDlg::onDatabaseQueryResult(%this,%status,%recordCount,%key)
|
|||
ForumsMessageList.removeRow( %selRow );
|
||||
ForumsMessageList.setSelectedRow( %selRow );
|
||||
CacheForumTopic();
|
||||
$EmailToAddress = getField(%status,3);
|
||||
$EmailCCAddress = "";
|
||||
Email_ToEdit.setText(getField(%status,3));
|
||||
Email_CCEdit.setText("");
|
||||
switch(getField(%status,2))
|
||||
{
|
||||
case 1: $EmailSubject = "Policy Violation Warning";
|
||||
|
|
@ -1721,4 +1739,4 @@ function ForumsComposeDlg::onSleep( %this )
|
|||
{
|
||||
$pref::Forum::PostWindowPos = FC_Window.getPosition();
|
||||
$pref::Forum::PostWindowExtent = FC_Window.getExtent();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,53 +1,105 @@
|
|||
addWebLink( "Tribes 2 Home Page", "www.tribes2.com" );
|
||||
addWebLink( "T2 Technical Information", "sierrastudios.com/games/tribes2/support" );
|
||||
addWebLink( "5 Assed Monkey", "www.5assedmonkey.com" );
|
||||
addWebLink( "Arc 2055", "www.arc2055.com" );
|
||||
addWebLink( "Atari Secret Society", "www.atarisecretsociety.org" );
|
||||
addWebLink( "BarrysWorld", "www.barrysworld.com" );
|
||||
addWebLink( "Bomb", "www.bomb.net" );
|
||||
addWebLink( "Box Factory Games", "http://www.bfgames1.com" );
|
||||
addWebLink( "Clan Happytyme", "www.happytyme.com" );
|
||||
addWebLink( "ClanBase", "www.clanbase.com" );
|
||||
addWebLink( "ClanServ", "www.clanserv.com" );
|
||||
addWebLink( "Dopplegangers", "www.dopplegangers.com" );
|
||||
addWebLink( "Dutchbat Homeworld", "www.dutchbat-homeworld.com" );
|
||||
addWebLink( "eDome Tribes 2", "http://games.edome.net/tribes2/" );
|
||||
addWebLink( "Euro Tribesplayers", "www.euro-tribesplayers.com" );
|
||||
addWebLink( "eXtreme-Players", "www.eXtreme-players.de" );
|
||||
addWebLink( "Game Forces", "www.gameforces.net" );
|
||||
addWebLink( "Game Planet", "www.gameplanet.co.nz" );
|
||||
addWebLink( "Game Surf", "www.gamesurf.de" );
|
||||
addWebLink( "Grave Diggers Union", "www.gravediggersunion.com" );
|
||||
addWebLink( "HomeLan", "www.homelan.com" );
|
||||
addWebLink( "IanStorm", "www.ianstorm.com" );
|
||||
addWebLink( "IMGaming", "www.imgaming.com" );
|
||||
addWebLink( "Long Dongles", "www.longdongles.com" );
|
||||
addWebLink( "MaxBaud.Net", "www.maxbaud.net" );
|
||||
addWebLink( "MoreGaming", "www.moregaming.com" );
|
||||
addWebLink( "NetGames UK", "www.nguk.net" );
|
||||
addWebLink( "NGI", "www.ngi.it" );
|
||||
addWebLink( "PlanetTribes", "www.planettribes.com" );
|
||||
addWebLink( "Raging Angels", "www.ragingangels.org" );
|
||||
addWebLink( "Rogue Disciples", "www.roguedisciples.com" );
|
||||
addWebLink( "StrikeForce", "www.strikeforcecenter.com" );
|
||||
addWebLink( "Supreme Tribes", "www.supremetribes.com" );
|
||||
addWebLink( "Sydney Gamers League", "www.sgl.org.au" );
|
||||
addWebLink( "System Recall", "www.systemrecall.com.com" );
|
||||
addWebLink( "TeamSound", "www.teamsound.com" );
|
||||
addWebLink( "Telenordia", "www.telenordia.se" );
|
||||
addWebLink( "Telepresence Heavy Assault Team", "www.that.co.nz" );
|
||||
addWebLink( "Temple of Blood", "www.templeofblood.com" );
|
||||
addWebLink( "The Ghostbear Tribe", "www.ghostbear.net" );
|
||||
addWebLink( "ToKrZ", "www.tokrz.com" );
|
||||
addWebLink( "Tribes Attack", "www.tribesattack.com" );
|
||||
addWebLink( "Tribes Center", "www.tribescenter.com" );
|
||||
addWebLink( "Tribes 2 Database", "www.tribes2database.com" );
|
||||
addWebLink( "Tribes Gamers", "www.tribesgamers.com" );
|
||||
addWebLink( "TribesMaps", "www.tribesmaps.com" );
|
||||
addWebLink( "TribalWar", "www.tribalwar.com" );
|
||||
addWebLink( "Tribes Worlds", "www.tribesworlds.com" );
|
||||
addWebLink( "Tribes-Universe", "www.tribes-universe.com" );
|
||||
addWebLink( "WirePlay", "www.wireplay.com.au" );
|
||||
//addWebLink( "Z Free", "games13.clear.net.nz" );
|
||||
function weblinksmenu::defaultList(%this)
|
||||
{
|
||||
addWebLink( "Tribes 2 Home Page", "www.tribes2.com" );
|
||||
addWebLink( "T2 Technical Information", "sierrastudios.com/games/tribes2/support" );
|
||||
addWebLink( "5 Assed Monkey", "www.5assedmonkey.com" );
|
||||
addWebLink( "Arc 2055", "www.arc2055.com" );
|
||||
addWebLink( "Atari Secret Society", "www.atarisecretsociety.org" );
|
||||
addWebLink( "BarrysWorld", "www.barrysworld.com" );
|
||||
addWebLink( "Bomb", "www.bomb.net" );
|
||||
addWebLink( "Clan Happytyme", "www.happytyme.com" );
|
||||
addWebLink( "ClanBase", "www.clanbase.com" );
|
||||
addWebLink( "ClanServ", "www.clanserv.com" );
|
||||
addWebLink( "Dopplegangers", "www.dopplegangers.com" );
|
||||
addWebLink( "Dutchbat Homeworld", "www.dutchbat-homeworld.com" );
|
||||
addWebLink( "eDome Tribes 2", "http://games.edome.net/tribes2/" );
|
||||
addWebLink( "Euro Tribesplayers", "www.euro-tribesplayers.com" );
|
||||
addWebLink( "eXtreme-Players", "www.eXtreme-players.de" );
|
||||
addWebLink( "Game Forces", "www.gforces.net" );
|
||||
addWebLink( "Game Planet", "www.gameplanet.co.nz" );
|
||||
addWebLink( "Game Surf", "www.gamesurf.de" );
|
||||
addWebLink( "Grave Diggers Union", "www.gravediggersunion.com" );
|
||||
addWebLink( "HomeLan", "www.homelan.com" );
|
||||
addWebLink( "IanStorm", "www.ianstorm.com" );
|
||||
addWebLink( "IMGaming", "www.imgaming.com" );
|
||||
addWebLink( "LAN Place", "www.lanplace.co.nz" );
|
||||
addWebLink( "Long Dongles", "www.longdongles.com" );
|
||||
addWebLink( "MaxBaud.Net", "www.maxbaud.net" );
|
||||
addWebLink( "MoreGaming", "www.moregaming.com" );
|
||||
addWebLink( "NetGames UK", "www.nguk.net" );
|
||||
addWebLink( "NGI", "www.ngi.it" );
|
||||
addWebLink( "PlanetTribes", "www.planettribes.com" );
|
||||
addWebLink( "Raging Angels", "www.ragingangels.org" );
|
||||
addWebLink( "Rogue Disciples", "www.roguedisciples.com" );
|
||||
addWebLink( "StrikeForce", "www.strikeforcecenter.com" );
|
||||
addWebLink( "Sydney Gamers League", "www.sgl.org.au" );
|
||||
addWebLink( "System Recall", "www.systemrecall.com" );
|
||||
addWebLink( "TeamSound", "www.teamsound.com" );
|
||||
addWebLink( "Telenordia", "www.telenordia.se" );
|
||||
addWebLink( "Telepresence Heavy Assault Team", "www.that.co.nz" );
|
||||
addWebLink( "Temple of Blood", "www.templeofblood.com" );
|
||||
addWebLink( "The Ghostbear Tribe", "www.ghostbear.net" );
|
||||
addWebLink( "ToKrZ", "www.tokrz.com" );
|
||||
addWebLink( "Tribes Attack", "www.tribesattack.com" );
|
||||
addWebLink( "Tribes Center", "www.tribescenter.com" );
|
||||
addWebLink( "Tribes 2 Database", "www.tribes2database.com" );
|
||||
addWebLink( "Tribes Gamers", "www.tribesgamers.com" );
|
||||
addWebLink( "TribesMaps", "www.tribesmaps.com" );
|
||||
addWebLink( "TribalWar", "www.tribalwar.com" );
|
||||
addWebLink( "Tribes Worlds", "www.tribesworlds.com" );
|
||||
addWebLink( "Tribes-Universe", "www.tribes-universe.com" );
|
||||
addWebLink( "WirePlay", "www.wireplay.com.au" );
|
||||
//addWebLink( "Z Free", "games13.clear.net.nz" );
|
||||
//addWebLink( "Box Factory Games", "http://www.bfgames1.com" );
|
||||
//addWebLink( "Box Factory Games", "http://www.bfgn.hobbiton.org" );
|
||||
for ( %i = 0; %i < $WebLinkCount; %i++ )
|
||||
%this.add( $WebLink[%i, name], %i );
|
||||
weblinksmenu.setSelected(0);
|
||||
}
|
||||
|
||||
function weblinksmenu::onDatabaseQueryResult(%this,%status,%resultstring,%key)
|
||||
{
|
||||
if(%key != %this.key)
|
||||
return;
|
||||
echo("RECV:" @ %status);
|
||||
switch$(%this.state)
|
||||
{
|
||||
case "fetchWeblink":
|
||||
if(getField(%status,0) == 0)
|
||||
{
|
||||
%this.isloaded = true;
|
||||
%this.state = "getLinks";
|
||||
$WebLink = "";
|
||||
%this.clear();
|
||||
%this.rownum = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
%this.state = "error";
|
||||
$WebLink = "";
|
||||
%this.clear();
|
||||
%this.defaultList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function weblinksmenu::onDatabaseRow(%this,%row,%isLastRow,%key)
|
||||
{
|
||||
if(%key != %this.key)
|
||||
return;
|
||||
|
||||
echo("RECV:" @ %row);
|
||||
switch$(%this.state)
|
||||
{
|
||||
case "getLinks":
|
||||
if(getField(%row,0) $= "0")
|
||||
{
|
||||
addWebLink(getField(%row,1),getField(%row,2));
|
||||
%this.add( getField(%row,1), %this.rownum );
|
||||
%this.rownum++;
|
||||
}
|
||||
if(%isLastRow)
|
||||
weblinksmenu.setSelected(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,22 +24,26 @@ function NewsGui::onWake(%this)
|
|||
NewsPrevBtn.setVisible( false );
|
||||
NewsNextBtn.setVisible( false );
|
||||
NewsSubmitBtn.setVisible( false );
|
||||
NewsMOTDText.setValue( "This is the fake Message of the Day just for people playing the demo." );
|
||||
%this.addStaticArticle( "ALIENS INVADE CLEVELAND!", "Oh, never mind.\nIt just usually looks like that.\nMy bad." );
|
||||
%this.addStaticArticle( "OMG! Tribes 2 is the Coolest!", "It's official, Tribes 2 is the coolest thing since ice cream." );
|
||||
%this.addStaticArticle( "BigDevDawg Worship Service Rescheduled", "Please note that the weekly devotional service for the followers of the almighty DevDawg has been rescheduled to 9pm so that it no longer conflicts with \"That 70\'s Show\"." );
|
||||
NewsMOTDText.setValue( "Welcome to the Tribes 2 Demo!" );
|
||||
%this.addStaticArticle( "What's In The Demo?", "There are two training missions, and two multiplayer maps in this demo.\nIf you're new to the Tribes experience, you should consider trying out the training missions so you can become familiar with the basics of the game. Then, after you learn how to use your jets and weapons, jump into multiplayer on one of our Demo Servers to fight against other players like yourself." );
|
||||
%this.addStaticArticle( "How Do I Change Settings?", "There is a LAUNCH button in the lower left of this screen. Click on it and choose the SETTINGS option. There you will find ways to modify your graphics, textures, network settings and more. \nMost of these settings will be configured automatically based on your hardware configs, so try the game with the default settings for a while and see how it plays. Then, optimize your settings accordingly thereafter." );
|
||||
// %this.addStaticArticle( "Two Game Types", "Talk about CTF and Hunters" );
|
||||
}
|
||||
else
|
||||
{
|
||||
Canvas.SetCursor(ArrowWaitCursor);
|
||||
%this.state = "status";
|
||||
%this.key = LaunchGui.key++;
|
||||
%this.caller = "GETNEWS";
|
||||
DatabaseQueryArray(0,0,"0" TAB "0",%this,%this.key);
|
||||
// Fetch the message of the day:
|
||||
NewsMOTDText.key = LaunchGui.key++;
|
||||
NewsMOTDText.state = "isvalid";
|
||||
DatabaseQuery(0,"",NewsMOTDText,NewsMOTDText.key);
|
||||
Canvas.SetCursor(ArrowWaitCursor);
|
||||
%this.state = "status";
|
||||
%this.key = LaunchGui.key++;
|
||||
%this.caller = "GETNEWS";
|
||||
DatabaseQueryArray(0,0,"0" TAB "0",%this,%this.key);
|
||||
// Fetch the message of the day:
|
||||
NewsMOTDText.key = LaunchGui.key++;
|
||||
NewsMOTDText.state = "isvalid";
|
||||
DatabaseQuery(0,"",NewsMOTDText,NewsMOTDText.key);
|
||||
weblinksmenu.clear();
|
||||
weblinksmenu.key = launchgui.key++;
|
||||
weblinksmenu.state = "fetchWeblink";
|
||||
DatabaseQueryArray(15,0,"WEBLINK",weblinksmenu,weblinksmenu.key);
|
||||
}
|
||||
WebLinksMenu.setSelected( 0 );
|
||||
NewsPrevBtn.setActive( false );
|
||||
|
|
@ -487,13 +491,12 @@ function addWebLink( %name, %address )
|
|||
//-----------------------------------------------------------------------------
|
||||
function WebLinksMenu::onAdd( %this )
|
||||
{
|
||||
for ( %i = 0; %i < $WebLinkCount; %i++ )
|
||||
%this.add( $WebLink[%i, name], %i );
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
function WebLinksMenu::launchWebBrowser( %this )
|
||||
{
|
||||
%address = $WebLink[WebLinksMenu.getSelected(), address];
|
||||
error("SELECTED:" SPC WebLinksMenu.getSelected());
|
||||
if ( %address !$= "" )
|
||||
{
|
||||
if ( isFullScreen() )
|
||||
|
|
|
|||
|
|
@ -246,5 +246,5 @@ function DatabaseQueryCancel(%id)
|
|||
|
||||
function WONUpdateCertificateDone(%errCode, %errStr)
|
||||
{
|
||||
IRCClient::relogin();
|
||||
IRCClient::reconnect();
|
||||
}
|
||||
|
|
@ -1 +1 @@
|
|||
buildVersion.setValue( "JUN 8, 2001, 11:12 PM (dmoore)" );
|
||||
buildVersion.setValue( "JUL 3, 2001, 1:09 PM (dmoore)" );
|
||||
|
|
|
|||
411
console_start.cs
411
console_start.cs
|
|
@ -13,6 +13,7 @@ $Login = false;
|
|||
$clientprefs = "prefs/clientPrefs.cs";
|
||||
$serverprefs = "prefs/serverPrefs.cs";
|
||||
$fromLauncher = false;
|
||||
$PureServer = true;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function prepBuild()
|
||||
|
|
@ -168,11 +169,16 @@ else
|
|||
{
|
||||
setModPaths( $nextArg );
|
||||
$i += 2;
|
||||
$PureServer = false;
|
||||
}
|
||||
else if($arg $= "-dedicated")
|
||||
{
|
||||
$LaunchMode = "DedicatedServer";
|
||||
}
|
||||
else if($arg $= "-nonpure")
|
||||
{
|
||||
$PureServer = false;
|
||||
}
|
||||
else if($arg $= "-clientprefs" && $hasNextArg)
|
||||
{
|
||||
$i++;
|
||||
|
|
@ -193,6 +199,14 @@ else
|
|||
$mission = $nextArg;
|
||||
$missionType = $nextArg2;
|
||||
}
|
||||
else if($arg $= "-telnetParams" && $has2NextArgs)
|
||||
{
|
||||
$i += 3;
|
||||
$telnetPort = $nextArg;
|
||||
$telnetPassword = $nextArg2;
|
||||
$telnetListenPass = $nextArg3;
|
||||
telnetSetParameters($telnetPort, $telnetPassword, $telnetListenPass);
|
||||
}
|
||||
else if($arg $= "-connect" && $hasNextArg)
|
||||
{
|
||||
$i++;
|
||||
|
|
@ -209,18 +223,21 @@ else
|
|||
$i++;
|
||||
$JournalFile = $nextArg;
|
||||
$JournalMode = "LoadJournal";
|
||||
$PureServer = false;
|
||||
}
|
||||
else if($arg $= "-jsave" && $hasNextArg)
|
||||
{
|
||||
$i++;
|
||||
$JournalFile = $nextArg;
|
||||
$JournalMode = "SaveJournal";
|
||||
$PureServer = false;
|
||||
}
|
||||
else if($arg $= "-jplay" && $hasNextArg)
|
||||
{
|
||||
$i++;
|
||||
$JournalFile = $nextArg;
|
||||
$journalMode = "PlayJournal";
|
||||
$PureServer = false;
|
||||
}
|
||||
else if($arg $= "-navBuild" && $has2NextArgs)
|
||||
{
|
||||
|
|
@ -246,6 +263,7 @@ else
|
|||
$Login = true;
|
||||
$LoginName = $nextArg;
|
||||
$LoginPassword = $nextArg2;
|
||||
$PureServer = false;
|
||||
}
|
||||
else if($arg $= "-show")
|
||||
{
|
||||
|
|
@ -271,6 +289,7 @@ else
|
|||
prepBuild();
|
||||
setLogMode(1);
|
||||
setEchoFileLoads(true);
|
||||
$PureServer = false;
|
||||
}
|
||||
else if($arg $= "-quit")
|
||||
{
|
||||
|
|
@ -287,6 +306,13 @@ else
|
|||
$fromLauncher = true;
|
||||
}
|
||||
|
||||
//see if we're launching a pure server
|
||||
if ($LaunchMode $= "DedicatedServer" && $PureServer)
|
||||
{
|
||||
if (setPureServer(1))
|
||||
$Con::prompt = "PURE%";
|
||||
}
|
||||
|
||||
// load autoexec once for command-line overrides:
|
||||
exec("autoexec.cs", true);
|
||||
|
||||
|
|
@ -313,6 +339,29 @@ exec("scripts/serverDefaults.cs", true);
|
|||
exec($clientprefs, true, true);
|
||||
exec($serverprefs, true, true);
|
||||
|
||||
//convert the team skin and name vars to tags...
|
||||
$index = 0;
|
||||
while ($Host::TeamSkin[$index] !$= "")
|
||||
{
|
||||
$TeamSkin[$index] = addTaggedString($Host::TeamSkin[$index]);
|
||||
$index++;
|
||||
}
|
||||
|
||||
$index = 0;
|
||||
while ($Host::TeamName[$index] !$= "")
|
||||
{
|
||||
$TeamName[$index] = addTaggedString($Host::TeamName[$index]);
|
||||
$index++;
|
||||
}
|
||||
|
||||
// initialize the hologram names:
|
||||
$index = 1;
|
||||
while ( $Host::holoName[$index] !$= "" )
|
||||
{
|
||||
$holoName[$index] = $Host::holoName[$index];
|
||||
$index++;
|
||||
}
|
||||
|
||||
// load autoexec again to override video settings/window creation
|
||||
|
||||
exec("autojournal.cs", true, true); // put journal'd startup options in here
|
||||
|
|
@ -505,14 +554,20 @@ function LoginMessageBoxButtonProcess()
|
|||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
function EditAccountDlg::onUpdate(%this)
|
||||
{
|
||||
if ( strcmp( $LoginPassword, EA_OldPassword.getValue() ) != 0 )
|
||||
{
|
||||
LoginMessageBox( "UPDATE FAILED", "The password you entered is incorrect.", "OK" );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( strcmp( $CreateAccountPassword, $CreateAccountConfirmPassword ) )
|
||||
{
|
||||
LoginMessageBox( "ERROR", "Passwords don't match.", "OK" );
|
||||
return;
|
||||
}
|
||||
|
||||
WONStartUpdateAccount( $CreateAccountPassword,
|
||||
$CreateAccountEmail,
|
||||
$CreateAccountSendInfo );
|
||||
|
|
@ -527,11 +582,12 @@ function EditAccountDlg::onDontUpdate(%this)
|
|||
schedule(0,0,LoginDone);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function StartupGui::checkLoginDone( %this, %editAcct, %emailCheck )
|
||||
{
|
||||
%result = WONLoginResult();
|
||||
%code = getField( %result, 1 );
|
||||
%codeText = getField(%result, 2);
|
||||
%codeText = getField( %result, 2 );
|
||||
%status = getField( %result, 0 );
|
||||
%errorString = getField( %result, 3);
|
||||
|
||||
|
|
@ -550,8 +606,7 @@ function StartupGui::checkLoginDone( %this, %editAcct, %emailCheck )
|
|||
%msg = "Account Creation Failed - Invalid login name. Login names may only contain letters, numbers and underlines, and must be from 3 to 16 characters in length.";
|
||||
case "WS_DBProxyServ_UserDoesNotExist":
|
||||
%msg = "Email Password Failed - No such login name. Please check the login name and try again.";
|
||||
case "WS_AuthServ_BadCDKey":
|
||||
case "WS_DBProxyServ_InvalidCDKey":
|
||||
case "WS_AuthServ_BadCDKey" or "WS_DBProxyServ_InvalidCDKey":
|
||||
%msg = "Account Creation Failed - Invalid CD Key. Please check the CD key for errors.";
|
||||
case "WS_TimedOut":
|
||||
%msg = "Login Failed - Server timed out. Your internet connection may be having problems or the servers may be temporarily unavailable.";
|
||||
|
|
@ -598,8 +653,10 @@ function StartupGui::checkLoginDone( %this, %editAcct, %emailCheck )
|
|||
else
|
||||
%msg = "Login Failed - Your internet connection may be having problems or the servers may be temporarily unavailable. (Error code: " @ %codeText @ ")";
|
||||
}
|
||||
|
||||
Canvas.popDialog( LoginMessagePopupDlg );
|
||||
if(StartupGui.updatingAccount)
|
||||
|
||||
if ( StartupGui.updatingAccount )
|
||||
LoginMessageBox( "UPDATE FAILED", %msg, "OK", "schedule(0,0,LoginDone);" );
|
||||
else if ( %emailCheck )
|
||||
LoginMessageBox( "FETCH FAILED", %msg, "OK", "StartupGui::dumbFunction();" );
|
||||
|
|
@ -612,7 +669,7 @@ function StartupGui::checkLoginDone( %this, %editAcct, %emailCheck )
|
|||
if ( $pref::RememberPassword )
|
||||
{
|
||||
if ( StartupGui.updatingAccount )
|
||||
EditAccountPasswordBox.savePassword();
|
||||
EA_NewPassword.savePassword();
|
||||
else
|
||||
LoginPasswordBox.savePassword();
|
||||
}
|
||||
|
|
@ -980,6 +1037,7 @@ if(!$SkipLogin)
|
|||
WONInit();
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
if ($LaunchMode $= "DedicatedServer" ||
|
||||
$LaunchMode $= "Console" ||
|
||||
$LaunchMode $= "NavBuild" ||
|
||||
|
|
@ -1606,146 +1664,211 @@ else
|
|||
|
||||
// Edit Account dialog:
|
||||
new GuiControl(EditAccountDlg) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "640 480";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
open = "0";
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "640 480";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
open = "0";
|
||||
|
||||
new ShellPaneCtrl() {
|
||||
profile = "ShellDlgPaneProfile";
|
||||
horizSizing = "center";
|
||||
vertSizing = "center";
|
||||
position = "70 105";
|
||||
extent = "500 255";
|
||||
minExtent = "48 92";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
text = "ACCOUNT INFORMATION";
|
||||
noTitleBar = "0";
|
||||
new ShellPaneCtrl() {
|
||||
profile = "ShellDlgPaneProfile";
|
||||
horizSizing = "center";
|
||||
vertSizing = "center";
|
||||
position = "94 116";
|
||||
extent = "452 284";
|
||||
minExtent = "48 92";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
text = "ACCOUNT INFORMATION";
|
||||
maxLength = "255";
|
||||
noTitleBar = "0";
|
||||
|
||||
new ShellBitmapButton() {
|
||||
profile = "ShellButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "282 200";
|
||||
extent = "128 38";
|
||||
minExtent = "32 38";
|
||||
visible = "1";
|
||||
command = "EditAccountDlg.onUpdate();";
|
||||
helpTag = "0";
|
||||
text = "UPDATE";
|
||||
simpleStyle = "0";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
profile = "ShellTextRightProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "126 51";
|
||||
extent = "100 22";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
text = "Password:";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
profile = "ShellTextRightProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "126 81";
|
||||
extent = "100 22";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
text = "Confirm Password:";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
profile = "ShellTextRightProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "37 125";
|
||||
extent = "100 22";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
text = "Email:";
|
||||
};
|
||||
new GuiLoginPasswordCtrl(EditAccountPasswordBox) {
|
||||
profile = "NewTextEditProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "222 43";
|
||||
extent = "180 38";
|
||||
minExtent = "32 38";
|
||||
visible = "1";
|
||||
variable = "$CreateAccountPassword";
|
||||
helpTag = "0";
|
||||
historySize = "0";
|
||||
maxLength = "16";
|
||||
password = "1";
|
||||
glowOffset = "9 9";
|
||||
};
|
||||
new ShellTextEditCtrl() {
|
||||
profile = "NewTextEditProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "222 73";
|
||||
extent = "180 38";
|
||||
minExtent = "32 38";
|
||||
visible = "1";
|
||||
variable = "$CreateAccountConfirmPassword";
|
||||
helpTag = "0";
|
||||
historySize = "0";
|
||||
maxLength = "16";
|
||||
password = "1";
|
||||
glowOffset = "9 9";
|
||||
};
|
||||
new ShellTextEditCtrl() {
|
||||
profile = "NewTextEditProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "133 115";
|
||||
extent = "269 38";
|
||||
minExtent = "32 38";
|
||||
visible = "1";
|
||||
variable = "$CreateAccountEmail";
|
||||
helpTag = "0";
|
||||
historySize = "0";
|
||||
maxLength = "128";
|
||||
password = "0";
|
||||
glowOffset = "9 9";
|
||||
};
|
||||
new ShellToggleButton() {
|
||||
profile = "ShellRadioProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "63 156";
|
||||
extent = "366 30";
|
||||
minExtent = "26 27";
|
||||
visible = "1";
|
||||
variable = "$CreateAccountSendInfo";
|
||||
helpTag = "0";
|
||||
text = "SEND ME INFORMATION ABOUT TRIBES 2 AND OTHER PRODUCTS";
|
||||
};
|
||||
new ShellBitmapButton() {
|
||||
profile = "ShellButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "72 200";
|
||||
extent = "128 38";
|
||||
minExtent = "32 38";
|
||||
visible = "1";
|
||||
command = "EditAccountDlg.onDontUpdate();";
|
||||
accelerator = "escape";
|
||||
helpTag = "0";
|
||||
text = "DON\'T UPDATE";
|
||||
simpleStyle = "0";
|
||||
};
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
profile = "ShellTextRightProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "top";
|
||||
position = "106 38";
|
||||
extent = "100 22";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
text = "Old Password:";
|
||||
maxLength = "255";
|
||||
};
|
||||
new ShellTextEditCtrl(EA_OldPassword) {
|
||||
profile = "NewTextEditProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "top";
|
||||
position = "202 30";
|
||||
extent = "180 38";
|
||||
minExtent = "32 38";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
maxLength = "16";
|
||||
historySize = "0";
|
||||
password = "1";
|
||||
tabComplete = "0";
|
||||
deniedSound = "InputDeniedSound";
|
||||
glowOffset = "9 9";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
profile = "ShellTextRightProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "top";
|
||||
position = "106 80";
|
||||
extent = "100 22";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
text = "New Password:";
|
||||
maxLength = "255";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
profile = "ShellTextRightProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "top";
|
||||
position = "66 110";
|
||||
extent = "140 22";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
text = "Confirm New Password:";
|
||||
maxLength = "255";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
profile = "ShellTextRightProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "top";
|
||||
position = "44 154";
|
||||
extent = "73 22";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
helpTag = "0";
|
||||
text = "Email:";
|
||||
maxLength = "255";
|
||||
};
|
||||
new GuiLoginPasswordCtrl(EA_NewPassword) {
|
||||
profile = "NewTextEditProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "top";
|
||||
position = "202 72";
|
||||
extent = "180 38";
|
||||
minExtent = "32 38";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
variable = "$CreateAccountPassword";
|
||||
helpTag = "0";
|
||||
maxLength = "16";
|
||||
historySize = "0";
|
||||
password = "1";
|
||||
tabComplete = "0";
|
||||
deniedSound = "InputDeniedSound";
|
||||
glowOffset = "9 9";
|
||||
};
|
||||
new ShellTextEditCtrl() {
|
||||
profile = "NewTextEditProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "top";
|
||||
position = "202 102";
|
||||
extent = "180 38";
|
||||
minExtent = "32 38";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
variable = "$CreateAccountConfirmPassword";
|
||||
helpTag = "0";
|
||||
maxLength = "16";
|
||||
historySize = "0";
|
||||
password = "1";
|
||||
tabComplete = "0";
|
||||
deniedSound = "InputDeniedSound";
|
||||
glowOffset = "9 9";
|
||||
};
|
||||
new ShellTextEditCtrl() {
|
||||
profile = "NewTextEditProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "top";
|
||||
position = "113 144";
|
||||
extent = "269 38";
|
||||
minExtent = "32 38";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
variable = "$CreateAccountEmail";
|
||||
helpTag = "0";
|
||||
maxLength = "128";
|
||||
historySize = "0";
|
||||
password = "0";
|
||||
tabComplete = "0";
|
||||
deniedSound = "InputDeniedSound";
|
||||
glowOffset = "9 9";
|
||||
};
|
||||
new ShellToggleButton() {
|
||||
profile = "ShellRadioProfile";
|
||||
horizSizing = "center";
|
||||
vertSizing = "top";
|
||||
position = "43 190";
|
||||
extent = "366 30";
|
||||
minExtent = "26 27";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
variable = "$CreateAccountSendInfo";
|
||||
helpTag = "0";
|
||||
text = "SEND ME INFORMATION ABOUT TRIBES 2 AND OTHER PRODUCTS";
|
||||
maxLength = "255";
|
||||
};
|
||||
new ShellBitmapButton() {
|
||||
profile = "ShellButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "top";
|
||||
position = "65 229";
|
||||
extent = "128 38";
|
||||
minExtent = "32 38";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
command = "EditAccountDlg.onDontUpdate();";
|
||||
accelerator = "escape";
|
||||
helpTag = "0";
|
||||
text = "CANCEL";
|
||||
simpleStyle = "0";
|
||||
};
|
||||
new ShellBitmapButton() {
|
||||
profile = "ShellButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "top";
|
||||
position = "259 229";
|
||||
extent = "128 38";
|
||||
minExtent = "32 38";
|
||||
visible = "1";
|
||||
hideCursor = "0";
|
||||
bypassHideCursor = "0";
|
||||
command = "EditAccountDlg.onUpdate();";
|
||||
helpTag = "0";
|
||||
text = "UPDATE";
|
||||
simpleStyle = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
// Create Account dialog:
|
||||
|
|
|
|||
Loading…
Reference in a new issue