mirror of
https://github.com/Ragora/TribesReplay.git
synced 2026-02-25 17:23:36 +00:00
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.
This commit is contained in:
parent
b58ea2862a
commit
7d0bae2fd4
80 changed files with 4200 additions and 8778 deletions
|
|
@ -416,7 +416,7 @@ function ChatRoomMemberList::onRightMouseDown(%this,%column,%row,%mousePos)
|
|||
|
||||
// if ( !ChatMember.player.isBot )
|
||||
|
||||
ChatMemberPopup.add(%nick,-1);
|
||||
ChatMemberPopup.add(%nick,7);
|
||||
for (%i = 0; %i < strlen(%nick) * 1.5; %i++)
|
||||
%line = %line @ "-";
|
||||
ChatMemberPopup.add(%line,-1);
|
||||
|
|
@ -449,6 +449,7 @@ function ChatRoomMemberList::onRightMouseDown(%this,%column,%row,%mousePos)
|
|||
ChatMemberPopup.add("Mute",6);
|
||||
|
||||
ChatMemberPopup.add( "--------------------",-1);
|
||||
// ChatMemberPopup.add( "Instant Message", 9 );
|
||||
ChatMemberPopup.add( "TMail", 10 );
|
||||
ChatMemberPopup.add( "Add To Buddylist",11);
|
||||
|
||||
|
|
@ -484,6 +485,8 @@ function ChatPrivate()
|
|||
function ChatMemberPopup::onSelect(%this,%id,%text)
|
||||
{
|
||||
%member = getSubStr(ChatMemberPopup.member.displayName,0,strlen(ChatMemberPopup.member.displayname)-strlen(nextToken(ChatMemberPopup.member.displayname,name,"^"))-1);
|
||||
if(getsubstr(%member,strlen(%member)-1,strlen(%member)) $= "^")
|
||||
%member = getsubstr(%member,0,strlen(%member)-1);
|
||||
switch( %id )
|
||||
{
|
||||
case 0: // Set Back
|
||||
|
|
@ -502,6 +505,10 @@ function ChatMemberPopup::onSelect(%this,%id,%text)
|
|||
IRCClient::kick(ChatMemberPopup.member,$pref::IRCClient::banmsg);
|
||||
case 6: // Mute/Unmute
|
||||
IRCClient::ignore(ChatMemberPopup.member,!(ChatMemberPopup.member.flags & $PERSON_IGNORE));
|
||||
case 7: // go to webbrowser page
|
||||
LinkBrowser(%member,"warrior");
|
||||
case 9: // Instant Message
|
||||
IRCClient::invite(ChatMemberPopup.member, %id);
|
||||
case 10: // TMail
|
||||
LinkEMail(%member);
|
||||
case 11: // Add To Buddylist
|
||||
|
|
@ -848,6 +855,8 @@ function IRCClient::notify(%event)
|
|||
case IDIRC_INVITED: //invited to join existing channel.
|
||||
//MessageBoxOKCancel("Invite", "You have been invited to channel " @ IRCClient::displayChannel($IRCClient::invitechannel) @ " by " @ $IRCClient::inviteperson @ ".", "IRCClient::join($IRCClient::invitechannel);");
|
||||
IRCClient::newMessage($IRCClient::CurrentChannel, "You have been invited to channel " @ $IRCClient::invitechannel @ " by " @ $IRCClient::inviteperson @ ".");
|
||||
case IDIRC_INSTANTMSG:
|
||||
messageBoxOK("TESTING","This is a test of the Instant Messaging System. Sent By: " @ $IRCClient::inviteperson @ ".");
|
||||
case IDIRC_BAN_LIST:
|
||||
ChannelBannedList_refresh();
|
||||
case IDIRC_TOPIC:
|
||||
|
|
@ -1537,9 +1546,10 @@ function IRCClient::dispatch(%prefix,%command,%params)
|
|||
IRCClient::onVersion(%prefix,%params);
|
||||
case "ACTION":
|
||||
IRCClient::onAction(%prefix,%params);
|
||||
case "INVITE":
|
||||
case "INVITE":
|
||||
IRCClient::onInvite(%prefix,%params);
|
||||
|
||||
case "INSTANTMSG":
|
||||
IRCClient::onInstantMsg(%prefix,%params);
|
||||
case "301":
|
||||
IRCClient::onAwayReply(%prefix,%params);
|
||||
case "305":
|
||||
|
|
@ -1557,8 +1567,7 @@ function IRCClient::dispatch(%prefix,%command,%params)
|
|||
case "315":
|
||||
IRCClient::onEndOfWho(%prefix,%params);
|
||||
case "317":
|
||||
IRCClient::onWhoisIdle(%prefix,%params);
|
||||
|
||||
IRCClient::onWhoisIdle(%prefix,%params);
|
||||
case "322":
|
||||
IRCClient::onList(%prefix,%params);
|
||||
case "323":
|
||||
|
|
@ -2348,8 +2357,8 @@ function IRCClient::onList(%prefix,%params)
|
|||
$IRCClient::channelTopics[$IRCClient::numChannels] = %topic;
|
||||
$IRCClient::numChannels++;
|
||||
}
|
||||
else
|
||||
IRCClient::newMessage($IRCClient::currentChannel,%users @ " " @ %ch @ " -- " @ %topic);
|
||||
// else
|
||||
// IRCClient::newMessage($IRCClient::currentChannel,%users @ " " @ %ch @ " -- " @ %topic);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
|
@ -2525,7 +2534,25 @@ function IRCClient::onChannelInviteOnly(%prefix,%params)
|
|||
IRCClient::statusMessage("Cannot join " @ %channel @ ": room is invite only.");
|
||||
IRCClient::notify(IDIRC_INVITE_ONLY);
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
function IRCClient::onInstantMsg(%prefix,%params)
|
||||
{
|
||||
%p = IRCClient::findPerson2(%prefix,true);
|
||||
if (%p)
|
||||
{
|
||||
%params = nextToken(%params,channel,":");
|
||||
%channel = %params;
|
||||
|
||||
// Only bother the user if they aren't ignoring this person
|
||||
if (!(%person.flags & $PERSON_IGNORE))
|
||||
{
|
||||
// Set vars and notify the responder
|
||||
$IRCClient::invitechannel = %channel;
|
||||
$IRCClient::inviteperson = IRCClient::displayNick(%p);
|
||||
IRCClient::notify(IDIRC_INSTANTMSG);
|
||||
}
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
function IRCClient::onInvite(%prefix,%params)
|
||||
{
|
||||
|
|
@ -3166,7 +3193,7 @@ function IRCClient::ignore(%p,%tf)
|
|||
//------------------------------------------------------------------------------
|
||||
function IRCClient::invite(%p,%c)
|
||||
{
|
||||
IRCClient::send("INVITE" SPC %p.displayName SPC %c.getName());
|
||||
IRCClient::send("INVITE" SPC %p.displayName SPC %c.getName());
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -18,16 +18,23 @@ function GameGui::onWake( %this )
|
|||
{
|
||||
Canvas.pushDialog( LaunchToolbarDlg );
|
||||
|
||||
GM_Frame.setTitle( $PlayingOnline ? "GAME" : "LAN GAME" );
|
||||
if ( isDemo() || $PlayingOnline )
|
||||
GM_Frame.setTitle( "GAME" );
|
||||
else
|
||||
GM_Frame.setTitle( "LAN GAME" );
|
||||
|
||||
// This is essentially an "isInitialized" flag...
|
||||
if ( GM_TabView.tabCount() == 0 )
|
||||
{
|
||||
GM_TabView.addTab( 1, "JOIN" );
|
||||
GM_TabView.addTab( 2, "HOST" );
|
||||
GM_TabView.addTab( 3, "WARRIOR SETUP", 1 );
|
||||
|
||||
queryMasterGameTypes();
|
||||
if ( !isDemo() )
|
||||
{
|
||||
GM_TabView.addTab( 2, "HOST" );
|
||||
GM_TabView.addTab( 3, "WARRIOR SETUP", 1 );
|
||||
queryMasterGameTypes();
|
||||
}
|
||||
else
|
||||
%this.pane = "Join";
|
||||
}
|
||||
|
||||
switch$ ( %this.pane )
|
||||
|
|
@ -106,21 +113,27 @@ function GM_JoinPane::onActivate( %this )
|
|||
|
||||
if ( %this.onceOnly $= "" )
|
||||
{
|
||||
GM_VersionText.setText( "Version" SPC getT2VersionNumber() );
|
||||
GM_VersionText.setText( "Version" SPC getT2VersionNumber() );
|
||||
GMJ_StopBtn.setActive( false );
|
||||
|
||||
%this.onceOnly = 1;
|
||||
GMJ_Browser.lastQuery = $PlayingOnline ? "Master" : "LanServers";
|
||||
if ( isDemo() || isDemoServer() )
|
||||
GMJ_Browser.lastQuery = "Demo";
|
||||
else
|
||||
GMJ_Browser.lastQuery = $PlayingOnline ? "Master" : "LanServers";
|
||||
GMJ_Browser.runQuery();
|
||||
}
|
||||
|
||||
if ( isObject( BrowserMap ) )
|
||||
{
|
||||
BrowserMap.pop();
|
||||
BrowserMap.delete();
|
||||
}
|
||||
new ActionMap( BrowserMap );
|
||||
BrowserMap.bindCmd( keyboard, insert, "GMJ_Browser.insertIPAddress();", "" );
|
||||
BrowserMap.push();
|
||||
|
||||
GM_VersionText.setVisible( true );
|
||||
|
||||
// Use Server Info prefs:
|
||||
SI_Window.resize( firstWord( $pref::ServerBrowser::InfoWindowPos ),
|
||||
getWord( $pref::ServerBrowser::InfoWindowPos, 1 ),
|
||||
firstWord( $pref::ServerBrowser::InfoWindowExtent ),
|
||||
getWord( $pref::ServerBrowser::InfoWindowExtent, 1 ) );
|
||||
GM_VersionText.setVisible( !isDemo() );
|
||||
|
||||
if ( $pref::ServerBrowser::InfoWindowOpen )
|
||||
Canvas.pushDialog( ServerInfoDlg );
|
||||
|
|
@ -129,14 +142,12 @@ function GM_JoinPane::onActivate( %this )
|
|||
//------------------------------------------------------------------------------
|
||||
function GM_JoinPane::onDeactivate( %this )
|
||||
{
|
||||
BrowserMap.pop();
|
||||
BrowserMap.delete();
|
||||
|
||||
GM_VersionText.setVisible( false );
|
||||
|
||||
// Save off the Server Info Window prefs:
|
||||
$pref::ServerBrowser::InfoWindowOpen = GMJ_Browser.infoWindowOpen;
|
||||
$pref::ServerBrowser::InfoWindowPos = SI_Window.getPosition();
|
||||
$pref::ServerBrowser::InfoWindowExtent = SI_Window.getExtent();
|
||||
$pref::ServerBrowser::InfoWindowBarPos = getWord( SI_InfoScroll.getExtent(), 1 );
|
||||
|
||||
if ( GMJ_Browser.infoWindowOpen )
|
||||
Canvas.popDialog( ServerInfoDlg );
|
||||
}
|
||||
|
|
@ -173,9 +184,12 @@ $BrowserColumnCount++;
|
|||
$BrowserColumnName[9] = "IP Address";
|
||||
$BrowserColumnRange[9] = "25 200";
|
||||
$BrowserColumnCount++;
|
||||
$BrowserColumnName[10] = "Version";
|
||||
$BrowserColumnRange[10] = "25 200";
|
||||
$BrowserColumnCount++;
|
||||
if ( !isDemo() )
|
||||
{
|
||||
$BrowserColumnName[10] = "Version";
|
||||
$BrowserColumnRange[10] = "25 200";
|
||||
$BrowserColumnCount++;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function GMJ_Browser::onAdd( %this )
|
||||
|
|
@ -184,8 +198,11 @@ function GMJ_Browser::onAdd( %this )
|
|||
for ( %i = 0; %i < $BrowserColumnCount; %i++ )
|
||||
{
|
||||
%key = firstWord( $pref::ServerBrowser::Column[%i] );
|
||||
%width = getWord( $pref::ServerBrowser::Column[%i], 1 );
|
||||
%this.addColumn( %key, $BrowserColumnName[%key], %width, firstWord( $BrowserColumnRange[%key] ), getWord( $BrowserColumnRange[%key], 1 ) );
|
||||
if ( $BrowserColumnName[%key] !$= "" && $BrowserColumnRange[%key] !$= "" )
|
||||
{
|
||||
%width = getWord( $pref::ServerBrowser::Column[%i], 1 );
|
||||
%this.addColumn( %key, $BrowserColumnName[%key], %width, firstWord( $BrowserColumnRange[%key] ), getWord( $BrowserColumnRange[%key], 1 ) );
|
||||
}
|
||||
}
|
||||
%this.setSortColumn( $pref::ServerBrowser::SortColumnKey );
|
||||
%this.setSortIncreasing( $pref::ServerBrowser::SortInc );
|
||||
|
|
@ -233,6 +250,15 @@ function GMJ_Browser::runQuery( %this )
|
|||
queryLanServers( $JoinGamePort );
|
||||
GMJ_StopBtn.setActive( true );
|
||||
}
|
||||
else if ( %this.lastQuery $= "Demo" )
|
||||
{
|
||||
GMJ_StatusText.setValue( "Querying the master server..." );
|
||||
GMJ_FilterBtn.setActive( false );
|
||||
GMJ_FilterBtn.setVisible( false );
|
||||
GMJ_FilterText.setText( "Demo Servers" );
|
||||
queryMasterServer( $JoinGamePort );
|
||||
GMJ_StopBtn.setActive( true );
|
||||
}
|
||||
else
|
||||
{
|
||||
GMJ_FilterBtn.setActive( true );
|
||||
|
|
@ -438,6 +464,36 @@ function GMJ_Browser::removeFavorite( %this, %address )
|
|||
$pref::ServerBrowser::FavoriteCount--;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function GMJ_Browser::insertIPAddress( %this )
|
||||
{
|
||||
if ( isServerQueryActive() )
|
||||
{
|
||||
BrowserMap.pop();
|
||||
MessageBoxOK( "ERROR", "Can't insert addresses while a query is running!", "BrowserMap.push();" );
|
||||
alxPlay( InputDeniedSound, 0, 0, 0 );
|
||||
return;
|
||||
}
|
||||
|
||||
IPEntry.setText( "IP:" );
|
||||
Canvas.pushDialog( EnterIPDlg );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function EnterIPDlg::onDone( %this )
|
||||
{
|
||||
Canvas.popDialog( EnterIPDlg );
|
||||
%address = IPEntry.getValue();
|
||||
if ( getSubStr( %address, 0, 3 ) !$= "IP:" )
|
||||
%address = "IP:" @ %address;
|
||||
if ( strpos( %address, ":", 3 ) == -1 )
|
||||
%address = %address @ ":28000";
|
||||
|
||||
error( ">> address = \"" @ %address @ "\" <<" );
|
||||
pushServerAddress( %address );
|
||||
GMJ_Browser.selectRowByAddress( %address );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function ServerInfoDlg::onAdd( %this )
|
||||
{
|
||||
|
|
@ -448,6 +504,25 @@ function ServerInfoDlg::onAdd( %this )
|
|||
function ServerInfoDlg::onWake( %this )
|
||||
{
|
||||
GMJ_Browser.infoWindowOpen = true;
|
||||
|
||||
// Get the position and size from the prefs:
|
||||
%res = getResolution();
|
||||
%resW = firstWord( %res );
|
||||
%resH = getWord( %res, 1 );
|
||||
%w = firstWord( $pref::ServerBrowser::InfoWindowExtent );
|
||||
if ( %w > %resW )
|
||||
%w = %resW;
|
||||
%h = getWord( $pref::ServerBrowser::InfoWindowExtent, 1 );
|
||||
if ( %h > %resH )
|
||||
%h = %resH;
|
||||
%x = firstWord( $pref::ServerBrowser::InfoWindowPos );
|
||||
if ( %x > %resW - %w )
|
||||
%x = %resW - %w;
|
||||
%y = getWord( $pref::ServerBrowser::InfoWindowPos, 1 );
|
||||
if ( %y > %resH - %h )
|
||||
%y = %resH - %h;
|
||||
SI_Window.resize( %x, %y, %w, %h );
|
||||
|
||||
GMJ_InfoBtn.setActive( false );
|
||||
SI_RefreshBtn.setActive( false );
|
||||
%this.update();
|
||||
|
|
@ -572,6 +647,12 @@ function SI_ContentWindow::fill( %this, %content )
|
|||
function ServerInfoDlg::onSleep( %this )
|
||||
{
|
||||
GMJ_Browser.infoWindowOpen = false;
|
||||
|
||||
// Save off the Server Info Window prefs:
|
||||
$pref::ServerBrowser::InfoWindowPos = SI_Window.getPosition();
|
||||
$pref::ServerBrowser::InfoWindowExtent = SI_Window.getExtent();
|
||||
$pref::ServerBrowser::InfoWindowBarPos = getWord( SI_InfoScroll.getExtent(), 1 );
|
||||
|
||||
GMJ_InfoBtn.setActive( true );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -83,7 +83,17 @@ function LaunchToolbarDlg::onWake(%this)
|
|||
|
||||
LaunchToolbarMenu.clear();
|
||||
|
||||
if ( $PlayingOnline )
|
||||
if ( isDemo() )
|
||||
{
|
||||
LaunchToolbarMenu.add( 1, "TRAINING" );
|
||||
LaunchToolbarMenu.add( 0, "GAME" );
|
||||
LaunchToolbarMenu.add( 2, "NEWS" );
|
||||
//LaunchToolbarMenu.add( 3, "FORUMS" );
|
||||
//LaunchToolbarMenu.add( 4, "EMAIL" );
|
||||
//LaunchToolbarMenu.add( 5, "CHAT" );
|
||||
//LaunchToolbarMenu.add( 6, "BROWSER" );
|
||||
}
|
||||
else if ( $PlayingOnline )
|
||||
{
|
||||
LaunchToolbarMenu.add( 0, "GAME" );
|
||||
LaunchToolbarMenu.add( 2, "NEWS" );
|
||||
|
|
@ -111,7 +121,17 @@ function LaunchToolbarDlg::onWake(%this)
|
|||
// LaunchToolbarMenu.add( 11, "LOG ON" );
|
||||
LaunchToolbarMenu.add( 9, "QUIT" );
|
||||
|
||||
LaunchToolbarCloseButton.setVisible( LaunchTabView.tabCount() > 0 );
|
||||
%on = false;
|
||||
for ( %tab = 0; %tab < LaunchTabView.tabCount(); %tab++ )
|
||||
{
|
||||
if ( LaunchTabView.isTabActive( %tab ) )
|
||||
{
|
||||
%on = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
LaunchToolbarCloseButton.setVisible( %on );
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
|
@ -125,14 +145,25 @@ function OpenLaunchTabs( %gotoWarriorSetup )
|
|||
$FirstLaunch = "";
|
||||
|
||||
// Set up all of the launch bar tabs:
|
||||
if ( $PlayingOnline )
|
||||
if ( isDemo() )
|
||||
{
|
||||
LaunchTabView.addLaunchTab( "TRAINING", TrainingGui );
|
||||
LaunchTabView.addLaunchTab( "GAME", GameGui );
|
||||
LaunchTabView.addLaunchTab( "NEWS", NewsGui );
|
||||
LaunchTabView.addLaunchTab( "FORUMS", "", true );
|
||||
LaunchTabView.addLaunchTab( "EMAIL", "", true );
|
||||
LaunchTabView.addLaunchTab( "CHAT", "", true );
|
||||
LaunchTabView.addLaunchTab( "BROWSER", "", true );
|
||||
%launchGui = GameGui;
|
||||
}
|
||||
else 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 );
|
||||
LaunchTabView.addLaunchTab( "BROWSER", TribeandWarriorBrowserGui);
|
||||
|
||||
switch$ ( $pref::Shell::LaunchGui )
|
||||
{
|
||||
|
|
@ -140,7 +171,7 @@ function OpenLaunchTabs( %gotoWarriorSetup )
|
|||
case "Forums": %launchGui = ForumsGui;
|
||||
case "Email": %launchGui = EmailGui;
|
||||
case "Chat": %launchGui = ChatGui;
|
||||
case "Browser": %launchGui = TribeAndWarriorBrowserGui;
|
||||
case "Browser": %launchGui = TribeandWarriorBrowserGui;
|
||||
default: %launchGui = GameGui;
|
||||
}
|
||||
}
|
||||
|
|
@ -158,12 +189,14 @@ function OpenLaunchTabs( %gotoWarriorSetup )
|
|||
}
|
||||
|
||||
//--------------------------------------------------------
|
||||
function LaunchTabView::addLaunchTab( %this, %text, %gui )
|
||||
function LaunchTabView::addLaunchTab( %this, %text, %gui, %makeInactive )
|
||||
{
|
||||
%tabCount = %this.tabCount();
|
||||
%this.gui[%tabCount] = %gui;
|
||||
%this.key[%tabCount] = 0;
|
||||
%this.addTab( %tabCount, %text );
|
||||
if ( %makeInactive )
|
||||
%this.setTabActive( %tabCount, false );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------
|
||||
|
|
@ -219,10 +252,13 @@ function LaunchTabView::closeCurrentTab( %this )
|
|||
function LaunchTabView::closeTab( %this, %gui, %key )
|
||||
{
|
||||
%tabCount = %this.tabCount();
|
||||
for ( %tab = 0; %tab < %tabCount; %tab++ )
|
||||
%activeCount = 0;
|
||||
for ( %i = 0; %i < %tabCount; %i++ )
|
||||
{
|
||||
if( %this.gui[%tab] $= %gui && %this.key[%tab] $= %key )
|
||||
break;
|
||||
if ( %this.gui[%i] $= %gui && %this.key[%i] $= %key )
|
||||
%tab = %i;
|
||||
else if ( %this.isTabActive( %i ) )
|
||||
%activeCount++;
|
||||
}
|
||||
|
||||
if ( %tab == %tabCount )
|
||||
|
|
@ -237,7 +273,7 @@ function LaunchTabView::closeTab( %this, %gui, %key )
|
|||
%this.removeTabByIndex( %tab );
|
||||
%gui.onClose( %key );
|
||||
|
||||
if ( %tabCount == 1 )
|
||||
if ( %activeCount == 0 )
|
||||
{
|
||||
%this.lastTab = "";
|
||||
Canvas.setContent( LaunchGui );
|
||||
|
|
@ -275,7 +311,10 @@ function LaunchGui::onWake(%this)
|
|||
if ( !$FirstLaunch )
|
||||
LaunchTabView.viewLastTab();
|
||||
|
||||
checkNamesAndAliases();
|
||||
if ( !isDemo() )
|
||||
checkNamesAndAliases();
|
||||
else
|
||||
OpenLaunchTabs();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -185,6 +185,18 @@ function OptionsDlg::onWake( %this )
|
|||
%selId = 1;
|
||||
OP_LaunchScreenMenu.setText( OP_LaunchScreenMenu.getTextById( %selId ) );
|
||||
OP_LaunchScreenMenu.setSelected( %selId );
|
||||
|
||||
// Hide controls that are not relevant to the demo:
|
||||
if ( isDemo() )
|
||||
{
|
||||
OP_MasterServerTxt.setVisible( false );
|
||||
OP_MasterServerMenu.setVisible( false );
|
||||
OP_CheckEmailTgl.setVisible( false );
|
||||
OP_ChatDisconnectTgl.setVisible( false );
|
||||
OP_EditChatMenuBtn.setVisible( false );
|
||||
OP_LaunchScreenTxt.setVisible( false );
|
||||
OP_LaunchScreenMenu.setVisible( false );
|
||||
}
|
||||
|
||||
%this.setPane( %this.pane );
|
||||
}
|
||||
|
|
@ -1160,17 +1172,15 @@ function OP_VoiceListenMenu::init( %this )
|
|||
%this.add( ".v12", 1 );
|
||||
%this.add( ".v12 - .v24", 3 );
|
||||
%this.add( ".v12 - .v29", 7 );
|
||||
%this.add( ".v12 - .gsm", 15 );
|
||||
|
||||
switch ( $pref::Audio::decodingMask )
|
||||
{
|
||||
case 0 or 3 or 7 or 15:
|
||||
case 0 or 3 or 7:
|
||||
%this.setSelected( $pref::Audio::decodingMask );
|
||||
default:
|
||||
%this.setSelected( 1 );
|
||||
}
|
||||
|
||||
// Linux only has the GSM codec available for now
|
||||
if ( $platform $= "linux" ) {
|
||||
%this.setActive(false);
|
||||
}
|
||||
|
|
@ -1183,11 +1193,9 @@ function OP_VoiceSendMenu::init( %this )
|
|||
%this.add( ".v12", 0 );
|
||||
%this.add( ".v24", 1 );
|
||||
%this.add( ".v29", 2 );
|
||||
%this.add( ".gsm", 3 );
|
||||
|
||||
%this.setSelected($pref::Audio::encodingLevel);
|
||||
|
||||
// Linux only has the GSM codec available for now
|
||||
if ( $platform $= "linux" ) {
|
||||
%this.setActive(false);
|
||||
}
|
||||
|
|
@ -1201,7 +1209,6 @@ function OP_VoiceCodecInfo::init( %this )
|
|||
" .v12: variable bitrate codec (~1.2 kbits/sec win only)" NL
|
||||
" .v24: fixed bitrate codec (2.4 kbits/sec win only)" NL
|
||||
" .v29: fixed bitrate codec (2.9 kbits/sec win only)" NL
|
||||
" .gsm: fixed bitrate codec (6.6 kbits/sec win/linux)" NL
|
||||
"\n" @
|
||||
"<bitmap:bullet_2><lmargin:24>" @
|
||||
"Setting your codec levels too high can have adverse" @
|
||||
|
|
|
|||
|
|
@ -252,6 +252,7 @@ function TrainingGui::startTraining( %this )
|
|||
{
|
||||
MessagePopup( "STARTING MISSION", "Initializing, please wait..." );
|
||||
Canvas.repaint();
|
||||
cancelServerQuery();
|
||||
%file = getField( TrainingMissionList.getValue(), 1 );
|
||||
$ServerName = "Single Player Training";
|
||||
$HostGameType = "SinglePlayer";
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ $VoteMessage["VoteChangeMission"] = "change the mission to";
|
|||
$VoteMessage["VoteTeamDamage", 0] = "enable team damage";
|
||||
$VoteMessage["VoteTeamDamage", 1] = "disable team damage";
|
||||
$VoteMessage["VoteTournamentMode"] = "change the server to";
|
||||
$VoteMessage["VoteFFAMode"] = "change the server to";
|
||||
$VoteMessage["VoteChangeTimeLimit"] = "change the time limit to";
|
||||
$VoteMessage["VoteMatchStart"] = "start the match";
|
||||
$VoteMessage["VoteGreedMode", 0] = "enable Hoard Mode";
|
||||
|
|
@ -15,6 +16,13 @@ $VoteMessage["VoteHoardMode", 1] = "disable Greed Mode";
|
|||
|
||||
function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %playerVote)
|
||||
{
|
||||
//DEMO VERSION - only voteKickPlayer is allowed
|
||||
if ((isDemo() || isDemoServer()) && %typeName !$= "VoteKickPlayer")
|
||||
{
|
||||
messageClient(%client, '', "All voting options except to kick a player are disabled in the DEMO VERSION.");
|
||||
return;
|
||||
}
|
||||
|
||||
// haha - who gets the last laugh... No admin for you!
|
||||
if( %typeName $= "VoteAdminPlayer" && !$Host::allowAdminPlayerVotes )
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -50,9 +50,9 @@ function clientCmdPickTeamMenu( %teamA, %teamB )
|
|||
|
||||
function clientCmdProcessPickTeam( %option )
|
||||
{
|
||||
if( %option <= 4 )
|
||||
if( %option !$= "" && %option <= 4 )
|
||||
CommandToServer( 'clientPickedTeam', %option );
|
||||
else if( %option == 5 )
|
||||
else if( %option !$= "" && %option == 5 )
|
||||
disconnect();
|
||||
|
||||
Canvas.popDialog( PickTeamDlg );
|
||||
|
|
@ -64,16 +64,13 @@ $LastHudTarget = 0;
|
|||
|
||||
function addMessageHudLine(%text)
|
||||
{
|
||||
//first, see if we're "scrolled up"...
|
||||
%textHeight = chatHud.profile.fontSize;
|
||||
if (%textHeight <= 0)
|
||||
%textHeight = 12;
|
||||
%chatScrollHeight = getWord(chatHud.getGroup().getGroup().extent, 1);
|
||||
%chatPosition = getWord(chatHud.extent, 1) - %chatScrollHeight + getWord(chatHud.position, 1);
|
||||
%linesToScroll = mFloor((%chatPosition / %textHeight) + 0.5);
|
||||
if (%linesToScroll > 0)
|
||||
%adjustPos = false;
|
||||
if( chatPageDown.isVisible() )
|
||||
{
|
||||
%adjustPos = true;
|
||||
%origPosition = chatHud.position;
|
||||
|
||||
}
|
||||
|
||||
//add the message...
|
||||
while( !chatPageDown.isVisible() && HudMessageVector.getNumLines() && (HudMessageVector.getNumLines() >= $pref::HudMessageLogSize))
|
||||
{
|
||||
|
|
@ -86,7 +83,7 @@ function addMessageHudLine(%text)
|
|||
$LastHudTarget = 0;
|
||||
|
||||
//now that we've added the message, see if we need to reset the position
|
||||
if (%linesToScroll > 0)
|
||||
if ( %adjustPos )
|
||||
{
|
||||
chatPageDown.setVisible(true);
|
||||
ChatPageDown.position = ( firstWord( outerChatHud.extent ) - 20 ) @ " " @ ( $chatScrollLenY[$Pref::chatHudLength] - 6 );
|
||||
|
|
@ -466,8 +463,8 @@ function clientCmdToggleDashHud(%val)
|
|||
if(isObject(turreteerHud))
|
||||
turreteerHud.delete();
|
||||
// reset in case of vehicle-specific reticle
|
||||
reticleHud.setBitmap("");
|
||||
reticleFrameHud.setVisible(false);
|
||||
//reticleHud.setBitmap("");
|
||||
//reticleFrameHud.setVisible(false);
|
||||
}
|
||||
dashboardHud.setVisible(%val);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,6 +89,18 @@ function initAudio()
|
|||
alxSetChannelVolume( $RadioAudioType, $pref::Audio::radioVolume );
|
||||
|
||||
alxSetCaptureGainScale( $pref::Audio::captureGainScale );
|
||||
|
||||
// cap the codec levels
|
||||
if( $platform $= "linux" )
|
||||
{
|
||||
$pref::Audio::encodingLevel = -1;
|
||||
$pref::Audio::decodingMask = 0;
|
||||
}
|
||||
|
||||
if( $pref::Audio::encodingLevel > 2)
|
||||
$pref::Audio::encodingLevel = 2;
|
||||
|
||||
$pref::Audio::decodingMask &= 7;
|
||||
}
|
||||
|
||||
if($Audio::initialized)
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ $pref::Audio::channels = 2;
|
|||
$pref::Audio::enableVoiceCapture = 1;
|
||||
$pref::Audio::voiceChannels = 1;
|
||||
if ( $platform $= "linux" ) {
|
||||
$pref::Audio::encodingLevel = 3;
|
||||
$pref::Audio::decodingMask = 15;
|
||||
$pref::Audio::encodingLevel = -1;
|
||||
$pref::Audio::decodingMask = 0;
|
||||
} else {
|
||||
$pref::Audio::encodingLevel = 0;
|
||||
$pref::Audio::decodingMask = 1;
|
||||
|
|
@ -32,6 +32,8 @@ $pref::Email::Column0 = 30;
|
|||
$pref::Email::Column1 = 250;
|
||||
$pref::Email::Column2 = 250;
|
||||
$pref::Email::Column3 = 150;
|
||||
$pref::Email::ComposeWindowPos = "74 32";
|
||||
$pref::Email::ComposeWindowExtent = "500 408";
|
||||
$pref::Email::SortColumnKey = 3;
|
||||
$pref::Email::SortInc = 1;
|
||||
$pref::EnableBadWordFilter = 1;
|
||||
|
|
@ -79,6 +81,8 @@ $pref::Forum::Column0 = 290;
|
|||
$pref::Forum::Column1 = 265;
|
||||
$pref::Forum::Column2 = 159;
|
||||
$pref::Forum::CacheSize = 100;
|
||||
$pref::Forum::PostWindowPos = "69 32";
|
||||
$pref::Forum::PostWindowExtent = "500 408";
|
||||
$pref::HudMessageLogSize = 40;
|
||||
$pref::Input::ActiveConfig = "MyConfig";
|
||||
$pref::Input::LinkMouseSensitivity = 1;
|
||||
|
|
@ -105,7 +109,8 @@ $pref::Net::RegionMask = 2;
|
|||
$pref::Net::CheckEmail = 0;
|
||||
$pref::Net::DisconnectChat = 0;
|
||||
$pref::Net::LagThreshold = 400;
|
||||
$pref::overrideTeamSkins = 0;
|
||||
$pref::News::PostWindowPos = "85 39";
|
||||
$pref::News::PostWindowExtent = "470 396";
|
||||
$pref::Player::Count = 0;
|
||||
$pref::Player::Current = 0;
|
||||
$pref::Player::defaultFov = 90;
|
||||
|
|
@ -126,7 +131,8 @@ $pref::ServerBrowser::Column6 = "8 56";
|
|||
$pref::ServerBrowser::Column7 = "9 155";
|
||||
$pref::ServerBrowser::Column8 = "4 89";
|
||||
$pref::ServerBrowser::Column9 = "6 74";
|
||||
$pref::ServerBrowser::Column10 = "10 70";
|
||||
if ( !isDemo() )
|
||||
$pref::ServerBrowser::Column10 = "10 70";
|
||||
$pref::ServerBrowser::FavoriteCount = 0;
|
||||
$pref::ServerBrowser::SortColumnKey = 0;
|
||||
$pref::ServerBrowser::SortInc = 1;
|
||||
|
|
|
|||
|
|
@ -336,4 +336,7 @@ function TaskHudDlg::onSleep(%this)
|
|||
TaskHudMap.pop();
|
||||
TaskList.setVisible(false);
|
||||
TaskList.updateSelected(false);
|
||||
|
||||
//make sure the action maps are still pushed in the correct order...
|
||||
updateActionMaps();
|
||||
}
|
||||
|
|
@ -1330,4 +1330,5 @@ function cycleDebugRenderMode()
|
|||
}
|
||||
|
||||
// Since the toggle console key is remappable, put it here:
|
||||
GlobalActionMap.bind(keyboard, "grave", toggleConsole);
|
||||
if (!isDemo())
|
||||
GlobalActionMap.bind(keyboard, "grave", toggleConsole);
|
||||
|
|
|
|||
|
|
@ -379,7 +379,7 @@ addCreditsLine("Gino \"tAngGSI\" Gard");
|
|||
addCreditsLine("Glenn \"IcyHot\" Wisbey");
|
||||
addCreditsLine("Gregory \"Brak Panda\" Pesochin");
|
||||
addCreditsLine("Gregory \"Strife\" Hill");
|
||||
addCreditsLine("Hannes \"Skace\" Wagner");
|
||||
addCreditsLine("Hannes \"Cohen\" Wagner");
|
||||
addCreditsLine("Ian \"Kowboy\" Gonsalves");
|
||||
addCreditsLine("Ian Threadgold");
|
||||
addCreditsLine("J Alex \"Blackheart\" Wheeler");
|
||||
|
|
@ -456,6 +456,7 @@ addCreditsLine("Shane \"Mental Trousers\" Taylor");
|
|||
addCreditsLine("Shane \"Santa\" Beaumont");
|
||||
addCreditsLine("Shane \"Shaneman\" Evans");
|
||||
addCreditsLine("Stefan Grufman");
|
||||
addCreditsLine("Stefan \"Skace\" Kiehne");
|
||||
addCreditsLine("Stephen \"Cato\" Farquhar");
|
||||
addCreditsLine("Stephen \"SL83\" Limowski");
|
||||
addCreditsLine("Steve \"Presto\" Eisner");
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ $DamageTypeText[99] = "suicide";
|
|||
//**** SHRIKE SCOUT FIGHTER ****
|
||||
datablock SimDataBlock(ShrikeDamageProfile)
|
||||
{
|
||||
shieldDamageScale[$DamageType::Blaster] = 1.0;
|
||||
shieldDamageScale[$DamageType::Blaster] = 1.75;
|
||||
shieldDamageScale[$DamageType::Bullet] = 1.75;
|
||||
shieldDamageScale[$DamageType::ELF] = 1.0;
|
||||
shieldDamageScale[$DamageType::ShockLance] = 0.5;
|
||||
|
|
@ -108,10 +108,10 @@ datablock SimDataBlock(ShrikeDamageProfile)
|
|||
shieldDamageScale[$DamageType::ShrikeBlaster] = 4.0;
|
||||
shieldDamageScale[$DamageType::BellyTurret] = 2.0;
|
||||
shieldDamageScale[$DamageType::AATurret] = 3.0;
|
||||
shieldDamageScale[$DamageType::IndoorDepTurret] = 2.25;
|
||||
shieldDamageScale[$DamageType::OutdoorDepTurret] = 2.25;
|
||||
shieldDamageScale[$DamageType::SentryTurret] = 2.25;
|
||||
shieldDamageScale[$DamageType::Disc] = 1.0;
|
||||
shieldDamageScale[$DamageType::IndoorDepTurret] = 2.5;
|
||||
shieldDamageScale[$DamageType::OutdoorDepTurret] = 2.5;
|
||||
shieldDamageScale[$DamageType::SentryTurret] = 2.5;
|
||||
shieldDamageScale[$DamageType::Disc] = 1.5;
|
||||
shieldDamageScale[$DamageType::Grenade] = 1.0;
|
||||
shieldDamageScale[$DamageType::Mine] = 3.0;
|
||||
shieldDamageScale[$DamageType::Missile] = 3.0;
|
||||
|
|
@ -138,13 +138,13 @@ datablock SimDataBlock(ShrikeDamageProfile)
|
|||
damageScale[$DamageType::ShrikeBlaster] = 3.5;
|
||||
damageScale[$DamageType::BellyTurret] = 1.2;
|
||||
damageScale[$DamageType::AATurret] = 1.5;
|
||||
damageScale[$DamageType::IndoorDepTurret] = 1.25;
|
||||
damageScale[$DamageType::OutdoorDepTurret] = 1.25;
|
||||
damageScale[$DamageType::SentryTurret] = 1.25;
|
||||
damageScale[$DamageType::Disc] = 1.0;
|
||||
damageScale[$DamageType::IndoorDepTurret] = 1.5;
|
||||
damageScale[$DamageType::OutdoorDepTurret] = 1.5;
|
||||
damageScale[$DamageType::SentryTurret] = 1.5;
|
||||
damageScale[$DamageType::Disc] = 1.25;
|
||||
damageScale[$DamageType::Grenade] = 0.75;
|
||||
damageScale[$DamageType::Mine] = 4.0;
|
||||
damageScale[$DamageType::Missile] = 1.5;
|
||||
damageScale[$DamageType::Missile] = 2.0;
|
||||
damageScale[$DamageType::Mortar] = 2.0;
|
||||
damageScale[$DamageType::Plasma] = 0.5;
|
||||
damageScale[$DamageType::BomberBombs] = 2.0;
|
||||
|
|
@ -297,19 +297,19 @@ datablock SimDataBlock(WildcatDamageProfile)
|
|||
shieldDamageScale[$DamageType::ELF] = 1.0;
|
||||
shieldDamageScale[$DamageType::ShockLance] = 1.0;
|
||||
shieldDamageScale[$DamageType::Laser] = 4.0;
|
||||
shieldDamageScale[$DamageType::ShrikeBlaster] = 5.0;
|
||||
shieldDamageScale[$DamageType::ShrikeBlaster] = 6.0;
|
||||
shieldDamageScale[$DamageType::BellyTurret] = 2.0;
|
||||
shieldDamageScale[$DamageType::AATurret] = 2.0;
|
||||
shieldDamageScale[$DamageType::IndoorDepTurret] = 2.5;
|
||||
shieldDamageScale[$DamageType::OutdoorDepTurret] = 2.5;
|
||||
shieldDamageScale[$DamageType::Disc] = 2.5;
|
||||
shieldDamageScale[$DamageType::Grenade] = 2.0;
|
||||
shieldDamageScale[$DamageType::Mine] = 3.5;
|
||||
shieldDamageScale[$DamageType::Mine] = 4.0;
|
||||
shieldDamageScale[$DamageType::Missile] = 4.0;
|
||||
shieldDamageScale[$DamageType::Mortar] = 2.0;
|
||||
shieldDamageScale[$DamageType::Plasma] = 1.6;
|
||||
shieldDamageScale[$DamageType::BomberBombs] = 2.0;
|
||||
shieldDamageScale[$DamageType::TankChaingun] = 2.0;
|
||||
shieldDamageScale[$DamageType::Plasma] = 2.0;
|
||||
shieldDamageScale[$DamageType::BomberBombs] = 2.5;
|
||||
shieldDamageScale[$DamageType::TankChaingun] = 3.0;
|
||||
shieldDamageScale[$DamageType::TankMortar] = 2.0;
|
||||
shieldDamageScale[$DamageType::MissileTurret] = 4.0;
|
||||
shieldDamageScale[$DamageType::MortarTurret] = 2.0;
|
||||
|
|
@ -326,7 +326,7 @@ datablock SimDataBlock(WildcatDamageProfile)
|
|||
damageScale[$DamageType::ELF] = 0.0;
|
||||
damageScale[$DamageType::ShockLance] = 0.50;
|
||||
damageScale[$DamageType::Laser] = 2.0;
|
||||
damageScale[$DamageType::ShrikeBlaster] = 2.5;
|
||||
damageScale[$DamageType::ShrikeBlaster] = 4.0;
|
||||
damageScale[$DamageType::BellyTurret] = 1.5;
|
||||
damageScale[$DamageType::AATurret] = 1.0;
|
||||
damageScale[$DamageType::IndoorDepTurret] = 1.0;
|
||||
|
|
@ -336,9 +336,9 @@ datablock SimDataBlock(WildcatDamageProfile)
|
|||
damageScale[$DamageType::Mine] = 4.0;
|
||||
damageScale[$DamageType::Missile] = 1.2;
|
||||
damageScale[$DamageType::Mortar] = 1.0;
|
||||
damageScale[$DamageType::Plasma] = 1.2;
|
||||
damageScale[$DamageType::BomberBombs] = 1.0;
|
||||
damageScale[$DamageType::TankChaingun] = 1.0;
|
||||
damageScale[$DamageType::Plasma] = 1.5;
|
||||
damageScale[$DamageType::BomberBombs] = 2.0;
|
||||
damageScale[$DamageType::TankChaingun] = 2.0;
|
||||
damageScale[$DamageType::TankMortar] = 1.0;
|
||||
damageScale[$DamageType::MissileTurret] = 1.2;
|
||||
damageScale[$DamageType::MortarTurret] = 1.0;
|
||||
|
|
@ -686,7 +686,7 @@ datablock SimDataBlock(HeavyPlayerDamageProfile)
|
|||
damageScale[$DamageType::Bullet] = 0.6;
|
||||
damageScale[$DamageType::ELF] = 0.75;
|
||||
damageScale[$DamageType::ShockLance] = 1.0;
|
||||
damageScale[$DamageType::Laser] = 0.63;
|
||||
damageScale[$DamageType::Laser] = 0.67;
|
||||
damageScale[$DamageType::ShrikeBlaster] = 1.0;
|
||||
damageScale[$DamageType::BellyTurret] = 1.0;
|
||||
damageScale[$DamageType::AATurret] = 0.7;
|
||||
|
|
|
|||
|
|
@ -39,6 +39,9 @@ $DeathMessageSuicide[4] = '\c0%1 self-destructs in a fit of ennui.';
|
|||
$DeathMessageVehPadCount = 1;
|
||||
$DeathMessageVehPad[0] = '\c0%1 got caught in a vehicle\'s spawn field.';
|
||||
|
||||
$DeathMessageRogueMineCount = 1;
|
||||
$DeathMessageRogueMine[$DamageType::Mine, 0] = '\c0%1 is all mine.';
|
||||
|
||||
//these used when a player kills himself (other than by using ctrl - k)
|
||||
$DeathMessageSelfKillCount = 5;
|
||||
$DeathMessageSelfKill[$DamageType::Blaster, 0] = '\c0%1 kills %2self with a blaster.';
|
||||
|
|
@ -349,9 +352,9 @@ $DeathMessageCTurretKill[$DamageType::TankMortars, 0] = '\c0Whoops! %1 + %4\'s t
|
|||
$DeathMessageCTurretKill[$DamageType::TankMortars, 1] = '\c0%1 learns the happy explosion dance from %4\'s tank mortar.';
|
||||
$DeathMessageCTurretKill[$DamageType::TankMortars, 2] = '\c0%4\'s tank mortar has a blast with %1.';
|
||||
|
||||
$DeathMessageCTurretKill[$DamageType::ShrikeBlaster, 0] = '\c0%1 lunches on a Shrike blaster sandwich, courtesy of %4.';
|
||||
$DeathMessageCTurretKill[$DamageType::ShrikeBlaster, 1] = '\c0%4\'s Shrike blaster catches %1 with %3 pants down.';
|
||||
$DeathMessageCTurretKill[$DamageType::ShrikeBlaster, 2] = '\c0%1 gets drilled big-time by %4\'s Shrike blaster.';
|
||||
$DeathMessageCTurretKill[$DamageType::ShrikeBlaster, 0] = '\c0%1 dines on a Shrike blaster sandwich, courtesy of %4.';
|
||||
$DeathMessageCTurretKill[$DamageType::ShrikeBlaster, 1] = '\c0The blaster of %4\'s Shrike turns %1 into finely shredded meat.';
|
||||
$DeathMessageCTurretKill[$DamageType::ShrikeBlaster, 2] = '\c0%1 gets drilled big-time by the blaster of %4\'s Shrike.';
|
||||
|
||||
$DeathMessageCTurretKill[$DamageType::MPBMissile, 0] = '\c0%1 intersects nicely with %4\'s MPB Missile.';
|
||||
$DeathMessageCTurretKill[$DamageType::MPBMissile, 1] = '\c0%4\'s MPB Missile makes armored chowder out of %1.';
|
||||
|
|
|
|||
|
|
@ -753,6 +753,18 @@ function DefaultGame::onClientDamaged(%game, %clVictim, %clAttacker, %damageType
|
|||
%clVictim.lastDamageTurretTime = getSimTime();
|
||||
%clVictim.lastDamageTurret = %sourceObject;
|
||||
}
|
||||
|
||||
%turretAttacker = %sourceObject.getControllingClient();
|
||||
// should get a damagae message from friendly fire turrets also
|
||||
if(%turretAttacker && %turretAttacker != %clVictim && %turretAttacker.team == %clVictim.team)
|
||||
{
|
||||
if (%game.numTeams > 1 && %turretAttacker.player.causedRecentDamage != %clVictim.player) //is a teamgame & player just damaged a teammate
|
||||
{
|
||||
%turretAttacker.player.causedRecentDamage = %clVictim.player;
|
||||
%turretAttacker.player.schedule(1000, "causedRecentDamage", ""); //allow friendly fire message every x ms
|
||||
%game.friendlyFireMessage(%clVictim, %turretAttacker);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (%sourceClassType $= "PlayerData")
|
||||
{
|
||||
|
|
@ -1076,7 +1088,7 @@ function DefaultGame::displayDeathMessages(%game, %clVictim, %clKiller, %damageT
|
|||
logEcho(%clVictim.nameBase@" (pl "@%clVictim.player@"/cl "@%clVictim@") killed by a vehicle (unmanned)");
|
||||
}
|
||||
}
|
||||
else if (isObject(%implement) && (%implement.getClassName() $= "Turret" || %implement.getClassName() $= "VehicleTurret")) //player killed by a turret
|
||||
else if (isObject(%implement) && (%implement.getClassName() $= "Turret" || %implement.getClassName() $= "VehicleTurret" || %implement.getClassName() $= "FlyingVehicle" )) //player killed by a turret
|
||||
{
|
||||
if (%implement.getControllingClient() != 0) //is turret being controlled?
|
||||
{
|
||||
|
|
@ -1150,6 +1162,11 @@ function DefaultGame::displayDeathMessages(%game, %clVictim, %clKiller, %damageT
|
|||
messageAll('msgLightningKill', $DeathMessageLightning[mFloor(getRandom() * $DeathMessageLightningCount)], %victimName, %victimGender, %victimPoss, %killerName, %killerGender, %killerPoss, %damageType);
|
||||
logEcho(%clVictim.nameBase@" (pl "@%clVictim.player@"/cl "@%clVictim@") killed by lightning");
|
||||
}
|
||||
else if ( %damageType == $DamageType::Mine && !isObject(%implement) )
|
||||
{
|
||||
error("Mine kill w/o source");
|
||||
messageAll('MsgRogueMineKill', $DeathMessageRogueMine[%damageType, mFloor(getRandom() * $DeathMessageRogueMineCount)], %victimName, %victimGender, %victimPoss, %killerName, %killerGender, %killerPoss, %damageType);
|
||||
}
|
||||
else //was a legitimate enemy kill
|
||||
{
|
||||
if(%damageType == 6 && (%clVictim.headShot))
|
||||
|
|
@ -2352,8 +2369,8 @@ function DefaultGame::sendGamePlayerPopupMenu( %game, %client, %targetClient, %k
|
|||
%outrankTarget = !%targetClient.isSuperAdmin;
|
||||
else if ( %client.isAdmin )
|
||||
%outrankTarget = !%targetClient.isAdmin;
|
||||
|
||||
if( %client.isSuperAdmin && %targetClient.guid != 0 )
|
||||
|
||||
if( %client.isSuperAdmin && %targetClient.guid != 0 && !isDemo() && !isDemoServer())
|
||||
{
|
||||
messageClient( %client, 'MsgPlayerPopupItem', "", %key, "addAdmin", "", 'Add to Server Admin List', 10);
|
||||
messageClient( %client, 'MsgPlayerPopupItem', "", %key, "addSuperAdmin", "", 'Add to Server SuperAdmin List', 11);
|
||||
|
|
@ -2363,9 +2380,9 @@ function DefaultGame::sendGamePlayerPopupMenu( %game, %client, %targetClient, %k
|
|||
if ( !%isTargetSelf )
|
||||
{
|
||||
if ( %client.muted[%targetClient] )
|
||||
messageClient( %client, 'MsgPlayerPopupItem', "", %key, "MutePlayer", "", 'Unmute', 1);
|
||||
messageClient( %client, 'MsgPlayerPopupItem', "", %key, "MutePlayer", "", 'Unmute Text Chat', 1);
|
||||
else
|
||||
messageClient( %client, 'MsgPlayerPopupItem', "", %key, "MutePlayer", "", 'Mute', 1);
|
||||
messageClient( %client, 'MsgPlayerPopupItem', "", %key, "MutePlayer", "", 'Mute Text Chat', 1);
|
||||
|
||||
if ( !%isTargetBot && %client.canListenTo( %targetClient ) )
|
||||
{
|
||||
|
|
@ -2382,7 +2399,7 @@ function DefaultGame::sendGamePlayerPopupMenu( %game, %client, %targetClient, %k
|
|||
// regular vote options on players
|
||||
if ( %game.scheduleVote $= "" && !%isAdmin && !%isTargetAdmin )
|
||||
{
|
||||
if ( $Host::allowAdminPlayerVotes && !%isTargetBot )
|
||||
if ( $Host::allowAdminPlayerVotes && !%isTargetBot && !isDemo() && !isDemoServer())
|
||||
messageClient( %client, 'MsgPlayerPopupItem', "", %key, "AdminPlayer", "", 'Vote to Make Admin', 2 );
|
||||
|
||||
if ( !%isTargetSelf )
|
||||
|
|
@ -2392,7 +2409,7 @@ function DefaultGame::sendGamePlayerPopupMenu( %game, %client, %targetClient, %k
|
|||
}
|
||||
|
||||
// Admin only options on players:
|
||||
else if ( %isAdmin )
|
||||
else if ( %isAdmin && !isDemo() && !isDemoServer())
|
||||
{
|
||||
if ( !%isTargetBot && !%isTargetAdmin )
|
||||
messageClient( %client, 'MsgPlayerPopupItem', "", %key, "AdminPlayer", "", 'Make Admin', 2 );
|
||||
|
|
@ -2472,6 +2489,9 @@ function DefaultGame::sendGameVoteMenu( %game, %client, %key )
|
|||
|
||||
if( !%client.canVote && !%isAdmin )
|
||||
return;
|
||||
|
||||
if (isDemo() || isDemoServer())
|
||||
return;
|
||||
|
||||
if ( %game.scheduleVote $= "" )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -111,7 +111,10 @@ datablock StaticShapeData(DeployedStationInventory) : StaticShapeDamageProfile
|
|||
maxDamage = 0.70;
|
||||
destroyedLevel = 0.70;
|
||||
disabledLevel = 0.42;
|
||||
explosion = DeployablesExplosion;
|
||||
explosion = DeployablesExplosion;
|
||||
expDmgRadius = 8.0;
|
||||
expDamage = 0.35;
|
||||
expImpulse = 500.0;
|
||||
|
||||
dynamicType = $TypeMasks::StationObjectType;
|
||||
isShielded = true;
|
||||
|
|
@ -622,7 +625,7 @@ function TurretIndoorDeployableImage::testTurretTooClose(%item, %plyr)
|
|||
while((%found = containerSearchNext()) != 0)
|
||||
{
|
||||
%foundName = %found.getDataBlock().getName();
|
||||
if((%foundname $= TurretDeployedFloorIndoor) || (%foundName $= TurretDeployedWallIndoor) || (%foundName $= TurretDeployedCeilingIndoor) || (%foundName $= TurretDeployedOutdoor) || (%foundName $= DeployedStationInventory))
|
||||
if((%foundname $= TurretDeployedFloorIndoor) || (%foundName $= TurretDeployedWallIndoor) || (%foundName $= TurretDeployedCeilingIndoor) || (%foundName $= TurretDeployedOutdoor) )
|
||||
if (%found.team == %plyr.team)
|
||||
{
|
||||
%turretInRange = true;
|
||||
|
|
@ -642,7 +645,7 @@ function TurretOutdoorDeployableImage::testTurretTooClose(%item, %plyr)
|
|||
while((%found = containerSearchNext()) != 0)
|
||||
{
|
||||
%foundName = %found.getDataBlock().getName();
|
||||
if((%foundname $= TurretDeployedFloorIndoor) || (%foundName $= TurretDeployedWallIndoor) || (%foundName $= TurretDeployedCeilingIndoor) || (%foundName $= TurretDeployedOutdoor) || (%foundName $= DeployedStationInventory))
|
||||
if((%foundname $= TurretDeployedFloorIndoor) || (%foundName $= TurretDeployedWallIndoor) || (%foundName $= TurretDeployedCeilingIndoor) || (%foundName $= TurretDeployedOutdoor) )
|
||||
if (%found.team == %plyr.team)
|
||||
{
|
||||
%turretInRange = true;
|
||||
|
|
@ -666,7 +669,7 @@ function TurretIndoorDeployableImage::testTurretSaturation(%item)
|
|||
while(%found)
|
||||
{
|
||||
%foundName = %found.getDataBlock().getName();
|
||||
if((%foundname $= TurretDeployedFloorIndoor) || (%foundName $= TurretDeployedWallIndoor) || (%foundName $= TurretDeployedCeilingIndoor) || (%foundName $= TurretDeployedOutdoor) || (%foundName $= DeployedStationInventory))
|
||||
if((%foundname $= TurretDeployedFloorIndoor) || (%foundName $= TurretDeployedWallIndoor) || (%foundName $= TurretDeployedCeilingIndoor) || (%foundName $= TurretDeployedOutdoor) )
|
||||
{
|
||||
//found one
|
||||
%numTurretsNearby++;
|
||||
|
|
@ -691,7 +694,7 @@ function TurretOutdoorDeployableImage::testTurretSaturation(%item)
|
|||
while(%found)
|
||||
{
|
||||
%foundName = %found.getDataBlock().getName();
|
||||
if((%foundname $= TurretDeployedFloorIndoor) || (%foundName $= TurretDeployedWallIndoor) || (%foundName $= TurretDeployedCeilingIndoor) || (%foundName $= TurretDeployedOutdoor) || (%foundName $= DeployedStationInventory))
|
||||
if((%foundname $= TurretDeployedFloorIndoor) || (%foundName $= TurretDeployedWallIndoor) || (%foundName $= TurretDeployedCeilingIndoor) || (%foundName $= TurretDeployedOutdoor) )
|
||||
{
|
||||
//found one
|
||||
%numTurretsNearby++;
|
||||
|
|
@ -724,7 +727,7 @@ function testNearbyDensity(%item, %radius)
|
|||
while(%found)
|
||||
{
|
||||
%foundName = %found.getDataBlock().getName();
|
||||
if((%foundname $= TurretDeployedFloorIndoor) || (%foundName $= TurretDeployedWallIndoor) || (%foundName $= TurretDeployedCeilingIndoor) || (%foundName $= TurretDeployedOutdoor) || (%foundName $= DeployedStationInventory))
|
||||
if((%foundname $= TurretDeployedFloorIndoor) || (%foundName $= TurretDeployedWallIndoor) || (%foundName $= TurretDeployedCeilingIndoor) || (%foundName $= TurretDeployedOutdoor) )
|
||||
%turretCount++;
|
||||
%found = containerSearchNext();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -802,13 +802,13 @@ function MainChatHud::nextChatHudLen( %this )
|
|||
|
||||
%totalLines = HudMessageVector.getNumLines();
|
||||
%posLines = $pref::chatHudLength * 4;
|
||||
%linesOver = ( %totalLines - %posLines ) * 14;
|
||||
%linesOver = %totalLines - %posLines;
|
||||
ChatPageDown.position = ( firstWord( outerChatHud.extent ) - 20 ) @ " " @ ( $chatScrollLenY[$pref::chatHudLength] - 6 );
|
||||
|
||||
if( ( %linesOver > 0 ) && !%sizeIncrease )
|
||||
{
|
||||
%linesOver = %totalLines - %posLines;
|
||||
%posAdjust = %linesOver * ChatHud.profile.fontSize + 3;
|
||||
%posAdjust = %linesOver * $ShellFontSize;
|
||||
|
||||
%newPos = "0" @ " " @ ( -1 * %posAdjust );
|
||||
ChatHud.position = %newPos;
|
||||
|
|
@ -816,7 +816,7 @@ function MainChatHud::nextChatHudLen( %this )
|
|||
else if( %sizeIncrease && ( %linesOver > 0 ) )
|
||||
{
|
||||
%curPos = getWord( ChatHud.position, 1 );
|
||||
%newY = %curPos + ( 4 * 14 );
|
||||
%newY = %curPos + ( 4 * $ShellFontSize );
|
||||
%newPos = "0 " @ %newY;
|
||||
ChatHud.position = %newPos;
|
||||
}
|
||||
|
|
@ -1094,11 +1094,10 @@ function ClientCmdDisplayHuds()
|
|||
else
|
||||
mainVoteHud.setVisible(0);
|
||||
|
||||
clientCmdSetWeaponsHudActive(0);
|
||||
}
|
||||
}
|
||||
|
||||
function clientCmdTogglePlayHuds(%val)
|
||||
function clientcmdTogglePlayHuds(%val)
|
||||
{
|
||||
ammoHud.setVisible(%val);
|
||||
objectiveHud.setVisible(%val);
|
||||
|
|
@ -1748,4 +1747,13 @@ function displayObserverHud(%client, %targetClient, %potentialClient)
|
|||
function hudFirstPersonToggled()
|
||||
{
|
||||
ammoHud.setVisible($firstPerson);
|
||||
}
|
||||
|
||||
$testCount = 0;
|
||||
|
||||
function testChatHud()
|
||||
{
|
||||
$testCount++;
|
||||
messageAll( '', "This is test number " @ $testCount );
|
||||
$tester = schedule( 50, 0, "testChatHud");
|
||||
}
|
||||
|
|
@ -183,10 +183,6 @@ function RepairPackImage::onActivate(%data, %obj, %slot)
|
|||
{
|
||||
messageClient(%obj.client, 'MsgRepairPackOn', '\c2Repair pack activated.');
|
||||
|
||||
// unmount any weapon the player may have been holding
|
||||
if(%obj.getMountedImage($WeaponSlot))
|
||||
%obj.unmountImage($WeaponSlot);
|
||||
|
||||
// make sure player's arm thread is "look"
|
||||
%obj.setArmThread(look);
|
||||
|
||||
|
|
|
|||
|
|
@ -1216,7 +1216,7 @@ datablock PlayerData(LightMaleHumanArmor) : LightPlayerDamageProfile
|
|||
energyPerDamagePoint = 75.0; // shield energy required to block one point of damage
|
||||
|
||||
rechargeRate = 0.256;
|
||||
jetForce = 26.2 * 90;
|
||||
jetForce = 28.2 * 90;
|
||||
underwaterJetForce = 26.2 * 90 * 2.0;
|
||||
underwaterVertJetFactor = 1.5;
|
||||
jetEnergyDrain = 0.8;
|
||||
|
|
@ -1224,12 +1224,12 @@ datablock PlayerData(LightMaleHumanArmor) : LightPlayerDamageProfile
|
|||
minJetEnergy = 1;
|
||||
maxJetHorizontalPercentage = 0.8;
|
||||
|
||||
runForce = 48 * 90;
|
||||
runForce = 55.20 * 90;
|
||||
runEnergyDrain = 0;
|
||||
minRunEnergy = 0;
|
||||
maxForwardSpeed = 14;
|
||||
maxBackwardSpeed = 13;
|
||||
maxSideSpeed = 13;
|
||||
maxForwardSpeed = 15;
|
||||
maxBackwardSpeed = 14;
|
||||
maxSideSpeed = 14;
|
||||
|
||||
maxUnderwaterForwardSpeed = 8.4;
|
||||
maxUnderwaterBackwardSpeed = 7.8;
|
||||
|
|
@ -1294,10 +1294,10 @@ datablock PlayerData(LightMaleHumanArmor) : LightPlayerDamageProfile
|
|||
minJumpSpeed = 20;
|
||||
maxJumpSpeed = 30;
|
||||
|
||||
maxJetForwardSpeed = 30;
|
||||
horizMaxSpeed = 68;
|
||||
horizResistSpeed = 33;
|
||||
horizResistFactor = 0.35;
|
||||
maxJetForwardSpeed = 30;
|
||||
|
||||
upMaxSpeed = 80;
|
||||
upResistSpeed = 25;
|
||||
|
|
@ -1474,7 +1474,7 @@ datablock PlayerData(MediumMaleHumanArmor) : MediumPlayerDamageProfile
|
|||
energyPerDamagePoint = 75.0; // shield energy required to block one point of damage
|
||||
|
||||
rechargeRate = 0.256;
|
||||
jetForce = 24.6 * 130;
|
||||
jetForce = 27.06 * 130;
|
||||
underwaterJetForce = 24.6 * 130 * 2.0;
|
||||
underwaterVertJetFactor = 1.5;
|
||||
jetEnergyDrain = 1.0;
|
||||
|
|
@ -1482,12 +1482,12 @@ datablock PlayerData(MediumMaleHumanArmor) : MediumPlayerDamageProfile
|
|||
minJetEnergy = 1;
|
||||
maxJetHorizontalPercentage = 0.8;
|
||||
|
||||
runForce = 40 * 130;
|
||||
runForce = 46 * 130;
|
||||
runEnergyDrain = 0;
|
||||
minRunEnergy = 0;
|
||||
maxForwardSpeed = 11;
|
||||
maxBackwardSpeed = 10;
|
||||
maxSideSpeed = 10;
|
||||
maxForwardSpeed = 12;
|
||||
maxBackwardSpeed = 11;
|
||||
maxSideSpeed = 11;
|
||||
|
||||
maxUnderwaterForwardSpeed = 6.6;
|
||||
maxUnderwaterBackwardSpeed = 6;
|
||||
|
|
@ -1500,7 +1500,7 @@ datablock PlayerData(MediumMaleHumanArmor) : MediumPlayerDamageProfile
|
|||
heatDecayPerSec = 1.0 / 3.0; // takes 3 seconds to clear heat sig.
|
||||
heatIncreasePerSec = 1.0 / 3.0; // takes 3.0 seconds of constant jet to get full heat sig.
|
||||
|
||||
jumpForce = 8.4 * 130;
|
||||
jumpForce = 8.3 * 130;
|
||||
jumpEnergyDrain = 0;
|
||||
minJumpEnergy = 0;
|
||||
jumpSurfaceAngle = 75;
|
||||
|
|
@ -1512,15 +1512,15 @@ datablock PlayerData(MediumMaleHumanArmor) : MediumPlayerDamageProfile
|
|||
|
||||
minJumpSpeed = 15;
|
||||
maxJumpSpeed = 25;
|
||||
maxJetForwardSpeed = 22;
|
||||
|
||||
horizMaxSpeed = 60;
|
||||
horizResistSpeed = 28;
|
||||
horizResistFactor = 0.2;
|
||||
horizResistFactor = 0.32;
|
||||
maxJetForwardSpeed = 22;
|
||||
|
||||
upMaxSpeed = 80;
|
||||
upResistSpeed = 35;
|
||||
upResistFactor = 0.15;
|
||||
upMaxSpeed = 70;
|
||||
upResistSpeed = 30;
|
||||
upResistFactor = 0.23;
|
||||
|
||||
minImpactSpeed = 45;
|
||||
speedDamageScale = 0.004;
|
||||
|
|
@ -1730,7 +1730,7 @@ datablock PlayerData(HeavyMaleHumanArmor) : HeavyPlayerDamageProfile
|
|||
energyPerDamagePoint = 75.0; // shield energy required to block one point of damage
|
||||
|
||||
rechargeRate = 0.256;
|
||||
jetForce = 21.4 * 180;
|
||||
jetForce = 23.54 * 180;
|
||||
underwaterJetForce = 21.4 * 180 * 2.0;
|
||||
underwaterVertJetFactor = 1.5;
|
||||
jetEnergyDrain = 1.1;
|
||||
|
|
@ -1738,12 +1738,12 @@ datablock PlayerData(HeavyMaleHumanArmor) : HeavyPlayerDamageProfile
|
|||
minJetEnergy = 1;
|
||||
maxJetHorizontalPercentage = 0.8;
|
||||
|
||||
runForce = 35 * 180;
|
||||
runForce = 40.25 * 180;
|
||||
runEnergyDrain = 0;
|
||||
minRunEnergy = 0;
|
||||
maxForwardSpeed = 6.5;
|
||||
maxBackwardSpeed = 5;
|
||||
maxSideSpeed = 5;
|
||||
maxForwardSpeed = 7.5;
|
||||
maxBackwardSpeed = 6;
|
||||
maxSideSpeed = 6;
|
||||
|
||||
maxUnderwaterForwardSpeed = 3.9;
|
||||
maxUnderwaterBackwardSpeed = 3;
|
||||
|
|
@ -1768,14 +1768,14 @@ datablock PlayerData(HeavyMaleHumanArmor) : HeavyPlayerDamageProfile
|
|||
minJumpSpeed = 20;
|
||||
maxJumpSpeed = 30;
|
||||
|
||||
horizMaxSpeed = 50;
|
||||
horizResistSpeed = 20;
|
||||
horizResistFactor = 0.3;
|
||||
horizMaxSpeed = 52;
|
||||
horizResistSpeed = 23;
|
||||
horizResistFactor = 0.29;
|
||||
maxJetForwardSpeed = 16;
|
||||
|
||||
upMaxSpeed = 60;
|
||||
upResistSpeed = 35;
|
||||
upResistFactor = 0.15;
|
||||
upResistFactor = 0.18;
|
||||
|
||||
minImpactSpeed = 45;
|
||||
speedDamageScale = 0.006;
|
||||
|
|
@ -2137,6 +2137,10 @@ function Armor::onUnmount( %this, %obj, %vehicle, %node )
|
|||
{
|
||||
commandToClient( %obj.client, 'VehicleDismount' );
|
||||
%obj.mountImage(%obj.lastWeapon, $WeaponSlot);
|
||||
//Inform gunner position when pilot leaves...
|
||||
//if(%vehicle.getDataBlock().showPilotInfo !$= "")
|
||||
// if((%gunner = %vehicle.getMountNodeObject(1)) != 0)
|
||||
// commandToClient(%gunner.client, 'PilotInfo', "PILOT EJECTED", 6, 1);
|
||||
}
|
||||
// announce to any other passengers that you've left
|
||||
if(%vehicle.getDatablock().numMountPoints > 1)
|
||||
|
|
@ -2157,7 +2161,7 @@ $ammoType[3] = "MortarAmmo";
|
|||
$ammoType[4] = "MissileLauncherAmmo";
|
||||
$ammoType[5] = "ChaingunAmmo";
|
||||
|
||||
function Armor::onCollision(%this,%obj,%col)
|
||||
function Armor::onCollision(%this,%obj,%col,%forceVehicleNode)
|
||||
{
|
||||
if (%obj.getState() $= "Dead")
|
||||
return;
|
||||
|
|
@ -2167,7 +2171,7 @@ function Armor::onCollision(%this,%obj,%col)
|
|||
%client = %obj.client;
|
||||
// player collided with a vehicle
|
||||
%node = -1;
|
||||
if ((%className $= WheeledVehicleData || %className $= FlyingVehicleData || %className $= HoverVehicleData) &&
|
||||
if (%forceVehicleNode !$= "" || (%className $= WheeledVehicleData || %className $= FlyingVehicleData || %className $= HoverVehicleData) &&
|
||||
%obj.mountVehicle && %obj.getState() $= "Move" && %col.mountable) {
|
||||
|
||||
//if the player is an AI, he should snap to the mount points in node order,
|
||||
|
|
@ -2191,7 +2195,7 @@ function Armor::onCollision(%this,%obj,%col)
|
|||
%node = findAIEmptySeat(%col, %obj);
|
||||
}
|
||||
else
|
||||
%node = findEmptySeat(%col, %obj);
|
||||
%node = findEmptySeat(%col, %obj, %forceVehicleNode);
|
||||
|
||||
//now mount the player in the vehicle
|
||||
if(%node >= 0)
|
||||
|
|
|
|||
|
|
@ -31,6 +31,9 @@ function ScoreScreen::onSleep(%this)
|
|||
{
|
||||
hudMap.pop();
|
||||
hudMap.delete();
|
||||
|
||||
//make sure the action maps are still pushed in the correct order...
|
||||
updateActionMaps();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -265,31 +265,31 @@ function kick( %client, %admin, %guid )
|
|||
|
||||
messageClient(%client, 'onClientKicked', "");
|
||||
messageAllExcept( %client, -1, 'MsgClientDrop', "", %client.name, %client );
|
||||
|
||||
if( %client.isAIControlled() )
|
||||
{
|
||||
|
||||
if( %client.isAIControlled() )
|
||||
{
|
||||
$HostGameBotCount--;
|
||||
%client.drop();
|
||||
}
|
||||
else
|
||||
{
|
||||
%client.drop();
|
||||
}
|
||||
else
|
||||
{
|
||||
%count = ClientGroup.getCount();
|
||||
for( %i = 0; %i < %count; %i++ )
|
||||
{
|
||||
%cl = ClientGroup.getObject( %i );
|
||||
if( %cl.guid == %guid )
|
||||
if( %cl.guid == %guid )
|
||||
{
|
||||
// kill and delete this client
|
||||
if( isObject( %cl.player ) )
|
||||
%cl.player.scriptKill(0);
|
||||
// kill and delete this client
|
||||
if( isObject( %cl.player ) )
|
||||
%cl.player.scriptKill(0);
|
||||
|
||||
%cl.schedule(700, "delete");
|
||||
|
||||
BanList::add( %guid, "0", $Host::KickBanTime );
|
||||
Game.kickGuid = "";
|
||||
%cl.schedule(700, "delete");
|
||||
|
||||
BanList::add( %guid, "0", $Host::KickBanTime );
|
||||
Game.kickGuid = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function ban( %client, %admin )
|
||||
|
|
@ -338,148 +338,162 @@ function GameConnection::onConnect( %client, %name, %raceGender, %skin, %voice,
|
|||
sendLoadInfoToClient( %client );
|
||||
|
||||
//%client.setSimulatedNetParams(0.1, 30);
|
||||
// if hosting this server, set this client to superAdmin
|
||||
if(%client.getAddress() $= "Local")
|
||||
{
|
||||
%client.isAdmin = true;
|
||||
%client.isSuperAdmin = true;
|
||||
}
|
||||
|
||||
// Get the client's unique id:
|
||||
%authInfo = %client.getAuthInfo();
|
||||
%client.guid = getField( %authInfo, 3 );
|
||||
|
||||
// check admin and super admin list, and set status accordingly
|
||||
if ( !%client.isSuperAdmin )
|
||||
if ( isDemo() )
|
||||
{
|
||||
if ( isOnSuperAdminList( %client ) )
|
||||
%client.armor = "Light";
|
||||
%client.sex = "Male";
|
||||
%client.race = "Human";
|
||||
%client.name = addTaggedString( "DemoGuy" );
|
||||
%client.nameBase = "DemoGuy";
|
||||
%client.voice = "Male1";
|
||||
%client.voiceTag = addtaggedString( "Male1" );
|
||||
}
|
||||
else
|
||||
{
|
||||
// if hosting this server, set this client to superAdmin
|
||||
if(%client.getAddress() $= "Local")
|
||||
{
|
||||
%client.isAdmin = true;
|
||||
%client.isSuperAdmin = true;
|
||||
%client.isSuperAdmin = true;
|
||||
}
|
||||
else if( isOnAdminList( %client ) )
|
||||
{
|
||||
%client.isAdmin = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Sex/Race defaults
|
||||
switch$ ( %raceGender )
|
||||
{
|
||||
case "Human Male":
|
||||
%client.sex = "Male";
|
||||
%client.race = "Human";
|
||||
case "Human Female":
|
||||
%client.sex = "Female";
|
||||
%client.race = "Human";
|
||||
case "Bioderm":
|
||||
%client.sex = "Male";
|
||||
%client.race = "Bioderm";
|
||||
default:
|
||||
error("Invalid race/gender combo passed: " @ %raceGender);
|
||||
%client.sex = "Male";
|
||||
%client.race = "Human";
|
||||
}
|
||||
%client.armor = "Light";
|
||||
|
||||
// Override the connect name if this server does not allow smurfs:
|
||||
%realName = getField( %authInfo, 0 );
|
||||
if ( $PlayingOnline && $Host::NoSmurfs )
|
||||
%name = %realName;
|
||||
|
||||
if ( strcmp( %name, %realName ) == 0 )
|
||||
{
|
||||
%client.isSmurf = false;
|
||||
|
||||
// Add the tribal tag:
|
||||
%tag = getField( %authInfo, 1 );
|
||||
%append = getField( %authInfo, 2 );
|
||||
if ( %append )
|
||||
%name = "\cp\c6" @ %name @ "\c7" @ %tag @ "\co";
|
||||
else
|
||||
%name = "\cp\c7" @ %tag @ "\c6" @ %name @ "\co";
|
||||
|
||||
%client.sendGuid = %client.guid;
|
||||
}
|
||||
else
|
||||
{
|
||||
%client.isSmurf = true;
|
||||
%client.sendGuid = 0;
|
||||
%name = stripTrailingSpaces( strToPlayerName( %name ) );
|
||||
if ( strlen( %name ) < 3 )
|
||||
%name = "Poser";
|
||||
// Get the client's unique id:
|
||||
%authInfo = %client.getAuthInfo();
|
||||
%client.guid = getField( %authInfo, 3 );
|
||||
|
||||
// Make sure the alias is unique:
|
||||
%isUnique = true;
|
||||
%count = ClientGroup.getCount();
|
||||
for ( %i = 0; %i < %count; %i++ )
|
||||
// check admin and super admin list, and set status accordingly
|
||||
if ( !%client.isSuperAdmin )
|
||||
{
|
||||
%test = ClientGroup.getObject( %i );
|
||||
%rawName = stripChars( detag( getTaggedString( %test.name ) ), "\cp\co\c6\c7\c8\c9" );
|
||||
if ( strcmp( %name, %rawName ) == 0 )
|
||||
if ( isOnSuperAdminList( %client ) )
|
||||
{
|
||||
%client.isAdmin = true;
|
||||
%client.isSuperAdmin = true;
|
||||
}
|
||||
else if( isOnAdminList( %client ) )
|
||||
{
|
||||
%isUnique = false;
|
||||
break;
|
||||
%client.isAdmin = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Append a number to make the alias unique:
|
||||
if ( !%isUnique )
|
||||
|
||||
// Sex/Race defaults
|
||||
switch$ ( %raceGender )
|
||||
{
|
||||
%suffix = 1;
|
||||
while ( !%isUnique )
|
||||
{
|
||||
%nameTry = %name @ "." @ %suffix;
|
||||
%isUnique = true;
|
||||
case "Human Male":
|
||||
%client.sex = "Male";
|
||||
%client.race = "Human";
|
||||
case "Human Female":
|
||||
%client.sex = "Female";
|
||||
%client.race = "Human";
|
||||
case "Bioderm":
|
||||
%client.sex = "Male";
|
||||
%client.race = "Bioderm";
|
||||
default:
|
||||
error("Invalid race/gender combo passed: " @ %raceGender);
|
||||
%client.sex = "Male";
|
||||
%client.race = "Human";
|
||||
}
|
||||
%client.armor = "Light";
|
||||
|
||||
%count = ClientGroup.getCount();
|
||||
for ( %i = 0; %i < %count; %i++ )
|
||||
// Override the connect name if this server does not allow smurfs:
|
||||
%realName = getField( %authInfo, 0 );
|
||||
if ( $PlayingOnline && $Host::NoSmurfs )
|
||||
%name = %realName;
|
||||
|
||||
if ( strcmp( %name, %realName ) == 0 )
|
||||
{
|
||||
%client.isSmurf = false;
|
||||
|
||||
// Add the tribal tag:
|
||||
%tag = getField( %authInfo, 1 );
|
||||
%append = getField( %authInfo, 2 );
|
||||
if ( %append )
|
||||
%name = "\cp\c6" @ %name @ "\c7" @ %tag @ "\co";
|
||||
else
|
||||
%name = "\cp\c7" @ %tag @ "\c6" @ %name @ "\co";
|
||||
|
||||
%client.sendGuid = %client.guid;
|
||||
}
|
||||
else
|
||||
{
|
||||
%client.isSmurf = true;
|
||||
%client.sendGuid = 0;
|
||||
%name = stripTrailingSpaces( strToPlayerName( %name ) );
|
||||
if ( strlen( %name ) < 3 )
|
||||
%name = "Poser";
|
||||
|
||||
// Make sure the alias is unique:
|
||||
%isUnique = true;
|
||||
%count = ClientGroup.getCount();
|
||||
for ( %i = 0; %i < %count; %i++ )
|
||||
{
|
||||
%test = ClientGroup.getObject( %i );
|
||||
%rawName = stripChars( detag( getTaggedString( %test.name ) ), "\cp\co\c6\c7\c8\c9" );
|
||||
if ( strcmp( %name, %rawName ) == 0 )
|
||||
{
|
||||
%test = ClientGroup.getObject( %i );
|
||||
%rawName = stripChars( detag( getTaggedString( %test.name ) ), "\cp\co\c6\c7\c8\c9" );
|
||||
if ( strcmp( %nameTry, %rawName ) == 0 )
|
||||
%isUnique = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Append a number to make the alias unique:
|
||||
if ( !%isUnique )
|
||||
{
|
||||
%suffix = 1;
|
||||
while ( !%isUnique )
|
||||
{
|
||||
%nameTry = %name @ "." @ %suffix;
|
||||
%isUnique = true;
|
||||
|
||||
%count = ClientGroup.getCount();
|
||||
for ( %i = 0; %i < %count; %i++ )
|
||||
{
|
||||
%isUnique = false;
|
||||
break;
|
||||
%test = ClientGroup.getObject( %i );
|
||||
%rawName = stripChars( detag( getTaggedString( %test.name ) ), "\cp\co\c6\c7\c8\c9" );
|
||||
if ( strcmp( %nameTry, %rawName ) == 0 )
|
||||
{
|
||||
%isUnique = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
%suffix++;
|
||||
}
|
||||
|
||||
%suffix++;
|
||||
// Success!
|
||||
%name = %nameTry;
|
||||
}
|
||||
|
||||
// Success!
|
||||
%name = %nameTry;
|
||||
%smurfName = %name;
|
||||
// Tag the name with the "smurf" color:
|
||||
%name = "\cp\c8" @ %name @ "\co";
|
||||
}
|
||||
|
||||
%smurfName = %name;
|
||||
// Tag the name with the "smurf" color:
|
||||
%name = "\cp\c8" @ %name @ "\co";
|
||||
%client.name = addTaggedString(%name);
|
||||
if(%client.isSmurf)
|
||||
%client.nameBase = %smurfName;
|
||||
else
|
||||
%client.nameBase = %realName;
|
||||
|
||||
// Make sure that the connecting client is not trying to use a bot skin:
|
||||
%temp = detag( %skin );
|
||||
if ( %temp $= "basebot" || %temp $= "basebbot" )
|
||||
%client.skin = addTaggedString( "base" );
|
||||
else
|
||||
%client.skin = addTaggedString( %skin );
|
||||
|
||||
%client.voice = %voice;
|
||||
%client.voiceTag = addtaggedString(%voice);
|
||||
|
||||
//set the voice pitch based on a lookup table from their chosen voice
|
||||
%client.voicePitch = getValidVoicePitch(%voice, %voicePitch);
|
||||
}
|
||||
|
||||
%client.name = addTaggedString(%name);
|
||||
if(%client.isSmurf)
|
||||
%client.nameBase = %smurfName;
|
||||
else
|
||||
%client.nameBase = %realName;
|
||||
%client.justConnected = true;
|
||||
%client.isReady = false;
|
||||
|
||||
// Make sure that the connecting client is not trying to use a bot skin:
|
||||
%temp = detag( %skin );
|
||||
if ( %temp $= "basebot" || %temp $= "basebbot" )
|
||||
%client.skin = addTaggedString( "base" );
|
||||
else
|
||||
%client.skin = addTaggedString( %skin );
|
||||
|
||||
// full reset of client target manager
|
||||
clientResetTargets(%client, false);
|
||||
|
||||
%client.voice = %voice;
|
||||
%client.voiceTag = addtaggedString(%voice);
|
||||
|
||||
//set the voice pitch based on a lookup table from their chosen voice
|
||||
%client.voicePitch = getValidVoicePitch(%voice, %voicePitch);
|
||||
|
||||
%client.target = allocClientTarget(%client, %client.name, %client.skin, %client.voiceTag, '_ClientConnection', 0, 0, %client.voicePitch);
|
||||
%client.score = 0;
|
||||
%client.team = 0;
|
||||
|
|
@ -517,7 +531,7 @@ function GameConnection::onConnect( %client, %name, %raceGender, %skin, %voice,
|
|||
if ( $CurrentMissionType !$= "SinglePlayer" )
|
||||
{
|
||||
messageClient(%client, 'MsgClientJoin', '\c2Welcome to Tribes2 %1.',
|
||||
%name,
|
||||
%client.name,
|
||||
%client,
|
||||
%client.target,
|
||||
false, // isBot
|
||||
|
|
@ -527,7 +541,7 @@ function GameConnection::onConnect( %client, %name, %raceGender, %skin, %voice,
|
|||
%client.sendGuid );
|
||||
|
||||
messageAllExcept(%client, -1, 'MsgClientJoin', '\c1%1 joined the game.',
|
||||
%name,
|
||||
%client.name,
|
||||
%client,
|
||||
%client.target,
|
||||
false, // isBot
|
||||
|
|
@ -538,7 +552,7 @@ function GameConnection::onConnect( %client, %name, %raceGender, %skin, %voice,
|
|||
}
|
||||
else
|
||||
messageClient(%client, 'MsgClientJoin', "\c0Mission Insertion complete...",
|
||||
%name,
|
||||
%client.name,
|
||||
%client,
|
||||
%client.target,
|
||||
false, // isBot
|
||||
|
|
@ -595,7 +609,8 @@ function dismountPlayers()
|
|||
|
||||
function loadMission( %missionName, %missionType, %firstMission )
|
||||
{
|
||||
cls();
|
||||
if (!$pref::NoClearConsole)
|
||||
cls();
|
||||
buildLoadInfo( %missionName, %missionType );
|
||||
|
||||
// reset all of these
|
||||
|
|
@ -738,6 +753,10 @@ function loadMissionStage2()
|
|||
else
|
||||
$TeamDamage = $Host::TeamDamageOn;
|
||||
|
||||
//the demo version always has team damage off
|
||||
if (isDemo() || isDemoServer())
|
||||
$TeamDamage = 0;
|
||||
|
||||
Game.missionLoadDone();
|
||||
|
||||
// start all the clients in the mission
|
||||
|
|
@ -1304,6 +1323,10 @@ function serverCmdChangePlayersTeam( %clientRequesting, %client, %team)
|
|||
{
|
||||
if( isObject( Game ) && %client != Game.kickClient && %clientRequesting.isAdmin)
|
||||
{
|
||||
// clear the pickteam menu
|
||||
if( !$MatchStarted && $Host::TournamentMode && !$CountdownStarted && %client.camera.Mode $= "pickingTeam" )
|
||||
commandToClient( %client, 'processPickTeam' );
|
||||
|
||||
serverCmdClientJoinTeam(%client, %team);
|
||||
|
||||
if(!$MatchStarted)
|
||||
|
|
@ -1853,8 +1876,12 @@ function resetServerDefaults()
|
|||
{
|
||||
echo( "Resetting server defaults..." );
|
||||
|
||||
allowConnections( false );// no connections when resetting the server
|
||||
|
||||
if( isObject( Game ) )
|
||||
Game.gameOver();
|
||||
else
|
||||
schedule( 500, 0, "resetServerDefaults" );
|
||||
|
||||
// Override server defaults with prefs:
|
||||
exec( "scripts/ServerDefaults.cs" );
|
||||
|
|
@ -1867,17 +1894,20 @@ function resetServerDefaults()
|
|||
if( $Host::botsEnabled )
|
||||
initGameBots( $Host::Map, $Host::MissionType );
|
||||
|
||||
// load the missions
|
||||
loadMission( $Host::Map, $Host::MissionType );
|
||||
// load the mission
|
||||
loadMission( $Host::Map, $Host::MissionType );
|
||||
|
||||
// allow connections since were ready to go.
|
||||
allowConnections( true );
|
||||
}
|
||||
|
||||
function removeAllBots()
|
||||
{
|
||||
while( ClientGroup.getCount() )
|
||||
{
|
||||
%client = ClientGroup.getObject(0);
|
||||
if(%client.isAIControlled())
|
||||
%client.drop();
|
||||
{
|
||||
%client = ClientGroup.getObject(0);
|
||||
if(%client.isAIControlled())
|
||||
%client.drop();
|
||||
else
|
||||
%client.delete();
|
||||
}
|
||||
|
|
@ -1925,6 +1955,9 @@ function getAdmin()
|
|||
|
||||
function serverCmdSetPDAPose(%client, %val)
|
||||
{
|
||||
if(!isObject(%client.player))
|
||||
return;
|
||||
|
||||
// if client is in a vehicle, return
|
||||
if(%client.player.isMounted())
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -85,9 +85,9 @@ function serverCmdControlObject(%client, %targetId)
|
|||
return;
|
||||
}
|
||||
|
||||
//mounted in a vehicle?
|
||||
if (%client.player.isMounted())
|
||||
{
|
||||
//mounted in a vehicle?
|
||||
if (%client.player.isMounted())
|
||||
{
|
||||
commandToClient(%client, 'ControlObjectResponse', false, "can't control objects while mounted in a vehicle.");
|
||||
return;
|
||||
}
|
||||
|
|
@ -173,14 +173,14 @@ function serverCmdAttachCommanderCamera(%client, %target)
|
|||
commandToClient(%client, 'CameraAttachResponse', false);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
%data = %obj.getDataBlock();
|
||||
%obsData = %data.observeParameters;
|
||||
%obsX = firstWord(%obsData);
|
||||
%obsY = getWord(%obsData, 1);
|
||||
%obsZ = getWord(%obsData, 2);
|
||||
|
||||
%client.camera.mode = "observerFollow";
|
||||
// don't set the camera mode so that it does not interfere with spawning
|
||||
%transform = %obj.getTransform();
|
||||
%client.camera.setTransform(%transform);
|
||||
%client.camera.setOrbitMode(%obj, %transform, %obsX, %obsY, %obsZ);
|
||||
|
|
|
|||
|
|
@ -56,8 +56,7 @@ $Host::TeamDamageOn = 0;
|
|||
$MasterServerAddress = "IP:198.74.40.152:28000";
|
||||
|
||||
// 0: .v12 (1.2 kbits/sec), 1: .v24 (2.4 kbits/sec), 2: .v29 (2.9kbits/sec)
|
||||
// 3: gsm (6.6 kbits/sec)
|
||||
$Audio::maxEncodingLevel = 3;
|
||||
$Audio::maxEncodingLevel = 2;
|
||||
$Audio::maxVoiceChannels = 2;
|
||||
|
||||
$Host::MapPlayerLimits["Abominable", "CnH"] = "-1 32";
|
||||
|
|
|
|||
|
|
@ -168,12 +168,12 @@ datablock TurretImageData(AABarrelLarge)
|
|||
useTargetAudio = false;
|
||||
|
||||
// Turret parameters
|
||||
activationMS = 500;
|
||||
activationMS = 250;
|
||||
deactivateDelayMS = 500;
|
||||
thinkTimeMS = 200;
|
||||
degPerSecTheta = 600;
|
||||
degPerSecPhi = 1080;
|
||||
attackRadius = 180;
|
||||
attackRadius = 200;
|
||||
|
||||
// State transitions
|
||||
stateName[0] = "Activate";
|
||||
|
|
|
|||
|
|
@ -61,9 +61,12 @@ datablock TurretData(TurretDeployedFloorIndoor) : TurretDamageProfile
|
|||
maxDamage = 0.5;
|
||||
destroyedLevel = 0.5;
|
||||
disabledLevel = 0.21;
|
||||
explosion = SmallTurretExplosion;
|
||||
expDmgRadius = 5.0;
|
||||
expDamage = 0.25;
|
||||
expImpulse = 500.0;
|
||||
repairRate = 0;
|
||||
heatSignature = 0.0;
|
||||
explosion = SmallTurretExplosion;
|
||||
|
||||
deployedObject = true;
|
||||
|
||||
|
|
@ -105,9 +108,12 @@ datablock TurretData(TurretDeployedWallIndoor) : TurretDamageProfile
|
|||
maxDamage = 0.5;
|
||||
destroyedLevel = 0.5;
|
||||
disabledLevel = 0.21;
|
||||
explosion = SmallTurretExplosion;
|
||||
expDmgRadius = 5.0;
|
||||
expDamage = 0.25;
|
||||
expImpulse = 500.0;
|
||||
repairRate = 0;
|
||||
heatSignature = 0.0;
|
||||
explosion = SmallTurretExplosion;
|
||||
|
||||
thetaMin = 5;
|
||||
thetaMax = 145;
|
||||
|
|
@ -149,6 +155,10 @@ datablock TurretData(TurretDeployedCeilingIndoor) : TurretDamageProfile
|
|||
maxDamage = 0.5;
|
||||
destroyedLevel = 0.5;
|
||||
disabledLevel = 0.21;
|
||||
explosion = SmallTurretExplosion;
|
||||
expDmgRadius = 5.0;
|
||||
expDamage = 0.25;
|
||||
expImpulse = 500.0;
|
||||
repairRate = 0;
|
||||
explosion = SmallTurretExplosion;
|
||||
|
||||
|
|
|
|||
|
|
@ -99,12 +99,12 @@ datablock TurretImageData(MissileBarrelLarge)
|
|||
minTargetingDistance = 40;
|
||||
|
||||
// Turret parameters
|
||||
activationMS = 500;
|
||||
deactivateDelayMS = 1000;
|
||||
activationMS = 250;
|
||||
deactivateDelayMS = 500;
|
||||
thinkTimeMS = 200;
|
||||
degPerSecTheta = 580;
|
||||
degPerSecPhi = 1080;
|
||||
attackRadius = 180;
|
||||
attackRadius = 250;
|
||||
|
||||
// State transitions
|
||||
stateName[0] = "Activate";
|
||||
|
|
|
|||
|
|
@ -118,8 +118,11 @@ datablock TurretData(TurretDeployedOutdoor) : TurretDamageProfile
|
|||
maxDamage = 0.80;
|
||||
destroyedLevel = 0.80;
|
||||
disabledLevel = 0.35;
|
||||
explosion = HandGrenadeExplosion;
|
||||
expDmgRadius = 5.0;
|
||||
expDamage = 0.3;
|
||||
expImpulse = 500.0;
|
||||
repairRate = 0;
|
||||
explosion = HandGrenadeExplosion;
|
||||
|
||||
deployedObject = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -126,7 +126,6 @@ function createVehicle(%client, %station, %blockName, %team , %pos, %rot, %angle
|
|||
%station.station.teleporter.MPB = %obj;
|
||||
%obj.teleporter = %station.station.teleporter;
|
||||
}
|
||||
|
||||
%station.ready = false;
|
||||
%obj.team = %team;
|
||||
%obj.useCreateHeight(true);
|
||||
|
|
@ -169,6 +168,7 @@ function createVehicle(%client, %station, %blockName, %team , %pos, %rot, %angle
|
|||
stationObject = %station;
|
||||
};
|
||||
|
||||
%obj.getDataBlock().schedule(5000, "mountDriver", %obj, %client.player);
|
||||
}
|
||||
if(%obj.getTarget() != -1)
|
||||
setTargetSensorGroup(%obj.getTarget(), %client.getSensorGroup());
|
||||
|
|
@ -177,6 +177,15 @@ function createVehicle(%client, %station, %blockName, %team , %pos, %rot, %angle
|
|||
//VehicleHud.updateHud(%client, 'vehicleHud');
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function VehicleData::mountDriver(%data, %obj, %player)
|
||||
{
|
||||
%player.startFade(1000, 0, true);
|
||||
|
||||
%player.getDataBlock().schedule(1000,"onCollision",%player, %obj, 0);
|
||||
%player.schedule(1500,"startFade",1000, 0, false);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function VehicleData::checkIfPlayersMounted(%data, %obj)
|
||||
{
|
||||
|
|
@ -226,31 +235,37 @@ function VehicleHud::updateHud( %obj, %client, %tag )
|
|||
if ( %station.vehicle[scoutVehicle] )
|
||||
{
|
||||
messageClient( %client, 'SetLineHud', "", %tag, %count, "GRAV CYCLE", "", ScoutVehicle, $VehicleMax[ScoutVehicle] - $VehicleTotalCount[%team, ScoutVehicle] );
|
||||
//new messageClient( %client, 'SetLineHud', "", %tag, %count, 'ScoutVehicle', $VehicleMax[ScoutVehicle] - $VehicleTotalCount[%team, ScoutVehicle], '', "GRAV CYCLE" );
|
||||
%count++;
|
||||
}
|
||||
if ( %station.vehicle[AssaultVehicle] )
|
||||
{
|
||||
messageClient( %client, 'SetLineHud', "", %tag, %count, "ASSAULT TANK", "", AssaultVehicle, $VehicleMax[AssaultVehicle] - $VehicleTotalCount[%team, AssaultVehicle] );
|
||||
//new messageClient( %client, 'SetLineHud', "", %tag, %count, 'AssaultVehicle', $VehicleMax[AssaultVehicle] - $VehicleTotalCount[%team, AssaultVehicle], '', "ASSAULT TANK");
|
||||
%count++;
|
||||
}
|
||||
if ( %station.vehicle[mobileBaseVehicle] )
|
||||
{
|
||||
messageClient( %client, 'SetLineHud', "", %tag, %count, "MOBILE POINT BASE", "", MobileBaseVehicle, $VehicleMax[MobileBaseVehicle] - $VehicleTotalCount[%team, MobileBaseVehicle] );
|
||||
//new messageClient( %client, 'SetLineHud', "", %tag, %count, 'MobileBaseVehicle', $VehicleMax[MobileBaseVehicle] - $VehicleTotalCount[%team, MobileBaseVehicle], '', "MOBILE POINT BASE" );
|
||||
%count++;
|
||||
}
|
||||
if ( %station.vehicle[scoutFlyer] )
|
||||
{
|
||||
messageClient( %client, 'SetLineHud', "", %tag, %count, "SCOUT FLIER", "", ScoutFlyer, $VehicleMax[ScoutFlyer] - $VehicleTotalCount[%team, ScoutFlyer] );
|
||||
//new messageClient( %client, 'SetLineHud', "", %tag, %count, 'ScoutFlyer', $VehicleMax[ScoutFlyer] - $VehicleTotalCount[%team, ScoutFlyer], '', "SCOUT FLIER");
|
||||
%count++;
|
||||
}
|
||||
if ( %station.vehicle[bomberFlyer] )
|
||||
{
|
||||
messageClient( %client, 'SetLineHud', "", %tag, %count, "BOMBER", "", BomberFlyer, $VehicleMax[BomberFlyer] - $VehicleTotalCount[%team, BomberFlyer] );
|
||||
//new messageClient( %client, 'SetLineHud', "", %tag, %count, 'BomberFlyer', $VehicleMax[BomberFlyer] - $VehicleTotalCount[%team, BomberFlyer], '', "BOMBER");
|
||||
%count++;
|
||||
}
|
||||
if ( %station.vehicle[hapcFlyer] )
|
||||
{
|
||||
messageClient( %client, 'SetLineHud', "", %tag, %count, "TRANSPORT", "", HAPCFlyer, $VehicleMax[HAPCFlyer] - $VehicleTotalCount[%team, HAPCFlyer] );
|
||||
//new messageClient( %client, 'SetLineHud', "", %tag, %count, 'HAPCFlyer', $VehicleMax[HAPCFlyer] - $VehicleTotalCount[%team, HAPCFlyer], '', "TRANSPORT");
|
||||
%count++;
|
||||
}
|
||||
%station.lastCount = %count;
|
||||
|
|
|
|||
|
|
@ -1030,7 +1030,7 @@ function findAIEmptySeat(%vehicle, %player)
|
|||
return %node;
|
||||
}
|
||||
|
||||
function findEmptySeat(%vehicle, %player)
|
||||
function findEmptySeat(%vehicle, %player, %forceNode)
|
||||
{
|
||||
%minNode = 1;
|
||||
%node = -1;
|
||||
|
|
@ -1050,18 +1050,22 @@ function findEmptySeat(%vehicle, %player)
|
|||
else
|
||||
%minNode = findFirstHeavyNode(%dataBlock);
|
||||
|
||||
for(%i = 0; %i < %dataBlock.numMountPoints; %i++)
|
||||
if(!%vehicle.getMountNodeObject(%i))
|
||||
{
|
||||
%seatPos = getWords(%vehicle.getSlotTransform(%i), 0, 2);
|
||||
%disTemp = VectorLen(VectorSub(%seatPos, %playerPos));
|
||||
if(%disTemp <= %dis)
|
||||
if(%forceNode !$= "")
|
||||
%node = %forceNode;
|
||||
else
|
||||
{
|
||||
for(%i = 0; %i < %dataBlock.numMountPoints; %i++)
|
||||
if(!%vehicle.getMountNodeObject(%i))
|
||||
{
|
||||
%node = %i;
|
||||
%dis = %disTemp;
|
||||
%seatPos = getWords(%vehicle.getSlotTransform(%i), 0, 2);
|
||||
%disTemp = VectorLen(VectorSub(%seatPos, %playerPos));
|
||||
if(%disTemp <= %dis)
|
||||
{
|
||||
%node = %i;
|
||||
%dis = %disTemp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if(%node != -1 && %node < %minNode)
|
||||
{
|
||||
if(%message $= "")
|
||||
|
|
@ -1110,6 +1114,7 @@ function VehicleData::damageObject(%data, %targetObject, %sourceObject, %positio
|
|||
if (%data.isShielded)
|
||||
%amount = %data.checkShields(%targetObject, %position, %amount, %damageType);
|
||||
|
||||
|
||||
%damageScale = %data.damageScale[%damageType];
|
||||
if(%damageScale !$= "")
|
||||
%amount *= %damageScale;
|
||||
|
|
|
|||
|
|
@ -193,11 +193,11 @@ datablock FlyingVehicleData(BomberFlyer) : BomberDamageProfile
|
|||
|
||||
// Ground Impact Damage (uses DamageType::Ground)
|
||||
minImpactSpeed = 20; // If hit ground at speed above this then it's an impact. Meters/second
|
||||
speedDamageScale = 0.150;
|
||||
speedDamageScale = 0.060;
|
||||
|
||||
// Object Impact Damage (uses DamageType::Impact)
|
||||
collDamageThresholdVel = 25;
|
||||
collDamageMultiplier = 0.030;
|
||||
collDamageMultiplier = 0.020;
|
||||
|
||||
//
|
||||
minTrailSpeed = 15; // The speed your contrail shows up at.
|
||||
|
|
@ -240,8 +240,8 @@ datablock FlyingVehicleData(BomberFlyer) : BomberDamageProfile
|
|||
|
||||
checkRadius = 7.1895;
|
||||
observeParameters = "1 10 10";
|
||||
|
||||
shieldEffectScale = "0.75 0.975 0.375";
|
||||
showPilotInfo = 1;
|
||||
};
|
||||
|
||||
//**************************************************************
|
||||
|
|
@ -334,8 +334,8 @@ datablock LinearFlareProjectileData(BomberFusionBolt)
|
|||
explosion = BomberFusionBoltExplosion;
|
||||
sound = BlasterProjectileSound;
|
||||
|
||||
dryVelocity = 75.0;
|
||||
wetVelocity = 75.0;
|
||||
dryVelocity = 200.0;
|
||||
wetVelocity = 200.0;
|
||||
velInheritFactor = 1.0;
|
||||
fizzleTimeMS = 2000;
|
||||
lifetimeMS = 3000;
|
||||
|
|
|
|||
|
|
@ -111,12 +111,12 @@ datablock FlyingVehicleData(HAPCFlyer) : HavocDamageProfile
|
|||
hardImpactSpeed = 15; // Sound hooks. This is the hard hit.
|
||||
|
||||
// Ground Impact Damage (uses DamageType::Ground)
|
||||
minImpactSpeed = 12; // If hit ground at speed above this then it's an impact. Meters/second
|
||||
minImpactSpeed = 25; // If hit ground at speed above this then it's an impact. Meters/second
|
||||
speedDamageScale = 0.060;
|
||||
|
||||
// Object Impact Damage (uses DamageType::Impact)
|
||||
collDamageThresholdVel = 12;
|
||||
collDamageMultiplier = 0.080;
|
||||
collDamageThresholdVel = 28;
|
||||
collDamageMultiplier = 0.020;
|
||||
|
||||
//
|
||||
minTrailSpeed = 15;
|
||||
|
|
@ -154,7 +154,7 @@ datablock FlyingVehicleData(HAPCFlyer) : HavocDamageProfile
|
|||
cmdIcon = CMDFlyingHAPCIcon;
|
||||
cmdMiniIconName = "commander/MiniIcons/com_hapc_grey";
|
||||
targetNameTag = 'Havoc';
|
||||
targetTypeTag = 'Flying Vehicle';
|
||||
targetTypeTag = 'Heavy Transport';
|
||||
sensorData = VehiclePulseSensor;
|
||||
|
||||
checkRadius = 7.8115;
|
||||
|
|
|
|||
|
|
@ -150,8 +150,8 @@ datablock WheeledVehicleData(MobileBaseVehicle) : MPBDamageProfile
|
|||
speedDamageScale = 0.060;
|
||||
|
||||
// Object Impact Damage (uses DamageType::Impact)
|
||||
collDamageThresholdVel = 12;
|
||||
collDamageMultiplier = 0.080;
|
||||
collDamageThresholdVel = 18;
|
||||
collDamageMultiplier = 0.070;
|
||||
|
||||
// Engine
|
||||
engineTorque = 7.0 * 745;
|
||||
|
|
|
|||
|
|
@ -99,9 +99,10 @@ datablock FlyingVehicleData(ScoutFlyer) : ShrikeDamageProfile
|
|||
isShielded = true;
|
||||
energyPerDamagePoint = 160;
|
||||
maxEnergy = 280; // Afterburner and any energy weapon pool
|
||||
rechargeRate = 0.8;
|
||||
|
||||
minDrag = 30; // Linear Drag (eventually slows you down when not thrusting...constant drag)
|
||||
rotationalDrag = 900; // Anguler Drag (dampens the drift after you stop moving the mouse...also tumble drag)
|
||||
rechargeRate = 0.8;
|
||||
|
||||
maxAutoSpeed = 15; // Autostabilizer kicks in when less than this speed. (meters/second)
|
||||
autoAngularForce = 400; // Angular stabilizer force (this force levels you out when autostabilizer kicks in)
|
||||
|
|
@ -112,7 +113,7 @@ datablock FlyingVehicleData(ScoutFlyer) : ShrikeDamageProfile
|
|||
maxSteeringAngle = 5; // Max radiens you can rotate the wheel. Smaller number is more maneuverable.
|
||||
horizontalSurfaceForce = 6; // Horizontal center "wing" (provides "bite" into the wind for climbing/diving and turning)
|
||||
verticalSurfaceForce = 4; // Vertical center "wing" (controls side slip. lower numbers make MORE slide.)
|
||||
maneuveringForce = 3000; // Horizontal jets (W,S,D,A key thrust)
|
||||
maneuveringForce = 2500; // Horizontal jets (W,S,D,A key thrust)
|
||||
steeringForce = 1200; // Steering jets (force applied when you move the mouse)
|
||||
steeringRollForce = 400; // Steering jets (how much you heel over when you turn)
|
||||
rollForce = 4; // Auto-roll (self-correction to right you after you roll/invert)
|
||||
|
|
@ -120,10 +121,10 @@ datablock FlyingVehicleData(ScoutFlyer) : ShrikeDamageProfile
|
|||
createHoverHeight = 3; // Height off the ground when created
|
||||
|
||||
// Turbo Jet
|
||||
jetForce = 2000; // Afterburner thrust (this is in addition to normal thrust)
|
||||
jetForce = 1750; // Afterburner thrust (this is in addition to normal thrust)
|
||||
minJetEnergy = 28; // Afterburner can't be used if below this threshhold.
|
||||
jetEnergyDrain = 2.8; // Energy use of the afterburners (low number is less drain...can be fractional) // Auto stabilize speed
|
||||
vertThrustMultiple = 2.0;
|
||||
vertThrustMultiple = 2.5;
|
||||
|
||||
// Rigid body
|
||||
mass = 150; // Mass of the vehicle
|
||||
|
|
@ -134,7 +135,7 @@ datablock FlyingVehicleData(ScoutFlyer) : ShrikeDamageProfile
|
|||
hardImpactSpeed = 25; // Sound hooks. This is the hard hit.
|
||||
|
||||
// Ground Impact Damage (uses DamageType::Ground)
|
||||
minImpactSpeed = 23; // If hit ground at speed above this then it's an impact. Meters/second
|
||||
minImpactSpeed = 10; // If hit ground at speed above this then it's an impact. Meters/second
|
||||
speedDamageScale = 0.06;
|
||||
|
||||
// Object Impact Damage (uses DamageType::Impact)
|
||||
|
|
@ -192,7 +193,7 @@ datablock FlyingVehicleData(ScoutFlyer) : ShrikeDamageProfile
|
|||
cmdIcon = CMDFlyingScoutIcon;
|
||||
cmdMiniIconName = "commander/MiniIcons/com_scout_grey";
|
||||
targetNameTag = 'Shrike';
|
||||
targetTypeTag = 'Flying Vehicle';
|
||||
targetTypeTag = 'Turbograv';
|
||||
sensorData = AWACPulseSensor;
|
||||
sensorRadius = AWACPulseSensor.detectRadius;
|
||||
sensorColor = "255 194 9";
|
||||
|
|
|
|||
|
|
@ -201,8 +201,8 @@ datablock HoverVehicleData(AssaultVehicle) : TankDamageProfile
|
|||
speedDamageScale = 0.060;
|
||||
|
||||
// Object Impact Damage (uses DamageType::Impact)
|
||||
collDamageThresholdVel = 17;
|
||||
collDamageMultiplier = 0.070;
|
||||
collDamageThresholdVel = 18;
|
||||
collDamageMultiplier = 0.045;
|
||||
|
||||
dragForce = 40 / 20;
|
||||
vertFactor = 0.0;
|
||||
|
|
@ -211,7 +211,7 @@ datablock HoverVehicleData(AssaultVehicle) : TankDamageProfile
|
|||
mainThrustForce = 50;
|
||||
reverseThrustForce = 40;
|
||||
strafeThrustForce = 40;
|
||||
turboFactor = 1.5;
|
||||
turboFactor = 1.25;
|
||||
|
||||
brakingForce = 25;
|
||||
brakingActivationSpeed = 4;
|
||||
|
|
@ -276,18 +276,17 @@ datablock HoverVehicleData(AssaultVehicle) : TankDamageProfile
|
|||
cmdIcon = CMDGroundTankIcon;
|
||||
cmdMiniIconName = "commander/MiniIcons/com_tank_grey";
|
||||
targetNameTag = 'Beowulf';
|
||||
targetTypeTag = 'Assault Vehicle';
|
||||
targetTypeTag = 'Assault Tank';
|
||||
sensorData = VehiclePulseSensor;
|
||||
|
||||
checkRadius = 5.5535;
|
||||
observeParameters = "1 10 10";
|
||||
|
||||
runningLight[0] = TankLight1;
|
||||
runningLight[1] = TankLight2;
|
||||
runningLight[2] = TankLight3;
|
||||
runningLight[3] = TankLight4;
|
||||
|
||||
shieldEffectScale = "0.9 1.0 0.6";
|
||||
showPilotInfo = 1;
|
||||
};
|
||||
|
||||
//**************************************************************
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ datablock HoverVehicleData(ScoutVehicle) : WildcatDamageProfile
|
|||
|
||||
// Object Impact Damage (uses DamageType::Impact)
|
||||
collDamageThresholdVel = 23;
|
||||
collDamageMultiplier = 0.040;
|
||||
collDamageMultiplier = 0.030;
|
||||
|
||||
dragForce = 25 / 45.0;
|
||||
vertFactor = 0.0;
|
||||
|
|
@ -123,7 +123,7 @@ datablock HoverVehicleData(ScoutVehicle) : WildcatDamageProfile
|
|||
mainThrustForce = 25;
|
||||
reverseThrustForce = 10;
|
||||
strafeThrustForce = 8;
|
||||
turboFactor = 2.0;
|
||||
turboFactor = 1.5;
|
||||
|
||||
brakingForce = 25;
|
||||
brakingActivationSpeed = 4;
|
||||
|
|
@ -188,7 +188,7 @@ datablock HoverVehicleData(ScoutVehicle) : WildcatDamageProfile
|
|||
cmdIcon = CMDHoverScoutIcon;
|
||||
cmdMiniIconName = "commander/MiniIcons/com_landscout_grey";
|
||||
targetNameTag = 'WildCat';
|
||||
targetTypeTag = 'Hover Vehicle';
|
||||
targetTypeTag = 'Grav Cycle';
|
||||
sensorData = VehiclePulseSensor;
|
||||
|
||||
checkRadius = 1.7785;
|
||||
|
|
|
|||
|
|
@ -232,8 +232,7 @@ function voiceCapStart()
|
|||
{
|
||||
case 0: %level = "Codec .v12";
|
||||
case 1: %level = "Codec .v24";
|
||||
case 2: %level = "Codec .v29";
|
||||
default: %level = "Codec GSM";
|
||||
default: %level = "Codec .v29";
|
||||
}
|
||||
|
||||
addMessageHudLine("\c2System:\cr server has voice level capped at [\c1" @ %level @ "\cr].");
|
||||
|
|
|
|||
|
|
@ -741,19 +741,20 @@ function detonateFlashGrenade(%hg)
|
|||
// ----------------------------------------------
|
||||
|
||||
|
||||
function MineDeployed::onThrow(%this, %mine)
|
||||
function MineDeployed::onThrow(%this, %mine, %thrower)
|
||||
{
|
||||
%mine.armed = false;
|
||||
%mine.damaged = 0;
|
||||
%mine.detonated = false;
|
||||
%mine.depCount = 0;
|
||||
schedule(1500, %mine, "deployMineCheck", %mine);
|
||||
schedule(1500, %mine, "deployMineCheck", %mine, %thrower);
|
||||
}
|
||||
|
||||
function deployMineCheck(%mineObj)
|
||||
function deployMineCheck(%mineObj, %player)
|
||||
{
|
||||
if(%mineObj.depCount > %mineObj.getDatablock().maxDepCount)
|
||||
explodeMine(%mineObj, true);
|
||||
|
||||
// wait until the mine comes to rest
|
||||
if(%mineObj.getVelocity() $= "0 0 0")
|
||||
{
|
||||
|
|
@ -779,7 +780,10 @@ function deployMineCheck(%mineObj)
|
|||
%mineTeam = %mineObj.sourceObject.team;
|
||||
$TeamDeployedCount[%mineTeam, MineDeployed]++;
|
||||
if($TeamDeployedCount[%mineTeam, MineDeployed] > $TeamDeployableMax[MineDeployed])
|
||||
{
|
||||
messageClient( %player.client, '', 'Maximum allowable mines deployed.' );
|
||||
schedule(100, %mineObj, "explodeMine", %mineObj, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
//start the thread that keeps checking for objects near the mine...
|
||||
|
|
@ -796,7 +800,7 @@ function deployMineCheck(%mineObj)
|
|||
{
|
||||
//schedule this deploy check again a little later
|
||||
%mineObj.depCount++;
|
||||
schedule(500, %mineObj, "deployMineCheck", %mineObj);
|
||||
schedule(500, %mineObj, "deployMineCheck", %mineObj, %player);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ function HandInventory::onUse(%data, %obj)
|
|||
serverPlay3D(GrenadeThrowSound, %pos);
|
||||
%obj.lastThrowTime[%data] = getSimTime();
|
||||
|
||||
%thrownItem.getDataBlock().onThrow(%thrownItem);
|
||||
%thrownItem.getDataBlock().onThrow(%thrownItem, %obj);
|
||||
%obj.throwStrength = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -818,7 +818,7 @@ function BrowserSearchMatchList::onSelect( %this, %id, %text )
|
|||
//-----------------------------------------------------------------------------
|
||||
function BrowserSearchMatchList::onAdd(%this)
|
||||
{
|
||||
BrowserSearchMatchList.addStyle( 1, "Univers", 12 , "150 150 150", "200 200 200", "60 60 60" );
|
||||
// BrowserSearchMatchList.addStyle( 1, "Univers", 12 , "150 150 150", "200 200 200", "60 60 60" );
|
||||
}
|
||||
//==-- BrowserSearchPane ----------------------------------------------------
|
||||
function BrowserSearchPane::onDatabaseQueryResult(%this, %status, %resultStatus, %key)
|
||||
|
|
@ -1150,9 +1150,9 @@ function GuiMLTextCtrl::onURL(%this, %url)
|
|||
PostsPopupDlg.state = "adminRemovePostPlus";
|
||||
databaseQuery(63, 7 TAB getFields(%url,1), PostsPopupDlg, PostsPopupDlg.key);
|
||||
case "joinPublicChat":
|
||||
TribePane.joinChat(getField(%url,1),0);
|
||||
joinPublicTribeChannel(getField(%url,1));
|
||||
case "joinPrivateChat":
|
||||
TribePane.joinChat(getField(%url,1),1);
|
||||
joinPrivateTribeChannel(getField(%url,1));
|
||||
|
||||
//if there is an unknown URL type, treat it as a weblink..
|
||||
default:
|
||||
|
|
@ -1248,13 +1248,9 @@ function TribePane::onWake(%this)
|
|||
function TribePane::JoinChat(%this, %tribe, %chanType)
|
||||
{
|
||||
if(%chanType == 0)
|
||||
%chan = "_Public";
|
||||
joinPublicTribeChannel(%tribe);
|
||||
else
|
||||
%chan = "_Private";
|
||||
|
||||
error("CHANNEL:" @ %chan);
|
||||
IRCClient::join(IRCClient::channelName(%tribe) @ %chan);
|
||||
LaunchTabView.viewTab("CHAT", ChatGui, 0);
|
||||
joinPrivateTribeChannel(%tribe);
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
function TribePane::onDatabaseQueryResult(%this, %status, %resultString , %key)
|
||||
|
|
@ -2175,7 +2171,7 @@ function TribeMemberPopupDlg::onWake( %this )
|
|||
TribeMemberPopup.add( "Contact by EMail", 2 );
|
||||
TribeMemberPopup.add( "Add To Buddylist", 4 );
|
||||
TribeMemberPopup.add( "Add To Blocklist", 5 );
|
||||
TribeMemberPopup.add( "Invite To Chat", 8);
|
||||
// TribeMemberPopup.add( "Invite To Chat", 8);
|
||||
if(%isMember)
|
||||
{
|
||||
TribeMemberPopup.add( "............................................", -1);
|
||||
|
|
|
|||
|
|
@ -439,6 +439,34 @@ function EmailBlockRemove()
|
|||
}
|
||||
}
|
||||
//-- EMailComposeDlg ----------------------------------------------------------------
|
||||
function EmailComposeDlg::onWake( %this )
|
||||
{
|
||||
// Get the compose dialog position and size from the prefs:
|
||||
%res = getResolution();
|
||||
%resW = firstWord( %res );
|
||||
%resH = getWord( %res, 1 );
|
||||
%w = firstWord( $pref::Email::ComposeWindowExtent );
|
||||
if ( %w > %resW )
|
||||
%w = %resW;
|
||||
%h = getWord( $pref::Email::ComposeWindowExtent, 1 );
|
||||
if ( %h > %resH )
|
||||
%h = %resH;
|
||||
%x = firstWord( $pref::Email::ComposeWindowPos );
|
||||
if ( %x > %resW - %w )
|
||||
%x = %resW - %w;
|
||||
%y = getWord( $pref::Email::ComposeWindowPos, 1 );
|
||||
if ( %y > %resH - %h )
|
||||
%y = %resH - %h;
|
||||
|
||||
EmailComposeWindow.resize( %x, %y, %w, %h );
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
function EmailComposeDlg::onSleep( %this )
|
||||
{
|
||||
$pref::Email::ComposeWindowPos = EmailComposeWindow.getPosition();
|
||||
$pref::Email::ComposeWindowExtent = EmailComposeWindow.getExtent();
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
function EMailComposeDlg::onDatabaseQueryResult(%this, %status, %RowCount_Result, %key)
|
||||
{
|
||||
if(%this.key != %key)
|
||||
|
|
@ -950,13 +978,13 @@ function AddressDlg::onWake(%this)
|
|||
LC_Search.clear();
|
||||
StrToList(LC_ToList,$EmailToAddress,",");
|
||||
StrToList(LC_CCList,$EmailCCAddress,",");
|
||||
%info = WONGetAuthInfo();
|
||||
%tribeCount = getField( getRecord( %info, 1 ), 0 ); //%cert
|
||||
for ( %i = 0; %i < %tribeCount; %i++ )
|
||||
{
|
||||
%tribe = getField( getRecord( %info, %i + 2 ), 0 ); //%cert
|
||||
LC_ListBox.add(%tribe,%i);
|
||||
}
|
||||
%info = WONGetAuthInfo();
|
||||
%tribeCount = getField( getRecord( %info, 1 ), 0 ); //%cert
|
||||
for ( %i = 0; %i < %tribeCount; %i++ )
|
||||
{
|
||||
%tribe = getField( getRecord( %info, %i + 2 ), 0 ); //%cert
|
||||
LC_ListBox.add(%tribe,%i);
|
||||
}
|
||||
}
|
||||
//-- EMailGui ----------------------------------------------------------------
|
||||
function EmailGui::onWake(%this)
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ $TopicColumnName[1] = "Posts";
|
|||
$TopicColumnRange[1] = "25 100";
|
||||
$TopicColumnFlags[1] = "numeric center";
|
||||
$TopicColumnCount++;
|
||||
$TopicColumnName[2] = "Posted By";
|
||||
$TopicColumnName[2] = "Last Poster";
|
||||
$TopicColumnRange[2] = "50 300";
|
||||
$TopicColumnCount++;
|
||||
$TopicColumnName[3] = "Last Post Date";
|
||||
|
|
@ -74,6 +74,8 @@ if(!isObject(ForumsMessageVector))
|
|||
//-----------------------------------------------------------------------------
|
||||
function isModerator()
|
||||
{
|
||||
if(!$GuidTribes)
|
||||
$GuidTribes = getRecords(WonGetAuthInfo(),1);
|
||||
%result = 0;
|
||||
for(%checkID=0;%checkID<getField(getRecord($GuidTribes,0),0);%checkID++)
|
||||
{
|
||||
|
|
@ -86,6 +88,8 @@ function isModerator()
|
|||
//-----------------------------------------------------------------------------
|
||||
function isT2Admin()
|
||||
{
|
||||
if(!$GuidTribes)
|
||||
$GuidTribes = getRecords(wonGetAuthinfo(),1);
|
||||
%result = 0;
|
||||
for(%checkID=0;%checkID<getField(getRecord($GuidTribes,0),0);%checkID++)
|
||||
{
|
||||
|
|
@ -244,7 +248,7 @@ function CacheForumTopic()
|
|||
ForumsMessageList.highestUpdate = 0;
|
||||
|
||||
%newGroup = TopicsListGroup.getObject(ForumsTopicsList.getSelectedRow());
|
||||
ForumsMessageList.lastID = %newGroup.updateid;
|
||||
ForumsMessageList.lastID = %newGroup.updateid-1;
|
||||
%latest = GetField(ForumsTopicsList.getRowTextbyID(ForumsTopicsList.getSelectedID()),3);
|
||||
ForumsMessageVector.dump( $ForumCachePath @ "tpc" @ ForumsMessageVector.tid , ForumsMessageList.lastID TAB $ForumCacheVersion TAB %allRead TAB %latest);
|
||||
}
|
||||
|
|
@ -812,7 +816,7 @@ function ForumsGui::onDatabaseRow(%this,%row,%isLastRow,%key)
|
|||
%name = getField(%row, 8);
|
||||
%hasDeletes = getField(%row,12);
|
||||
%slevel = getField(%row,13);
|
||||
%maxUpdateId = getField(%row,14);
|
||||
%maxUpdateId = getField(%row,14)-1;
|
||||
ForumsTopicsList.addTopic( %id, %topic, %date, %maxUpdateID, %slevel, %row);
|
||||
ForumsTopicsList.addRow( %id, %topic TAB %postCount TAB %name TAB %date TAB %hasDeletes);
|
||||
if ( %isLastRow ) //is last line
|
||||
|
|
@ -869,7 +873,7 @@ function ForumsGui::onDatabaseRow(%this,%row,%isLastRow,%key)
|
|||
{
|
||||
ForumsMessageVector.tid = ForumsTopicsList.getSelectedID();
|
||||
ForumsTopicsList.thread = TopicsListGroup.getObject(ForumsTopicsList.getSelectedRow());
|
||||
ForumsTopicsList.thread.updateID = %high;
|
||||
ForumsTopicsList.thread.updateID = %high-1;
|
||||
CacheForumTopic();
|
||||
ForumsMessageList.loadCache(ForumsTopicsList.getSelectedID());
|
||||
}
|
||||
|
|
@ -998,7 +1002,7 @@ function ForumsTopicsList::AddTopic(%this, %id, %topicname, %date, %mid, %slevel
|
|||
Id = %id;
|
||||
name = %topicname;
|
||||
date = %date;
|
||||
updateid = %mid;
|
||||
updateid = %mid-1;
|
||||
slevel = %slevel;
|
||||
rcvrec = %vline;
|
||||
};
|
||||
|
|
@ -1043,10 +1047,11 @@ function TopicsPopupDlg::onWake( %this )
|
|||
if(isModerator())
|
||||
TopicsPopupMenu.add(%line,-1);
|
||||
TopicsPopupMenu.add("Request Admin Review", 3);
|
||||
// TopicsPopupMenu.add("Unlock Topic", 5);
|
||||
if(isT2Admin())
|
||||
{
|
||||
TopicsPopupMenu.add("Lock Topic", 4);
|
||||
TopicsPopupMenu.add("Unlock Topic", 5);
|
||||
TopicsPopupMenu.add("Move Topic",6);
|
||||
TopicsPopupMenu.add("Remove Topic", 10);
|
||||
}
|
||||
|
||||
|
|
@ -1159,14 +1164,15 @@ function TopicsPopupMenu::onSelect( %this, %id, %text )
|
|||
databaseQuery(60, %fieldData, TopicsPopupDlg, TopicsPopupDlg.key);
|
||||
|
||||
case 4: //Lock Thread
|
||||
TopicsPopupDlg.key = LaunchGui.key++;
|
||||
TopicsPopupDlg.state = "lockTopic";
|
||||
%fieldData = TopicsPopupMenu.topic.id TAB "Locked at Admin Request";
|
||||
DatabaseQuery(66,%fieldData,topicsPopupDlg,topicsPopupDlg.key);
|
||||
LockTopicReason.setText("Locked at Admin Request");
|
||||
Canvas.pushDialog("GenDialog");
|
||||
case 5: //Unlock Thread
|
||||
MessageBoxOK("NOTICE","Feature Not Yet Implemented");
|
||||
case 6: //Not Implemented
|
||||
MessageBoxOK("NOTICE","Feature Not Yet Implemented");
|
||||
TopicsPopupDlg.key = LaunchGui.key++;
|
||||
TopicsPopupDlg.state = "unlockTopic";
|
||||
%fieldData = TopicsPopupMenu.topic.id;
|
||||
DatabaseQuery(67,%fieldData,topicsPopupDlg,topicsPopupDlg.key);
|
||||
case 6: //Move Thread
|
||||
Canvas.pushDialog("MoveThreadDlg");
|
||||
case 7: //Not Implemented
|
||||
MessageBoxOK("NOTICE","Feature Not Yet Implemented");
|
||||
case 8: //Not Implemented
|
||||
|
|
@ -1183,6 +1189,34 @@ function TopicsPopupMenu::onSelect( %this, %id, %text )
|
|||
canvas.popDialog(TopicsPopupDlg);
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
function MoveThreadDlg::onWake(%this)
|
||||
{
|
||||
MoveToForumList.clear();
|
||||
for(%i=0;%i<ForumsList.rowCount();%i++)
|
||||
{
|
||||
MoveToForumList.add(getField(ForumsList.getRowText(%i),0),ForumsList.getRowid(%i));
|
||||
}
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
function TopicsPopupMenu::ExecuteLock(%this)
|
||||
{
|
||||
Canvas.popDialog("GenDialog");
|
||||
%fieldData = TopicsPopupMenu.topic.id TAB LockTopicReason.getText();
|
||||
TopicsPopupDlg.key = LaunchGui.key++;
|
||||
TopicsPopupDlg.state = "lockTopic";
|
||||
DatabaseQuery(66,%fieldData,topicsPopupDlg,topicsPopupDlg.key);
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
function TopicsPopupMenu::ExecuteMove(%this)
|
||||
{
|
||||
%fieldData = TopicsPopupMenu.topic.id TAB MoveToForumList.getSelected() TAB MoveToForumList.getText();
|
||||
error("MOVE: " @ %fieldData);
|
||||
Canvas.popDialog("MoveThreadDlg");
|
||||
TopicsPopupDlg.key = LaunchGui.key++;
|
||||
TopicsPopupDlg.state = "moveTopic";
|
||||
DatabaseQuery(68,%fieldData,topicsPopupDlg,topicsPopupDlg.key);
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
function TopicsPopupDlg::onSleep(%this)
|
||||
{
|
||||
ForumsGui.TDialogOpen = false;
|
||||
|
|
@ -1214,11 +1248,18 @@ function TopicsPopupDlg::onDatabaseQueryResult(%this,%status,%recordCount,%key)
|
|||
}
|
||||
else
|
||||
{
|
||||
if(%this.state $= "lockTopic")
|
||||
{
|
||||
switch$(%this.state)
|
||||
{
|
||||
case "lockTopic":
|
||||
ForumsTopicsList.setRowStyle( getField(%recordCount,0), 3 );
|
||||
}
|
||||
MessageBoxOK("NOTICE",getField(%status,1));
|
||||
MessageBoxOK("NOTICE",getField(%status,1));
|
||||
case "unlockTopic":
|
||||
ForumsTopicsList.setRowStyle( getField(%recordCount,0), 1 );
|
||||
MessageBoxOK("NOTICE",getField(%status,1));
|
||||
case "moveTopic":
|
||||
ForumsTopicsList.setRowStyle( getField(%recordCount,0), 3 );
|
||||
MessageBoxOK("NOTICE",getField(%status,1));
|
||||
}
|
||||
}
|
||||
else
|
||||
messageBoxOK("ERROR",getField(%status,1));
|
||||
|
|
@ -1271,7 +1312,7 @@ function ForumsTopicsList::updateReadStatus( %this )
|
|||
{
|
||||
%header = %file.readLine();
|
||||
%topicDate = getField( %this.getRowText( %row ), 3 );
|
||||
%updateID = getField(%header,0);
|
||||
%updateID = getField(%header,0)-1;
|
||||
if ( getField( %header, 1 ) == $ForumCacheVersion // Must have same cache version
|
||||
&& getField( %header, 2 ) == 1 // "all read" flag must be set
|
||||
&& strcmp( getField( %header, 3 ), %topicDate ) >= 0
|
||||
|
|
@ -1337,7 +1378,7 @@ function ForumsMessageList::AddPost(%this, %id, %postname, %authorID, %authorNam
|
|||
author = %authorName;
|
||||
authorID = %authorID;
|
||||
date = %date;
|
||||
updateid = %mid;
|
||||
updateid = %mid-1;
|
||||
slevel = %slevel;
|
||||
rcvrec = %vline;
|
||||
};
|
||||
|
|
@ -1607,9 +1648,9 @@ function ForumsMessagelist::onDatabaseQueryResult(%this,%status,%resultString,%k
|
|||
case "editPost":
|
||||
%this.state = "done";
|
||||
%postId = getField( %status, 2 );
|
||||
%index = ForumsMessageVector.getLineIndexByTag( %postId );
|
||||
%text = ForumsMessageVector.getLineTextByTag( %postId );
|
||||
%parent = getRecord( %text, 2 );
|
||||
%index = ForumsMessageVector.getLineIndexByTag( %postId );
|
||||
%text = ForumsMessageVector.getLineTextByTag( %postId );
|
||||
%parent = getRecord( %text, 2 );
|
||||
ForumsMessageVector.deleteLine( %index );
|
||||
%text = setRecord(%text,0,"1");
|
||||
ForumsMessageVector.pushBackLine(%text, %postID);
|
||||
|
|
@ -1618,9 +1659,9 @@ function ForumsMessagelist::onDatabaseQueryResult(%this,%status,%resultString,%k
|
|||
case "deletePost":
|
||||
%this.state = "done";
|
||||
%postId = getField( %status, 2 );
|
||||
%index = ForumsMessageVector.getLineIndexByTag( %postId );
|
||||
%text = ForumsMessageVector.getLineTextByTag( %postId );
|
||||
%parent = getRecord( %text, 2 );
|
||||
%index = ForumsMessageVector.getLineIndexByTag( %postId );
|
||||
%text = ForumsMessageVector.getLineTextByTag( %postId );
|
||||
%parent = getRecord( %text, 2 );
|
||||
ForumsTopicsList.refreshFlag = true;
|
||||
ForumsMessageVector.deleteLine( %index );
|
||||
CacheForumTopic();
|
||||
|
|
@ -1653,4 +1694,31 @@ function ForumsMessagelist::onDatabaseQueryResult(%this,%status,%resultString,%k
|
|||
MessageBoxOK("ERROR",getFields(%status,1));
|
||||
}
|
||||
canvas.SetCursor(DefaultCursor);
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
function ForumsComposeDlg::onWake( %this )
|
||||
{
|
||||
// Get the window pos and extent from prefs:
|
||||
%res = getResolution();
|
||||
%resW = firstWord( %res );
|
||||
%resH = getWord( %res, 1 );
|
||||
%w = firstWord( $pref::Forum::PostWindowExtent );
|
||||
if ( %w > %resW )
|
||||
%w = %resW;
|
||||
%h = getWord( $pref::Forum::PostWindowExtent, 1 );
|
||||
if ( %h > %resH )
|
||||
%h = %resH;
|
||||
%x = firstWord( $pref::Forum::PostWindowPos );
|
||||
if ( %x > %resW - %w )
|
||||
%x = %resW - %w;
|
||||
%y = getWord( $pref::Forum::PostWindowPos, 1 );
|
||||
if ( %y > %resH - %h )
|
||||
%y = %resH - %h;
|
||||
FC_Window.resize( %x, %y, %w, %h );
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
function ForumsComposeDlg::onSleep( %this )
|
||||
{
|
||||
$pref::Forum::PostWindowPos = FC_Window.getPosition();
|
||||
$pref::Forum::PostWindowExtent = FC_Window.getExtent();
|
||||
}
|
||||
|
|
@ -5,19 +5,22 @@ addWebLink( "Arc 2055", "www.arc2055.com" );
|
|||
addWebLink( "Atari Secret Society", "www.atarisecretsociety.org" );
|
||||
addWebLink( "BarrysWorld", "www.barrysworld.com" );
|
||||
addWebLink( "Bomb", "www.bomb.net" );
|
||||
addWebLink( "Box Factory Games", "http://www.bfgames1.com" );
|
||||
addWebLink( "Clan Happytyme", "www.happytyme.com" );
|
||||
addWebLink( "ClanBase", "www.clanbase.com" );
|
||||
addWebLink( "ClanServ", "www.clanserv.com" );
|
||||
addWebLink( "Dopplegangers", "www.dopplegangers.com" );
|
||||
addWebLink( "Dutchbat Homeworld", "www.dutchbat-homeworld.com" );
|
||||
addWebLink( "EDome Tribes 2", "http://games.edome.net/tribes2/" );
|
||||
addWebLink( "eDome Tribes 2", "http://games.edome.net/tribes2/" );
|
||||
addWebLink( "Euro Tribesplayers", "www.euro-tribesplayers.com" );
|
||||
addWebLink( "eXtreme-Players", "www.eXtreme-players.de" );
|
||||
addWebLink( "Game Forces", "www.gameforces.net" );
|
||||
addWebLink( "Game Planet", "www.gameplanet.co.nz" );
|
||||
addWebLink( "Game Surf", "www.gamesurf.de" );
|
||||
addWebLink( "Grave Diggers Union", "www.gravediggersunion.com" );
|
||||
addWebLink( "HomeLan", "www.homelan.com" );
|
||||
addWebLink( "IanStorm", "www.ianstorm.com" );
|
||||
addWebLink( "IMGaming", "www.imgaming.com" );
|
||||
addWebLink( "Inquest Entertainment", "www.inguestentertainment.com" );
|
||||
addWebLink( "Long Dongles", "www.longdongles.com" );
|
||||
addWebLink( "MaxBaud.Net", "www.maxbaud.net" );
|
||||
addWebLink( "MoreGaming", "www.moregaming.com" );
|
||||
|
|
@ -26,9 +29,12 @@ addWebLink( "NGI", "www.ngi.it" );
|
|||
addWebLink( "PlanetTribes", "www.planettribes.com" );
|
||||
addWebLink( "Raging Angels", "www.ragingangels.org" );
|
||||
addWebLink( "Rogue Disciples", "www.roguedisciples.com" );
|
||||
addWebLink( "Supreme Tribes", "www.supremetribes.com" );
|
||||
addWebLink( "StrikeForce", "www.strikeforcecenter.com" );
|
||||
addWebLink( "Supreme Tribes", "www.supremetribes.com" );
|
||||
addWebLink( "Sydney Gamers League", "www.sgl.org.au" );
|
||||
addWebLink( "System Recall", "www.systemrecall.com.com" );
|
||||
addWebLink( "TeamSound", "www.teamsound.com" );
|
||||
addWebLink( "Telenordia", "www.telenordia.se" );
|
||||
addWebLink( "Telepresence Heavy Assault Team", "www.that.co.nz" );
|
||||
addWebLink( "Temple of Blood", "www.templeofblood.com" );
|
||||
addWebLink( "The Ghostbear Tribe", "www.ghostbear.net" );
|
||||
|
|
|
|||
|
|
@ -15,20 +15,32 @@ function updatePageBtn(%prev,%next)
|
|||
//-----------------------------------------------------------------------------
|
||||
function NewsGui::onWake(%this)
|
||||
{
|
||||
Canvas.SetCursor(ArrowWaitCursor);
|
||||
Canvas.pushDialog(LaunchToolbarDlg);
|
||||
%this.key = LaunchGui.key++;
|
||||
%this.state = "status";
|
||||
%this.articleCount = 0;
|
||||
%this.set = 1; // signifies the first (latest) set
|
||||
NewsText.setValue("");
|
||||
%this.caller = "GETNEWS";
|
||||
DatabaseQueryArray(0,0,"0" TAB "0",%this,%this.key);
|
||||
// Fetch the message of the day:
|
||||
NewsMOTDText.key = LaunchGui.key++;
|
||||
NewsMOTDText.state = "isvalid";
|
||||
NewsMOTDText.lineCount = 0;
|
||||
DatabaseQuery(0,"",NewsMOTDText,NewsMOTDText.key);
|
||||
if ( isDemo() )
|
||||
{
|
||||
NewsPrevBtn.setVisible( false );
|
||||
NewsNextBtn.setVisible( false );
|
||||
NewsSubmitBtn.setVisible( false );
|
||||
NewsMOTDText.setValue( "This is the fake Message of the Day just for people playing the demo." );
|
||||
%this.addStaticArticle( "ALIENS INVADE CLEVELAND!", "Oh, never mind.\nIt just usually looks like that.\nMy bad." );
|
||||
%this.addStaticArticle( "OMG! Tribes 2 is the Coolest!", "It's official, Tribes 2 is the coolest thing since ice cream." );
|
||||
%this.addStaticArticle( "BigDevDawg Worship Service Rescheduled", "Please note that the weekly devotional service for the followers of the almighty DevDawg has been rescheduled to 9pm so that it no longer conflicts with \"That 70\'s Show\"." );
|
||||
}
|
||||
else
|
||||
{
|
||||
Canvas.SetCursor(ArrowWaitCursor);
|
||||
%this.state = "status";
|
||||
%this.key = LaunchGui.key++;
|
||||
%this.caller = "GETNEWS";
|
||||
DatabaseQueryArray(0,0,"0" TAB "0",%this,%this.key);
|
||||
// Fetch the message of the day:
|
||||
NewsMOTDText.key = LaunchGui.key++;
|
||||
NewsMOTDText.state = "isvalid";
|
||||
DatabaseQuery(0,"",NewsMOTDText,NewsMOTDText.key);
|
||||
}
|
||||
WebLinksMenu.setSelected( 0 );
|
||||
NewsPrevBtn.setActive( false );
|
||||
NewsNextBtn.setActive( false );
|
||||
|
|
@ -49,52 +61,66 @@ function NewsGui::onClose( %this, %key )
|
|||
//-----------------------------------------------------------------------------
|
||||
function NewsGui::rebuildText(%this)
|
||||
{
|
||||
NewsHeadlines.clear();
|
||||
for(%i = 0; %i < %this.articleCount; %i++)
|
||||
{
|
||||
%article = %this.article[%i];
|
||||
NewsHeadlines.clear();
|
||||
for(%i = 0; %i < %this.articleCount; %i++)
|
||||
{
|
||||
%article = %this.article[%i];
|
||||
|
||||
%ai = wonGetAuthInfo();
|
||||
%isMem = 0;
|
||||
for(%east=0;%east<getField(getRecord(%ai,1),0);%east++)
|
||||
{
|
||||
%tpv = GetRecord(%ai,2+%east);
|
||||
if(getField(%tpv,3)==1401 || getField(%tpv,3)==1402)
|
||||
%isMem = 1;
|
||||
}
|
||||
%editable = %isMem;
|
||||
if ( isDemo() )
|
||||
{
|
||||
%topic = getField( %article, 0 );
|
||||
%body = getFields( %article, 1 );
|
||||
|
||||
%topicid = getField(%article,1);
|
||||
%articleid = getField(%article, 2);
|
||||
%postcount = getField(%article,3)-1;
|
||||
%date = getField(%article,4);
|
||||
%update_id = getField(%article,5);
|
||||
%author_id = getField(%article,6);
|
||||
%nameLink = getLinkName(getField(%article,8) TAB getField(%article,9) TAB getField(%article,10) TAB getField(%article,11),0);
|
||||
%category = getField(%article, 12);
|
||||
%topic = getField(%article, 13);
|
||||
%body = getFields(%article,14);
|
||||
%rc = getRecordCount(%body);
|
||||
%atxt = "";
|
||||
if ( %editable )
|
||||
%editText = "<a:editnews" TAB %i TAB %topicid TAB %articleid TAB %update_id @
|
||||
">[edit]</a> <a:deletenews" TAB %i TAB %articleid TAB %topicid @
|
||||
">[delete]</a> <a:forumlink" TAB "NEWS" TAB %articleid TAB %topic @
|
||||
">[comments ("@%postcount@")]</a>";
|
||||
else
|
||||
%editText = "<a:forumlink" TAB "NEWS" TAB %articleid TAB %topic @
|
||||
">[comments ("@%postcount@"]</a>";
|
||||
%text = %text @ "<lmargin:10><color:adfffa><font:univers:22><tag:" @ %i @ ">"
|
||||
@ %topic
|
||||
@ "<lmargin:30><rmargin%:80><color:82beb9><font:univers:16>\n"
|
||||
NL %body
|
||||
@ "<sbreak>\n\n<rmargin%:100>";
|
||||
}
|
||||
else
|
||||
{
|
||||
%ai = wonGetAuthInfo();
|
||||
%isMem = 0;
|
||||
for(%east=0;%east<getField(getRecord(%ai,1),0);%east++)
|
||||
{
|
||||
%tpv = GetRecord(%ai,2+%east);
|
||||
if(getField(%tpv,3)==1401 || getField(%tpv,3)==1402)
|
||||
%isMem = 1;
|
||||
}
|
||||
%editable = %isMem;
|
||||
|
||||
for(%l = 0; %l < %rc; %l++)
|
||||
%atxt = %atxt @ getRecord(%body,%l) @ "\n";
|
||||
%topicid = getField(%article,1);
|
||||
%articleid = getField(%article, 2);
|
||||
%postcount = getField(%article,3)-1;
|
||||
%date = getField(%article,4);
|
||||
%update_id = getField(%article,5);
|
||||
%author_id = getField(%article,6);
|
||||
%nameLink = getLinkName(getField(%article,8) TAB getField(%article,9) TAB getField(%article,10) TAB getField(%article,11),0);
|
||||
%category = getField(%article, 12);
|
||||
%topic = getField(%article, 13);
|
||||
%body = getFields(%article,14);
|
||||
%rc = getRecordCount(%body);
|
||||
%atxt = "";
|
||||
if ( %editable )
|
||||
%editText = "<a:editnews" TAB %i TAB %topicid TAB %articleid TAB %update_id @
|
||||
">[edit]</a> <a:deletenews" TAB %i TAB %articleid TAB %topicid @
|
||||
">[delete]</a> <a:forumlink" TAB "NEWS" TAB %articleid TAB %topic @
|
||||
">[comments ("@%postcount@")]</a>";
|
||||
else
|
||||
%editText = "<a:forumlink" TAB "NEWS" TAB %articleid TAB %topic @
|
||||
">[comments ("@%postcount@"]</a>";
|
||||
|
||||
for(%l = 0; %l < %rc; %l++)
|
||||
%atxt = %atxt @ getRecord(%body,%l) @ "\n";
|
||||
|
||||
%text = %text @ "<lmargin:10><color:ADFFFA><font:Univers:22><tag:" @ %i @ ">" @
|
||||
%topic @ " <font:Univers Condensed:18>" @ %editText @ "\nPosted by: " @ %nameLink @ " on " @ %date NL
|
||||
"\n<lmargin:30><rmargin%:80><font:Univers:16><color:82BEB9>" @ %atxt @ "<sbreak>\n\n<rmargin%:100>";
|
||||
}
|
||||
|
||||
NewsHeadlines.addRow( %i, %topic );
|
||||
%text = %text @ "<lmargin:10><color:ADFFFA><font:Univers:22><tag:" @ %i @ ">" @
|
||||
%topic @ " <font:Univers Condensed:18>" @ %editText @ "\nPosted by: " @ %nameLink @ " on " @ %date NL
|
||||
"\n<lmargin:30><rmargin%:80><font:Univers:16><color:82BEB9>" @ %atxt @ "<sbreak>\n\n<rmargin%:100>";
|
||||
}
|
||||
NewsText.setValue(%text);
|
||||
%article = "";
|
||||
NewsText.setValue(%text);
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
function NewsGui::onDatabaseQueryResult(%this, %status, %RowCount_Result, %key)
|
||||
|
|
@ -168,6 +194,14 @@ function NewsGui::onDatabaseRow(%this, %row,%isLastRow,%key)
|
|||
return;
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
function NewsGui::addStaticArticle( %this, %topic, %body )
|
||||
{
|
||||
%tag = %this.articleCount;
|
||||
%this.article[%tag] = %topic TAB %body;
|
||||
%this.articleCount++;
|
||||
%this.rebuildText();
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
function PostNews()
|
||||
{
|
||||
messageBoxYesNo("CONFIRM","Please do not submit bug reports without a tested solution, test posts or recruiting posts." NL " " NL "Continue with your submittal?","StartPostNews();");
|
||||
|
|
@ -183,6 +217,24 @@ function StartPostNews()
|
|||
//-----------------------------------------------------------------------------
|
||||
function NewsPostDlg::onWake( %this )
|
||||
{
|
||||
// Get the window pos and extent from prefs:
|
||||
%res = getResolution();
|
||||
%resW = firstWord( %res );
|
||||
%resH = getWord( %res, 1 );
|
||||
%w = firstWord( $pref::News::PostWindowExtent );
|
||||
if ( %w > %resW )
|
||||
%w = %resW;
|
||||
%h = getWord( $pref::News::PostWindowExtent, 1 );
|
||||
if ( %h > %resH )
|
||||
%h = %resH;
|
||||
%x = firstWord( $pref::News::PostWindowPos );
|
||||
if ( %x > %resW - %w )
|
||||
%x = %resW - %w;
|
||||
%y = getWord( $pref::News::PostWindowPos, 1 );
|
||||
if ( %y > %resH - %h )
|
||||
%y = %resH - %h;
|
||||
NP_Window.resize( %x, %y, %w, %h );
|
||||
|
||||
// Fill the category menu (should we get this from somewhere?):
|
||||
NewsCategoryMenu.clear();
|
||||
NewsCategoryMenu.add( "General", 0 );
|
||||
|
|
@ -200,6 +252,12 @@ function NewsPostDlg::onWake( %this )
|
|||
NewsCategoryMenu.setSelected( %selId );
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
function NewsPostDlg::onSleep( %this )
|
||||
{
|
||||
$pref::News::PostWindowPos = NP_Window.getPosition();
|
||||
$pref::News::PostWindowExtent = NP_Window.getExtent();
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
function NewsCategoryMenu::onSelect( %this, %id, %text )
|
||||
{
|
||||
$NewsCategory = %text;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue