v22337 (04/13/01):

**SIEGE GAMEPLAY CHANGE**: When attacking a base, you will see red waypoints on the generators. When those generators are destroyed, the waypoints will change to green. If the generators are repaired thereafter, they will return to red. If you are on the defender team, these colors are reversed (green normally, red if destroyed, green if repaired again). This will help teams coordinate attack and defense more easily.

**FLARE GREANDE GAMEPLAY CHANGE**: Each flare will only attract ONE missile now. When the missile hits the flare, the flare will be destroyed. Only the first missile fired after the flare is thrown will be fooled by that flare. Other missiles must be attracted by other flares in order to be avoided.

*There was a problem where emails were getting cloned multiple times for some folks. This is fixed now and no longer occurs.

*There was an issue where the single player game type was not being properly cleared for folks when they left single player and went to other games. This is fixed now.

*A stray underground generator was removed from Caldera.

*The name column will no longer jump to the top when folks leave and join a room, thus making it easier to stay focused on a particular player's name.

*If you steal a vehicle, the vehicle's sensor radius will not switch to the stealing player's team. In otherwords, the sensor of the vehicle will still report to the original team's sensor net...not the team that stole the vehicle. That's as design and is one of the drawbacks of using a stolen vehicle.

*Bounty & Hunter: The player icons on the command maps are now the correct colors.

*More items have correct names and tags on the command map and in the HUD. There were instances like "East Generator Generator". Those have been eliminated.

*The last patch accidentally eliminated the "PlayerXXX joined YYYY game. Click here to join." links from the CHAT. This has been resolved and is now available again.

*Players are no longer able to squeeze in under the tires of vehicles and play Superman by lifting them off the ground. ; )

*Bots were getting stuck in Riverdance when the fell in the water near the bridge. This has been fixed.

*Added more filtering options so that the filters for the server query (JOIN) screen are more powerful and flexible.

*Added a Linux indicator so users can tell whether they are joining a Win32 or Linux server. (Shouldn't make any difference to game play, but we felt you'd like to know.)

*Fixed a small texture leak on 3Space objects.

*Added an underwater satchel charge effect. Slightly increased the delay time between activating the satchel and the time that it actually explodes (this was as designed...a minor bug was causing it to explode too soon).
This commit is contained in:
Robert MacGregor 2017-07-17 23:07:50 -04:00
parent b1941454ec
commit f9ca0b52f9
48 changed files with 1067 additions and 625 deletions

View file

@ -41,7 +41,7 @@ $CHANNEL_NEW = 512;
// Default messages (if gui is left blank)
$DefaultChatAwayMessage = "Don't be alarmed. I'm going to step away from my computer.";
$DefaultChatKickMessage = "Alright, you\'re outta here!";
$DefaultChatBanMessage = "You, and three generations of your offspring, are banned from this channel.";
$DefaultChatBanMessage = "Get out. And stay out!";
//------------------------------------------------------------------------------
@ -145,6 +145,7 @@ function ChatTabView::onSelect(%this,%obj,%name)
if ($IRCClient::currentChannel == $IRCClient::attachedChannel)
ChatGuiMessageVector.detach();
ChatGuiMessageVector.attach(%obj);
ChatGuiMessageVector.scrollToBottom();
$IRCClient::attachedChannel = %obj;
}
$IRCClient::currentChannel = %obj;
@ -786,7 +787,7 @@ function IRCClient::notify(%event)
case IDIRC_SORT:
%i = $IRCClient::currentChannel.findMember($IRCClient::people.getObject(0));
ChatEditChannelBtn.setVisible($IRCClient::currentChannel.getFlags(%i) & $PERSON_OPERATOR);
ChatRoomMemberList_rebuild($IRCClient::currentChannel);
ChatRoomMemberList_refresh($IRCClient::currentChannel);
case IDIRC_PART:
ChatRoomMemberList_refresh($IRCClient::currentChannel);
case IDIRC_KICK:
@ -824,6 +825,7 @@ function IRCClient::notify(%event)
//------------------------------------------------------------------------------
function IRCClient::statusMessage(%message)
{
//error("IRCClient::statusMessage( "@%message@" )");
$IRCClient::channels.getObject(0).pushBackLine("[STATUS] " @ %message);
}
@ -1370,6 +1372,9 @@ function IRCClient::relogin()
//------------------------------------------------------------------------------
function IRCClient::send(%message)
{
if($IRCEcho)
echo("IRC SEND:" @ %message);
$IRCClient::tcp.send(%message @ "\r\n");
}
@ -1377,7 +1382,7 @@ function IRCClient::send(%message)
function IRCTCP::onLine(%this,%line)
{
if($IRCEcho)
echo("IRC " @ %line);
echo("IRC RECV:" @ %line);
// HACK: Windows 2000 bug. We shouldn't need to do this!
if ($IRCClient::state $= IDIRC_CONNECTING_SOCKET)
IRCTCP::onConnected(%this);
@ -1614,6 +1619,7 @@ function IRCClient::onJoin(%prefix,%params)
// this is a hack, the list isnt being rebuilt right away but it is if you give it a half second
schedule(500, 0, chatRoomMemberList_rebuild);
//error("rebuilt by onJoin");
}
IRCClient::connected();
}
@ -1942,7 +1948,7 @@ function IRCClient::onKick(%prefix,%params)
}
else
{
IRCClient::newMessage($IRCClient::currentChannel,"Host " @ %host @ " kicks " @ IRCClient::taggedNick(%p) @ " out of the chat room, saying \"" @ %params @ "\"");
IRCClient::newMessage(%c, "Host " @ %host @ " kicks " @ IRCClient::taggedNick(%p) @ " out of the chat room, saying \"" @ %params @ "\"");
IRCClient::notify(IDIRC_PART);
}
@ -2199,7 +2205,7 @@ function IRCClient::censor(%str)
//------------------------------------------------------------------------------
function IRCClient::onList(%prefix,%params)
{
//error("IRCClient::onList( "@ %prefix @", "@ %params @")");
//error("IRCClient::onList( "@ %prefix @", "@ %params @")");
//EXAMPLE: :StLouis.MO.US.UnderNet.org 322 homer128 #bmx 9 :BMX Rules!
%params = nextToken(%params,nick," ");
@ -2309,6 +2315,7 @@ function IRCClient::onAway(%prefix,%params)
//------------------------------------------------------------------------------
function IRCClient::onAction(%prefix,%params)
{
//error("IRCClient::onAction( "@ %prefix @", "@ %params @")");
%msg = nextToken(%params,ch," :");
%c = IRCClient::findChannel(%ch,true);
@ -2436,7 +2443,8 @@ function IRCClient::onChannelBanned(%prefix,%params)
nextToken(%channel,channel," ");
IRCClient::connected();
IRCClient::statusMessage("Cannot join " @ %channel @ ": you have been banned.");
//IRCClient::statusMessage("Cannot join " @ %channel @ ": you have been banned.");
MessageBoxOk("Banned", "Cannot join " @ IRCClient::displayChannel(%channel) @ ". You have been banned.");
IRCClient::notify(IDIRC_BANNED_CH);
}
@ -2446,6 +2454,7 @@ function IRCClient::onServerBanned(%prefix,%params)
$IRCClient::state = $IDIRC_DISCONNECTED;
IRCClient::statusMessage("You have been banned from this server.");
MessageBoxOk("Server Ban", "You have been banned from this server.");
// IRCClient::notify(IDIRC_BANNED_SERVER);
}
@ -2830,6 +2839,7 @@ function IRCClient::setSpectator(%nick)
//------------------------------------------------------------------------------
function IRCClient::kick(%p,%msg)
{
//error("IRCClient::kick( "@ %p @", "@ %msg@" )");
IRCClient::send("KICK" SPC $IRCClient::currentChannel.getName() SPC %p.displayName @ " :" @ %msg);
}
@ -2968,19 +2978,29 @@ function IRCClient::onJoinServer(%mission,%server,%address,%mayprequire,%prequir
}
//------------------------------------------------------------------------------
function IRCClient::onJoinGame(%address,%desc)
function IRCClient::onJoinGame(%address,%desc)
{
//error("IRCClient::onJoinGame( "@ %address @", "@ %desc @" )");
IRCClient::away("joined a game.");
%me = $IRCClient::people.getObject(0);
if(%address $= %me.lastAddress)
return;
%me.lastAddress = %address;
if (%address $= "")
%msg = $pref::IRCClient::hostMsg;
else
%msg = "launched into <t2server:" @ %address @ ">" @ %desc @ "</t2server>.";
IRCClient::away(%msg);
//IRCClient::sendAction(%msg);
for (%i = 1; %i < $IRCClient::channels.getCount(); %i++)
{
%c = $IRCClient::channels.getObject(%i);
if (!%c.private)
//IRCClient::send2(%msg,%c.getName());
IRCClient::send("PRIVMSG " @ %c.getName() @ ":\x01ACTION " @ %msg @ "\x01");
IRCClient::send("PRIVMSG " @ %c.getName() @ " :\x01ACTION " @ %msg @ "\x01");
}
}

View file

@ -64,11 +64,28 @@ function ChooseFilterDlg::editFilter( %this )
%rowText = CF_FilterList.getRowTextById( %rowId );
%filterName = getField( %rowText, 0 );
%gameType = getField( %rowText, 1 );
if ( %gameType $= "" )
%gameType = "Any";
%misType = getField( %rowText, 2 );
if ( %misType $= "" )
%misType = "Any";
%minPlayers = getField( %rowText, 3 );
if ( %minPlayers $= "" )
%minPlayers = 0;
%maxPlayers = getField( %rowText, 4 );
if ( %maxPlayers $= "" )
%maxPlayers = 255;
%regionCode = getField( %rowText, 5 );
if ( %regionCode $= "" )
%regionCode = 4294967295;
%maxPing = getField( %rowText, 6 );
%maxBots = getField( %rowText, 7 );
if ( %maxBots $= "" )
%maxBots = 16;
%minCPU = getField( %rowText, 8 );
if ( %minCPU $= "" )
%minCPU = 0;
%flags = getField( %rowText, 9 );
FilterEditName.setValue( %filterName );
FilterEditMinPlayers.setValue( %minPlayers );
@ -96,6 +113,12 @@ function ChooseFilterDlg::editFilter( %this )
FilterEditMaxPing.setVisible( true );
}
FilterEditMaxBots.setValue( %maxBots );
FilterEditMinCPU.setValue( %minCPU );
FilterEditDedicatedTgl.setValue( %flags & 1 );
FilterEditNoPwdTgl.setValue( %flags & 2 );
FilterEditCurVersionTgl.setValue( %flags & 128 );
%this.editFilterIndex = %rowId;
Canvas.pushDialog( FilterEditDlg );
}
@ -115,8 +138,14 @@ function ChooseFilterDlg::saveFilter( %this )
%regionCode |= ( 1 << %i );
}
%maxPing = FilterEditUsePingTgl.getValue() ? FilterEditMaxPing.getValue() : 0;
%maxBots = FilterEditMaxBots.getValue();
%minCPU = FilterEditMinCPU.getValue();
%flags = FilterEditDedicatedTgl.getValue()
| ( FilterEditNoPwdTgl.getValue() << 1 )
| ( FilterEditCurVersionTgl.getValue() << 7 );
%row = %filterName TAB %gameType TAB %misType
TAB %minPlayers TAB %maxPlayers TAB %regionCode TAB %maxPing;
TAB %minPlayers TAB %maxPlayers TAB %regionCode
TAB %maxPing TAB %maxBots TAB %minCPU TAB %flags;
CF_FilterList.setRowById( %this.editFilterIndex, %row );
CF_FilterList.setSelectedById( %this.editFilterIndex );
@ -209,7 +238,7 @@ function FilterEditDlg::setMaxPlayers( %this )
%newMax = 1;
FilterEditMaxPlayers.setValue( %newMax );
}
if ( %newMax > 255 )
else if ( %newMax > 255 )
{
%newMax = 255;
FilterEditMaxPlayers.setValue( %newMax );
@ -223,6 +252,22 @@ function FilterEditDlg::setMaxPlayers( %this )
}
}
//------------------------------------------------------------------------------
function FilterEditDlg::setMaxBots( %this )
{
%newMax = FilterEditMaxBots.getValue();
if ( %newMax < 0 )
{
%newMax = 0;
FilterEditMaxBots.setValue( %newMax );
}
else if ( %newMax > 16 )
{
%newMax = 16;
FilterEditMaxBots.setValue( %newMax );
}
}
//------------------------------------------------------------------------------
function FilterEditUsePingTgl::onAction( %this )
{
@ -240,6 +285,17 @@ function FilterEditDlg::setMaxPing( %this )
}
}
//------------------------------------------------------------------------------
function FilterEditDlg::setMinCPU( %this )
{
%newMin = FilterEditMinCPU.getValue();
if ( %newMin < 0 )
{
%newMin = 0;
FilterEditMinCPU.setValue( %newMin );
}
}
//------------------------------------------------------------------------------
function clearGameTypes()
{

View file

@ -383,7 +383,7 @@ function CnHGame::genOnRepaired(%game, %obj, %objName)
if (%game.testValidRepair(%obj))
{
%repairman = %obj.repairedBy;
messageTeam(%repairman.team, 'msgGenRepaired', '\c0%1 repaired the %2 Generator!', %repairman.name, %objName);
messageTeam(%repairman.team, 'msgGenRepaired', '\c0%1 repaired the %2 Generator!', %repairman.name, %obj.nameTag);
}
}
@ -392,7 +392,7 @@ function CnHGame::stationOnRepaired(%game, %obj, %objName)
if (%game.testValidRepair(%obj))
{
%repairman = %obj.repairedBy;
messageTeam(%repairman.team, 'msgStationRepaired', '\c0%1 repaired the %2 Inventory Station!', %repairman.name, %objName);
messageTeam(%repairman.team, 'msgStationRepaired', '\c0%1 repaired the %2 Inventory Station!', %repairman.name, %obj.nameTag);
}
}
@ -401,16 +401,16 @@ function CnHGame::sensorOnRepaired(%game, %obj, %objName)
if (%game.testValidRepair(%obj))
{
%repairman = %obj.repairedBy;
messageTeam(%repairman.team, 'msgSensorRepaired', '\c0%1 repaired the %2 Pulse Sensor!', %repairman.name, %objName);
messageTeam(%repairman.team, 'msgSensorRepaired', '\c0%1 repaired the %2 Pulse Sensor!', %repairman.name, %obj.nameTag);
}
}
function CnHGame::turretOnRepaired(%game, %obj, %objName)
{
{
if (%game.testValidRepair(%obj))
{
%repairman = %obj.repairedBy;
messageTeam(%repairman.team, 'msgTurretRepaired', '\c0%1 repaired the %2 Turret!', %repairman.name, %objName);
messageTeam(%repairman.team, 'msgTurretRepaired', '\c0%1 repaired the %2 Turret!', %repairman.name, %obj.nameTag);
}
}
@ -419,7 +419,7 @@ function CnHGame::vStationOnRepaired(%game, %obj, %objName)
if (%game.testValidRepair(%obj))
{
%repairman = %obj.repairedBy;
messageTeam(%repairman.team, 'msgTurretRepaired', '\c0%1 repaired the %2 Vehicle Station!', %repairman.name, %objName);
messageTeam(%repairman.team, 'msgTurretRepaired', '\c0%1 repaired the %2 Vehicle Station!', %repairman.name, %obj.nameTag);
}
}

View file

@ -277,15 +277,34 @@ function GMJ_Browser::runQuery( %this )
{
%filter = $pref::ServerBrowser::Filter[%filterIndex];
GMJ_FilterText.setText( getField( %filter, 0 ) );
%rulesSet = getField( %filter, 1 );
if ( %rulesSet $= "" )
%rulesSet = "any";
%missionType = getField( %filter, 2 );
if ( %missionType $= "" )
%missionType = "any";
%maxPlayers = getField( %filter, 4 );
if ( %maxPlayers $= "" )
%maxPlayers = 255;
%maxBots = getField( %filter, 7 );
if ( %maxBots $= "" )
%maxBots = 16;
%regionMask = getField( %filter, 5 );
if ( %regionMask $= "" )
%regionMask = 4294967295;
queryMasterServer(
$JoinGamePort,
0, // Flags
getField( %filter, 1 ), // Rules Set
getField( %filter, 2 ), // Mission Type
%rulesSet, // Rules Set
%missionType, // Mission Type
getField( %filter, 3 ), // Min Players
getField( %filter, 4 ), // Max Players
getField( %filter, 5 ), // Region Mask
getField( %filter, 6 ) ); // Max Ping
%maxPlayers, // Max Players
%maxBots, // Max Bots
%regionMask, // Region Mask
getField( %filter, 6 ), // Max Ping
getField( %filter, 8 ), // Min CPU Speed
getField( %filter, 9 ) ); // Filter flags
GMJ_StopBtn.setActive( true );
}
else
@ -329,7 +348,7 @@ function GMJ_Browser::onDatabaseRow( %this, %row, %isLastRow, %key )
if ( %isLastRow )
{
GMJ_StatusText.setValue( "Querying the master server..." );
queryMasterServer( $JoinGamePort, 0, "Any", "Any", 0, 255, 0xFFFFFFFF, 0, %this.buddyList );
queryMasterServer( $JoinGamePort, 0, "Any", "Any", 0, 255, 16, 0xFFFFFFFF, 0, 0, %this.buddyList );
GMJ_StopBtn.setActive( true );
%this.buddyList = "";
}

View file

@ -115,6 +115,21 @@ function OptionsDlg::onWake( %this )
OP_AudioBitRateMenu.init();
OP_AudioChannelsMenu.init();
// don't allow changing of of mixer settings while in a game...
%active = !isObject(ServerConnection);
OP_AudioFrequencyMenu.setActive(%active);
// Changing these audio settings doesn't help Linux performance
if ( $platform $= "linux" ) {
OP_AudioBitRateMenu.setActive(false);
OP_AudioChannelsMenu.setActive(false);
} else {
OP_AudioBitRateMenu.setActive(%active);
OP_AudioChannelsMenu.setActive(%active);
}
OP_AudioProviderMenu.setActive(%active);
OP_AudioEnvironmentTgl.setActive(%active);
OP_AudioSpeakerMenu.setActive(%active);
OP_MasterVolumeSlider.setValue( $pref::Audio::masterVolume );
OP_EffectsVolumeSlider.setValue( $pref::Audio::effectsVolume );
OP_VoiceBindVolumeSlider.setValue( $pref::Audio::radioVolume );
@ -128,6 +143,7 @@ function OptionsDlg::onWake( %this )
OP_InputBoostSlider.setValue( $pref::Audio::captureGainScale );
OP_VoiceListenMenu.init();
OP_VoiceSendMenu.init();
OP_VoiceCodecInfo.init();
updateInputBoost();
// Initialize the Control Options controls:
@ -272,6 +288,12 @@ function OptionsDlg::onSleep( %this )
audioSetDriver( "none" );
audioSetDriver( $pref::Audio::activeDriver );
%this.resetAudio = "";
// Play the shell hum: (all sources are gone)
if($HudHandle['shellScreen'] $= "")
alxStop($HudHandle['shellScreen']);
$HudHandle['shellScreen'] = alxPlay(ShellScreenHumSound, 0, 0, 0);
}
if ( isObject( ServerConnection ) && isTextureFlushRequired() )
@ -1127,13 +1149,16 @@ function localCaptureStop( %method )
function OP_VoiceListenMenu::init( %this )
{
%this.clear();
%this.add( "Low", 1 );
%this.add( "Medium", 3 );
%this.add( "High", 7 );
%this.add( "<NONE>", 0 );
%this.add( ".v12", 1 );
%this.add( ".v12 - .v24", 3 );
%this.add( ".v12 - .v29", 7 );
// %this.add( ".v12 - .gsm", 15 );
switch ( $pref::Audio::decodingMask )
{
case 3 or 7:
// case 0 or 3 or 7 or 15:
case 0 or 3 or 7:
%this.setSelected( $pref::Audio::decodingMask );
default:
%this.setSelected( 1 );
@ -1144,17 +1169,31 @@ function OP_VoiceListenMenu::init( %this )
function OP_VoiceSendMenu::init( %this )
{
%this.clear();
%this.add( "Low", 0 );
%this.add( "Medium", 1 );
%this.add( "High", 2 );
%this.add( ".v12", 0 );
%this.add( ".v24", 1 );
%this.add( ".v29", 2 );
// %this.add( ".gsm", 3 );
switch ( $pref::Audio::encodingLevel )
{
case 1 or 2:
%this.setSelected( $pref::Audio::encodingLevel );
default:
%this.setSelected( 0 );
}
%this.setSelected($pref::Audio::encodingLevel);
}
function OP_VoiceCodecInfo::init( %this )
{
%headerStyle = "<font:" @ $ShellLabelFont @ ":" @ $ShellFontSize @ "><color:00DC00>";
%displayText = "<spush>" @ %headerStyle @ "Voice Codec Information:<spop>" NL
"\n" @
" .v12: variable bitrate codec (~1.2 kbits/sec win)" NL
" .v24: fixed bitrate codec (2.4 kbits/sec win)" NL
" .v29: fixed bitrate codec (2.9 kbits/sec win)" 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" @
" affects on network performance." @
"<lmargin:0>";
%this.setText(%displayText);
%this.setActive(false);
}
//------------------------------------------------------------------------------

View file

@ -67,6 +67,22 @@ function FlipFlop::playerTouch(%data, %flipflop, %player)
Game.allObjectivesCompleted();
}
//--------------------------------------------------------------------------------
function StaticShapeData::onDisabled(%data, %obj, %prevState)
{
Parent::onDisabled(%data, %obj, %prevState);
if(%obj.waypoint)
game.switchWaypoint(%obj.waypoint);
}
//--------------------------------------------------------------------------------
function StaticShapeData::onEnabled(%data, %obj, %prevState)
{
if(%obj.waypoint)
game.switchWaypoint(%obj.waypoint);
}
};
//--------- Siege SCORING INIT ------------------
@ -137,6 +153,9 @@ function SiegeGame::missionLoadDone(%game)
// save off turret bases' original barrels
%game.checkTurretBases();
// add objective waypoints
%game.findObjectiveWaypoints();
MissionGroup.setupPositionMarkers(true);
}
@ -388,6 +407,9 @@ function SiegeGame::halftime(%game, %reason)
// start the mission again (release players)
%game.halfTimeCountDown($Host::warmupTime);
//redo the objective waypoints
%game.findObjectiveWaypoints();
}
else
{
@ -658,6 +680,68 @@ function ForceFieldBare::objectRestore(%this)
// avoid console error spam
}
// ------------------------------------------------------------------------
// Waypoint managing
function siegeGame::findObjectiveWaypoints(%game, %group)
{
if(!%group)
%group = nameToId("MissionGroup/Teams");
for (%i = 0; %i < %group.getCount(); %i++)
{
%obj = %group.getObject(%i);
if(%obj.getClassName() $= SimGroup)
{
%game.findObjectiveWaypoints(%obj);
}
else if(%obj.needsObjectiveWaypoint)
{
%game.initializeWaypointAtObjective(%obj);
}
}
}
function siegeGame::initializeWaypointAtObjective(%game, %object)
{
// out with the old...jic
if(%object.waypoint)
%object.waypoint.delete();
if(%object.team == %game.offenseTeam)
%team = %game.offenseTeam;
else
%team = (%game.offenseTeam == 1 ? 2 : 1);
// to make the waypoint look a little prettier we are using the z from
// position and the x and y from worldBoxCenter
%posX = getWord(%object.getWorldBoxCenter(), 0);
%posY = getWord(%object.getWorldBoxCenter(), 1);
%posZ = getWord(%object.position, 2);
%append = getTaggedString(%object.getDataBlock().targetTypeTag);
%object.waypoint = new WayPoint() {
position = %posX SPC %posY SPC %posZ;
rotation = "1 0 0 0";
scale = "1 1 1";
dataBlock = "WayPointMarker";
team = %team;
name = %object.nameTag SPC %append;
};
MissionCleanup.add(%object.waypoint);
}
function siegeGame::switchWaypoint(%game, %waypoint)
{
%team = %waypoint.team;
%newTeam = (%team == 1 ? 2 : 1);
%waypoint.team = %newTeam;
}
function SiegeGame::gameOver(%game)
{
//call the default
@ -866,8 +950,8 @@ function SiegeGame::genOnRepaired(%game, %obj, %objName)
if (%game.testValidRepair(%obj))
{
%repairman = %obj.repairedBy;
messageTeam(%repairman.team, 'msgGenRepaired', '\c0%1 repaired the %2 generator!', %repairman.name, %objName);
}
messageTeam(%repairman.team, 'msgGenRepaired', '\c0%1 repaired the %2 generator!', %repairman.name, %obj.nameTag);
}
}
function SiegeGame::stationOnRepaired(%game, %obj, %objName)
@ -875,7 +959,7 @@ function SiegeGame::stationOnRepaired(%game, %obj, %objName)
if (%game.testValidRepair(%obj))
{
%repairman = %obj.repairedBy;
messageTeam(%repairman.team, 'msgStationRepaired', '\c0%1 repaired the %2 inventory station!', %repairman.name, %objName);
messageTeam(%repairman.team, 'msgStationRepaired', '\c0%1 repaired the %2 inventory station!', %repairman.name, %obj.nameTag);
}
}
@ -884,7 +968,7 @@ function SiegeGame::sensorOnRepaired(%game, %obj, %objName)
if (%game.testValidRepair(%obj))
{
%repairman = %obj.repairedBy;
messageTeam(%repairman.team, 'msgSensorRepaired', '\c0%1 repaired the %2 pulse sensor!', %repairman.name, %objName);
messageTeam(%repairman.team, 'msgSensorRepaired', '\c0%1 repaired the %2 pulse sensor!', %repairman.name, %obj.nameTag);
}
}
@ -893,7 +977,7 @@ function SiegeGame::turretOnRepaired(%game, %obj, %objName)
if (%game.testValidRepair(%obj))
{
%repairman = %obj.repairedBy;
messageTeam(%repairman.team, 'msgTurretRepaired', '\c0%1 repaired the %2 turret!', %repairman.name, %objName);
messageTeam(%repairman.team, 'msgTurretRepaired', '\c0%1 repaired the %2 turret!', %repairman.name, %obj.nameTag);
}
}
@ -902,7 +986,7 @@ function SiegeGame::vStationOnRepaired(%game, %obj, %objName)
if (%game.testValidRepair(%obj))
{
%repairman = %obj.repairedBy;
messageTeam(%repairman.team, 'msgTurretRepaired', '\c0%1 repaired the %2 vehicle station!', %repairman.name, %objName);
messageTeam(%repairman.team, 'msgTurretRepaired', '\c0%1 repaired the %2 vehicle station!', %repairman.name, %obj.nameTag);
}
}

View file

@ -555,15 +555,7 @@ function singlePlayerGame::gameOver(%game)
//disable the AI system
AISystemEnabled(false);
//Deactivate packages...gotta catch'm all
//deactivatepackage(SinglePlayer);
deactivatepackage(Training1);
deactivatepackage(Training2);
deactivatepackage(Training3);
deactivatepackage(Training4);
deactivatepackage(Training5);
deactivatepackage(Training6);
deactivatePackage(singlePlayerMissionAreaEnforce);
game.deactivatePackages();
if(isObject( $player.currentWaypoint ))
$player.currentWaypoint.delete();
@ -579,6 +571,22 @@ function singlePlayerGame::gameOver(%game)
DefaultGame::GameOver(%game);
}
function singlePlayerGame::deactivatePackages(%game)
{
error("singlePlayerGame packages deactivated");
//Deactivate packages...gotta catch'm all
//deactivatepackage(SinglePlayer);
deactivatepackage(Training1);
deactivatepackage(Training2);
deactivatepackage(Training3);
deactivatepackage(Training4);
deactivatepackage(Training5);
deactivatepackage(Training6);
deactivatePackage(singlePlayerMissionAreaEnforce);
}
//------------------------------------------------------------------------------------
// Voice line, text, function and audio parsing
//=================================================================================
// this is how we handle ALL the voice distribition and playing

View file

@ -824,42 +824,42 @@ function flashObjective()
}
//------------------------------------------------------------------------------
function playCinematicSound(%sound)
{
switch$(%sound)
{
case "MissileLock":
%file = "fx/weapons/missile_launcher_lock.wav";
%looping = true;
case "Heartbeat":
%file = "fx/misc/heartbeat.wav";
%looping = false;
}
%audiosound = new AudioEmitter() {
filename = %flie;
position = $player.player;
volume = "1";
isLooping = %looping;
is3D = false;
type = "EffectAudioType";
};
$player.currentSound = %audiosound;
}
function playCinematicMissileLockSound()
{
%audiosound = new AudioEmitter() {
filename = "fx/weapons/missile_launcher_lock.wav";
position = $player.player;
volume = "1";
isLooping = "1";
is3D = false;
type = "EffectAudioType";
};
$player.missileSound = %audiosound;
}
// function playCinematicSound(%sound)
// {
// switch$(%sound)
// {
// case "MissileLock":
// %file = "fx/weapons/missile_launcher_lock.wav";
// %looping = true;
//
// case "Heartbeat":
// %file = "fx/misc/heartbeat.wav";
// %looping = false;
// }
//
// %audiosound = new AudioEmitter() {
// filename = %flie;
// position = $player.player;
// volume = "1";
// isLooping = %looping;
// is3D = false;
// type = "EffectAudioType";
// };
// $player.currentSound = %audiosound;
// }
//
// function playCinematicMissileLockSound()
// {
// %audiosound = new AudioEmitter() {
// filename = "fx/weapons/missile_launcher_lock.wav";
// position = $player.player;
// volume = "1";
// isLooping = "1";
// is3D = false;
// type = "EffectAudioType";
// };
// $player.missileSound = %audiosound;
// }
//------------------------------------------------------------------------------
@ -1079,7 +1079,7 @@ function AITraining1Pilot::monitor(%task, %client)
if (VectorDist(%dest2D, %pos2D) < 20)
{
if(%group.getCount() > %task.locationIndex) {
if(%group.getCount() > %task.locationIndex + 1) {
%task.locationIndex++;
cinematicEvent(%task.locationIndex);
}
@ -1130,7 +1130,7 @@ function cinematicEvent(%num)
moveMap.push();
TrainingPacifistMap.push();
hideHudHack(true);
playCinematicSound("MissileLock");
// playCinematicSound("MissileLock");
schedule(5700, 0, forcedCinematicPlayerDismount);
schedule( 6100, game, cleanUpFlyer);
//schedule( 8000, game, trainingIntroFlightEnd);

View file

@ -1,12 +1,16 @@
$JoinGamePort = 28000;
$pref::Audio::activeDriver = "default";
$pref::Audio::drivers = "Miles";
if ( $platform $= "linux" ) {
$pref::Audio::drivers = "OpenAL";
} else {
$pref::Audio::drivers = "Miles";
}
$pref::Audio::frequency = 22100;
$pref::Audio::sampleBits = 16;
$pref::Audio::channels = 2;
$pref::Audio::enableVoiceCapture = 1;
$pref::Audio::voiceChannels = 2;
$pref::Audio::encodingLevel = 0;
$pref::Audio::voiceChannels = 1;
$pref::Audio::encodingLevel = 0;
$pref::Audio::decodingMask = 1;
$pref::Audio::forceMaxDistanceUpdate = 0;
$pref::Audio::environmentEnabled = 0;
@ -77,7 +81,7 @@ $pref::Input::KeyboardTurnSpeed = 0.1;
$pref::Interior::TexturedFog = 0;
$pref::IRCClient::autoreconnect = 1;
$pref::IRCClient::awaymsg = "Don't be alarmed. I'm going to step away from my computer.";
$pref::IRCClient::banmsg = "You, and three generations of your offspring, are banned from this channel.";
$pref::IRCClient::banmsg = "Get out. And stay out!";
$pref::IRCClient::kickmsg = "Alright, you're outta here!";
$pref::IRCClient::hostmsg = "left to host a game.";
$pref::IRCClient::showJoin = true;

View file

@ -96,9 +96,16 @@ addCreditsLine("<spush><font:Univers condensed:22><spush><color:18A27B>Motion Ca
addCreditsLine("Technical Director: Troy McFarland");
addCreditsLine("Performer: Cosmo Hom");
addCreditsLine("");
addCreditsLine("<spush><font:Univers condensed:22><spush><color:18A27B>Digital Video Support Team<spop><spop>");
addCreditsLine("Director: Jim\"zootboy\" Carey");
addCreditsLine("Sage \"3Dkid\" Freeman");
addCreditsLine("Steve \"opticNerve\" Bradford");
addCreditsLine("Tonya \"Agentmoody\" Stumphauzer");
addCreditsLine("Troy \"cann n fodder\" McFarland");
addCreditsLine("Kate \"reelBoss\" Alley");
addCreditsLine("");
addCreditsLine("<spush><font:Univers condensed:22><spush><color:18A27B>Movie Intro<spop><spop>");
addCreditsLine("Robert Borth");
addCreditsLine("Mike Price");
addCreditsLine("PBDigital, Inc.");
addCreditsLine("");
addCreditsLine("<spush><font:Univers condensed:22><spush><color:18A27B>Installer<spop><spop>");
addCreditsLine("Chris Mahnken");

View file

@ -752,7 +752,7 @@ function ShapeBaseImageData::testInvalidDeployConditions(%item, %plyr, %slot)
%disqualified = $NotDeployableReason::TurretTooClose;
else if (%item.testTurretSaturation())
%disqualified = $NotDeployableReason::TurretSaturation;
else
else if (%disqualified == $NotDeployableReason::None)
{
// Test that there are no objstructing objects that this object
// will intersect with

View file

@ -61,14 +61,14 @@ function serverCmdThrowPack(%client,%data)
function serverCmdTogglePack(%client,%data)
{
// this function is apparently never called
%client.getControlObject().togglePack();
// this function is apparently never called
%client.getControlObject().togglePack();
}
function serverCmdThrowFlag(%client)
{
//Game.playerDroppedFlag(%client.player);
Game.dropFlag(%client.player);
//Game.playerDroppedFlag(%client.player);
Game.dropFlag(%client.player);
}
function serverCmdSelectWeaponSlot( %client, %data )
@ -83,37 +83,37 @@ function serverCmdCycleWeapon( %client, %data )
function serverCmdStartThrowCount(%client, %data)
{
%client.player.throwStart = getSimTime();
%client.player.throwStart = getSimTime();
}
function serverCmdEndThrowCount(%client, %data)
{
if(%client.player.throwStart == 0)
return;
if(%client.player.throwStart == 0)
return;
// throwStrength will be how many seconds the key was held
%throwStrength = (getSimTime() - %client.player.throwStart) / 300;
// trim the time to fit between 0.5 and 1.5
if(%throwStrength > 1.5)
%throwStrength = 1.5;
else if(%throwStrength < 0.5)
%throwStrength = 0.5;
// throwStrength will be how many seconds the key was held
%throwStrength = (getSimTime() - %client.player.throwStart) / 300;
// trim the time to fit between 0.5 and 1.5
if(%throwStrength > 1.5)
%throwStrength = 1.5;
else if(%throwStrength < 0.5)
%throwStrength = 0.5;
%throwScale = %throwStrength / 2;
%client.player.throwStrength = %throwScale;
%throwScale = %throwStrength / 2;
%client.player.throwStrength = %throwScale;
%client.player.throwStart = 0;
%client.player.throwStart = 0;
}
//----------------------------------------------------------------------------
function ShapeBase::throwWeapon(%this)
{
if(Game.shapeThrowWeapon(%this)) {
%image = %this.getMountedImage($WeaponSlot);
%this.throw(%image.item);
%this.client.setWeaponsHudItem(%image.item, 0, 0);
}
if(Game.shapeThrowWeapon(%this)) {
%image = %this.getMountedImage($WeaponSlot);
%this.throw(%image.item);
%this.client.setWeaponsHudItem(%image.item, 0, 0);
}
}
function ShapeBase::throwPack(%this)
@ -139,12 +139,12 @@ function ShapeBase::throw(%this,%data)
function ShapeBase::use(%this, %data)
{
//if(%data.class $= "Weapon") {
// error("ShapeBase::use " @ %data);
//}
//if(%data.class $= "Weapon") {
// error("ShapeBase::use " @ %data);
//}
if(%data $= Grenade)
{
// figure out which grenade type you're using
// figure out which grenade type you're using
for(%x = 0; $InvGrenade[%x] !$= ""; %x++) {
if(%this.inv[$NameToInv[$InvGrenade[%x]]] > 0)
{
@ -153,23 +153,25 @@ function ShapeBase::use(%this, %data)
}
}
}
else if(%data $= "Backpack") {
%pack = %this.getMountedImage($BackpackSlot);
// if you don't have a pack but have placed a satchel charge, detonate it
if(!%pack && (%this.thrownChargeId > 0) && %this.thrownChargeId.armed )
else if(%data $= "Backpack") {
%pack = %this.getMountedImage($BackpackSlot);
// if you don't have a pack but have placed a satchel charge, detonate it
if(!%pack && (%this.thrownChargeId > 0) && %this.thrownChargeId.armed )
{
%this.playAudio( 0, SatchelChargeExplosionSound );
schedule( 800, %this, "detonateSatchelCharge", %this );
return true;
}
}
else if(%data $= Beacon)
return true;
}
return false;
}
else if(%data $= Beacon)
{
%data.onUse(%this);
if (%this.inv[%data.getName()] > 0)
return true;
}
// default case
// default case
if (%this.inv[%data.getName()] > 0) {
%data.onUse(%this);
return true;
@ -188,7 +190,7 @@ function ShapeBase::pickup(%this,%obj,%amount)
function ShapeBase::hasInventory(%this, %data)
{
// changed because it was preventing weapons cycling correctly (MES)
// changed because it was preventing weapons cycling correctly (MES)
return (%this.inv[%data] > 0);
}
@ -230,12 +232,12 @@ function ShapeBase::decInventory(%this,%data,%amount)
function SimObject::decCatagory(%this)
{
//function was added to reduce console err msg spam
//function was added to reduce console err msg spam
}
function SimObject::incCatagory(%this)
{
//function was added to reduce console err msg spam
//function was added to reduce console err msg spam
}
function ShapeBase::setInventory(%this,%data,%value,%force)
@ -320,7 +322,7 @@ function ShapeBase::hasAmmo( %this, %weapon )
case GrenadeLauncher:
return( %this.getInventory( GrenadeLauncherAmmo ) > 0 );
case SniperRifle:
return( %this.getInventory( EnergyPack ) );
return( %this.getInventory( EnergyPack ) );
case ELFGun:
return( true );
case Mortar:
@ -340,7 +342,7 @@ function ShapeBase::hasAmmo( %this, %weapon )
function SimObject::onInventory(%this, %obj)
{
//function was added to reduce console error msg spam
//function was added to reduce console error msg spam
}
function ShapeBase::throwItem(%this,%data)
@ -358,7 +360,7 @@ function ShapeBase::throwObject(%this,%obj)
//if the object is being thrown by a corpse, use a random vector
if (%this.getState() $= "Dead")
{
%vec = (-1.0 + getRandom() * 2.0) SPC (-1.0 + getRandom() * 2.0) SPC getRandom();
%vec = (-1.0 + getRandom() * 2.0) SPC (-1.0 + getRandom() * 2.0) SPC getRandom();
%vec = vectorScale(%vec, 10);
}
@ -379,10 +381,10 @@ function ShapeBase::throwObject(%this,%obj)
%vec = vectorAdd(%vec,%this.getVelocity());
%pos = getBoxCenter(%this.getWorldBox());
//since flags have a huge mass (so when you shoot them, they don't bounce too far)
//we need to up the %vec so that you can still throw them...
if (%obj.getDataBlock().getName() $= "Flag")
%vec = vectorScale(%vec, 40);
//since flags have a huge mass (so when you shoot them, they don't bounce too far)
//we need to up the %vec so that you can still throw them...
if (%obj.getDataBlock().getName() $= "Flag")
%vec = vectorScale(%vec, 40);
//
%obj.setTransform(%pos);
@ -391,8 +393,8 @@ function ShapeBase::throwObject(%this,%obj)
%data = %obj.getDatablock();
%data.onThrow(%obj,%this);
//call the AI hook
AIThrowObject(%obj);
//call the AI hook
AIThrowObject(%obj);
}
function ShapeBase::clearInventory(%this)
@ -408,7 +410,7 @@ function ShapeBase::clearInventory(%this)
%this.setInventory(FlashGrenade,0);
%this.setInventory(ConcussionGrenade,0);
%this.setInventory(FlareGrenade,0);
%this.setInventory(CameraGrenade, 0);
%this.setInventory(CameraGrenade, 0);
%this.setInventory(Blaster,0);
%this.setInventory(Plasma,0);
@ -428,12 +430,12 @@ function ShapeBase::clearInventory(%this)
%this.setInventory(GrenadeLauncherAmmo, 0);
%this.setInventory(MissileLauncherAmmo, 0);
%this.setInventory(MortarAmmo, 0);
%this.setInventory(Beacon, 0);
%this.setInventory(Beacon, 0);
// take away any pack the player has
%curPack = %this.getMountedImage($BackpackSlot);
if(%curPack > 0)
%this.setInventory(%curPack.item, 0);
// take away any pack the player has
%curPack = %this.getMountedImage($BackpackSlot);
if(%curPack > 0)
%this.setInventory(%curPack.item, 0);
}
@ -488,7 +490,7 @@ function ShapeBase::cycleWeapon( %this, %data )
&& %this.hasInventory( %this.weaponSlot[%i] )
&& %this.hasAmmo( %this.weaponSlot[%i] ) )
{
// player has this weapon and it has ammo or doesn't need ammo
// player has this weapon and it has ammo or doesn't need ammo
%newSlot = %i;
break;
}
@ -539,7 +541,7 @@ function serverCmdGiveAll(%client)
%player.setInventory(FlashGrenade,999);
%player.setInventory(FlareGrenade,999);
%player.setInventory(ConcussionGrenade,999);
%player.setInventory(CameraGrenade, 999);
%player.setInventory(CameraGrenade, 999);
%player.setInventory(Blaster,1);
%player.setInventory(Plasma,1);
%player.setInventory(Chaingun, 1);
@ -557,6 +559,6 @@ function serverCmdGiveAll(%client)
%player.setInventory(PlasmaAmmo,999);
%player.setInventory(ChaingunAmmo, 999);
%player.setInventory(DiscAmmo, 999);
%player.setInventory(Beacon, 999);
%player.setInventory(Beacon, 999);
}
}

View file

@ -788,7 +788,7 @@ function addQuickPackFavorite( %pack, %item )
if(%item $= "")
%item = "Pack";
%packFailMsg = "You cannot use that equipment with your selected loadout.";
if ( $Hud['inventoryScreen'].staticData[1, 1].getValue() $= "" )
if ( !isObject($Hud['inventoryScreen'].staticData[1, 1]) || $Hud['inventoryScreen'].staticData[1, 1].getValue() $= "" )
{
//if the player hasnt brought up the inv screen we use his current fav
%currentFav = $pref::Favorite[$pref::FavCurrentSelect];

View file

@ -179,7 +179,7 @@ function RepairPackImage::onActivate(%data, %obj, %slot)
return;
}
if(%obj.getMountedImage($WeaponSlot).getName() !$= "RepairGunImage")
if(!isObject(%obj.getMountedImage($WeaponSlot)) || %obj.getMountedImage($WeaponSlot).getName() !$= "RepairGunImage")
{
messageClient(%obj.client, 'MsgRepairPackOn', '\c2Repair pack activated.');

View file

@ -11,7 +11,7 @@ datablock AudioProfile(SatchelChargeActivateSound)
{
filename = "fx/packs/satchel_pack_activate.wav";
description = AudioClose3d;
preload = true;
preload = true;
};
datablock AudioProfile(SatchelChargeExplosionSound)
@ -21,6 +21,20 @@ datablock AudioProfile(SatchelChargeExplosionSound)
preload = true;
};
datablock AudioProfile(SatchelChargePreExplosionSound)
{
filename = "fx/explosions/explosion.xpl03.wav";
description = AudioBIGExplosion3d;
preload = true;
};
datablock AudioProfile(UnderwaterSatchelChargeExplosionSound)
{
filename = "fx/weapons/mortar_explode_UW.wav";
description = AudioBIGExplosion3d;
preload = true;
};
//----------------------------------------------------------------------------
// Satchel Debris
@ -80,6 +94,48 @@ datablock DebrisData( SatchelDebris )
lifetimeVariance = 0.02;
};
//----------------------------------------------------------------------------
// Bubbles
//----------------------------------------------------------------------------
datablock ParticleData(SatchelBubbleParticle)
{
dragCoefficient = 0.0;
gravityCoefficient = -0.25;
inheritedVelFactor = 0.0;
constantAcceleration = 0.0;
lifetimeMS = 1500;
lifetimeVarianceMS = 600;
useInvAlpha = false;
textureName = "special/bubbles";
spinRandomMin = -100.0;
spinRandomMax = 100.0;
colors[0] = "0.7 0.8 1.0 0.0";
colors[1] = "0.7 0.8 1.0 0.4";
colors[2] = "0.7 0.8 1.0 0.0";
sizes[0] = 2.0;
sizes[1] = 2.0;
sizes[2] = 2.0;
times[0] = 0.0;
times[1] = 0.8;
times[2] = 1.0;
};
datablock ParticleEmitterData(SatchelBubbleEmitter)
{
ejectionPeriodMS = 10;
periodVarianceMS = 0;
ejectionVelocity = 1.0;
ejectionOffset = 7.0;
velocityVariance = 0.5;
thetaMin = 0;
thetaMax = 80;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
particles = "MortarExplosionBubbleParticle";
};
//--------------------------------------------------------------------------
// Satchel Explosion Particle effects
//--------------------------------------
@ -128,6 +184,52 @@ datablock ParticleEmitterData(SatchelExplosionSmokeEmitter)
particles = "SatchelExplosionSmoke";
};
datablock ParticleData(UnderwaterSatchelExplosionSmoke)
{
dragCoeffiecient = 105.0;
gravityCoefficient = -0.0;
inheritedVelFactor = 0.025;
constantAcceleration = -1.0;
lifetimeMS = 1500;
lifetimeVarianceMS = 0;
textureName = "particleTest";
useInvAlpha = false;
spinRandomMin = -200.0;
spinRandomMax = 200.0;
textureName = "special/Smoke/smoke_001";
colors[0] = "0.4 0.4 1.0 1.0";
colors[1] = "0.4 0.4 1.0 0.5";
colors[2] = "0.0 0.0 0.0 0.0";
sizes[0] = 7.0;
sizes[1] = 17.0;
sizes[2] = 2.0;
times[0] = 0.0;
times[1] = 0.2;
times[2] = 1.0;
};
datablock ParticleEmitterData(UnderwaterSatchelExplosionSmokeEmitter)
{
ejectionPeriodMS = 10;
periodVarianceMS = 0;
ejectionVelocity = 14.25;
velocityVariance = 2.25;
thetaMin = 0.0;
thetaMax = 180.0;
lifetimeMS = 200;
particles = "UnderwaterSatchelExplosionSmoke";
};
datablock ParticleData(SatchelSparks)
@ -168,6 +270,43 @@ datablock ParticleEmitterData(SatchelSparksEmitter)
particles = "SatchelSparks";
};
datablock ParticleData(UnderwaterSatchelSparks)
{
dragCoefficient = 1;
gravityCoefficient = 0.0;
inheritedVelFactor = 0.2;
constantAcceleration = 0.0;
lifetimeMS = 500;
lifetimeVarianceMS = 350;
textureName = "special/underwaterSpark";
colors[0] = "0.6 0.6 1.0 1.0";
colors[1] = "0.6 0.6 1.0 1.0";
colors[2] = "0.6 0.6 1.0 0.0";
sizes[0] = 0.5;
sizes[1] = 0.5;
sizes[2] = 0.75;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData(UnderwaterSatchelSparksEmitter)
{
ejectionPeriodMS = 2;
periodVarianceMS = 0;
ejectionVelocity = 30;
velocityVariance = 5.0;
ejectionOffset = 0.0;
thetaMin = 0;
thetaMax = 70;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
orientParticles = true;
lifetimeMS = 100;
particles = "UnderwaterSatchelSparks";
};
//---------------------------------------------------------------------------
@ -263,11 +402,103 @@ datablock ExplosionData(SatchelSubExplosion3)
datablock ExplosionData(SatchelMainExplosion)
{
soundProfile = SatchelChargePreExplosionSound;
subExplosion[0] = SatchelSubExplosion;
subExplosion[1] = SatchelSubExplosion2;
subExplosion[2] = SatchelSubExplosion3;
};
//---------------------------------------------------------------------------
// Underwater Explosion
//---------------------------------------------------------------------------
datablock ExplosionData(UnderwaterSatchelSubExplosion)
{
explosionShape = "disc_explosion.dts";
faceViewer = true;
explosionScale = "0.5 0.5 0.5";
lifetimeMS = 1000;
delayMS = 0;
emitter[0] = UnderwaterSatchelExplosionSmokeEmitter;
emitter[1] = UnderwaterSatchelSparksEmitter;
emitter[2] = SatchelBubbleEmitter;
offset = 0.0;
playSpeed = 0.75;
sizes[0] = "1.5 1.5 1.5";
sizes[1] = "2.5 2.5 2.5";
sizes[2] = "2.0 2.0 2.0";
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ExplosionData(UnderwaterSatchelSubExplosion2)
{
explosionShape = "disc_explosion.dts";
faceViewer = true;
explosionScale = "0.7 0.7 0.7";
lifetimeMS = 1000;
delayMS = 50;
emitter[0] = UnderwaterSatchelExplosionSmokeEmitter;
emitter[1] = UnderwaterSatchelSparksEmitter;
emitter[2] = SatchelBubbleEmitter;
offset = 9.0;
playSpeed = 0.75;
sizes[0] = "1.5 1.5 1.5";
sizes[1] = "1.0 1.0 1.0";
sizes[2] = "0.75 0.75 0.75";
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ExplosionData(UnderwaterSatchelSubExplosion3)
{
explosionShape = "disc_explosion.dts";
faceViewer = true;
explosionScale = "1.0 1.0 1.0";
lifetimeMS = 2000;
delayMS = 100;
emitter[0] = UnderwaterSatchelExplosionSmokeEmitter;
emitter[1] = UnderwaterSatchelSparksEmitter;
emitter[2] = SatchelBubbleEmitter;
offset = 9.0;
playSpeed = 1.25;
sizes[0] = "1.0 1.0 1.0";
sizes[1] = "1.0 1.0 1.0";
sizes[2] = "0.5 0.5 0.5";
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ExplosionData(UnderwaterSatchelMainExplosion)
{
soundProfile = UnderwaterSatchelChargeExplosionSound;
subExplosion[0] = UnderwaterSatchelSubExplosion;
subExplosion[1] = UnderwaterSatchelSubExplosion2;
subExplosion[2] = UnderwaterSatchelSubExplosion3;
};
//--------------------------------------------------------------------------
@ -295,7 +526,7 @@ datablock ItemData(SatchelCharge)
friction = 0.6;
pickupRadius = 2;
rotate = true;
pickUpName = "a satchel charge pack";
pickUpName = "a satchel charge pack";
computeCRC = true;
};
@ -304,13 +535,14 @@ datablock ItemData(SatchelChargeThrown)
{
shapeFile = "pack_upgrade_satchel.dts";
explosion = SatchelMainExplosion;
underwaterExplosion = UnderwaterSatchelMainExplosion;
mass = 1.2;
elasticity = 0.1;
friction = 0.9;
rotate = false;
pickupRadius = 0;
noTimeout = true;
armDelay = 3000;
noTimeout = true;
armDelay = 3000;
maxDamage = 0.6;
kickBackStrength = 4000;
@ -327,45 +559,51 @@ function SatchelCharge::onUse(%this, %obj)
rotation = "0 0 1 " @ (getRandom() * 360);
};
MissionCleanup.add(%item);
// take pack out of inventory and unmount image
%obj.decInventory(SatchelCharge, 1);
// take pack out of inventory and unmount image
%obj.decInventory(SatchelCharge, 1);
%obj.throwObject(%item);
//error("throwing satchel charge #" @ %item);
//error("throwing satchel charge #" @ %item);
%obj.thrownChargeId = %item;
%item.sourceObject = %obj;
%item.armed = false;
%item.damaged = 0.0;
%item.thwart = false;
// arm itself 3 seconds after being thrown
schedule(%item.getDatablock().armDelay, %item, "armSatchelCharge", %item);
%item.damaged = 0.0;
%item.thwart = false;
// arm itself 3 seconds after being thrown
schedule(%item.getDatablock().armDelay, %item, "initArmSatchelCharge", %item);
messageClient(%obj.client, 'MsgSatchelChargePlaced', "\c2Satchel charge deployed.");
}
function initArmSatchelCharge(%satchel)
{
// "deet deet deet" sound
%satchel.playAudio(1, SatchelChargeActivateSound);
// also need to play "antenna extending" animation
%satchel.playThread(0, "deploy");
%satchel.playThread(1, "activate");
// delay the actual arming until after sound is done playing
schedule( 2200, 0, "armSatchelCharge", %satchel );
}
function armSatchelCharge(%satchel)
{
//error("satchel charge #" @ %satchel @ " armed!");
%satchel.armed = true;
// "deet deet deet" sound
%satchel.playAudio(1, SatchelChargeActivateSound);
// also need to play "antenna extending" animation
%satchel.playThread(0, "deploy");
%satchel.playThread(1, "activate");
%satchel.armed = true;
}
function detonateSatchelCharge(%player)
{
%satchelCharge = %player.thrownChargeId;
// can't detonate the satchel charge if it isn't armed
if(!%satchelCharge.armed)
return;
%satchelCharge = %player.thrownChargeId;
// can't detonate the satchel charge if it isn't armed
if(!%satchelCharge.armed)
return;
//error("Detonating satchel charge #" @ %satchelCharge @ " for player #" @ %player);
//error("Detonating satchel charge #" @ %satchelCharge @ " for player #" @ %player);
if(%satchelCharge.getDamageState() !$= Destroyed)
%satchelCharge.setDamageState(Destroyed);
%satchelCharge.setDamageState(Destroyed);
if(isObject(%player))
%player.thrownChargeId = 0;
if(isObject(%player))
%player.thrownChargeId = 0;
}
function SatchelChargeThrown::onEnterLiquid(%data, %obj, %coverage, %type)
@ -391,7 +629,7 @@ function SatchelChargeThrown::onEnterLiquid(%data, %obj, %coverage, %type)
function SatchelChargeImage::onMount(%data, %obj, %node)
{
%obj.thrownChargeId = 0;
%obj.thrownChargeId = 0;
}
function SatchelChargeImage::onUnmount(%data, %obj, %node)
@ -400,34 +638,35 @@ function SatchelChargeImage::onUnmount(%data, %obj, %node)
function SatchelChargeThrown::onDestroyed(%this, %object, %lastState)
{
if(%object.kaboom)
return;
else
{
%object.kaboom = true;
if(%object.kaboom)
return;
else
{
%object.kaboom = true;
// the "thwart" flag is set if the charge is destroyed with weapons rather
// than detonated. A less damaging explosion, but visually the same scale.
if(%object.thwart)
{
%dmgRadius = 10;
%dmgMod = 0.3;
%expImpulse = 1000;
%dmgType = $DamageType::Explosion;
}
else
{
messageClient(%object.sourceObject.client, 'msgSatchelChargeDetonate', "\c2Satchel charge detonated!");
%dmgRadius = 20;
%dmgMod = 1.0;
%expImpulse = 2500;
%dmgType = $DamageType::SatchelCharge;
}
// the "thwart" flag is set if the charge is destroyed with weapons rather
// than detonated. A less damaging explosion, but visually the same scale.
if(%object.thwart)
{
%dmgRadius = 10;
%dmgMod = 0.3;
%expImpulse = 1000;
%dmgType = $DamageType::Explosion;
}
else
{
messageClient(%object.sourceObject.client, 'msgSatchelChargeDetonate', "\c2Satchel charge detonated!");
%dmgRadius = 20;
%dmgMod = 1.0;
%expImpulse = 2500;
%dmgType = $DamageType::SatchelCharge;
}
RadiusExplosion(%object, %object.getPosition(), %dmgRadius, %dmgMod, %expImpulse, %object.sourceObject, %dmgType);
%object.blowingUp = true;
RadiusExplosion(%object, %object.getPosition(), %dmgRadius, %dmgMod, %expImpulse, %object.sourceObject, %dmgType);
%object.schedule(500, "delete");
}
%object.schedule(500, "delete");
}
}
function SatchelChargeThrown::onCollision(%data,%obj,%col)
@ -436,17 +675,20 @@ function SatchelChargeThrown::onCollision(%data,%obj,%col)
function SatchelChargeThrown::damageObject(%data, %targetObject, %sourceObject, %position, %amount, %damageType)
{
%targetObject.damaged += %amount;
if(%targetObject.damaged >= %targetObject.getDataBlock().maxDamage &&
%satchelCharge.getDamageState() !$= Destroyed)
if (!%object.blowingUp)
{
%targetObject.thwart = true;
%targetObject.setDamageState(Destroyed);
}
%targetObject.damaged += %amount;
if(%targetObject.damaged >= %targetObject.getDataBlock().maxDamage &&
%targetObject.getDamageState() !$= Destroyed)
{
%targetObject.thwart = true;
%targetObject.setDamageState(Destroyed);
}
}
}
function SatchelCharge::onPickup(%this, %obj, %shape, %amount)
{
// created to prevent console errors
// created to prevent console errors
}

View file

@ -460,9 +460,7 @@ function RadiusExplosion(%explosionSource, %position, %radius, %damage, %impulse
{
InitContainerRadiusSearch(%position, %radius, $TypeMasks::PlayerObjectType |
$TypeMasks::VehicleObjectType |
$TypeMasks::MoveableObjectType |
$TypeMasks::StaticShapeObjectType |
$TypeMasks::ForceFieldObjectType |
$TypeMasks::TurretObjectType |
$TypeMasks::ItemObjectType);

View file

@ -8,7 +8,7 @@ $SB::DFDec = 0.02; // damageFlash
function VerifyCDCheck(%func)
{
if (!cdFileCheck())
messageBoxOkCancel("Tribes 2 CD Check", "You must have the Tribes 2 CD in the CD-ROM drive while playing offline. Please insert the CD.", "schedule(0, 0, VerifyCDCheck, " @ %func @ ");", "quit();");
messageBoxOkCancel("TRIBES 2 CD CHECK", "You must have the Tribes 2 CD in the CD-ROM drive while playing Tribes 2. Please insert the CD.", "schedule(0, 0, VerifyCDCheck, " @ %func @ ");", "quit();");
else
call(%func);
}
@ -165,11 +165,13 @@ function DestroyServer()
$missionRunning = false;
allowConnections(false);
stopHeartbeat();
%game = game.class;
MissionGroup.delete();
MissionCleanup.delete();
%game.deactivatePackages();
%game.delete();
if(isObject(game))
{
game.deactivatePackages();
game.delete();
}
if(isObject($ServerGroup))
$ServerGroup.delete();
@ -1472,12 +1474,30 @@ function isOnSuperAdminList(%client)
function addToAdminList( %client )
{
%count = getRecordCount( $Host::AdminList );
for ( %i = 0; %i < %count; %i++ )
{
%id = getRecord( $Host::AdminList, %i );
if ( %id == %client.guid )
return; // They're already there!
}
$Host::AdminList = $Host::AdminList NL %client.guid;
}
function addToSuperAdminList( %client )
{
%count = getRecordCount( $Host::SuperAdminList );
for ( %i = 0; %i < %count; %i++ )
{
%id = getRecord( $Host::SuperAdminList, %i );
if ( %id == %client.guid )
return; // They're already there!
}
$Host::SuperAdminList = $Host::SuperAdminList NL %client.guid;
}
function resetTournamentPlayers()

View file

@ -54,6 +54,8 @@ $Host::MaxMessageLen = 120;
$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)
// GSM: $Audio::maxEncodingLevel = 3;
$Audio::maxEncodingLevel = 2;
$Audio::maxVoiceChannels = 2;

View file

@ -1226,7 +1226,7 @@ function checkSpawnPos(%MPB, %radius)
%terrHeight = getTerrainHeight(%posX @ " " @ %posY);
if(abs(%terrHeight - %pPosZ) < %radius )
if(mAbs(%terrHeight - %pPosZ) < %radius )
{
%mask = $TypeMasks::VehicleObjectType | $TypeMasks::MoveableObjectType |
$TypeMasks::StaticShapeObjectType | $TypeMasks::StaticTSObjectType |

View file

@ -496,9 +496,12 @@ function MobileBaseVehicle::deleteAllMounted(%data, %obj)
if(isObject(%obj.shield))
%obj.shield.delete();
%obj.teleporter.setThreadDir($ActivateThread, FALSE);
%obj.teleporter.playThread($ActivateThread,"activate");
%obj.teleporter.playAudio($ActivateSound, StationTeleportDeacitvateSound);
if (isObject(%obj.teleporter))
{
%obj.teleporter.setThreadDir($ActivateThread, FALSE);
%obj.teleporter.playThread($ActivateThread,"activate");
%obj.teleporter.playAudio($ActivateSound, StationTeleportDeacitvateSound);
}
}
//**************************************************************

View file

@ -124,12 +124,12 @@ datablock WheeledVehicleData(MobileBaseVehicle) : MPBDamageProfile
hardImpactSpeed = 25; // Play HardImpact Sound
// Ground Impact Damage (uses DamageType::Ground)
minImpactSpeed = 25;
speedDamageScale = 0.220;
minImpactSpeed = 12;
speedDamageScale = 0.060;
// Object Impact Damage (uses DamageType::Impact)
collDamageThresholdVel = 28;
collDamageMultiplier = 0.040;
collDamageThresholdVel = 12;
collDamageMultiplier = 0.080;
// Engine
engineTorque = 7.0 * 745;

View file

@ -5,7 +5,6 @@ $numTalking = 0;
//------------------------------------------------------------------------------
function clientCmdPlayerStartTalking(%client, %success)
{
//error("Client " @ %client @ " start talking, success = " @ %success);
// if more people are talking than we can handle, don't bother with names
if($numTalking > $voiceLines)
return;
@ -45,8 +44,6 @@ function clientCmdPlayerStoppedTalking(%client, %success)
}
if(%doneLine != -1)
%rmSuccess = removeVoiceLine(%doneLine);
//else
// error("Did not find voice line for client " @ %client);
}
//------------------------------------------------------------------------------
@ -233,9 +230,10 @@ function voiceCapStart()
{
switch($Audio::serverEncodingLevel)
{
case 0: %level = "Low";
case 1: %level = "Medium";
default: %level = "High";
case 0: %level = "Codec .v12";
case 1: %level = "Codec .v24";
case 2: %level = "Codec .v29";
default: %level = "Codec GSM";
}
addMessageHudLine("\c2System:\cr server has voice level capped at [\c1" @ %level @ "\cr].");

View file

@ -76,7 +76,7 @@ function BrowserStartSearch()
//-----------------------------------------------------------------------------
function ExecuteSearch(%id)
{
DatabaseQueryArray(BrowserSearchPane.query,0,trim($BrowserSearchField) TAB 0 TAB 100 TAB 0, BrowserSearchPane, BrowserSearchPane.key);
DatabaseQueryArray(BrowserSearchPane.query,0,trim($BrowserSearchField) TAB 0 TAB 100 TAB 0, BrowserSearchPane, BrowserSearchPane.key, true);
}
//-----------------------------------------------------------------------------
function getTribeMember(%tribeName)
@ -1372,12 +1372,12 @@ function TribePane::ButtonClick( %this, %senderid )
MemberList.addColumn( 0, "MEMBER", 92, 0, 100,"left");
MemberList.addColumn( 1, "TITLE", 90, 0, 100,"left");
MemberList.addColumn( 2, "RNK", 30, 0, 40, "numeric center" );
TribeAndWarriorBrowserGui.eid = schedule(500, 0, DatabaseQueryArray,6,0,%tribeName,%this,%this.key);
TribeAndWarriorBrowserGui.eid = schedule(500, 0, DatabaseQueryArray,6,0,%tribeName,%this,%this.key, true);
case 2: //NEWS BUTTON
%this.key = LaunchGui.key++;
%this.state = "getTribeNews";
%this.tstate = "NEWS";
TribeAndWarriorBrowserGui.eid = schedule(500, 0, DatabaseQueryArray,10,20,%tribeName,%this,%this.key);
TribeAndWarriorBrowserGui.eid = schedule(500, 0, DatabaseQueryArray,10,20,%tribeName,%this,%this.key,true);
case 3: //INVITE BUTTON
MemberList.Clear();
MemberList.ClearColumns();
@ -1388,7 +1388,7 @@ function TribePane::ButtonClick( %this, %senderid )
%this.tstate = "INVITES";
MemberList.addColumn( 0, "PLAYER", 100, 0, 350,"left" );
MemberList.addColumn( 1, "INVITED", 112, 0, 300, "left" );
TribeAndWarriorBrowserGui.eid = schedule(500, 0, DatabaseQueryArray,11,0,%tribeName,%this,%this.key);
TribeAndWarriorBrowserGui.eid = schedule(500, 0, DatabaseQueryArray,11,0,%tribeName,%this,%this.key,true);
case 4: //Admin Tribe
if(trim(TWBText.getText()) !$= "")
{
@ -1673,7 +1673,7 @@ function PlayerPane::ButtonClick( %this, %senderid )
%playerName = TWBTabView.getTabText(TWBTabView.GetSelectedID());
%callId = 3;
TribeAndWarriorBrowserGui.eid = schedule(500,0,DatabaseQueryArray,12,0,%playerName,%this,%this.key);
TribeAndWarriorBrowserGui.eid = schedule(500,0,DatabaseQueryArray,12,0,%playerName,%this,%this.key,true);
case 2: //TribeList
W_MemberList.Clear();
W_MemberList.ClearColumns();
@ -1684,7 +1684,7 @@ function PlayerPane::ButtonClick( %this, %senderid )
W_MemberList.addColumn( 1, "TITLE", 80, 0, 300 );
W_MemberList.addColumn( 2, "RNK", 38, 0, 50, "numeric center" );
%playerName = TWBTabView.getTabText(TWBTabView.GetSelectedID());
TribeAndWarriorBrowserGui.eid = schedule(500,0,DatabaseQueryArray,13,0,%playerName,%this,%this.key);
TribeAndWarriorBrowserGui.eid = schedule(500,0,DatabaseQueryArray,13,0,%playerName,%this,%this.key,true);
case 3: //Player Buddylist
W_MemberList.Clear();
W_MemberList.ClearColumns();
@ -1695,14 +1695,14 @@ function PlayerPane::ButtonClick( %this, %senderid )
%this.key = LaunchGui.key++;
%this.state = "getWarriorBuddyList";
%playerName = TWBTabView.getTabText(TWBTabView.GetSelectedID());
TribeAndWarriorBrowserGui.eid = schedule(500,0,DatabaseQueryArray,5,0,%playerName,%this,%this.key);
TribeAndWarriorBrowserGui.eid = schedule(500,0,DatabaseQueryArray,5,0,%playerName,%this,%this.key,true);
case 4: //Visitor Options
W_Text.setValue("");
%this.state = "getVisitorOptions";
%owner = getField(getRecord(WonGetAuthInfo(),0),0);
%playerName = TWBTabView.getTabText(TWBTabView.GetSelectedID());
TWBTitle.OldText = TWBTitle.name;
TribeAndWarriorBrowserGui.eid = schedule(500,0,DatabaseQuery,23,%playerName,%this,%this.key);
TribeAndWarriorBrowserGui.eid = schedule(500,0,DatabaseQuery,23,%playerName,%this,%this.key,true);
case 5: //Admin Options
if(trim(w_text.getText()) !$= "")
{
@ -1828,8 +1828,6 @@ function WarriorPopup::onSelect( %this, %id, %text )
{
case "T2 ADMINISTRATION":
%tribe = "Game Feedback";
case "T2 PRESSCORPS":
%tribe = "PRESSCORPS-Submissions";
}
ForumsThreadPane.setVisible(false);
ForumsTopicsPane.setVisible(true);

View file

@ -374,6 +374,8 @@ function CheckEmail(%calledFromSched)
EmailGui.checkSchedule = "";
EMailGui.key = LaunchGui.key++;
EmailGui.state = "getMail";
EM_Browser.clear();
EmailGui.LoadCache();
DatabaseQueryArray(1,0,$EmailNextSeq, EMailGui, EMailGui.key);
EmailGui.checkingEmail = true;
}
@ -765,7 +767,7 @@ function AddressDlg::GoSearch(%this)
%this.key = LaunchGui.key++;
%this.state = "goSearch";
%this.lbstate = "errorcheck";
DatabaseQueryArray(3,100,trim(LC_Search.getValue()) TAB 0 TAB 100 TAB 1 ,%this, %this.key);
DatabaseQueryArray(3,100,trim(LC_Search.getValue()) TAB 0 TAB 100 TAB 1 ,%this, %this.key,true);
LC_BuddyListBtn.direction = 0;
LC_BuddyListBtn.text = "ADD TO BUDDYLIST";
LC_ListBox.setSelected(0);
@ -792,7 +794,7 @@ function AddressDlg::GoList(%this)
else
{
%this.state = "getTribeMembers";
DatabaseQueryArray(6,0,LC_ListBox.getValue(),%this,%this.key);
DatabaseQueryArray(6,0,LC_ListBox.getValue(),%this,%this.key,true);
LC_BuddyListBtn.direction = 0;
LC_BuddyListBtn.text = "ADD TO BUDDYLIST";
}
@ -932,7 +934,7 @@ function EmailGui::onWake(%this)
if(!%this.cacheFile)
{
%this.cacheFile = "email0";
%this.cacheFile = "email1";
EmailGui.getCache();
}
if ( !EmailGui.cacheLoaded || EM_Browser.rowCount() == 0 )
@ -969,7 +971,7 @@ function EmailGui::ButtonClick(%this,%ord)
EmailInboxBodyText.setText("");
EMailGui.state = "getDeletedMail";
EmailGui.key = LaunchGui.key++;
DatabaseQueryArray(14,100,EmailGui.state,EMailGui,EMailGui.key);
DatabaseQueryArray(14,100,EmailGui.state,EMailGui,EMailGui.key,true);
}
}
//-----------------------------------------------------------------------------
@ -997,10 +999,8 @@ function EMailGui::onDatabaseQueryResult(%this, %status, %RowCount_Result, %key)
EMailGui.getCache();
EMailGui.outputVector();
if(EMailGui.btnClicked)
{
MessageBoxOK("NOTICE","No New Mail");
EmailGui.btnClicked = false;
}
%this.checkingEmail = false;
%this.checkSchedule = schedule(1000 * 60 * 5, 0, CheckEmail, true);
// echo("scheduling Email check " @ %this.checkSchedule @ " in 5 minutes");
@ -1121,7 +1121,7 @@ function EmailGui::getCache(%this)
EM_Browser.clear();
EMailMessageVector.clear();
EmailInboxBodyText.setText("");
%fileName = $EmailCachePath @ "email0";
%fileName = $EmailCachePath @ "email1";
%file = new FileObject();
if ( %this.cacheFile $= "" )
{
@ -1131,7 +1131,7 @@ function EmailGui::getCache(%this)
if ( %guid $= getField( WonGetAuthInfo(), 3 ) )
{
// This is the right one!
%this.cacheFile = "email0";
%this.cacheFile = "email1";
%this.messageCount = %file.readLine();
while( !%file.isEOF() )
{
@ -1176,7 +1176,7 @@ function EmailGui::loadCache( %this )
EM_Browser.clear();
EMailMessageVector.clear();
EMailInboxBodyText.setText("");
%fileName = $EmailCachePath @ "email0";
%fileName = $EmailCachePath @ "email1";
%file = new FileObject();
if ( %this.cacheFile $= "" )
{
@ -1186,7 +1186,7 @@ function EmailGui::loadCache( %this )
if ( %guid $= getField( WonGetAuthInfo(), 3 ) )
{
// This is the right one!
%this.cacheFile = "email0";
%this.cacheFile = "email1";
%this.messageCount = %file.readLine();
while( !%file.isEOF() )
{
@ -1219,7 +1219,7 @@ function EmailGui::loadCache( %this )
function EmailGui::dumpCache( %this )
{
%guid = getField( WONGetAuthInfo(), 3 );
if ( %this.cacheFile $= "" ) %this.cacheFile = "email0";
if ( %this.cacheFile $= "" ) %this.cacheFile = "email1";
EmailMessageVector.dump( $EmailCachePath @ %this.cacheFile, %guid );
}
//-----------------------------------------------------------------------------

View file

@ -122,6 +122,17 @@ function DateStrCompare(%date1,%date2)
return false;
}
//-----------------------------------------------------------------------------
function IsPostAuthor(%author)
{
// %ai = wonGetAuthInfo();
// %pid = getField(GetRecord(%ai,0),
// for(%east=0;%east<getField(getRecord(%ai,1),0);%east++)
// {
// %wonTribe = getRecord(%ai,2+%east);
// ForumsList.addRow(getField(%wonTribe,3)*-1,getField(%wonTribe,0) TAB getField(%wonTribe,4) TAB getField(%wonTribe,2));
// }
}
//-----------------------------------------------------------------------------
function BackToTopics()
{
CacheForumTopic();
@ -351,16 +362,7 @@ function ForumsPost()
TextCheck($ForumsSubject,ForumsGui);
if(!ForumsGui.textCheck)
{
// if(ForumsComposeDlg.action !$= "Post" || ForumsComposeDlg.parentPost != 0)
// {
// %proxy = ForumsMessageList;
// %newGroup = TopicsListGroup.getObject(ForumsTopicsList.getSelectedRow());
// %proxy.lastId = %newGroup.updateid;
// %proxy.highestUpdate = %proxy.lastId;
// %proxy.state = "updateCheck";
// }
{
ForumsTopicsList.refreshFlag = 1;
if(ForumsComposeDlg.parentPost == 0) //this is a new topic request
{
@ -375,6 +377,7 @@ function ForumsPost()
ForumsComposeDlg.parentPost TAB
$ForumsSubject TAB
ForumsBodyText.getValue();
error("RT:" TAB ForumsComposeDlg.forum TAB ForumsComposeDlg.topic TAB ForumsComposeDlg.parentPost);
}
else if(ForumsComposeDlg.action $="News")
{
@ -397,6 +400,7 @@ function ForumsPost()
ForumsComposeDlg.parentPost TAB
$ForumsSubject TAB
ForumsBodyText.getValue();
// error("RT:" TAB ForumsComposeDlg.forum TAB ForumsComposeDlg.topic TAB ForumsComposeDlg.parentPost);
}
else if(ForumsComposeDlg.action $="Edit")
{
@ -502,7 +506,7 @@ function GetTopicsList()
canvas.SetCursor(ArrowWaitCursor);
ForumsTopicsList.clearList();
// error("DQA:" @ 8 TAB ForumsComposeDlg.forum);
DatabaseQueryArray(8,80,ForumsComposeDlg.forum,ForumsGui,ForumsGui.key);
DatabaseQueryArray(8,80,ForumsComposeDlg.forum,ForumsGui,ForumsGui.key,true);
ForumsTopicsList.refreshFlag = 0;
}
//-----------------------------------------------------------------------------
@ -528,7 +532,7 @@ function GetTopicPosts()
ForumsMessageList.clear();
}
// error("DQA:" @ 8 TAB ForumsComposeDlg.topic);
DatabaseQueryArray(9,0,ForumsComposeDlg.Topic TAB ForumsMessageList.lastID,ForumsGui,ForumsGui.key);
DatabaseQueryArray(9,0,ForumsComposeDlg.Topic TAB ForumsMessageList.lastID,ForumsGui,ForumsGui.key,true);
}
//-----------------------------------------------------------------------------
//-- ForumsGui ---------------------------------------------------------------
@ -715,7 +719,7 @@ function ForumsGui::onDatabaseRow(%this,%row,%isLastRow,%key)
{
if(%this.key != %key)
return;
// echo("RECV: " @ %row);
echo("RECV: " @ %row);
%forumTID = getField(ForumsList.getRowTextbyId(ForumsList.getSelectedID()),2);
switch$(%this.state)
{
@ -747,8 +751,8 @@ function ForumsGui::onDatabaseRow(%this,%row,%isLastRow,%key)
%hasDeletes = getField(%row,12);
%slevel = getField(%row,13);
%maxUpdateId = getField(%row,14);
ForumsTopicsList.addRow( %id, %topic TAB %postCount TAB %name TAB %date TAB %hasDeletes);
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
{
%this.state = "done";
@ -762,6 +766,8 @@ function ForumsGui::onDatabaseRow(%this,%row,%isLastRow,%key)
}
else if( ForumsMessageVector.tid !$= "" )
ForumsTopicsList.setSelectedbyId(ForumsMessageVector.tid);
else
ForumsTopicsList.setSelectedRow(0);
}
case "PostList":
%isAuthor = getField(%row,0);
@ -770,6 +776,7 @@ function ForumsGui::onDatabaseRow(%this,%row,%isLastRow,%key)
%high = getField(%row,4);
%poster = getFields(%row,5,8);
%date = getField(%row,10);
%isDeleted = getField(%row,12);
%topic = getField(%row,13);
%body = getFields(%row,14);
if ( %high > ForumsMessageList.highestUpdate )
@ -793,7 +800,9 @@ function ForumsGui::onDatabaseRow(%this,%row,%isLastRow,%key)
if(ForumsMessageList.allRead && DateStrCompare(ForumsMessageList.lastDate,%date))
%text = setRecord( %text, 0, "1" );
ForumsMessageVector.pushBackLine(%text, %postId);
if(!%isDeleted)
ForumsMessageVector.pushBackLine(%text, %postId);
if(%isLastRow)
{
ForumsMessageVector.tid = ForumsTopicsList.getSelectedID();
@ -1381,4 +1390,4 @@ function ForumsMessagelist::onDatabaseQueryResult(%this,%status,%resultString,%k
MessageBoxOK("ERROR",getFields(%status,1));
}
canvas.SetCursor(DefaultCursor);
}
}

View file

@ -4,22 +4,27 @@ addWebLink( "5 Assed Monkey", "www.5assedmonkey.com" );
addWebLink( "BarrysWorld", "www.barrysworld.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( "Euro Tribesplayers", "www.euro-tribesplayers.com" );
addWebLink( "eXtreme-Players", "www.eXtreme-players.de" );
addWebLink( "IanStorm", "www.ianstorm.com" );
addWebLink( "Long Dongles", "www.longdongles.com" );
addWebLink( "MaxBaud.Net", "www.maxbaud.net" );
addWebLink( "MoreGaming", "www.moregaming.com" );
addWebLink( "NetGames UK", "www.nguk.net" );
addWebLink( "PlanetTribes", "www.planettribes.com" );
addWebLink( "Rogue Disciples", "www.roguedisciples.com" );
addWebLink( "StrikeForce", "www.strikeforcecenter.com" );
addWebLink( "TeamSound", "www.teamsound.com" );
addWebLink( "Telepresence Heavy Assault Team", "www.that.co.nz" );
addWebLink( "TribalWar", "www.tribalwar.com" );
addWebLink( "Tribes2 Database", "www.tribes2database.com" );
addWebLink( "TribesMaps", "www.tribesmaps.com" );
addWebLink( "TribalWar", "www.tribalwar.com" );
addWebLink( "Tribes-Universe", "www.tribes-universe.com" );
addWebLink( "WirePlay", "www.wireplay.com.au" );
addWebLink( "IanStorm", "www.ianstorm.com" );
addWebLink( "Tribes2 Database", "www.tribes2database.com" );
//addWebLink( "Z Free", "games13.clear.net.nz" );
addWebLink( "ClanServ", "www.clanserv.com" );
//addWebLink( "Z Free", "games13.clear.net.nz" );

View file

@ -45,10 +45,16 @@ function NewsGui::rebuildText(%this)
for(%i = 0; %i < %this.articleCount; %i++)
{
%article = %this.article[%i];
if(getField(%article,0)==1 || %this.acl > 2)
%editable = 1;
else
%editable = 0;
%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;
%topicid = getField(%article,1);
%articleid = getField(%article, 2);
@ -333,9 +339,17 @@ function NewsMOTDText::onDatabaseQueryResult(%this, %status, %RowCount_Result, %
if(%key != %this.key)
return;
// echo("RECV: " @ %status);
%ai = wonGetAuthInfo();
%isMem = 0;
if(getField(%status,0)==0)
{
NewsEditMOTDBtn.setVisible( getField(%status,2));
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;
}
NewsEditMOTDBtn.setVisible(%isMem);
%this.setText( %RowCount_Result );
}
else if (getSubStr(getField(%status,1),0,9) $= "ORA-04061")
@ -348,6 +362,7 @@ function NewsMOTDText::onDatabaseQueryResult(%this, %status, %RowCount_Result, %
%this.state = "halt";
MessageBoxOK("NOTICE",getField(%status,1));
}
canvas.repaint();
Canvas.setCursor(defaultCursor);
}
//-----------------------------------------------------------------------------
@ -383,9 +398,18 @@ function NewsEditMotdDlg::OnDatabaseQueryResult(%this, %status, %RowCount_Result
switch$(%this.state)
{
case "proceed":
NewsEditMOTDBtn.setVisible( getField(%status,2));
%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;
}
NewsEditMOTDBtn.setVisible(%isMem);
MessageBoxOK("NOTICE",getField(%status,1));
NewsMOTDText.setText( NewsEditMOTDText.getText() );
canvas.repaint();
Canvas.PopDialog(NewsEditMOTDDlg);
case "error":
MessageBoxOK("NOTICE",getField(%status,1));

View file

@ -148,7 +148,7 @@ function HandleDatabaseProxyResponse(%prefix, %params)
{
// erase the query from the array:
if(getWord($DBQueries[%qc], 1) == 0)
warnf("Error in database query response - not enough data.");
warn("Error in database query response - not enough data.");
for(%i = %qc; %i < $DBQueryCount; %i++)
{
$DBQueries[%i] = $DBQueries[%i+1];