TribesReplay/base/scripts/client.cs

1901 lines
60 KiB
C#
Raw Normal View History

2017-07-18 02:51:48 +00:00
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
function SAD(%password)
{
if(%password !$= "")
commandToServer('SAD', %password);
}
function SADSetPassword(%password)
{
commandToServer('SADSetPassword', %password);
}
function use(%data)
{
// %data is currently the datablock name of the item
commandToServer('use',%data);
}
function throw(%data)
{
// %data is currently the datablock name of the item
commandToServer('throw',%data);
}
function giveAll()
{
commandToServer('giveAll');
}
function clientCmdSetPlayContent()
{
if ( $LaunchMode $= "InteriorView" )
Canvas.setContent( interiorPreviewGui );
else
Canvas.setContent( Playgui );
}
function clientCmdPickTeamMenu( %teamA, %teamB )
{
ClientCmdSetHudMode("PickTeam");
PickTeamAButton.text = %teamA;
PickTeamBButton.text = %teamB;
PickTeamFrame.setTitle( "Pick Team" );
Canvas.pushDialog( PickTeamDlg );
}
function clientCmdProcessPickTeam( %option )
{
v23115 (05/30/01): - (bug fix) Fixed an authentication hole that allowed arbitrary IP connections to a LAN server. The policy now is: LAN servers will disallow any connections from IP addresses that do not match the Class B network address of the server (or match one of them, in a multihomed server). So if your server's address is 12.13.14.15, clients from 12.13.*.* will be considered, but clients from 12.12.*.* will be immediately rejected. In addition, a LAN server will only allow 4 unique Class C ids at any one time. This should be sufficiently lenient for even the largest LAN parties, but should eliminate the auth hole. - (bug fix) Fixed a server crash on mission change when the last human player leaves the game in mid cycle. - (bug fix) Fixed a bug that could reset your Shape Detail setting to max - (bug fix) Client join message name correction - (bug fix) All known in-game Chat HUD bugs are fixed (partial lines from paging up/down and resize issues, etc.). - (bug fix) Infinite missile lock-on sound bug is fixed. Dead. Finito. No more. Pushing up the daisies. - (bug fix) Stitched up a hole associated with one of the base shapes. Small fry compared to the memory leaks. - (bug fix) Found a particle crash issue and plugged it up good. - (bug fix) Fixed a shield impact internal compile error that was crunching frame rate. - (bug fix) Turns out we tweaked it so inventory stations were counting as turrets for turret placement purposes. D'oh. Fixed. - (bug fix) A rare crash that occurred with the Radeon VE card has been resolved. - (bug fix) Fixed a crash that could occur when a flare grenade was released when inside a force field. - (bug fix) Deployable turrets (spider and spike) and Deployable inv stations now do damage in their explosion when they are destroyed. - (optimization) The following missions were refined in order to optimize framerate: Alcatraz Caldera Flashpoint Gauntlet IceBound Insalubria Overreach Respite Sirocco - (optimization) Adjusted the LOD of the logo projectors found in CnH missions. - (optimization) Changed object shield shapes from the form-fitting forcefields into a less poly-intensive dome effect. Also gave shields a lower memory profile. - (optimization) Changed the way the clouds' planes are clipped. Sky's the limit, right? - (optimization) Missile sound script calls moved from script into code for faster processing. - (memory leak) Fixed a large memory leak. This plus the other leaks mentioned here should finally put the nail in the coffin on the "degrading server performance" issue. - (memory leak) Fixed a memory leak associated with the pretty lightning effects on maps like Casern Cavite.memory leaks: - (memory leak) Fixed a memory leak in our fancy text list control and the gui text list. - (memory leak) Fixed a memory leak involving memory use and resource allocation. - (improvement) Targeting laser prediction should be better now. - (improvement) You can specify a server's IP address manually at the join screen - (improvement) You can now specify "-password <pw>" on the command line to join a server that requires a password. - (improvement) Heavy armors are tougher against snipers. You now require four headshots or five body shots to kill a Juggernaut with a laser rifle. - (improvement) Footspeed of all armors increased slightly, as well as a minor boost to jetpack performance. Some improvements made to air resistance for mediums and heavy armors (very subtle). - (improvement) The jetpack effect was reverted back to the old effect (by popular demand). - (improvement) A Chat HUD message has been added that is displayed whenever you try to deploy a mine, but your team's maximum number of mines has already been deployed. Previously, the mine would just blow up and not explain why it detonated. Now, it still blows up, but tells you why it happened. - (improvement) Polished up the health meter on the HUD so when you're still alive, it displays a visible sliver of positive health. - (improvement) Made framerate and gameplay changes to Caldera. The attackers' base has been moved farther from the defenders, and the switch has been put in one of the upper chambers, while the stations are located separately from the generators. The changes should fix a serious defensive advantage. - (improvement) After you buy a vehicle, you now fade into the driver's seat if your armor and pack make you an eligible pilot/driver. - (improvement) Added a "rogue" mine message so that if you are killed by a mine laid by someone who has left the building, the death message is more accurate. - (improvement) Increased speed of belly turret projectiles so that it is more effective in general (especially for air defense). - (improvement) Modified name tags of vehicles when you place your reticle over them. Names are now more consistent and descriptive. - (improvement) Missile and AA turrets now have a longer maximum range (you'll still need to deploy sensors to get this added range, but they can fire farther if you do). They also react more quickly to available targets. - (community) The "compose email", "forum post", and "news submission" windows are now resizable and movable.
2017-07-18 03:20:27 +00:00
if( %option !$= "" && %option <= 4 )
2017-07-18 02:51:48 +00:00
CommandToServer( 'clientPickedTeam', %option );
v23115 (05/30/01): - (bug fix) Fixed an authentication hole that allowed arbitrary IP connections to a LAN server. The policy now is: LAN servers will disallow any connections from IP addresses that do not match the Class B network address of the server (or match one of them, in a multihomed server). So if your server's address is 12.13.14.15, clients from 12.13.*.* will be considered, but clients from 12.12.*.* will be immediately rejected. In addition, a LAN server will only allow 4 unique Class C ids at any one time. This should be sufficiently lenient for even the largest LAN parties, but should eliminate the auth hole. - (bug fix) Fixed a server crash on mission change when the last human player leaves the game in mid cycle. - (bug fix) Fixed a bug that could reset your Shape Detail setting to max - (bug fix) Client join message name correction - (bug fix) All known in-game Chat HUD bugs are fixed (partial lines from paging up/down and resize issues, etc.). - (bug fix) Infinite missile lock-on sound bug is fixed. Dead. Finito. No more. Pushing up the daisies. - (bug fix) Stitched up a hole associated with one of the base shapes. Small fry compared to the memory leaks. - (bug fix) Found a particle crash issue and plugged it up good. - (bug fix) Fixed a shield impact internal compile error that was crunching frame rate. - (bug fix) Turns out we tweaked it so inventory stations were counting as turrets for turret placement purposes. D'oh. Fixed. - (bug fix) A rare crash that occurred with the Radeon VE card has been resolved. - (bug fix) Fixed a crash that could occur when a flare grenade was released when inside a force field. - (bug fix) Deployable turrets (spider and spike) and Deployable inv stations now do damage in their explosion when they are destroyed. - (optimization) The following missions were refined in order to optimize framerate: Alcatraz Caldera Flashpoint Gauntlet IceBound Insalubria Overreach Respite Sirocco - (optimization) Adjusted the LOD of the logo projectors found in CnH missions. - (optimization) Changed object shield shapes from the form-fitting forcefields into a less poly-intensive dome effect. Also gave shields a lower memory profile. - (optimization) Changed the way the clouds' planes are clipped. Sky's the limit, right? - (optimization) Missile sound script calls moved from script into code for faster processing. - (memory leak) Fixed a large memory leak. This plus the other leaks mentioned here should finally put the nail in the coffin on the "degrading server performance" issue. - (memory leak) Fixed a memory leak associated with the pretty lightning effects on maps like Casern Cavite.memory leaks: - (memory leak) Fixed a memory leak in our fancy text list control and the gui text list. - (memory leak) Fixed a memory leak involving memory use and resource allocation. - (improvement) Targeting laser prediction should be better now. - (improvement) You can specify a server's IP address manually at the join screen - (improvement) You can now specify "-password <pw>" on the command line to join a server that requires a password. - (improvement) Heavy armors are tougher against snipers. You now require four headshots or five body shots to kill a Juggernaut with a laser rifle. - (improvement) Footspeed of all armors increased slightly, as well as a minor boost to jetpack performance. Some improvements made to air resistance for mediums and heavy armors (very subtle). - (improvement) The jetpack effect was reverted back to the old effect (by popular demand). - (improvement) A Chat HUD message has been added that is displayed whenever you try to deploy a mine, but your team's maximum number of mines has already been deployed. Previously, the mine would just blow up and not explain why it detonated. Now, it still blows up, but tells you why it happened. - (improvement) Polished up the health meter on the HUD so when you're still alive, it displays a visible sliver of positive health. - (improvement) Made framerate and gameplay changes to Caldera. The attackers' base has been moved farther from the defenders, and the switch has been put in one of the upper chambers, while the stations are located separately from the generators. The changes should fix a serious defensive advantage. - (improvement) After you buy a vehicle, you now fade into the driver's seat if your armor and pack make you an eligible pilot/driver. - (improvement) Added a "rogue" mine message so that if you are killed by a mine laid by someone who has left the building, the death message is more accurate. - (improvement) Increased speed of belly turret projectiles so that it is more effective in general (especially for air defense). - (improvement) Modified name tags of vehicles when you place your reticle over them. Names are now more consistent and descriptive. - (improvement) Missile and AA turrets now have a longer maximum range (you'll still need to deploy sensors to get this added range, but they can fire farther if you do). They also react more quickly to available targets. - (community) The "compose email", "forum post", and "news submission" windows are now resizable and movable.
2017-07-18 03:20:27 +00:00
else if( %option !$= "" && %option == 5 )
2017-07-18 02:51:48 +00:00
disconnect();
Canvas.popDialog( PickTeamDlg );
}
new MessageVector(HudMessageVector);
$LastHudTarget = 0;
function addMessageHudLine(%text)
{
v23115 (05/30/01): - (bug fix) Fixed an authentication hole that allowed arbitrary IP connections to a LAN server. The policy now is: LAN servers will disallow any connections from IP addresses that do not match the Class B network address of the server (or match one of them, in a multihomed server). So if your server's address is 12.13.14.15, clients from 12.13.*.* will be considered, but clients from 12.12.*.* will be immediately rejected. In addition, a LAN server will only allow 4 unique Class C ids at any one time. This should be sufficiently lenient for even the largest LAN parties, but should eliminate the auth hole. - (bug fix) Fixed a server crash on mission change when the last human player leaves the game in mid cycle. - (bug fix) Fixed a bug that could reset your Shape Detail setting to max - (bug fix) Client join message name correction - (bug fix) All known in-game Chat HUD bugs are fixed (partial lines from paging up/down and resize issues, etc.). - (bug fix) Infinite missile lock-on sound bug is fixed. Dead. Finito. No more. Pushing up the daisies. - (bug fix) Stitched up a hole associated with one of the base shapes. Small fry compared to the memory leaks. - (bug fix) Found a particle crash issue and plugged it up good. - (bug fix) Fixed a shield impact internal compile error that was crunching frame rate. - (bug fix) Turns out we tweaked it so inventory stations were counting as turrets for turret placement purposes. D'oh. Fixed. - (bug fix) A rare crash that occurred with the Radeon VE card has been resolved. - (bug fix) Fixed a crash that could occur when a flare grenade was released when inside a force field. - (bug fix) Deployable turrets (spider and spike) and Deployable inv stations now do damage in their explosion when they are destroyed. - (optimization) The following missions were refined in order to optimize framerate: Alcatraz Caldera Flashpoint Gauntlet IceBound Insalubria Overreach Respite Sirocco - (optimization) Adjusted the LOD of the logo projectors found in CnH missions. - (optimization) Changed object shield shapes from the form-fitting forcefields into a less poly-intensive dome effect. Also gave shields a lower memory profile. - (optimization) Changed the way the clouds' planes are clipped. Sky's the limit, right? - (optimization) Missile sound script calls moved from script into code for faster processing. - (memory leak) Fixed a large memory leak. This plus the other leaks mentioned here should finally put the nail in the coffin on the "degrading server performance" issue. - (memory leak) Fixed a memory leak associated with the pretty lightning effects on maps like Casern Cavite.memory leaks: - (memory leak) Fixed a memory leak in our fancy text list control and the gui text list. - (memory leak) Fixed a memory leak involving memory use and resource allocation. - (improvement) Targeting laser prediction should be better now. - (improvement) You can specify a server's IP address manually at the join screen - (improvement) You can now specify "-password <pw>" on the command line to join a server that requires a password. - (improvement) Heavy armors are tougher against snipers. You now require four headshots or five body shots to kill a Juggernaut with a laser rifle. - (improvement) Footspeed of all armors increased slightly, as well as a minor boost to jetpack performance. Some improvements made to air resistance for mediums and heavy armors (very subtle). - (improvement) The jetpack effect was reverted back to the old effect (by popular demand). - (improvement) A Chat HUD message has been added that is displayed whenever you try to deploy a mine, but your team's maximum number of mines has already been deployed. Previously, the mine would just blow up and not explain why it detonated. Now, it still blows up, but tells you why it happened. - (improvement) Polished up the health meter on the HUD so when you're still alive, it displays a visible sliver of positive health. - (improvement) Made framerate and gameplay changes to Caldera. The attackers' base has been moved farther from the defenders, and the switch has been put in one of the upper chambers, while the stations are located separately from the generators. The changes should fix a serious defensive advantage. - (improvement) After you buy a vehicle, you now fade into the driver's seat if your armor and pack make you an eligible pilot/driver. - (improvement) Added a "rogue" mine message so that if you are killed by a mine laid by someone who has left the building, the death message is more accurate. - (improvement) Increased speed of belly turret projectiles so that it is more effective in general (especially for air defense). - (improvement) Modified name tags of vehicles when you place your reticle over them. Names are now more consistent and descriptive. - (improvement) Missile and AA turrets now have a longer maximum range (you'll still need to deploy sensors to get this added range, but they can fire farther if you do). They also react more quickly to available targets. - (community) The "compose email", "forum post", and "news submission" windows are now resizable and movable.
2017-07-18 03:20:27 +00:00
%adjustPos = false;
if( chatPageDown.isVisible() )
{
%adjustPos = true;
2017-07-18 02:51:48 +00:00
%origPosition = chatHud.position;
v23115 (05/30/01): - (bug fix) Fixed an authentication hole that allowed arbitrary IP connections to a LAN server. The policy now is: LAN servers will disallow any connections from IP addresses that do not match the Class B network address of the server (or match one of them, in a multihomed server). So if your server's address is 12.13.14.15, clients from 12.13.*.* will be considered, but clients from 12.12.*.* will be immediately rejected. In addition, a LAN server will only allow 4 unique Class C ids at any one time. This should be sufficiently lenient for even the largest LAN parties, but should eliminate the auth hole. - (bug fix) Fixed a server crash on mission change when the last human player leaves the game in mid cycle. - (bug fix) Fixed a bug that could reset your Shape Detail setting to max - (bug fix) Client join message name correction - (bug fix) All known in-game Chat HUD bugs are fixed (partial lines from paging up/down and resize issues, etc.). - (bug fix) Infinite missile lock-on sound bug is fixed. Dead. Finito. No more. Pushing up the daisies. - (bug fix) Stitched up a hole associated with one of the base shapes. Small fry compared to the memory leaks. - (bug fix) Found a particle crash issue and plugged it up good. - (bug fix) Fixed a shield impact internal compile error that was crunching frame rate. - (bug fix) Turns out we tweaked it so inventory stations were counting as turrets for turret placement purposes. D'oh. Fixed. - (bug fix) A rare crash that occurred with the Radeon VE card has been resolved. - (bug fix) Fixed a crash that could occur when a flare grenade was released when inside a force field. - (bug fix) Deployable turrets (spider and spike) and Deployable inv stations now do damage in their explosion when they are destroyed. - (optimization) The following missions were refined in order to optimize framerate: Alcatraz Caldera Flashpoint Gauntlet IceBound Insalubria Overreach Respite Sirocco - (optimization) Adjusted the LOD of the logo projectors found in CnH missions. - (optimization) Changed object shield shapes from the form-fitting forcefields into a less poly-intensive dome effect. Also gave shields a lower memory profile. - (optimization) Changed the way the clouds' planes are clipped. Sky's the limit, right? - (optimization) Missile sound script calls moved from script into code for faster processing. - (memory leak) Fixed a large memory leak. This plus the other leaks mentioned here should finally put the nail in the coffin on the "degrading server performance" issue. - (memory leak) Fixed a memory leak associated with the pretty lightning effects on maps like Casern Cavite.memory leaks: - (memory leak) Fixed a memory leak in our fancy text list control and the gui text list. - (memory leak) Fixed a memory leak involving memory use and resource allocation. - (improvement) Targeting laser prediction should be better now. - (improvement) You can specify a server's IP address manually at the join screen - (improvement) You can now specify "-password <pw>" on the command line to join a server that requires a password. - (improvement) Heavy armors are tougher against snipers. You now require four headshots or five body shots to kill a Juggernaut with a laser rifle. - (improvement) Footspeed of all armors increased slightly, as well as a minor boost to jetpack performance. Some improvements made to air resistance for mediums and heavy armors (very subtle). - (improvement) The jetpack effect was reverted back to the old effect (by popular demand). - (improvement) A Chat HUD message has been added that is displayed whenever you try to deploy a mine, but your team's maximum number of mines has already been deployed. Previously, the mine would just blow up and not explain why it detonated. Now, it still blows up, but tells you why it happened. - (improvement) Polished up the health meter on the HUD so when you're still alive, it displays a visible sliver of positive health. - (improvement) Made framerate and gameplay changes to Caldera. The attackers' base has been moved farther from the defenders, and the switch has been put in one of the upper chambers, while the stations are located separately from the generators. The changes should fix a serious defensive advantage. - (improvement) After you buy a vehicle, you now fade into the driver's seat if your armor and pack make you an eligible pilot/driver. - (improvement) Added a "rogue" mine message so that if you are killed by a mine laid by someone who has left the building, the death message is more accurate. - (improvement) Increased speed of belly turret projectiles so that it is more effective in general (especially for air defense). - (improvement) Modified name tags of vehicles when you place your reticle over them. Names are now more consistent and descriptive. - (improvement) Missile and AA turrets now have a longer maximum range (you'll still need to deploy sensors to get this added range, but they can fire farther if you do). They also react more quickly to available targets. - (community) The "compose email", "forum post", and "news submission" windows are now resizable and movable.
2017-07-18 03:20:27 +00:00
}
2017-07-18 02:51:48 +00:00
//add the message...
v22228 (04/06/01): * Fixed a problem that could have caused texture leaking in the interiors * Fixed an AI problem in Training 2 * Chinese "simplified" keyboard supported * Korean keyboard supported * A bug where infinite ammo could be gained by tossing the ammo was prevented. * Fixed a problem in Training 2 where a waypoint wouldn't update properly. * Thundersword and Havoc hold steady now when players try to jump in so they don't invert and detonate. * CD is now required in the drive for on-line play. * Scoring has been fixed so that it isn't blanked any longer if the admin changes the time limit during a game. * Active server queries will be cancelled now when you join a game (loads game faster now). * If standing in an inventory station when it is destroyed you no longer permanently lose weapons. * Fixed two issues that *could* cause crashes. * Fixed a problem where the bombardier could create a permanent targeting laser. * Cleaned up Chat text to remove programming characters. * Fixed "highlight text with my nick" option so it saves preference to file correctly. * Made MPB able to climb hills more easily and reduced damage from impact with the ground. * Added button to stop server queries in progress on "JOIN" screen. * Observers can now only chat with other observers (no one else can hear them). * Made deployable inv stations have smaller trigger so they don't "suck you in" from so far away. * Bots will now claim switches in CnH more accurately. * Added a "max distance" ring for sensors on the commander map so players can more accurately assess how well they placed the sensor in relation to how much area it is actually sensing. * Added a "ding" sound when you have filled up a text buffer so that you know why your text isn't showing up. * Fixed Chat HUD so that page up/page down works better. * Fixed a situation where Heavies could end up being permanently cloaked. * The MPBs on the "Alcatraz" map now deploy correctly (Siege map). * The "edited post" date stamp now works correctly. * If you jump into a vehicle while zoomed in, the zoom will reset correctly therafter now. * The Score Screen (F2) is now available while in a vehicle. * You can now vote to kick observers, if desired. * The ELF turret is fixed so it no longer fires at players when destroyed (an intermittent bug) * Some console spam associated with the Wildcat has been removed. * There was a situation where a player could die twice if he fell out of bounds. That has been resolved. * Screen resolution information should update properly now when restarting the application. * The camera should no longer be able to dip below terrain when in third person mode.
2017-07-18 03:05:21 +00:00
while( !chatPageDown.isVisible() && HudMessageVector.getNumLines() && (HudMessageVector.getNumLines() >= $pref::HudMessageLogSize))
2017-07-18 02:51:48 +00:00
{
%tag = HudMessageVector.getLineTag(0);
if(%tag != 0)
%tag.delete();
HudMessageVector.popFrontLine();
}
HudMessageVector.pushBackLine(%text, $LastHudTarget);
$LastHudTarget = 0;
//now that we've added the message, see if we need to reset the position
v23115 (05/30/01): - (bug fix) Fixed an authentication hole that allowed arbitrary IP connections to a LAN server. The policy now is: LAN servers will disallow any connections from IP addresses that do not match the Class B network address of the server (or match one of them, in a multihomed server). So if your server's address is 12.13.14.15, clients from 12.13.*.* will be considered, but clients from 12.12.*.* will be immediately rejected. In addition, a LAN server will only allow 4 unique Class C ids at any one time. This should be sufficiently lenient for even the largest LAN parties, but should eliminate the auth hole. - (bug fix) Fixed a server crash on mission change when the last human player leaves the game in mid cycle. - (bug fix) Fixed a bug that could reset your Shape Detail setting to max - (bug fix) Client join message name correction - (bug fix) All known in-game Chat HUD bugs are fixed (partial lines from paging up/down and resize issues, etc.). - (bug fix) Infinite missile lock-on sound bug is fixed. Dead. Finito. No more. Pushing up the daisies. - (bug fix) Stitched up a hole associated with one of the base shapes. Small fry compared to the memory leaks. - (bug fix) Found a particle crash issue and plugged it up good. - (bug fix) Fixed a shield impact internal compile error that was crunching frame rate. - (bug fix) Turns out we tweaked it so inventory stations were counting as turrets for turret placement purposes. D'oh. Fixed. - (bug fix) A rare crash that occurred with the Radeon VE card has been resolved. - (bug fix) Fixed a crash that could occur when a flare grenade was released when inside a force field. - (bug fix) Deployable turrets (spider and spike) and Deployable inv stations now do damage in their explosion when they are destroyed. - (optimization) The following missions were refined in order to optimize framerate: Alcatraz Caldera Flashpoint Gauntlet IceBound Insalubria Overreach Respite Sirocco - (optimization) Adjusted the LOD of the logo projectors found in CnH missions. - (optimization) Changed object shield shapes from the form-fitting forcefields into a less poly-intensive dome effect. Also gave shields a lower memory profile. - (optimization) Changed the way the clouds' planes are clipped. Sky's the limit, right? - (optimization) Missile sound script calls moved from script into code for faster processing. - (memory leak) Fixed a large memory leak. This plus the other leaks mentioned here should finally put the nail in the coffin on the "degrading server performance" issue. - (memory leak) Fixed a memory leak associated with the pretty lightning effects on maps like Casern Cavite.memory leaks: - (memory leak) Fixed a memory leak in our fancy text list control and the gui text list. - (memory leak) Fixed a memory leak involving memory use and resource allocation. - (improvement) Targeting laser prediction should be better now. - (improvement) You can specify a server's IP address manually at the join screen - (improvement) You can now specify "-password <pw>" on the command line to join a server that requires a password. - (improvement) Heavy armors are tougher against snipers. You now require four headshots or five body shots to kill a Juggernaut with a laser rifle. - (improvement) Footspeed of all armors increased slightly, as well as a minor boost to jetpack performance. Some improvements made to air resistance for mediums and heavy armors (very subtle). - (improvement) The jetpack effect was reverted back to the old effect (by popular demand). - (improvement) A Chat HUD message has been added that is displayed whenever you try to deploy a mine, but your team's maximum number of mines has already been deployed. Previously, the mine would just blow up and not explain why it detonated. Now, it still blows up, but tells you why it happened. - (improvement) Polished up the health meter on the HUD so when you're still alive, it displays a visible sliver of positive health. - (improvement) Made framerate and gameplay changes to Caldera. The attackers' base has been moved farther from the defenders, and the switch has been put in one of the upper chambers, while the stations are located separately from the generators. The changes should fix a serious defensive advantage. - (improvement) After you buy a vehicle, you now fade into the driver's seat if your armor and pack make you an eligible pilot/driver. - (improvement) Added a "rogue" mine message so that if you are killed by a mine laid by someone who has left the building, the death message is more accurate. - (improvement) Increased speed of belly turret projectiles so that it is more effective in general (especially for air defense). - (improvement) Modified name tags of vehicles when you place your reticle over them. Names are now more consistent and descriptive. - (improvement) Missile and AA turrets now have a longer maximum range (you'll still need to deploy sensors to get this added range, but they can fire farther if you do). They also react more quickly to available targets. - (community) The "compose email", "forum post", and "news submission" windows are now resizable and movable.
2017-07-18 03:20:27 +00:00
if ( %adjustPos )
2017-07-18 02:51:48 +00:00
{
chatPageDown.setVisible(true);
v22228 (04/06/01): * Fixed a problem that could have caused texture leaking in the interiors * Fixed an AI problem in Training 2 * Chinese "simplified" keyboard supported * Korean keyboard supported * A bug where infinite ammo could be gained by tossing the ammo was prevented. * Fixed a problem in Training 2 where a waypoint wouldn't update properly. * Thundersword and Havoc hold steady now when players try to jump in so they don't invert and detonate. * CD is now required in the drive for on-line play. * Scoring has been fixed so that it isn't blanked any longer if the admin changes the time limit during a game. * Active server queries will be cancelled now when you join a game (loads game faster now). * If standing in an inventory station when it is destroyed you no longer permanently lose weapons. * Fixed two issues that *could* cause crashes. * Fixed a problem where the bombardier could create a permanent targeting laser. * Cleaned up Chat text to remove programming characters. * Fixed "highlight text with my nick" option so it saves preference to file correctly. * Made MPB able to climb hills more easily and reduced damage from impact with the ground. * Added button to stop server queries in progress on "JOIN" screen. * Observers can now only chat with other observers (no one else can hear them). * Made deployable inv stations have smaller trigger so they don't "suck you in" from so far away. * Bots will now claim switches in CnH more accurately. * Added a "max distance" ring for sensors on the commander map so players can more accurately assess how well they placed the sensor in relation to how much area it is actually sensing. * Added a "ding" sound when you have filled up a text buffer so that you know why your text isn't showing up. * Fixed Chat HUD so that page up/page down works better. * Fixed a situation where Heavies could end up being permanently cloaked. * The MPBs on the "Alcatraz" map now deploy correctly (Siege map). * The "edited post" date stamp now works correctly. * If you jump into a vehicle while zoomed in, the zoom will reset correctly therafter now. * The Score Screen (F2) is now available while in a vehicle. * You can now vote to kick observers, if desired. * The ELF turret is fixed so it no longer fires at players when destroyed (an intermittent bug) * Some console spam associated with the Wildcat has been removed. * There was a situation where a player could die twice if he fell out of bounds. That has been resolved. * Screen resolution information should update properly now when restarting the application. * The camera should no longer be able to dip below terrain when in third person mode.
2017-07-18 03:05:21 +00:00
ChatPageDown.position = ( firstWord( outerChatHud.extent ) - 20 ) @ " " @ ( $chatScrollLenY[$Pref::chatHudLength] - 6 );
2017-07-18 02:51:48 +00:00
chatHud.position = %origPosition;
}
else
chatPageDown.setVisible(false);
}
function pageUpMessageHud()
{
//find out the text line height
%textHeight = chatHud.profile.fontSize;
if (%textHeight <= 0)
%textHeight = 12;
//find out how many lines per page are visible
%chatScrollHeight = getWord(chatHud.getGroup().getGroup().extent, 1);
if (%chatScrollHeight <= 0)
return;
%pageLines = mFloor(%chatScrollHeight / %textHeight) - 1;
if (%pageLines <= 0)
%pageLines = 1;
//see how many lines we actually can scroll up:
%chatPosition = -1 * getWord(chatHud.position, 1);
%linesToScroll = mFloor((%chatPosition / %textHeight) + 0.5);
if (%linesToScroll <= 0)
return;
if (%linesToScroll > %pageLines)
%scrollLines = %pageLines;
else
%scrollLines = %linesToScroll;
//now set the position
chatHud.position = firstWord(chatHud.position) SPC (getWord(chatHud.position, 1) + (%scrollLines * %textHeight));
//display the pageup icon
ChatPageDown.position = ( firstWord( outerChatHud.extent ) - 20 ) @ " " @ ( $chatScrollLenY[$pref::chatHudLength] - 6 );
chatPageDown.setVisible(true);
}
function pageDownMessageHud()
{
//find out the text line height
%textHeight = chatHud.profile.fontSize;
if (%textHeight <= 0)
%textHeight = 12;
//find out how many lines per page are visible
%chatScrollHeight = getWord(chatHud.getGroup().getGroup().extent, 1);
if (%chatScrollHeight <= 0)
return;
%pageLines = mFloor(%chatScrollHeight / %textHeight) - 1;
if (%pageLines <= 0)
%pageLines = 1;
//see how many lines we actually can scroll down:
%chatPosition = getWord(chatHud.extent, 1) - %chatScrollHeight + getWord(chatHud.position, 1);
%linesToScroll = mFloor((%chatPosition / %textHeight) + 0.5);
if (%linesToScroll <= 0)
return;
if (%linesToScroll > %pageLines)
%scrollLines = %pageLines;
else
%scrollLines = %linesToScroll;
//now set the position
chatHud.position = firstWord(chatHud.position) SPC (getWord(chatHud.position, 1) - (%scrollLines * %textHeight));
//see if we have should (still) display the pagedown icon
if (%scrollLines < %linesToScroll)
{
chatPageDown.setVisible(true);
ChatPageDown.position = ( firstWord( outerChatHud.extent ) - 20 ) @ " " @ ( $chatScrollLenY[$Pref::chatHudLength] - 6 );
}
else
chatPageDown.setVisible(false);
}
$cursorControlled = true;
function CursorOff()
{
if ( $cursorControlled )
lockMouse(true);
Canvas.cursorOff();
}
function CursorOn()
{
if ( $cursorControlled )
lockMouse(false);
Canvas.cursorOn();
Canvas.setCursor(DefaultCursor);
}
function toggleCursorControl()
{
// If the user manually toggles the mouse control, lock or unlock for them
if ( $cursorControlled )
$cursorControlled = false;
else
$cursorControlled = true;
lockMouse($cursorControlled);
}
if ( $platform $= "linux" )
GlobalActionMap.bindCmd(keyboard, "ctrl g", "", "toggleCursorControl();");
function PlayGui::onWake(%this)
{
// Make sure the shell hum is off:
if ( $HudHandle['shellScreen'] !$= "" )
{
alxStop( $HudHandle['shellScreen'] );
$HudHandle['shellScreen'] = "";
}
$enableDirectInput = "1";
2017-07-18 02:55:25 +00:00
activateDirectInput();
2017-07-18 02:51:48 +00:00
// chat hud dialog
Canvas.pushDialog( MainChatHud );
chatHud.attach(HudMessageVector);
// just update the action map here, the huds should be properly setup
updateActionMaps();
// hack city - these controls are floating around and need to be clamped
schedule(0, 0, "refreshCenterTextCtrl");
schedule(0, 0, "refreshBottomTextCtrl");
}
function refreshBottomTextCtrl()
{
BottomPrintText.position = "0 0";
}
function refreshCenterTextCtrl()
{
CenterPrintText.position = "0 0";
}
function PlayGui::onSleep(%this)
{
Canvas.popDialog( MainChatHud );
//pop all possible keymaps
moveMap.pop();
if ( isObject( passengerKeys ) )
passengerKeys.pop();
2017-07-18 02:55:25 +00:00
if ( isObject( observerBlockMap ) )
observerBlockMap.pop();
if ( isObject( observerMap ) )
observerMap.pop();
//flyingCameraMove.pop();
2017-07-18 02:51:48 +00:00
}
function onConnectRequestRejected( %msg )
{
switch$(%msg)
{
case "CR_INVALID_CONNECT_PACKET":
%error = "Network error - badly formed network packet - this should not happen!";
case "CR_AUTHENTICATION_FAILED":
%error = "Failed to authenticate with server. Please restart TRIBES 2 and try again.";
case "CR_YOUAREBANNED":
%error = "You are not allowed to play on this server.";
case "CR_SERVERFULL":
%error = "This server is full.";
default:
%error = "Connection error. Please try another server. Error code: (" @ %msg @ ")";
}
DisconnectedCleanup();
MessageBoxOK( "REJECTED", %error);
}
function onChallengeRequestRejected( %msg )
{
CloseMessagePopup();
DisconnectedCleanup();
switch$(%msg)
{
case "PASSWORD":
if ( $JoinGamePassword $= "" )
Canvas.pushDialog( PasswordDlg );
else
{
$JoinGamePassword = "";
MessageBoxOK( "REJECTED", "That password is incorrect.");
}
return;
case "CHR_PROTOCOL":
%error = "Incompatible protocol version: You must upgrade your game version to play on this server.";
case "CHR_NOT_AUTHENTICATED":
%error = "This is an online server - you must be logged in to play on it.";
case "CHR_INVALID_SERVER_PACKET":
%error = "Invalid server response packet. This should not happen.";
case "WS_PeerAuthServer_ExpiredClientCertificate":
%error = "Authentication error - please restart TRIBES 2 and try again.";
default:
%error = "Connection challenge error. Please try another server. Error code: (" @ %msg @ ")";
}
MessageBoxOK( "REJECTED", %error );
}
function onConnectRequestTimedOut()
{
DisconnectedCleanup();
MessageBoxOK( "TIMED OUT", "Your connection to the server timed out." );
}
function onConnectionToServerTimedOut()
{
DisconnectedCleanup();
MessageBoxOK( "TIMED OUT", "Your connection to the server timed out.");
}
function onConnectionToServerLost( %msg )
{
DisconnectedCleanup();
MessageBoxOK( "DISCONNECT", "Your connection to the server was lost." NL %msg);
}
// Client voting functions:
v22649 (04/28/01): - Fixed buddy filter. You can now use the Filter option on the JOIN screen to find games that have players in them that are listed on your buddy list. (Use the Email or Warrior Browser functions to add/remove people from your buddy list.) - You can now add a player to your server admin lists (so that server admins can auto-admin players when they join a server, if desired). How this is done: If you are a SuperAdmin (owner of the server), you can go into the lobby and right-click on a player's name. You will then have the ability to add them to your Admin or SuperAdmin lists. - "Vote Spamming" has been prevented in-game. - Added "quickbuy" keyboard shortcuts to use at vehicle station. (Default keys are the 1-6 number keys. 1 is Wildcat, 6 is Havoc). (NOTE: These key bindings are not currently editable. However, since you are on the vehicle purchase pad when they are in effect, they cannot interfere with any custom keys you've created, so you should have no problems.) - Moved some of the CD check from script into code, where it should be. - Missile reticle is improved aesthetically. This is part 1 of 2 of the missile reticle changes. The second part will be in the next patch. - Team Damage ON/OFF can be changed by Admins/SuperAdmins as well as being voted on by players. If you are an Admin or SuperAdmin, then just go to Lobby and look up where the "Vote" options are listed. There are options there to toggle the Team Damage flag. Regular players can also Vote to Enable/Disable Team Damage in the same spot. - Default server prefs have been changed so that the default time limit is now 30 minutes (instead of 20) and Team Damage is OFF. - The "sticking" mouse button problem is now fixed. - Deployables are now easier to place on walls and other surfaces. There were some inconsistencies on which surfaces could be placed upon and those are now resolved. - (gameplay change) Flag captures are now worth 100 points, instead of 1 point. Additionally, each time someone grabs the flag *from the enemy flag stand* they will gain 1 point, regardless of whether they actually capture it or not. You will ONLY get this single point if the flag was actually on the flagstand. You will NOT get the point by touching the flag anywhere else on the field. This change will help prevent tie situations and will reward aggressive offensive play. NOTE: The "touch" point can only be gained once every 20 seconds...so a "scrum" around the flag base will not result in a large group of points being gained. - (gameplay change) Deployable inventory stations can no longer be deployed directly next to each other. They must be at least 20 meters apart in order to be deployed properly. - (gameplay change) Many team damage fixes occurred. When Team Damage is OFF the following are now true: Friendly teammates are no longer prevented from destroying deployables. The ELF will no longer drain energy from friendly players. If a friendly player blinds another friendly player with Whiteout grenades, then a message is displayed in the Chat HUD so that the blinded person knows who did it. (There are more Team Damage changes coming in the next patch.) - (gameplay change) Medium now has a standard loadout of 12 grenades in the grenade launcher instead of 10. Light: 10; Medium: 12; Heavy: 15. - (gameplay change) Deployable pulse sensors now have a range of 150m instead of 120m to make them a more attractive option to deploy. - (gameplay change) Ejection speed increased slightly to more easily accomodate jumping out of moving vehicles. - (gameplay change) Siege: Alcatraz. The generators have been moved around a bit. There are two entrances to that base. One is the "front door" and the other is the "back door". (The back door is the one that has a team-pass-only force field blocking enemies from the switch room.) There is now an upper generator down the chute from the "front door" that powers the "back door" force field. Additionally, there is a solar panel outside that powers the base turrets and sentry turrets. None of these generators have to be destroyed to get to the switch, but their destruction makes it MUCH easier to do so. There are four generators total on this map (all are waypointed now), and the destruction of all four is necessary before the base power will go down. - (gameplay change) Siege: Caldera. The generator has been moved out of the switch room and into the very big main room that has the inventory stations in it. It is no longer necessary to destroy the generators in a particular sequence. Destroying the two main generators (Primary and Secondary) will drop the force field that protects the switch. Both gens must be down in order for the switch force field to drop.
2017-07-18 03:12:56 +00:00
function startNewVote(%name, %arg1, %arg2, %arg3, %arg4, %playerVote)
2017-07-18 02:51:48 +00:00
{
if ( %arg1 $= "" )
%arg1 = 0;
if ( %arg2 $= "" )
%arg2 = 0;
if ( %arg3 $= "" )
%arg3 = 0;
if ( %arg4 $= "" )
%arg4 = 0;
if ( %playerVote $= "" )
%playerVote = 0;
v22649 (04/28/01): - Fixed buddy filter. You can now use the Filter option on the JOIN screen to find games that have players in them that are listed on your buddy list. (Use the Email or Warrior Browser functions to add/remove people from your buddy list.) - You can now add a player to your server admin lists (so that server admins can auto-admin players when they join a server, if desired). How this is done: If you are a SuperAdmin (owner of the server), you can go into the lobby and right-click on a player's name. You will then have the ability to add them to your Admin or SuperAdmin lists. - "Vote Spamming" has been prevented in-game. - Added "quickbuy" keyboard shortcuts to use at vehicle station. (Default keys are the 1-6 number keys. 1 is Wildcat, 6 is Havoc). (NOTE: These key bindings are not currently editable. However, since you are on the vehicle purchase pad when they are in effect, they cannot interfere with any custom keys you've created, so you should have no problems.) - Moved some of the CD check from script into code, where it should be. - Missile reticle is improved aesthetically. This is part 1 of 2 of the missile reticle changes. The second part will be in the next patch. - Team Damage ON/OFF can be changed by Admins/SuperAdmins as well as being voted on by players. If you are an Admin or SuperAdmin, then just go to Lobby and look up where the "Vote" options are listed. There are options there to toggle the Team Damage flag. Regular players can also Vote to Enable/Disable Team Damage in the same spot. - Default server prefs have been changed so that the default time limit is now 30 minutes (instead of 20) and Team Damage is OFF. - The "sticking" mouse button problem is now fixed. - Deployables are now easier to place on walls and other surfaces. There were some inconsistencies on which surfaces could be placed upon and those are now resolved. - (gameplay change) Flag captures are now worth 100 points, instead of 1 point. Additionally, each time someone grabs the flag *from the enemy flag stand* they will gain 1 point, regardless of whether they actually capture it or not. You will ONLY get this single point if the flag was actually on the flagstand. You will NOT get the point by touching the flag anywhere else on the field. This change will help prevent tie situations and will reward aggressive offensive play. NOTE: The "touch" point can only be gained once every 20 seconds...so a "scrum" around the flag base will not result in a large group of points being gained. - (gameplay change) Deployable inventory stations can no longer be deployed directly next to each other. They must be at least 20 meters apart in order to be deployed properly. - (gameplay change) Many team damage fixes occurred. When Team Damage is OFF the following are now true: Friendly teammates are no longer prevented from destroying deployables. The ELF will no longer drain energy from friendly players. If a friendly player blinds another friendly player with Whiteout grenades, then a message is displayed in the Chat HUD so that the blinded person knows who did it. (There are more Team Damage changes coming in the next patch.) - (gameplay change) Medium now has a standard loadout of 12 grenades in the grenade launcher instead of 10. Light: 10; Medium: 12; Heavy: 15. - (gameplay change) Deployable pulse sensors now have a range of 150m instead of 120m to make them a more attractive option to deploy. - (gameplay change) Ejection speed increased slightly to more easily accomodate jumping out of moving vehicles. - (gameplay change) Siege: Alcatraz. The generators have been moved around a bit. There are two entrances to that base. One is the "front door" and the other is the "back door". (The back door is the one that has a team-pass-only force field blocking enemies from the switch room.) There is now an upper generator down the chute from the "front door" that powers the "back door" force field. Additionally, there is a solar panel outside that powers the base turrets and sentry turrets. None of these generators have to be destroyed to get to the switch, but their destruction makes it MUCH easier to do so. There are four generators total on this map (all are waypointed now), and the destruction of all four is necessary before the base power will go down. - (gameplay change) Siege: Caldera. The generator has been moved out of the switch room and into the very big main room that has the inventory stations in it. It is no longer necessary to destroy the generators in a particular sequence. Destroying the two main generators (Primary and Secondary) will drop the force field that protects the switch. Both gens must be down in order for the switch force field to drop.
2017-07-18 03:12:56 +00:00
commandToServer('startNewVote', %name, %arg1, %arg2, %arg3, %arg4, %playerVote);
2017-07-18 02:51:48 +00:00
}
function setPlayerVote(%vote)
{
commandToServer('setPlayerVote', %vote);
}
function ClientCmdVoteSubmitted(%type)
{
clientCmdClearBottomPrint();
if(%type)
alxPlay(VoteAgainstSound, 0, 0, 0);
else
alxPlay(VoteForSound, 0, 0, 0);
}
// End client voting functions.
function clientCmdEndBomberSight()
{
PlayGui.remove($bombSightHud);
}
function clientCmdSetBeaconNames(%target, %marker, %vehicle)
{
setBeaconNames(%target, %marker, %vehicle);
}
function clientCmdStartBomberSight()
{
$bombSightHud = new HudBombSight(bombSightName) {
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "286 206";
extent = "67 67";
minExtent = "8 8";
visible = "1";
setFirstResponder = "0";
modal = "1";
helpTag = "0";
minDisplayHeight = "20";
};
PlayGui.add($bombSightHud);
}
function tempShowSpeed(%client)
{
if(!$tmpSpeedShow)
$tmpSpeedShow = true;
else
$tmpSpeedShow = false;
commandToClient(%client, 'toggleSpeed', %client, $tmpSpeedShow);
}
function clientCmdToggleSpeed(%client, %toggle)
{
if(%toggle) {
%tempSpeedHud = new GuiTextCtrl(tmpSpeed) {
profile = "GuiTempSpeedProfile";
horizSizing = "center";
vertSizing = "top";
position = "175 200";
extent = "120 50";
minExtent = "8 8";
visible = "1";
setFirstResponder = "0";
modal = "1";
};
PlayGui.add(%tempSpeedHud);
%client.updateTempSpeed(%client);
}
else {
cancel(%client.tmpSpeedCheck);
tmpSpeed.delete();
}
}
function GameConnection::updateTempSpeed(%client)
{
commandToClient(%client, 'getTempSpeed');
%client.tmpSpeedCheck = %client.schedule(100, "updateTempSpeed", %client);
}
function clientCmdGetTempSpeed()
{
%vel = getControlObjectSpeed();
tmpSpeed.setValue(%vel);
}
function clientCmdInitLoadClientFavorites()
{
loadFavorite($pref::FavCurrentSelect);
}
function clientCmdToggleDashHud(%val)
{
if(!%val) {
if(isObject(vDiagramHud))
{
vDiagramHud.delete();
cancel(dashboardHud.speedCheck);
vSpeedBox.delete();
}
if(isObject(vOverheadHud))
vOverheadHud.delete();
if(isObject(vEnergyFrame))
vEnergyFrame.delete();
if(isObject(vDamageFrame))
vDamageFrame.delete();
if(isObject(vAltitudeBox))
{
cancel(dashboardHud.altitudeCheck);
vAltitudeBox.delete();
}
if(isObject(vWeaponOne))
vWeaponOne.delete();
if(isObject(vWeaponTwo))
vWeaponTwo.delete();
if(isObject(vWeaponThree))
vWeaponThree.delete();
if(isObject(vWeapHiliteOne))
vWeapHiliteOne.delete();
if(isObject(vWeapHiliteTwo))
vWeapHiliteTwo.delete();
if(isObject(vWeapHiliteThree))
vWeapHiliteThree.delete();
if(isObject(vPassengerHud))
vPassengerHud.delete();
if(isObject(bombardierHud))
bombardierHud.delete();
if(isObject(turreteerHud))
turreteerHud.delete();
// reset in case of vehicle-specific reticle
v23115 (05/30/01): - (bug fix) Fixed an authentication hole that allowed arbitrary IP connections to a LAN server. The policy now is: LAN servers will disallow any connections from IP addresses that do not match the Class B network address of the server (or match one of them, in a multihomed server). So if your server's address is 12.13.14.15, clients from 12.13.*.* will be considered, but clients from 12.12.*.* will be immediately rejected. In addition, a LAN server will only allow 4 unique Class C ids at any one time. This should be sufficiently lenient for even the largest LAN parties, but should eliminate the auth hole. - (bug fix) Fixed a server crash on mission change when the last human player leaves the game in mid cycle. - (bug fix) Fixed a bug that could reset your Shape Detail setting to max - (bug fix) Client join message name correction - (bug fix) All known in-game Chat HUD bugs are fixed (partial lines from paging up/down and resize issues, etc.). - (bug fix) Infinite missile lock-on sound bug is fixed. Dead. Finito. No more. Pushing up the daisies. - (bug fix) Stitched up a hole associated with one of the base shapes. Small fry compared to the memory leaks. - (bug fix) Found a particle crash issue and plugged it up good. - (bug fix) Fixed a shield impact internal compile error that was crunching frame rate. - (bug fix) Turns out we tweaked it so inventory stations were counting as turrets for turret placement purposes. D'oh. Fixed. - (bug fix) A rare crash that occurred with the Radeon VE card has been resolved. - (bug fix) Fixed a crash that could occur when a flare grenade was released when inside a force field. - (bug fix) Deployable turrets (spider and spike) and Deployable inv stations now do damage in their explosion when they are destroyed. - (optimization) The following missions were refined in order to optimize framerate: Alcatraz Caldera Flashpoint Gauntlet IceBound Insalubria Overreach Respite Sirocco - (optimization) Adjusted the LOD of the logo projectors found in CnH missions. - (optimization) Changed object shield shapes from the form-fitting forcefields into a less poly-intensive dome effect. Also gave shields a lower memory profile. - (optimization) Changed the way the clouds' planes are clipped. Sky's the limit, right? - (optimization) Missile sound script calls moved from script into code for faster processing. - (memory leak) Fixed a large memory leak. This plus the other leaks mentioned here should finally put the nail in the coffin on the "degrading server performance" issue. - (memory leak) Fixed a memory leak associated with the pretty lightning effects on maps like Casern Cavite.memory leaks: - (memory leak) Fixed a memory leak in our fancy text list control and the gui text list. - (memory leak) Fixed a memory leak involving memory use and resource allocation. - (improvement) Targeting laser prediction should be better now. - (improvement) You can specify a server's IP address manually at the join screen - (improvement) You can now specify "-password <pw>" on the command line to join a server that requires a password. - (improvement) Heavy armors are tougher against snipers. You now require four headshots or five body shots to kill a Juggernaut with a laser rifle. - (improvement) Footspeed of all armors increased slightly, as well as a minor boost to jetpack performance. Some improvements made to air resistance for mediums and heavy armors (very subtle). - (improvement) The jetpack effect was reverted back to the old effect (by popular demand). - (improvement) A Chat HUD message has been added that is displayed whenever you try to deploy a mine, but your team's maximum number of mines has already been deployed. Previously, the mine would just blow up and not explain why it detonated. Now, it still blows up, but tells you why it happened. - (improvement) Polished up the health meter on the HUD so when you're still alive, it displays a visible sliver of positive health. - (improvement) Made framerate and gameplay changes to Caldera. The attackers' base has been moved farther from the defenders, and the switch has been put in one of the upper chambers, while the stations are located separately from the generators. The changes should fix a serious defensive advantage. - (improvement) After you buy a vehicle, you now fade into the driver's seat if your armor and pack make you an eligible pilot/driver. - (improvement) Added a "rogue" mine message so that if you are killed by a mine laid by someone who has left the building, the death message is more accurate. - (improvement) Increased speed of belly turret projectiles so that it is more effective in general (especially for air defense). - (improvement) Modified name tags of vehicles when you place your reticle over them. Names are now more consistent and descriptive. - (improvement) Missile and AA turrets now have a longer maximum range (you'll still need to deploy sensors to get this added range, but they can fire farther if you do). They also react more quickly to available targets. - (community) The "compose email", "forum post", and "news submission" windows are now resizable and movable.
2017-07-18 03:20:27 +00:00
//reticleHud.setBitmap("");
//reticleFrameHud.setVisible(false);
2017-07-18 02:51:48 +00:00
}
dashboardHud.setVisible(%val);
}
function clientCmdShowVehicleGauges(%vehType, %node)
{
//if(!((%vehType $= "Bomber" || %vehType $= "Assault") && %node > 0))
if(%node == 0)
{
// common elements that show up on all vehicle pilot HUDs
dashboardHud.diagram = new HudBitmapCtrl(vDiagramHud) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "top";
position = "200 10";
extent = "176 108";
minExtent = "8 8";
visible = "1";
bitmap = "gui/hud_veh_new_dash.png";
opacity = "0.8";
};
dashboardHud.add(dashboardHud.diagram);
dashboardHud.vehDiagram = new HudBitmapCtrl(vOverheadHud) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "top";
position = "256 0";
extent = "128 128";
minExtent = "8 8";
visible = "1";
bitmap = "";
opacity = "1.0";
};
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);
dashboardHud.dmgBar = new HudBitmapCtrl(vDamageFrame) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "top";
position = "361 80";
extent = "118 19";
minExtent = "8 8";
visible = "1";
bitmap = "gui/hud_veh_new_dashpiece_4.png";
opacity = "0.8";
new HudDamage(vDamageBar) {
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "top";
position = "0 0";
extent = "118 19";
minExtent = "8 8";
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";
verticalFill = false;
displayMounted = true;
opacity = "0.8";
subRegion = "18 5 97 10";
pulseRate = "500";
pulseThreshold = "0.3";
//modColor = "1.000000 0.500000 0.000000 1.000000";
};
};
dashboardHud.add(dashboardHud.dmgBar);
dashboardHud.speedBox = new GuiControl(vSpeedBox) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "top";
position = "210 47";
extent = "40 40";
minExtent = "8 8";
visible = "1";
new GuiTextCtrl(vSpeedText) {
profile = "GuiDashTextProfile";
horizSizing = "right";
vertSizing = "top";
position = "3 15";
extent = "18 15";
minExtent = "8 8";
visible = "1";
text = "test";
};
new GuiTextCtrl(vSpeedTxtLbl) {
profile = "GuiDashTextProfile";
horizSizing = "right";
vertSizing = "top";
position = "18 15";
extent = "27 15";
minExtent = "8 8";
visible = "1";
text = "KPH";
};
};
dashboardHud.add(dashboardHud.speedBox);
dashboardHud.updateSpeed();
}
switch$ (%vehType) {
case "Shrike" :
vOverheadHud.setBitmap("gui/hud_veh_icon_shrike.png");
// add altitude box for flying vehicles
dashboardHud.altBox = new HudBitmapCtrl(vAltitudeBox) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "top";
position = "371 56";
extent = "68 22";
minExtent = "8 8";
bitmap = "gui/hud_veh_new_dashpiece_1.png";
visible = "1";
opacity = "0.8";
new GuiTextCtrl(vAltitudeText) {
profile = "GuiDashTextProfile";
horizSizing = "right";
vertSizing = "top";
position = "19 5";
extent = "18 15";
minExtent = "8 8";
visible = "1";
text = "test";
};
new GuiTextCtrl(vAltitudeTxtLbl) {
profile = "GuiDashTextProfile";
horizSizing = "right";
vertSizing = "top";
position = "40 5";
extent = "12 15";
minExtent = "8 8";
visible = "1";
text = "M";
};
};
dashboardHud.add(dashboardHud.altBox);
dashboardHud.updateAltitude();
// add right-hand weapons box and highlight
dashboardHud.weapon = new GuiControl(vWeapHiliteOne) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "top";
position = "358 22";
extent = "80 33";
minExtent = "8 8";
visible = "1";
new HudBitmapCtrl(vWeapBkgdOne) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "top";
position = "0 0";
extent = "82 40";
minExtent = "8 8";
bitmap = "gui/hud_veh_new_dashpiece_2.png";
visible = "1";
opacity = "0.8";
new HudBitmapCtrl(vWeapIconOne) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "top";
position = "28 6";
extent = "25 25";
minExtent = "8 8";
bitmap = "gui/hud_blaster.png";
visible = "1";
opacity = "0.8";
};
};
};
dashboardHud.add(dashboardHud.weapon);
// change to shrike reticle
reticleHud.setBitmap("gui/hud_ret_shrike.png");
reticleFrameHud.setVisible(false);
case "Bomber" :
if(%node == 1)
{
// bombardier hud
dashboardHud.bHud = new GuiControl(bombardierHud) {
profile = "GuiDefaultProfile";
horizSizing = "center";
vertSizing = "top";
position = "200 75";
extent = "240 50";
minExtent = "8 8";
visible = "1";
new HudBitmapCtrl(vWeap1Hilite) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "18 9";
extent = "80 44";
minExtent = "8 8";
visible = "1";
bitmap = "gui/hud_veh_new_hilite_left.png";
opacity = "0.3";
};
new HudBitmapCtrl(vWeap2Hilite) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "141 9";
extent = "80 44";
minExtent = "8 8";
visible = "0";
bitmap = "gui/hud_veh_new_hilite_right.png";
opacity = "0.3";
};
new HudBitmapCtrl(vWeap3Hilite) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "99 9";
extent = "40 44";
minExtent = "8 8";
visible = "0";
bitmap = "gui/hud_veh_new_hilite_middle.png";
opacity = "0.3";
};
new HudBitmapCtrl(bombardierFrame) {
profile = "GuiDashBoxProfile";
horizSizing = "center";
vertSizing = "bottom";
position = "20 8";
extent = "200 40";
minExtent = "8 8";
visible = "1";
bitmap = "gui/hud_veh_new_bombardier_dash.png";
opacity = "1.0";
new HudBitmapCtrl(vWeaponOne) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "28 5";
extent = "25 25";
minExtent = "8 8";
visible = "1";
bitmap = "gui/hud_blaster.png";
};
new HudBitmapCtrl(vWeaponTwo) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "87 6";
extent = "25 25";
minExtent = "8 8";
visible = "1";
bitmap = "gui/hud_targetlaser.png";
};
new HudBitmapCtrl(vWeaponThree) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "147 6";
extent = "25 25";
minExtent = "8 8";
visible = "1";
bitmap = "gui/hud_veh_bomb.png";
};
};
};
dashboardHud.add(dashboardHud.bHud);
dashboardHud.nrgBar = new HudBitmapCtrl(vEnergyFrame) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "top";
position = "110 95";
extent = "118 19";
minExtent = "8 8";
visible = "1";
flipVertical = true;
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);
dashboardHud.dmgBar = new HudBitmapCtrl(vDamageFrame) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "top";
position = "410 95";
extent = "118 19";
minExtent = "8 8";
visible = "1";
flipVertical = true;
bitmap = "gui/hud_veh_new_dashpiece_4.png";
opacity = "0.8";
new HudDamage(vDamageBar) {
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "top";
position = "0 0";
extent = "118 19";
minExtent = "8 8";
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";
verticalFill = false;
displayMounted = true;
opacity = "0.8";
subRegion = "18 5 97 10";
pulseRate = "500";
pulseThreshold = "0.3";
//modColor = "1.000000 0.500000 0.000000 1.000000";
};
};
dashboardHud.add(dashboardHud.dmgBar);
$numVWeapons = 3;
reticleHud.setBitmap("gui/hud_ret_shrike.png");
reticleFrameHud.setVisible(false);
}
else if(%node == 0)
{
// pilot dashboard hud
vOverheadHud.setBitmap("gui/hud_veh_icon_bomber.png");
// add altitude box for flying vehicles
dashboardHud.altBox = new HudBitmapCtrl(vAltitudeBox) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "top";
position = "371 56";
extent = "68 22";
minExtent = "8 8";
bitmap = "gui/hud_veh_new_dashpiece_1.png";
visible = "1";
opacity = "0.8";
new GuiTextCtrl(vAltitudeText) {
profile = "GuiDashTextProfile";
horizSizing = "right";
vertSizing = "top";
position = "19 5";
extent = "18 15";
minExtent = "8 8";
visible = "1";
text = "test";
};
new GuiTextCtrl(vAltitudeTxtLbl) {
profile = "GuiDashTextProfile";
horizSizing = "right";
vertSizing = "top";
position = "40 5";
extent = "12 15";
minExtent = "8 8";
visible = "1";
text = "M";
};
};
dashboardHud.add(dashboardHud.altBox);
dashboardHud.updateAltitude();
}
else
{
// tailgunner hud
dashboardHud.vehDiagram = new HudBitmapCtrl(vOverheadHud) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "top";
position = "256 0";
extent = "128 128";
minExtent = "8 8";
visible = "1";
bitmap = "gui/hud_veh_icon_bomber.png";
opacity = "1.0";
};
dashboardHud.add(dashboardHud.vehDiagram);
dashboardHud.nrgBar = new HudBitmapCtrl(vEnergyFrame) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "top";
position = "177 50";
extent = "118 19";
minExtent = "8 8";
visible = "1";
bitmap = "gui/hud_veh_new_dashpiece_5.png";
flipVertical = true;
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";
};
};
dashboardHud.add(dashboardHud.nrgBar);
dashboardHud.dmgBar = new HudBitmapCtrl(vDamageFrame) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "top";
position = "345 50";
extent = "118 19";
minExtent = "8 8";
visible = "1";
bitmap = "gui/hud_veh_new_dashpiece_4.png";
flipVertical = true;
opacity = "0.8";
new HudDamage(vDamageBar) {
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "top";
position = "0 0";
extent = "118 19";
minExtent = "8 8";
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";
verticalFill = false;
displayMounted = true;
opacity = "0.8";
subRegion = "18 5 97 10";
pulseRate = "500";
pulseThreshold = "0.3";
};
};
dashboardHud.add(dashboardHud.dmgBar);
}
if(%node != 1)
{
// passenger slot "dots"
vOverheadHud.passengerHud = new GuiControl(vPassengerHud) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "top";
position = "0 0";
extent = "101 101";
minExtent = "8 8";
visible = "1";
new GuiBitmapCtrl(vPassenger0Slot) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "top";
position = "59 24";
extent = "10 10";
minExtent = "3 3";
visible = "0";
bitmap = "gui/hud_veh_seatdot.png";
};
new GuiBitmapCtrl(vPassenger1Slot) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "top";
position = "59 39";
extent = "10 10";
minExtent = "3 3";
visible = "0";
bitmap = "gui/hud_veh_seatdot.png";
};
new GuiBitmapCtrl(vPassenger2Slot) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "top";
position = "59 84";
extent = "10 10";
minExtent = "3 3";
visible = "0";
bitmap = "gui/hud_veh_seatdot.png";
};
};
vOverheadHud.add(vOverheadHud.passengerHud);
}
case "HAPC" :
if(%node == 0)
{
vOverheadHud.setBitmap("gui/hud_veh_icon_hapc.png");
// add altitude box for flying vehicles
dashboardHud.altBox = new HudBitmapCtrl(vAltitudeBox) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "top";
position = "371 56";
extent = "68 22";
minExtent = "8 8";
bitmap = "gui/hud_veh_new_dashpiece_1.png";
visible = "1";
opacity = "0.8";
new GuiTextCtrl(vAltitudeText) {
profile = "GuiDashTextProfile";
horizSizing = "right";
vertSizing = "top";
position = "19 5";
extent = "18 15";
minExtent = "8 8";
visible = "1";
text = "test";
};
new GuiTextCtrl(vAltitudeTxtLbl) {
profile = "GuiDashTextProfile";
horizSizing = "right";
vertSizing = "top";
position = "40 5";
extent = "12 15";
minExtent = "8 8";
visible = "1";
text = "M";
};
};
dashboardHud.add(dashboardHud.altBox);
updateVehicleAltitude();
dashboardHud.updateAltitude();
}
else
{
// passenger hud
dashboardHud.vehDiagram = new HudBitmapCtrl(vOverheadHud) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "top";
position = "256 0";
extent = "128 128";
minExtent = "8 8";
visible = "1";
bitmap = "gui/hud_veh_icon_hapc.png";
opacity = "1.0";
};
dashboardHud.add(dashboardHud.vehDiagram);
dashboardHud.nrgBar = new HudBitmapCtrl(vEnergyFrame) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "top";
position = "180 30";
extent = "118 19";
minExtent = "8 8";
visible = "1";
bitmap = "gui/hud_veh_new_dashpiece_5.png";
flipVertical = true;
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";
};
};
dashboardHud.add(dashboardHud.nrgBar);
dashboardHud.dmgBar = new HudBitmapCtrl(vDamageFrame) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "top";
position = "342 30";
extent = "118 19";
minExtent = "8 8";
visible = "1";
bitmap = "gui/hud_veh_new_dashpiece_4.png";
flipVertical = true;
opacity = "0.8";
new HudDamage(vDamageBar) {
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "top";
position = "0 0";
extent = "118 19";
minExtent = "8 8";
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";
verticalFill = false;
displayMounted = true;
opacity = "0.8";
subRegion = "18 5 97 10";
pulseRate = "500";
pulseThreshold = "0.3";
};
};
dashboardHud.add(dashboardHud.dmgBar);
}
// passenger slot "dots"
vOverheadHud.passengerHud = new GuiControl(vPassengerHud) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "top";
position = "0 0";
extent = "101 101";
minExtent = "8 8";
visible = "1";
setFirstResponder = "0";
modal = "1";
helpTag = "0";
new GuiBitmapCtrl(vPassenger0Slot) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "top";
position = "59 65";
extent = "10 10";
minExtent = "3 3";
visible = "0";
setFirstResponder = "0";
modal = "1";
bitmap = "gui/hud_veh_seatdot.png";
wrap = "0";
};
new GuiBitmapCtrl(vPassenger1Slot) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "top";
position = "59 84";
extent = "10 10";
minExtent = "3 3";
visible = "0";
setFirstResponder = "0";
modal = "1";
bitmap = "gui/hud_veh_seatdot.png";
wrap = "0";
};
new GuiBitmapCtrl(vPassenger2Slot) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "top";
position = "38 29";
extent = "10 10";
minExtent = "3 3";
visible = "0";
setFirstResponder = "0";
modal = "1";
bitmap = "gui/hud_veh_seatdot.png";
wrap = "0";
};
new GuiBitmapCtrl(vPassenger3Slot) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "top";
position = "38 50";
extent = "10 10";
minExtent = "3 3";
visible = "0";
setFirstResponder = "0";
modal = "1";
bitmap = "gui/hud_veh_seatdot.png";
wrap = "0";
};
new GuiBitmapCtrl(vPassenger4Slot) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "top";
position = "80 50";
extent = "10 10";
minExtent = "3 3";
visible = "0";
setFirstResponder = "0";
modal = "1";
bitmap = "gui/hud_veh_seatdot.png";
wrap = "0";
};
new GuiBitmapCtrl(vPassenger5Slot) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "top";
position = "80 29";
extent = "10 10";
minExtent = "3 3";
visible = "0";
setFirstResponder = "0";
modal = "1";
bitmap = "gui/hud_veh_seatdot.png";
wrap = "0";
};
};
vOverheadHud.add(vOverheadHud.passengerHud);
case "Assault" :
if(%node == 1)
{
// turreteer hud
dashboardHud.tHud = new GuiControl(turreteerHud) {
profile = "GuiDefaultProfile";
horizSizing = "center";
vertSizing = "top";
position = "225 70";
extent = "240 50";
minExtent = "8 8";
visible = "1";
new HudBitmapCtrl(vWeap1Hilite) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "10 11";
extent = "80 44";
minExtent = "8 8";
visible = "1";
bitmap = "gui/hud_veh_new_hilite_left.png";
opacity = "0.4";
};
new HudBitmapCtrl(vWeap2Hilite) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "103 11";
extent = "80 44";
minExtent = "8 8";
visible = "0";
bitmap = "gui/hud_veh_new_hilite_right.png";
opacity = "0.4";
};
new HudBitmapCtrl(turreteerFrame) {
profile = "GuiDashBoxProfile";
horizSizing = "center";
vertSizing = "bottom";
position = "20 8";
extent = "152 36";
minExtent = "8 8";
visible = "1";
bitmap = "gui/hud_veh_new_tankgunner_dash.png";
opacity = "0.8";
new HudBitmapCtrl(vWeaponOne) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "25 8";
extent = "25 25";
minExtent = "8 8";
visible = "1";
bitmap = "gui/hud_chaingun.png";
};
new HudBitmapCtrl(vWeaponTwo) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "99 8";
extent = "25 25";
minExtent = "8 8";
visible = "1";
bitmap = "gui/hud_mortor.png";
};
};
};
dashboardHud.add(dashboardHud.tHud);
dashboardHud.nrgBar = new HudBitmapCtrl(vEnergyFrame) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "top";
position = "134 95";
extent = "118 19";
minExtent = "8 8";
visible = "1";
flipVertical = true;
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);
dashboardHud.dmgBar = new HudBitmapCtrl(vDamageFrame) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "top";
position = "390 95";
extent = "118 19";
minExtent = "8 8";
visible = "1";
flipVertical = true;
bitmap = "gui/hud_veh_new_dashpiece_4.png";
opacity = "0.8";
new HudDamage(vDamageBar) {
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "top";
position = "0 0";
extent = "118 19";
minExtent = "8 8";
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";
verticalFill = false;
displayMounted = true;
opacity = "0.8";
subRegion = "18 5 97 10";
pulseRate = "500";
pulseThreshold = "0.3";
//modColor = "1.000000 0.500000 0.000000 1.000000";
};
};
dashboardHud.add(dashboardHud.dmgBar);
$numVWeapons = 2;
// add tank chaingun reticle
reticleHud.setBitmap("gui/hud_ret_tankchaingun.png");
reticleFrameHud.setVisible(false);
}
else
{
// node 0 == driver
vOverheadHud.setBitmap("gui/hud_veh_icon_assault.png");
// passenger slot "dots"
vOverheadHud.passengerHud = new GuiControl(vPassengerHud) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "top";
position = "0 0";
extent = "101 101";
minExtent = "8 8";
visible = "1";
new GuiBitmapCtrl(vPassenger0Slot) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "top";
position = "64 30";
extent = "10 10";
minExtent = "3 3";
visible = "0";
bitmap = "gui/hud_veh_seatdot.png";
};
new GuiBitmapCtrl(vPassenger1Slot) {
profile = "GuiDashBoxProfile";
horizSizing = "right";
vertSizing = "top";
position = "53 53";
extent = "10 10";
minExtent = "3 3";
visible = "0";
bitmap = "gui/hud_veh_seatdot.png";
};
};
vOverheadHud.add(vOverheadHud.passengerHud);
}
case "Hoverbike" :
vOverheadHud.setBitmap("gui/hud_veh_icon_hoverbike.png");
case "MPB" :
vOverheadHud.setBitmap("gui/hud_veh_icon_mpb.png");
}
if(%node == 0)
vDiagramHud.setVisible(true);
else
if(isObject(vDiagramHud))
vDiagramHud.setVisible(false);
}
function GuiControl::updateAltitude(%this)
{
%alt = getControlObjectAltitude();
vAltitudeText.setValue(%alt);
%this.altitudeCheck = %this.schedule(500, "updateAltitude");
}
function GuiControl::updateSpeed(%this)
{
%vel = getControlObjectSpeed();
// convert from m/s to km/h
%cVel = mFloor(%vel * 3.6); // m/s * (3600/1000) = km/h
vSpeedText.setValue(%cVel);
%this.speedCheck = %this.schedule(500, "updateSpeed");
}
//function clientCmdShowVehicleWeapons(%vehicleType)
//{
// all vehicle weapons are energy based; a -1 displays an infinity symbol
// for that weapon's ammo amount
//switch$ (%vehicleType)
//{
// case "ScoutFlyer":
// // blaster
// vWeaponsBox.addWeapon(0, -1);
// case "BomberFlyer":
// // plasma, bomb and targeting laser
// vWeaponsBox.addWeapon(1, -1);
// vWeaponsBox.addWeapon(3, -1);
// vWeaponsBox.addWeapon(4, -1);
// case "AssaultVehicle":
// vWeaponsBox.addWeapon(1, -1);
// vWeaponsBox.addWeapon(3, -1);
//}
//vWeaponsBox.setVisible(true);
//}
// if set, then static shapes with data member 'noIndividualDamage' set will
// not display their damage bars
function clientCmdProtectingStaticObjects(%val)
{
NavHud.protectedStatics = %val;
}
function clientCmdCheckPassengers(%pString)
{
// since each slot is represented by a "1" or a "0" followed by a space, the length
// of the string divided by 2 is equal to the number of slots in the vehicle
%numSlots = strlen(%pString) / 2;
for(%i = 0; %i < %numSlots; %i++)
{
%pass = "vPassenger" @ %i @ "Slot";
if(isObject(%pass))
if(getWord(%pString, %i) $= "1")
%pass.setVisible(true);
else
%pass.setVisible(false);
}
}
function clientCmdShowPassenger(%slot, %full)
{
%dotNum = "vPassenger" @ %slot @ "Slot";
if(isObject(%dotNum))
%dotNum.setVisible(%full);
}
function clientCmdClearPassengers()
{
for(%i = 1; %i < 6; %i++)
{
%pass = "vPassenger" @ %i @ "Slot";
%pass.setVisible(false);
}
}
addMessageCallback( 'MsgMissionDropInfo', handleDropInfoMessage );
addMessageCallback( 'MsgTeamList', handleTeamListMessage );
addMessageCallback( 'LeaveMissionArea', HandleLeaveMissionAreaAlarmMessage );
addMessageCallback( 'EnterMissionArea', HandleEnterMissionAreaAlarmMessage );
addMessageCallback( 'msgBountyStreakBonus', HandleBountyStreakMessage );
addMessageCallback( 'onClientKicked', handleIveBeenKicked );
addMessageCallback( 'onClientBanned', handleIveBeenBanned );
addMessageCallback( 'msgDeploySensorRed', clientDeploySensorRed );
addMessageCallback( 'msgDeploySensorGrn', clientDeploySensorGrn );
addMessageCallback( 'msgDeploySensorOff', clientDeploySensorOff );
addMessageCallback( 'msgPackIconOff', clientPackIconOff );
addMessageCallback( 'MsgForceObserver', HandleForceObserver );
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()
{
deploySensor.color = "255 0 0";
deploySensor.setVisible(true);
}
function clientDeploySensorGrn()
{
deploySensor.color = "0 255 0";
deploySensor.setVisible(true);
}
function clientDeploySensorOff()
{
deploySensor.setVisible(false);
}
function clientPackIconOff()
{
backpackIcon.setBitmap("");
backpackFrame.setVisible(false);
backpackText.setValue("");
backpackText.setVisible(false);
backpackFrame.pack = false;
}
function HandleBountyStreakMessage(%msgType, %msgString, %client, %streak, %award)
{
%delay = alxGetWaveLen("fx/misc/bounty_bonus.wav");
%overlap = 0.50;
alxPlay(BountyBellSound, 0, 0, 0); //first bell
for (%loop = 1; %loop < %award; %loop++) //any repetitions, overlapped.
schedule((%delay * %loop) * %overlap, 0, "alxPlay", BountyBellSound, 0, 0, 0);
}
function HandleLeaveMissionAreaAlarmMessage(%msgType, %msgString)
{
//Tinman - sounds are now sent by the individual game script
//if(ServerConnection.OutOfBoundsHandle $= "")
// ServerConnection.OutOfBoundsHandle = alxPlay(OutOfBoundsSound, 0, 0, 0);
}
function HandleEnterMissionAreaAlarmMessage(%msgType, %msgString)
{
//Tinman - sounds are now sent by the individual game script
//if(ServerConnection.OutOfBoundsHandle !$= "")
// alxStop(ServerConnection.OutOfBoundsHandle);
//
//ServerConnection.OutOfBoundsHandle = "";
}
function handleDropInfoMessage( %msgType, %msgString, %map, %gameType, %serverName )
{
$clServerName = %serverName;
$clMissionName = %map;
$clMissionType = %gameType;
}
function handleTeamListMessage( %msgType, %msgString, %teamCount, %teamList )
{
// Save off the team names:
$clTeamCount = %teamCount;
for ( %i = 0; %i < %teamCount; %i++ )
$clTeamScore[%i + 1, 0] = getRecord( %teamList, %i );
// Initialize the lobby:
LobbyPlayerList.initColumns();
}
//----------------------------------------------------------------------------
function clientCmdStartEffect( %effect )
{
// Put in iterations
StartEffect( %effect );
}
function clientCmdStopEffect( %effect )
{
StopEffect( %effect );
}
function clientCmdPickTeam()
{
}
function clientCmdMissionStartPhase1(%seq, %missionName, %musicTrack)
{
echo( "got client StartPhase1..." );
// Reset the loading progress controls:
LoadingProgress.setValue( 0 );
DB_LoadingProgress.setValue( 0 );
LoadingProgressTxt.setValue( "LOADING MISSION" );
DB_LoadingProgressTxt.setValue( "LOADING MISSION" );
clientCmdPlayMusic(%musicTrack);
commandToServer('MissionStartPhase1Done', %seq);
clientCmdResetCommandMap();
}
function clientCmdMissionStartPhase2(%seq)
{
// clean some stuff up.
MessageHud.close();
purgeResources();
if (!$pref::NoClearConsole)
cls();
2017-07-18 02:51:48 +00:00
commandToServer('MissionStartPhase2Done', %seq);
}
function clientCmdMissionStartPhase3(%seq, %missionName)
{
$MSeq = %seq;
//Reset Inventory Hud...
if($Hud['inventoryScreen'] !$= "")
{
%favList = $Hud['inventoryScreen'].data[0, 1].type TAB $Hud['inventoryScreen'].data[0, 1].getValue();
for ( %i = 1; %i < $Hud['inventoryScreen'].count; %i++ )
if($Hud['inventoryScreen'].data[%i, 1].getValue() $= invalid)
%favList = %favList TAB $Hud['inventoryScreen'].data[%i, 1].type TAB "EMPTY";
else
%favList = %favList TAB $Hud['inventoryScreen'].data[%i, 1].type TAB $Hud['inventoryScreen'].data[%i, 1].getValue();
commandToServer( 'setClientFav', %favList );
}
else
commandToServer( 'setClientFav', $pref::Favorite[$pref::FavCurrentSelect]);
// needed?
$MissionName = %missionName;
//commandToServer( 'getScores' );
// only show dialog if actually lights
if(lightScene("sceneLightingComplete", $LaunchMode $= "SceneLight" ? "forceWritable" : ""))
{
error("beginning SceneLighting....");
schedule(1, 0, "updateLightingProgress");
$lightingMission = true;
LoadingProgress.setValue( 0 );
DB_LoadingProgress.setValue( 0 );
LoadingProgressTxt.setValue( "LIGHTING MISSION" );
DB_LoadingProgressTxt.setValue( "LIGHTING MISSION" );
$missionLightStarted = true;
Canvas.repaint();
}
}
function clientCmdMissionEnd(%seq)
{
alxStopAll();
// disable mission lighting if it's going (since the interiors will be gone in a sec)
$lightingMission = false;
$sceneLighting::terminateLighting = true;
}
function clientCmdSetPowerAudioProfiles(%up, %down)
{
setPowerAudioProfiles(%up, %down);
}
function ghostAlwaysStarted(%ghostCount)
{
echo( "starting to ghost " @ %ghostCount @ " server objects....");
LoadingProgress.setValue( 0 );
DB_LoadingProgress.setValue( 0 );
LoadingProgressTxt.setValue( "LOADING OBJECTS" );
DB_LoadingProgressTxt.setValue( "LOADING OBJECTS" );
Canvas.repaint();
$ghostCount = %ghostCount;
$ghostsRecvd = 0;
}
function ghostAlwaysObjectReceived()
{
$ghostsRecvd++;
%pct = $ghostsRecvd / $ghostCount;
LoadingProgress.setValue( %pct );
DB_LoadingProgress.setValue( %pct );
Canvas.repaint();
}
function updateLightingProgress()
{
if( $SceneLighting::lightingProgress == 0)
{
if($sceneLightStarted)
{
$sceneLightStarted = false;
}
else
$SceneLighting::lightingProgress = 1;
}
LoadingProgress.setValue( $SceneLighting::lightingProgress );
DB_LoadingProgress.setValue( $SceneLighting::lightingProgress );
if($lightingMission)
$lightingProgressThread = schedule(1, 0, "updateLightingProgress");
}
function sceneLightingComplete()
{
LoadingProgress.setValue( 1 );
DB_LoadingProgress.setValue( 1 );
echo("Scenelighting done...");
$lightingMission = false;
cleanUpHuds();
if($LaunchMode $= "SceneLight")
{
quit();
return;
}
clientCmdResetHud();
2017-07-18 02:55:25 +00:00
commandToServer('SetVoiceInfo', $pref::Audio::voiceChannels, $pref::Audio::decodingMask, $pref::Audio::encodingLevel);
2017-07-18 02:51:48 +00:00
commandToServer('MissionStartPhase3Done', $MSeq);
}
2017-07-18 02:55:25 +00:00
function clientCmdSetVoiceInfo(%channels, %decodingMask, %encodingLevel)
{
$Audio::serverChannels = %channels;
$Audio::serverDecodingMask = %decodingMask;
$Audio::serverEncodingLevel = %encodingLevel;
}
2017-07-18 02:51:48 +00:00
function ClientReceivedDataBlock(%index, %total)
{
%pct = %index / %total;
LoadingProgress.setValue( %pct );
LoadingProgress.setValue( %pct );
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" )
{
if( !%con.targetTone )
%con.targetTone = alxPlay( "sLockedTone", 0, 0, 0 );
}
else
{
if( %con.targetTone $= "" )
return;
if( %con.targetTone )
alxStop( %con.targetTone );
%con.targetTone = "";
}
}
function GameConnection::onTrackingTarget( %con, %state )
{
if( %state $= "true" )
{
if( !%con.trackingTargetTone )
%con.trackingTargetTone = alxPlay( "sSearchingTone", 0, 0, 0 );
}
else
{
if( %con.trackingTargetTone $= "" )
return;
if( %con.trackingTargetTone )
alxStop( %con.trackingTargetTone );
%con.TrackingTargetTone = "";
}
}
function GameConnection::onLockWarning( %con, %state )
{
if( %state $= "true" )
{
if( !%con.lockWarningTone )
%con.lockWarningTone = alxPlay( "sMissileLockWarningTone", 0, 0, 0 );
}
else
{
if( %con.lockWarningTone $= "" )
return;
if( %con.lockWarningTone )
alxStop( %con.lockWarningTone );
%con.lockWarningTone = "";
}
}
function GameConnection::onHomeWarning( %con, %state )
{
if( %state $= "true" )
{
if( !%con.homeWarningTone )
%con.homeWarningTone = alxPlay( "sMissileHomingWarningTone", 0, 0, 0 );
}
else
{
if( %con.homeWarningTone $= "" )
return;
if( %con.homeWarningTone )
alxStop( %con.homeWarningTone );
%con.homeWarningTone = "";
}
}
function GameConnection::initialControlSet(%this)
{
if ( $LaunchMode $= "InteriorView" )
{
Canvas.setContent( InteriorPreviewGui );
return;
}
if( Canvas.getContent() != PlayGui.getId() )
{
Canvas.setContent( PlayGui );
Canvas.pushDialog( MainChatHud );
CommandToServer('PlayContentSet');
}
}