mirror of
https://github.com/Ragora/TribesReplay.git
synced 2026-01-19 17:44:45 +00:00
* 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.
337 lines
9.4 KiB
C#
337 lines
9.4 KiB
C#
//--------------------------------------------------------
|
|
function QueryServers( %searchCriteria )
|
|
{
|
|
GMJ_Browser.lastQuery = %searchCriteria;
|
|
LaunchGame( "JOIN" );
|
|
}
|
|
|
|
//--------------------------------------------------------
|
|
function QueryOnlineServers()
|
|
{
|
|
QueryServers("Master");
|
|
}
|
|
|
|
//--------------------------------------------------------
|
|
// Launch gui functions
|
|
//--------------------------------------------------------
|
|
function PlayOffline()
|
|
{
|
|
$FirstLaunch = true;
|
|
setNetPort(0);
|
|
$PlayingOnline = false;
|
|
Canvas.setContent(LaunchGui);
|
|
}
|
|
|
|
//--------------------------------------------------------
|
|
function OnlineLogIn()
|
|
{
|
|
$FirstLaunch = true;
|
|
setNetPort(0);
|
|
$PlayingOnline = true;
|
|
FilterEditGameType.clear();
|
|
FilterEditMissionType.clear();
|
|
queryMasterGameTypes();
|
|
// Start the Email checking...
|
|
EmailGui.checkSchedule = schedule( 5000, 0, CheckEmail, true );
|
|
Canvas.setContent(LaunchGui);
|
|
}
|
|
|
|
//--------------------------------------------------------
|
|
function LaunchToolbarMenu::onSelect(%this, %id, %text)
|
|
{
|
|
switch(%id)
|
|
{
|
|
case 0:
|
|
LaunchGame();
|
|
case 1: // Start Training Mission
|
|
LaunchTraining();
|
|
case 2:
|
|
LaunchNews();
|
|
case 3:
|
|
LaunchForums();
|
|
case 4:
|
|
LaunchEmail();
|
|
case 5: // Join Chat Room
|
|
Canvas.pushDialog(JoinChatDlg);
|
|
case 6:
|
|
LaunchBrowser();
|
|
case 7: // Options
|
|
Canvas.pushDialog(OptionsDlg);
|
|
//case 8: // Play Recording
|
|
// Canvas.pushDialog(RecordingsDlg);
|
|
case 9: // Quit
|
|
LaunchTabView.closeAllTabs();
|
|
quit();
|
|
//case 10: // Log Off
|
|
// LaunchTabView.closeAllTabs();
|
|
// PlayOffline();
|
|
//case 11: // Log On
|
|
// LaunchTabView.closeAllTabs();
|
|
// OnlineLogIn();
|
|
case 12:
|
|
LaunchCredits();
|
|
}
|
|
}
|
|
|
|
//--------------------------------------------------------
|
|
function LaunchToolbarDlg::onWake(%this)
|
|
{
|
|
// Play the shell hum:
|
|
if ( $HudHandle['shellScreen'] $= "" )
|
|
$HudHandle['shellScreen'] = alxPlay( ShellScreenHumSound, 0, 0, 0 );
|
|
|
|
LaunchToolbarMenu.clear();
|
|
|
|
if ( $PlayingOnline )
|
|
{
|
|
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
|
|
{
|
|
LaunchToolbarMenu.add( 1, "TRAINING" );
|
|
LaunchToolbarMenu.add( 0, "LAN GAME" );
|
|
}
|
|
|
|
LaunchToolbarMenu.addSeparator();
|
|
LaunchToolbarMenu.add( 7, "SETTINGS" );
|
|
// LaunchToolbarMenu.add( 8, "RECORDINGS" );
|
|
LaunchToolbarMenu.add( 12, "CREDITS" );
|
|
|
|
LaunchToolbarMenu.addSeparator();
|
|
|
|
// if ( $PlayingOnline )
|
|
// LaunchToolbarMenu.add( 10, "LOG OFF" );
|
|
// else
|
|
// LaunchToolbarMenu.add( 11, "LOG ON" );
|
|
LaunchToolbarMenu.add( 9, "QUIT" );
|
|
|
|
LaunchToolbarCloseButton.setVisible( LaunchTabView.tabCount() > 0 );
|
|
}
|
|
|
|
//----------------------------------------------------------------------------
|
|
// Launch Tab Group functions:
|
|
//----------------------------------------------------------------------------
|
|
function OpenLaunchTabs( %gotoWarriorSetup )
|
|
{
|
|
if ( LaunchTabView.tabCount() > 0 || !$FirstLaunch )
|
|
return;
|
|
|
|
$FirstLaunch = "";
|
|
|
|
// Set up all of the launch bar tabs:
|
|
if ( $PlayingOnline )
|
|
{
|
|
LaunchTabView.addLaunchTab( "GAME", GameGui );
|
|
LaunchTabView.addLaunchTab( "NEWS", NewsGui );
|
|
LaunchTabView.addLaunchTab( "FORUMS", ForumsGui );
|
|
LaunchTabView.addLaunchTab( "EMAIL", EmailGui );
|
|
LaunchTabView.addLaunchTab( "CHAT", ChatGui );
|
|
LaunchTabView.addLaunchTab( "BROWSER", TribeAndWarriorBrowserGui );
|
|
|
|
switch$ ( $pref::Shell::LaunchGui )
|
|
{
|
|
case "News": %launchGui = NewsGui;
|
|
case "Forums": %launchGui = ForumsGui;
|
|
case "Email": %launchGui = EmailGui;
|
|
case "Chat": %launchGui = ChatGui;
|
|
case "Browser": %launchGui = TribeAndWarriorBrowserGui;
|
|
default: %launchGui = GameGui;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
LaunchTabView.addLaunchTab( "TRAINING", TrainingGui );
|
|
LaunchTabView.addLaunchTab( "LAN GAME", GameGui );
|
|
%launchGui = TrainingGui;
|
|
}
|
|
|
|
if ( %gotoWarriorSetup )
|
|
LaunchGame( "WARRIOR" );
|
|
else
|
|
LaunchTabView.viewTab( "", %launchGui, 0 );
|
|
}
|
|
|
|
//--------------------------------------------------------
|
|
function LaunchTabView::addLaunchTab( %this, %text, %gui )
|
|
{
|
|
%tabCount = %this.tabCount();
|
|
%this.gui[%tabCount] = %gui;
|
|
%this.key[%tabCount] = 0;
|
|
%this.addTab( %tabCount, %text );
|
|
}
|
|
|
|
//--------------------------------------------------------
|
|
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;
|
|
}
|
|
|
|
//--------------------------------------------------------
|
|
function LaunchTabView::viewLastTab( %this )
|
|
{
|
|
if ( %this.tabCount() == 0 || %this.lastTab $= "" )
|
|
return;
|
|
|
|
%this.setSelectedByIndex( %this.lastTab );
|
|
}
|
|
|
|
//--------------------------------------------------------
|
|
function LaunchTabView::viewTab( %this, %text, %gui, %key )
|
|
{
|
|
%tabCount = %this.tabCount();
|
|
for ( %tab = 0; %tab < %tabCount; %tab++ )
|
|
if ( %this.gui[%tab] $= %gui && %this.key[%tab] $= %key )
|
|
break;
|
|
|
|
if ( %tab == %tabCount )
|
|
{
|
|
// Add a new tab:
|
|
%this.gui[%tab] = %gui;
|
|
%this.key[%tab] = %key;
|
|
// WARNING! This id may not be unique and therefore should
|
|
// not be relied on! Use index instead!
|
|
%this.addTab( %tab, %text );
|
|
}
|
|
|
|
if ( %this.getSelectedTab() != %tab )
|
|
%this.setSelectedByIndex( %tab );
|
|
}
|
|
|
|
//--------------------------------------------------------
|
|
function LaunchTabView::closeCurrentTab( %this )
|
|
{
|
|
%tab = %this.getSelectedTab();
|
|
%this.closeTab( %this.gui[%tab], %this.key[%tab] );
|
|
}
|
|
|
|
//--------------------------------------------------------
|
|
function LaunchTabView::closeTab( %this, %gui, %key )
|
|
{
|
|
%tabCount = %this.tabCount();
|
|
for ( %tab = 0; %tab < %tabCount; %tab++ )
|
|
{
|
|
if( %this.gui[%tab] $= %gui && %this.key[%tab] $= %key )
|
|
break;
|
|
}
|
|
|
|
if ( %tab == %tabCount )
|
|
return;
|
|
|
|
for( %i = %tab; %i < %tabCount; %i++ )
|
|
{
|
|
%this.gui[%i] = %this.gui[%i+1];
|
|
%this.key[%i] = %this.key[%i+1];
|
|
}
|
|
|
|
%this.removeTabByIndex( %tab );
|
|
%gui.onClose( %key );
|
|
|
|
if ( %tabCount == 1 )
|
|
{
|
|
%this.lastTab = "";
|
|
Canvas.setContent( LaunchGui );
|
|
}
|
|
}
|
|
|
|
//--------------------------------------------------------
|
|
function LaunchTabView::closeAllTabs( %this )
|
|
{
|
|
%tabCount = %this.tabCount();
|
|
for ( %i = 0; %i < %tabCount; %i++ )
|
|
{
|
|
%this.gui[%i].onClose( %this.key[%i] );
|
|
%this.gui[%i] = "";
|
|
%this.key[%i] = "";
|
|
}
|
|
|
|
%this.clear();
|
|
}
|
|
|
|
//----------------------------------------------------------------------------
|
|
// LaunchGui functions:
|
|
//----------------------------------------------------------------------------
|
|
function LaunchGui::onAdd(%this)
|
|
{
|
|
%this.getWarrior = true;
|
|
}
|
|
|
|
//----------------------------------------------------------------------------
|
|
function LaunchGui::onWake(%this)
|
|
{
|
|
if ( !Canvas.isCursorOn() )
|
|
CursorOn();
|
|
$enableDirectInput = "0";
|
|
deactivateDirectInput();
|
|
Canvas.pushDialog(LaunchToolbarDlg);
|
|
if ( !$FirstLaunch )
|
|
LaunchTabView.viewLastTab();
|
|
|
|
checkNamesAndAliases();
|
|
}
|
|
|
|
//----------------------------------------------------------------------------
|
|
function LaunchGui::onSleep(%this)
|
|
{
|
|
//alxStop($HudHandle['shellScreen']);
|
|
Canvas.popDialog( LaunchToolbarDlg );
|
|
}
|
|
|
|
//----------------------------------------------------------------------------
|
|
function checkNamesAndAliases()
|
|
{
|
|
%gotoWarriorSetup = false;
|
|
if ( $PlayingOnline )
|
|
{
|
|
// When first launching, make sure we have a valid warrior:
|
|
if ( LaunchGui.getWarrior )
|
|
{
|
|
%cert = WONGetAuthInfo();
|
|
if ( %cert !$= "" )
|
|
{
|
|
LaunchGui.getWarrior = "";
|
|
if ( %cert $= "" )
|
|
%warrior = $CreateAccountWarriorName;
|
|
else
|
|
%warrior = getField( %cert, 0 );
|
|
|
|
%warriorIdx = -1;
|
|
for ( %i = 0; %i < $pref::Player::count; %i++ )
|
|
{
|
|
if ( %warrior $= getField( $pref::Player[%i], 0 ) )
|
|
{
|
|
%warriorIdx = %i;
|
|
break;
|
|
}
|
|
}
|
|
|
|
if ( %warriorIdx == -1 )
|
|
{
|
|
// Create new warrior:
|
|
$pref::Player[$pref::Player::Count] = %warrior @ "\tHuman Male\tbeagle\tMale1";
|
|
$pref::Player::Current = $pref::Player::Count;
|
|
$pref::Player::Count++;
|
|
%gotoWarriorSetup = true;
|
|
}
|
|
}
|
|
else
|
|
MessageBoxOK( "WARNING", "Failed to get account information. You may need to quit the game and log in again." );
|
|
}
|
|
}
|
|
else if ( $pref::Player::Count == 0 )
|
|
{
|
|
%gotoWarriorSetup = true;
|
|
}
|
|
|
|
OpenLaunchTabs( %gotoWarriorSetup );
|
|
}
|