2017-07-18 02:51:48 +00:00
|
|
|
//--- GAME RULES BEGIN ---
|
|
|
|
|
//One team defends base, other team tries to conquer it as quickly as possible
|
|
|
|
|
//Game has two rounds: Round 1 ends when base is conquered or time runs out
|
|
|
|
|
//Round 2: Teams switch sides, play again -- to win, attackers MUST beat the time set by the attackers in Round 1
|
|
|
|
|
//Touching base switch conquers base
|
|
|
|
|
//--- GAME RULES END ---
|
|
|
|
|
|
|
|
|
|
//Siege type script for TRIBES 2
|
|
|
|
|
//
|
|
|
|
|
//The two teams each take a turn at defense and offense.
|
|
|
|
|
//
|
|
|
|
|
//If initial defending team's objective is captured, then roles switch
|
|
|
|
|
//and new offense team gets same amount of time to attempt to capture the
|
|
|
|
|
//objective.
|
|
|
|
|
//
|
|
|
|
|
//If time runs out before initial defending team's objective is captured,
|
|
|
|
|
//then roles switch and new offense team has to try to capture the
|
|
|
|
|
//objective before time runs out.
|
|
|
|
|
//
|
|
|
|
|
//The winner is either the team who captures the objective in least amount of time.
|
|
|
|
|
//
|
|
|
|
|
// In the mission file, Team 1 will be offense team, and team 2 will be the defense team.
|
|
|
|
|
// When the game actually starts, either team could start on offense, and the objects must
|
|
|
|
|
// have their team designation set accordingly.
|
|
|
|
|
//
|
|
|
|
|
// This mission type doesn't have a scoreLimit because, well, it really doesn't
|
|
|
|
|
// need one or lend itself to one.
|
|
|
|
|
|
|
|
|
|
// ai support
|
|
|
|
|
exec("scripts/aiSiege.cs");
|
|
|
|
|
|
|
|
|
|
package SiegeGame {
|
|
|
|
|
|
|
|
|
|
function FlipFlop::objectiveInit(%data, %flipflop)
|
|
|
|
|
{
|
|
|
|
|
Game.regObjective(%flipflop);
|
|
|
|
|
setTargetSkin(%flipflop.getTarget(), $teamSkin[0]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SiegeGame::regObjective(%game, %object)
|
|
|
|
|
{
|
|
|
|
|
%objSet = nameToID("MissionCleanup/Objectives");
|
|
|
|
|
if(!isObject(%objSet))
|
|
|
|
|
{
|
|
|
|
|
%objSet = new SimSet("Objectives");
|
|
|
|
|
MissionCleanup.add(%objSet);
|
|
|
|
|
}
|
|
|
|
|
%objSet.add(%object);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function FlipFlop::playerTouch(%data, %flipflop, %player)
|
|
|
|
|
{
|
|
|
|
|
if(%player.team != Game.offenseTeam)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
%defTeam = %game.offenseTeam == 1 ? 2 : 1;
|
|
|
|
|
|
|
|
|
|
// Let the observers know:
|
|
|
|
|
messageTeam( 0, 'MsgSiegeTouchFlipFlop', '\c2%1 captured the %2 base!~wfx/misc/flipflop_taken.wav', %player.client.name, $TeamName[%defTeam] );
|
|
|
|
|
// Let the teammates know:
|
|
|
|
|
messageTeam( %player.team, 'MsgSiegeTouchFlipFlop', '\c2%1 captured the %2 base!~wfx/misc/flipflop_taken.wav', %player.client.name, $TeamName[%defTeam] );
|
|
|
|
|
// Let the other team know:
|
|
|
|
|
%losers = %player.team == 1 ? 2 : 1;
|
|
|
|
|
messageTeam( %losers, 'MsgSiegeTouchFlipFlop', '\c2%1 captured the %2 base!~wfx/misc/flipflop_lost.wav', %player.client.name, $TeamName[%defTeam]);
|
|
|
|
|
|
|
|
|
|
logEcho(%player.client.nameBase@" (pl "@%player@"/cl "@%player.client@") captured team "@%defTeam@" base");
|
|
|
|
|
Game.allObjectivesCompleted();
|
|
|
|
|
}
|
|
|
|
|
|
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).
2017-07-18 03:07:50 +00:00
|
|
|
//--------------------------------------------------------------------------------
|
|
|
|
|
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);
|
v22755 (05/11/01):
- (optimization) Damage Decal toggle applies to ALL damage decals now. This improves performance on video cards with lower VRAM. Those cards should turn this feature OFF for best gameplay.
- (optimization) Dynamic lighting now fades with distance so that systems do less calculations on lights that make little or no difference anyway.
- (optimization) The following missions were edited/revised in order to achieve much higher framerates in-game. They are:
Death Birds Fly
Dust to Dust
Recalascence
Reversion
Riverdance
- (optimization) There is now a PARTICLE DENSITY slider on the GRAPHICS menu that allows you to turn down the number of particles used in explosions and weapon effects. Systems with low VRAM should turn this down as low as possible. The effects will still look good, but will use many less polygons and alpha translucencies.
- (optimization) The force shield effect on players and objects has been greatly simplified. The old effect was hammering the frame rates on older video cards when played. This new effect greatly speeds gameplay on all cards, and particularly on Voodoo cards.
- (memory leak) Memory leaks were located and eradicated. This most likely was the cause of the "degradation over time" that folks were experiencing on their servers.
- (bug fix) "Vote Spamming" has been prevented in-game.
- (bug fix) Moved some of the CD check from script into code, where it should be.
- (bug fix) The "sticking" mouse button problem is now fixed.
- (bug fix) Deployables are now easier to place on walls and other surfaces. There were some inconsistencies on which surfaces could be placed upon and those are now resolved.
- (bug fix) There was a bug that prevented users from deleting some Server Filters. That is resolved now.
- (bug fix) There was a Siege bug where a base item (like a turret) could be destroyed, and then repaired, but it would no longer receive power after being repaired. That is now fixed. The items will receive power correctly after being repaired.
- (bug fix) Resolved the Team Damage OFF situation where friendly troops could destroy permanent "base" objects.
- (bug fix) Removed a packet overrun in the net code that *could* have allowed hackers to bring down servers. This had not occurred to date and is now prevented.
- (bug fix) Deployable inventory stations can no longer be deployed directly next to each other. They must be at least 20 meters apart in order to be deployed properly.
- (bug fix) Ejection speed increased slightly to more easily accomodate jumping out of moving vehicles.
- (bug fix) Many team damage fixes occurred. When Team Damage is OFF the following are now true: Friendly teammates are no longer prevented from destroying deployables. The ELF will no longer drain energy from friendly players. If a friendly player blinds another friendly player with Whiteout grenades, then a message is displayed in the Chat HUD so that the blinded person knows who did it. (There are more Team Damage changes coming in the next patch.)
- (bug fix) Medium now has a standard loadout of 12 grenades in the grenade launcher instead of 10. Light: 10; Medium: 12; Heavy: 15.
- (bug fix) Deployable pulse sensors now have a range of 150m instead of 120m to make them a more attractive option to deploy.
- (bug fix) Fixed an indoor turret proximity bug introduced in the last patch.
- (improvement) Flag captures are now worth 100 points (for the team), instead of 1 point. Additionally, each time someone grabs the flag *from the enemy flag stand* they will gain 1 point (for the team), regardless of whether they actually capture it or not. You will ONLY get this single point if the flag was actually on the flagstand. You will NOT get the point by touching the flag anywhere else on the field. This change will help prevent tie situations and will reward aggressive offensive play.
NOTE: The "touch" point can only be gained once every 20 seconds...so a "scrum" around the flag base will not result in a large group of points being gained.
- (improvement) Siege: Alcatraz. The generators have been moved around a bit. There are two entrances to that base. One is the "front door" and the other is the "back door". (The back door is the one that has a team-pass-only force field blocking enemies from the switch room.) There is now an upper generator down the chute from the "front door" that powers the "back door" force field. Additionally, there is a solar panel outside that powers the base turrets and sentry turrets. None of these generators have to be destroyed to get to the switch, but their destruction makes it MUCH easier to do so. There are four generators total on this map (all are waypointed now), and the destruction of all four is necessary before the base power will go down.
- (improvement) Siege: Caldera. The generator has been moved out of the switch room and into the very big main room that has the inventory stations in it. It is no longer necessary to destroy the generators in a particular sequence. Destroying the two main generators (Primary and Secondary) will drop the force field that protects the switch. Both gens must be down in order for the switch force field to drop.
- (improvement) Added "quickbuy" keyboard shortcuts to use at vehicle station. (Default keys are the 1-6 number keys. 1 is the top vehicle on the list, 6 is the bottom vehicle on the list).
NOTE: These key bindings are not currently editable. However, since you are on the vehicle purchase pad when they are in effect, they cannot interfere with any custom keys you've created, so you should have no problems.
- (improvement) Team Damage ON/OFF can be changed by Admins/SuperAdmins as well as being voted on by players. If you are an Admin or SuperAdmin, then just go to Lobby and look up where the "Vote" options are listed. There are options there to toggle the Team Damage flag. Regular players can also Vote to Enable/Disable Team Damage in the same spot.
- (improvement) Default server prefs have been changed so that the default time limit is now 30 minutes (instead of 20) and Team Damage is OFF.
- (improvement) Fixed buddy filter. You can now use the Filter option on the JOIN screen to find games that have players in them that are listed on your buddy list. (Use the Email or Warrior Browser functions to add/remove people from your buddy list.)
NOTE: We feel that there is an issue that may be related to NAT (Network Address Translation). Sierra QA uses public IP addresses on it's internal network that are not routable on the Internet. They experience a problem that occurs when anyone inside their firewall uses the Internet for anything, their internal address is "changed" to a legal external address. In their case, they use "many to one" NAT, so everyone appears to be the same address outside our walls. This issue prevents Sierra QA from seeing "buddies" that are on systems *inside* their firewall (they can see "buddies" on external servers just fine). We are hypothesizing that it is NAT that is causing the buddy list lookup to fail internally. We are continuing to work on this.
ALSO NOTE: This feature works correctly for everyone else.
- (improvement) You can now add a player to your server admin lists (so that server admins can auto-admin players when they join a server, if desired). How this is done: If you are a SuperAdmin (owner of the server), you can go into the lobby and right-click on a player's name. You will then have the ability to add them to your Admin or SuperAdmin lists.
- (improvement) Master Server list no longer insists on keeping your current game highlighted while refreshing a query. This allows you to page up and down more easily on the list while it is refreshing.
- (improvement) Added "Team Damage ON/OFF" and "Windows/Linux" as options for creating new Server Filters.
- (improvement) Missile reticle is improved aesthetically. This is part 1 of 2 of the missile reticle changes. The second part will be in the next patch.
- (community) Made changes to Tribe Forums to make posting new topics work better with the current cache architecture.
- (community) Fixed buttons on Tribe/Warrior Browser to reflect visitors membership in tribe
- (community) Changed NEWS button on Tribe page to OPTIONS, added links to Tribe Forum, Tribe Public Chat and Tribe Private Chat.
- (community) Added "EMail" and "Add To Buddylist" options into the right click menu in the Chat Channel member list.
- (community) Changed layout of right click menu's in the Community for easier understandability.
- (community) Added Moderator functions to the T2 Community - allows post removal, ability to send warnings and execute ban's to the perp.
- (community) Added confirmation box to the News page on Submit News - explains purpose and requires yes/no.
- (community) Upgraded Forum Cache version
- (community) Added ability to Lock Topic for Moderators
- (community) Added locking for posts where Topic is already in cache.
- (community) Implemented a ban structure on the Database
- (community) Fixed DBProxy thread disconnections - removed blank error boxes.
- (community) Fixed bug in Blocking Email Senders
2017-07-18 03:16:06 +00:00
|
|
|
|
|
|
|
|
if(%obj.isPowered())
|
|
|
|
|
%data.onGainPowerEnabled(%obj);
|
|
|
|
|
Parent::onEnabled(%data, %obj, %prevState);
|
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).
2017-07-18 03:07:50 +00:00
|
|
|
}
|
|
|
|
|
|
2017-07-18 02:51:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//--------- Siege SCORING INIT ------------------
|
|
|
|
|
function SiegeGame::initGameVars(%game)
|
|
|
|
|
{
|
|
|
|
|
%game.SCORE_PER_SUICIDE = 0;
|
|
|
|
|
%game.SCORE_PER_TEAMKILL = 0;
|
|
|
|
|
%game.SCORE_PER_DEATH = 0;
|
|
|
|
|
|
|
|
|
|
%game.SCORE_PER_KILL = 0;
|
|
|
|
|
|
|
|
|
|
%game.SCORE_PER_TURRET_KILL = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SiegeGame::claimFlipflopResources(%game, %flipflop, %team)
|
|
|
|
|
{
|
|
|
|
|
// equipment shouldn't switch teams when flipflop is touched
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SiegeGame::missionLoadDone(%game)
|
|
|
|
|
{
|
|
|
|
|
//default version sets up teams - must be called first...
|
|
|
|
|
DefaultGame::missionLoadDone(%game);
|
|
|
|
|
|
|
|
|
|
//clear the scores
|
|
|
|
|
$teamScore[1] = 0;
|
|
|
|
|
$teamScore[2] = 0;
|
|
|
|
|
|
|
|
|
|
//decide which team is starting first
|
|
|
|
|
if (getRandom() > 0.5)
|
|
|
|
|
{
|
|
|
|
|
%game.offenseTeam = 1;
|
|
|
|
|
%defenseTeam = 2;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
%game.offenseTeam = 2;
|
|
|
|
|
%defenseTeam = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//send the message
|
|
|
|
|
messageAll('MsgSiegeStart', '\c2%1 is starting on offense', $teamName[%game.offenseTeam]);
|
|
|
|
|
|
|
|
|
|
//if the first offense team is team2, switch the object team designation
|
|
|
|
|
if (%game.offenseTeam == 2)
|
|
|
|
|
{
|
|
|
|
|
%group = nameToID("MissionGroup/Teams");
|
|
|
|
|
%group.swapTeams();
|
|
|
|
|
// search for vehicle pads also
|
|
|
|
|
%mcg = nameToID("MissionCleanup");
|
|
|
|
|
%mcg.swapVehiclePads();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//also ensure the objectives are all on the defending team
|
|
|
|
|
%objSet = nameToId("MissionCleanup/Objectives");
|
|
|
|
|
for(%j = 0; %j < %objSet.getCount(); %j++)
|
|
|
|
|
{
|
|
|
|
|
%obj = %objSet.getObject(%j);
|
|
|
|
|
%obj.team = %defenseTeam;
|
|
|
|
|
setTargetSensorGroup(%obj.getTarget(), %defenseTeam);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//indicate we're starting the game from the beginning...
|
|
|
|
|
%game.firstHalf = true;
|
|
|
|
|
%game.timeLimitMS = $Host::TimeLimit * 60 * 1000;
|
|
|
|
|
%game.secondHalfCountDown = false;
|
|
|
|
|
|
|
|
|
|
// save off turret bases' original barrels
|
|
|
|
|
%game.checkTurretBases();
|
|
|
|
|
|
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).
2017-07-18 03:07:50 +00:00
|
|
|
// add objective waypoints
|
|
|
|
|
%game.findObjectiveWaypoints();
|
|
|
|
|
|
2017-07-18 02:51:48 +00:00
|
|
|
MissionGroup.setupPositionMarkers(true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SiegeGame::checkTurretBases(%game)
|
|
|
|
|
{
|
|
|
|
|
%mGroup = nameToID("MissionGroup/Teams");
|
|
|
|
|
%mGroup.findTurretBase();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SimGroup::findTurretBase(%this)
|
|
|
|
|
{
|
|
|
|
|
for (%i = 0; %i < %this.getCount(); %i++)
|
|
|
|
|
%this.getObject(%i).findTurretBase();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function InteriorInstance::findTurretBase(%this)
|
|
|
|
|
{
|
|
|
|
|
// sorry, we're not looking for interiors
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function AIObjective::findTurretBase(%this)
|
|
|
|
|
{
|
|
|
|
|
// prevent console error spam
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function TSStatic::findTurretBase(%this)
|
|
|
|
|
{
|
|
|
|
|
// prevent console error spam
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function GameBase::findTurretBase(%this)
|
|
|
|
|
{
|
|
|
|
|
// apparently, the initialBarrel attribute gets overwritten whenever the
|
|
|
|
|
// barrel gets replaced. :( So we have to save it again under "originalBarrel".
|
|
|
|
|
if(%this.getDatablock().getName() $= "TurretBaseLarge")
|
|
|
|
|
%this.originalBarrel = %this.initialBarrel;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function TSStatic::findTurretBase(%this)
|
|
|
|
|
{
|
|
|
|
|
// prevent console error spam
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SiegeGame::selectSpawnSphere(%game, %team)
|
|
|
|
|
{
|
|
|
|
|
//for siege, the team1 drops are offense, team2 drops are defense
|
|
|
|
|
%sphereTeam = %game.offenseTeam == %team ? 1 : 2;
|
|
|
|
|
|
|
|
|
|
return DefaultGame::selectSpawnSphere(%game, %sphereTeam);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SiegeGame::startMatch(%game)
|
|
|
|
|
{
|
|
|
|
|
DefaultGame::startMatch( %game );
|
|
|
|
|
|
|
|
|
|
%game.startTimeMS = getSimTime();
|
|
|
|
|
|
|
|
|
|
// schedule first timeLimit check for 20 seconds
|
|
|
|
|
%game.timeSync = %game.schedule( 20000, "checkTimeLimit");
|
|
|
|
|
%game.timeThread = %game.schedule( %game.timeLimitMS, "timeLimitReached");
|
|
|
|
|
//updateClientTimes(%game.timeLimitMS);
|
|
|
|
|
messageAll('MsgSystemClock', "", $Host::TimeLimit, %game.timeLimitMS);
|
|
|
|
|
|
|
|
|
|
//make sure the AI is started
|
|
|
|
|
AISystemEnabled(true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SiegeGame::allObjectivesCompleted(%game)
|
|
|
|
|
{
|
|
|
|
|
Cancel( %game.timeSync );
|
|
|
|
|
Cancel( %game.timeThread );
|
|
|
|
|
cancelEndCountdown();
|
|
|
|
|
|
|
|
|
|
//store the elapsed time in the teamScore array...
|
|
|
|
|
$teamScore[%game.offenseTeam] = getSimTime() - %game.startTimeMS;
|
|
|
|
|
messageAll('MsgSiegeCaptured', '\c2%1 captured the base in %2!', $teamName[%game.offenseTeam], %game.formatTime($teamScore[%game.offenseTeam], true));
|
|
|
|
|
|
|
|
|
|
//set the new timelimit
|
|
|
|
|
%game.timeLimitMS = $teamScore[%game.offenseTeam];
|
|
|
|
|
|
|
|
|
|
if (%game.firstHalf)
|
|
|
|
|
{
|
|
|
|
|
// it's halftime, let everyone know
|
|
|
|
|
messageAll('MsgSiegeSwitchSides', "");
|
|
|
|
|
CenterPrintAll( "Switching Sides", 3 );
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
// game is over
|
|
|
|
|
messageAll('MsgSiegeMisDone', '\c2Mission complete.');
|
|
|
|
|
}
|
|
|
|
|
logEcho("objective completed in "@%game.timeLimitMS);
|
|
|
|
|
|
|
|
|
|
//setup the second half...
|
|
|
|
|
// MES -- per MarkF, scheduling for 0 seconds will prevent player deletion-related crashes
|
|
|
|
|
%game.schedule(0, halftime, 'objectives');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SiegeGame::timeLimitReached(%game)
|
|
|
|
|
{
|
|
|
|
|
cancel( %game.timeThread );
|
|
|
|
|
cancel( %game.timeSync );
|
|
|
|
|
|
|
|
|
|
// if time has run out, the offense team gets no score (note, %game.timeLimitMS doesn't change)
|
|
|
|
|
$teamScore[%game.offenseTeam] = 0;
|
|
|
|
|
messageAll('MsgSiegeFailed', '\c2%1 failed to capture the base.', $teamName[%game.offenseTeam]);
|
|
|
|
|
|
|
|
|
|
if (%game.firstHalf)
|
|
|
|
|
{
|
|
|
|
|
// it's halftime, let everyone know
|
|
|
|
|
CenterPrintAll( "Switching Sides", 3 );
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
// game is over
|
|
|
|
|
messageAll('MsgSiegeMisDone', '\c2Mission complete.');
|
|
|
|
|
}
|
|
|
|
|
logEcho("time limit reached");
|
|
|
|
|
%game.halftime('time');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SiegeGame::checkTimeLimit(%game)
|
|
|
|
|
{
|
|
|
|
|
//if we're counting down to the beginning of the second half, check back in
|
|
|
|
|
if (%game.secondHalfCountDown)
|
|
|
|
|
{
|
|
|
|
|
%game.timeSync = %game.schedule(1000, "checkTimeLimit");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
%timeElapsedMS = getSimTime() - %game.startTimeMS;
|
|
|
|
|
%curTimeLeftMS = %game.timeLimitMS - %timeElapsedMS;
|
|
|
|
|
|
|
|
|
|
if (%curTimeLeftMS <= 0)
|
|
|
|
|
{
|
|
|
|
|
// time's up, put down your pencils
|
|
|
|
|
%game.timeLimitReached();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if(%curTimeLeftMS >= 20000)
|
|
|
|
|
%game.timeSync = %game.schedule( 20000, "checkTimeLimit" );
|
|
|
|
|
else
|
|
|
|
|
%game.timeSync = %game.schedule( %curTimeLeftMS + 1, "checkTimeLimit" );
|
|
|
|
|
|
|
|
|
|
//now synchronize everyone's clock
|
|
|
|
|
messageAll('MsgSystemClock', "", $Host::TimeLimit, %curTimeLeftMS);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SiegeGame::startSecondHalf(%game)
|
|
|
|
|
{
|
|
|
|
|
$MatchStarted = true;
|
|
|
|
|
%game.secondHalfCountDown = false;
|
|
|
|
|
|
|
|
|
|
MessageAll('MsgMissionStart', "\c2Match started");
|
|
|
|
|
|
|
|
|
|
// set the start time.
|
|
|
|
|
//the new %game.timeLimitMS would have been set by timeLimitReached() or allObjectivesCompleted()
|
|
|
|
|
%game.startTimeMS = getSimTime();
|
|
|
|
|
|
|
|
|
|
%game.timeThread = %game.schedule(%game.timeLimitMS, "timeLimitReached");
|
|
|
|
|
if (%game.timeLimitMS > 20000)
|
|
|
|
|
%game.timeSync = %game.schedule(20000, "checkTimeLimit");
|
|
|
|
|
else
|
|
|
|
|
%game.timeSync = %game.schedule(%game.timeLimitMS, "checkTimeLimit");
|
|
|
|
|
logEcho("start second half");
|
|
|
|
|
|
|
|
|
|
EndCountdown(%game.timeLimitMS);
|
|
|
|
|
|
|
|
|
|
// set all clients control to their player
|
|
|
|
|
%count = ClientGroup.getCount();
|
|
|
|
|
for( %i = 0; %i < %count; %i++ )
|
|
|
|
|
{
|
|
|
|
|
%cl = ClientGroup.getObject(%i);
|
|
|
|
|
if (!isObject(%cl.player))
|
|
|
|
|
commandToClient(%cl, 'setHudMode', 'Observer');
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
%cl.observerMode = "";
|
|
|
|
|
%cl.setControlObject( %cl.player );
|
|
|
|
|
commandToClient(%cl, 'setHudMode', 'Standard');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//now synchronize everyone's clock
|
|
|
|
|
updateClientTimes(%game.timeLimitMS);
|
|
|
|
|
|
|
|
|
|
//start the bots up again...
|
|
|
|
|
AISystemEnabled(true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SiegeGame::halftime(%game, %reason)
|
|
|
|
|
{
|
|
|
|
|
//stop the game and the bots
|
|
|
|
|
$MatchStarted = false;
|
|
|
|
|
AISystemEnabled(false);
|
|
|
|
|
|
|
|
|
|
if (%game.firstHalf)
|
|
|
|
|
{
|
|
|
|
|
//switch the game variables
|
|
|
|
|
%game.firstHalf = false;
|
|
|
|
|
if (%game.offenseTeam == 1)
|
|
|
|
|
%game.offenseTeam = 2;
|
|
|
|
|
else
|
|
|
|
|
%game.offenseTeam = 1;
|
|
|
|
|
|
|
|
|
|
//send the message
|
|
|
|
|
messageAll('MsgSiegeRolesSwitched', '\c2%1 is now on offense.', $teamName[%game.offenseTeam], %game.offenseTeam);
|
|
|
|
|
|
|
|
|
|
//reset stations and vehicles that players were using
|
|
|
|
|
%game.resetPlayers();
|
|
|
|
|
// zero out the counts for deployable items (found in defaultGame.cs)
|
|
|
|
|
%game.clearDeployableMaxes();
|
|
|
|
|
|
|
|
|
|
// clean up the MissionCleanup group - note, this includes deleting all the player objects
|
|
|
|
|
%clean = nameToID("MissionCleanup");
|
|
|
|
|
%clean.housekeeping();
|
|
|
|
|
|
|
|
|
|
// Non static objects placed in original position
|
|
|
|
|
resetNonStaticObjPositions();
|
|
|
|
|
|
|
|
|
|
// switch the teams for objects belonging to the teams
|
|
|
|
|
%group = nameToID("MissionGroup/Teams");
|
|
|
|
|
%group.swapTeams();
|
|
|
|
|
// search for vehicle pads also
|
|
|
|
|
%mcg = nameToID("MissionCleanup");
|
|
|
|
|
%mcg.swapVehiclePads();
|
|
|
|
|
|
|
|
|
|
//restore the objects
|
|
|
|
|
%game.restoreObjects();
|
|
|
|
|
|
|
|
|
|
%count = ClientGroup.getCount();
|
|
|
|
|
for(%cl = 0; %cl < %count; %cl++)
|
|
|
|
|
{
|
|
|
|
|
%client = ClientGroup.getObject(%cl);
|
|
|
|
|
if( !%client.isAIControlled() )
|
|
|
|
|
{
|
|
|
|
|
clientResetTargets(%client, true);
|
|
|
|
|
%client.notReady = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// drop all players into mission
|
|
|
|
|
%game.dropPlayers();
|
|
|
|
|
|
|
|
|
|
//setup the AI for the second half
|
|
|
|
|
%game.aiHalfTime();
|
|
|
|
|
|
|
|
|
|
// start the mission again (release players)
|
|
|
|
|
%game.halfTimeCountDown($Host::warmupTime);
|
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).
2017-07-18 03:07:50 +00:00
|
|
|
|
|
|
|
|
//redo the objective waypoints
|
|
|
|
|
%game.findObjectiveWaypoints();
|
2017-07-18 02:51:48 +00:00
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
// let's wrap it all up
|
|
|
|
|
%game.gameOver();
|
|
|
|
|
cycleMissions();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SiegeGame::dropPlayers( %game )
|
|
|
|
|
{
|
|
|
|
|
%count = ClientGroup.getCount();
|
|
|
|
|
for(%cl = 0; %cl < %count; %cl++)
|
|
|
|
|
{
|
|
|
|
|
%client = ClientGroup.getObject(%cl);
|
|
|
|
|
if( !%client.isAIControlled() )
|
|
|
|
|
{
|
|
|
|
|
// keep observers in observer mode
|
|
|
|
|
if(%client.team == 0)
|
|
|
|
|
%client.camera.getDataBlock().setMode(%client.camera, "justJoined");
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
%game.spawnPlayer( %client, false );
|
|
|
|
|
|
|
|
|
|
%client.camera.getDataBlock().setMode( %client.camera, "pre-game", %client.player );
|
|
|
|
|
%client.setControlObject( %client.camera );
|
|
|
|
|
%client.notReady = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SiegeGame::resetPlayers(%game)
|
|
|
|
|
{
|
|
|
|
|
// go through the client group and reset anything the players were using
|
|
|
|
|
// is most of this stuff really necessary?
|
|
|
|
|
%count = ClientGroup.getCount();
|
|
|
|
|
for(%cl = 0; %cl < %count; %cl++)
|
|
|
|
|
{
|
|
|
|
|
%client = ClientGroup.getObject(%cl);
|
|
|
|
|
%player = %client.player;
|
|
|
|
|
|
|
|
|
|
// clear the pack icon
|
|
|
|
|
messageClient(%client, 'msgPackIconOff', "");
|
|
|
|
|
// if player was firing, stop firing
|
|
|
|
|
if(%player.getImageTrigger($WeaponSlot))
|
|
|
|
|
%player.setImageTrigger($WeaponSlot, false);
|
|
|
|
|
|
|
|
|
|
// if player had pack activated, deactivate it
|
|
|
|
|
if(%player.getImageTrigger($BackpackSlot))
|
|
|
|
|
%player.setImageTrigger($BackpackSlot, false);
|
|
|
|
|
|
|
|
|
|
// if player was in a vehicle, get rid of vehicle hud
|
|
|
|
|
commandToClient(%client, 'setHudMode', 'Standard', "", 0);
|
|
|
|
|
|
|
|
|
|
// clear player's weapons and inventory huds
|
|
|
|
|
%client.SetWeaponsHudClearAll();
|
|
|
|
|
%client.SetInventoryHudClearAll();
|
|
|
|
|
|
|
|
|
|
// if player was at a station, deactivate it
|
|
|
|
|
if(%player.station)
|
|
|
|
|
{
|
|
|
|
|
%player.station.triggeredBy = "";
|
|
|
|
|
%player.station.getDataBlock().stationTriggered(%player.station, 0);
|
|
|
|
|
if(%player.armorSwitchSchedule)
|
|
|
|
|
cancel(%player.armorSwitchSchedule);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// if piloting a vehicle, reset it (assuming it doesn't get deleted)
|
|
|
|
|
if(%player.lastVehicle.lastPilot)
|
|
|
|
|
%player.lastVehicle.lastPilot = "";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SimGroup::housekeeping(%this)
|
|
|
|
|
{
|
|
|
|
|
// delete selectively in the MissionCleanup group
|
|
|
|
|
%count = %this.getCount();
|
|
|
|
|
// have to do this backwards or only half the objects will be deleted
|
|
|
|
|
for(%i = (%count - 1); %i > -1; %i--)
|
|
|
|
|
{
|
|
|
|
|
%detritus = %this.getObject(%i);
|
|
|
|
|
if(%detritus.getClassName() $= "SimSet")
|
|
|
|
|
{
|
|
|
|
|
// I don't think there are any simsets we want to delete
|
|
|
|
|
}
|
|
|
|
|
else if(%detritus.getName() $= "PZones")
|
|
|
|
|
{
|
|
|
|
|
// simgroup of physical zones for force fields
|
|
|
|
|
// don't delete them
|
|
|
|
|
}
|
|
|
|
|
//else if (%detritus.getClassName() $= "ScriptObject")
|
|
|
|
|
//{
|
|
|
|
|
// // this will be the game type object.
|
|
|
|
|
// // DEFINITELY don't want to delete this.
|
|
|
|
|
//}
|
|
|
|
|
else if(%detritus.getName() $= PosMarker)
|
|
|
|
|
{
|
|
|
|
|
//Needed to reset non static objects...
|
|
|
|
|
}
|
|
|
|
|
else if((%detritus.getName() $= "TeamDrops1") || (%detritus.getName() $= "TeamDrops2"))
|
|
|
|
|
{
|
|
|
|
|
// this will actually be a SimSet named TeamDropsN (1 or 2)
|
|
|
|
|
// don't want to delete the spawn sphere groups, so do nothing
|
|
|
|
|
}
|
|
|
|
|
else if (%detritus.getName() $= "PlayerListGroup")
|
|
|
|
|
{
|
|
|
|
|
// we don't want to delete PlayerListGroup (SimGroup)
|
|
|
|
|
}
|
|
|
|
|
else if (%detritus.getDatablock().getName() $= "stationTrigger")
|
|
|
|
|
{
|
|
|
|
|
//we don't want to delete triggers for stations
|
|
|
|
|
}
|
|
|
|
|
else if (%detritus.getDatablock().getName() $= "StationVehicle")
|
|
|
|
|
{
|
|
|
|
|
// vehicle stations automatically get placed in MissionCleanup in a
|
|
|
|
|
// position near the vehicle pad. Don't delete it.
|
|
|
|
|
}
|
|
|
|
|
else if (%detritus.getClassName() $= "Camera")
|
|
|
|
|
{
|
|
|
|
|
// Cameras should NOT be deleted
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
// this group of stuff to be deleted should include:
|
|
|
|
|
// mines, deployed objects, projectiles, explosions, corpses,
|
|
|
|
|
// players, and the like.
|
|
|
|
|
%detritus.delete();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SiegeGame::groupSwapTeams(%game, %this)
|
|
|
|
|
{
|
|
|
|
|
for(%i = 0; %i < %this.getCount(); %i++)
|
|
|
|
|
%this.getObject(%i).swapTeams();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SiegeGame::objectSwapTeams(%game, %this)
|
|
|
|
|
{
|
|
|
|
|
%defTeam = %game.offenseTeam == 1 ? 2 : 1;
|
|
|
|
|
|
|
|
|
|
if(%this.getDatablock().getName() $= "Flipflop")
|
|
|
|
|
{
|
|
|
|
|
if(getTargetSensorGroup(%this.getTarget()) != %defTeam)
|
|
|
|
|
{
|
|
|
|
|
setTargetSensorGroup(%this.getTarget(), %defTeam);
|
|
|
|
|
%this.team = %defTeam;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if(%this.getTarget() != -1)
|
|
|
|
|
{
|
|
|
|
|
if(getTargetSensorGroup(%this.getTarget()) == %game.offenseTeam)
|
|
|
|
|
{
|
|
|
|
|
setTargetSensorGroup(%this.getTarget(), %defTeam);
|
|
|
|
|
%this.team = %defTeam;
|
|
|
|
|
}
|
|
|
|
|
else if(getTargetSensorGroup(%this.getTarget()) == %defTeam)
|
|
|
|
|
{
|
|
|
|
|
setTargetSensorGroup(%this.getTarget(), %game.offenseTeam);
|
|
|
|
|
%this.team = %game.offenseTeam;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(%this.getClassName() $= "Waypoint")
|
|
|
|
|
{
|
|
|
|
|
if(%this.team == %defTeam)
|
|
|
|
|
%this.team = %game.offenseTeam;
|
|
|
|
|
else if(%this.team == %game.offenseTeam)
|
|
|
|
|
%this.team = %defTeam;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SiegeGame::groupSwapVehiclePads(%game, %this)
|
|
|
|
|
{
|
|
|
|
|
for(%i = 0; %i < %this.getCount(); %i++)
|
|
|
|
|
%this.getObject(%i).swapVehiclePads();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SiegeGame::objectSwapVehiclePads(%game, %this)
|
|
|
|
|
{
|
|
|
|
|
%defTeam = %game.offenseTeam == 1 ? 2 : 1;
|
|
|
|
|
|
|
|
|
|
if(%this.getDatablock().getName() $= "StationVehicle")
|
|
|
|
|
{
|
|
|
|
|
if(%this.getTarget() != -1)
|
|
|
|
|
{
|
|
|
|
|
// swap the teams of both the vehicle pad and the vehicle station
|
|
|
|
|
if(getTargetSensorGroup(%this.getTarget()) == %game.offenseTeam)
|
|
|
|
|
{
|
|
|
|
|
setTargetSensorGroup(%this.getTarget(), %defTeam);
|
|
|
|
|
%this.team = %defTeam;
|
|
|
|
|
setTargetSensorGroup(%this.pad.getTarget(), %defTeam);
|
|
|
|
|
%this.pad.team = %defTeam;
|
|
|
|
|
}
|
|
|
|
|
else if(getTargetSensorGroup(%this.getTarget()) == %defTeam)
|
|
|
|
|
{
|
|
|
|
|
setTargetSensorGroup(%this.getTarget(), %game.offenseTeam);
|
|
|
|
|
%this.team = %game.offenseTeam;
|
|
|
|
|
setTargetSensorGroup(%this.pad.getTarget(), %game.offenseTeam);
|
|
|
|
|
%this.pad.team = %game.offenseTeam;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SiegeGame::restoreObjects(%game)
|
|
|
|
|
{
|
|
|
|
|
// restore all the "permanent" mission objects to undamaged state
|
|
|
|
|
%group = nameToID("MissionGroup/Teams");
|
|
|
|
|
// SimGroup::objectRestore is defined in DefaultGame.cs -- it simply calls
|
|
|
|
|
// %game.groupObjectRestore
|
|
|
|
|
%group.objectRestore();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SiegeGame::groupObjectRestore(%game, %this)
|
|
|
|
|
{
|
|
|
|
|
for(%i = 0; %i < %this.getCount(); %i++)
|
|
|
|
|
%this.getObject(%i).objectRestore();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SiegeGame::shapeObjectRestore(%game, %object)
|
|
|
|
|
{
|
|
|
|
|
//if(%object.getDatablock().getName() $= FlipFlop)
|
|
|
|
|
//{
|
|
|
|
|
// messageAll('MsgSiegeObjRestore', "", %object.number, true);
|
|
|
|
|
//}
|
|
|
|
|
//else if(%object.getDamageLevel())
|
|
|
|
|
if(%object.getDamageLevel())
|
|
|
|
|
{
|
|
|
|
|
%object.setDamageLevel(0.0);
|
|
|
|
|
%object.setDamageState(Enabled);
|
|
|
|
|
}
|
|
|
|
|
if(%object.getDatablock().getName() $= "TurretBaseLarge")
|
|
|
|
|
{
|
|
|
|
|
// check to see if the turret base still has the same type of barrel it had
|
|
|
|
|
// at the beginning of the mission
|
|
|
|
|
if(%object.getMountedImage(0))
|
|
|
|
|
if(%object.getMountedImage(0).getName() !$= %object.originalBarrel)
|
|
|
|
|
{
|
|
|
|
|
// pop the "new" barrel
|
|
|
|
|
%object.unmountImage(0);
|
|
|
|
|
// mount the original barrel
|
|
|
|
|
%object.mountImage(%object.originalBarrel, 0, false);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function InteriorInstance::objectRestore(%this)
|
|
|
|
|
{
|
|
|
|
|
// avoid console error spam
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function Trigger::objectRestore(%this)
|
|
|
|
|
{
|
|
|
|
|
// avoid console error spam
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function TSStatic::objectRestore(%this)
|
|
|
|
|
{
|
|
|
|
|
// avoid console error spam
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function ForceFieldBare::objectRestore(%this)
|
|
|
|
|
{
|
|
|
|
|
// avoid console error spam
|
|
|
|
|
}
|
|
|
|
|
|
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).
2017-07-18 03:07:50 +00:00
|
|
|
// ------------------------------------------------------------------------
|
|
|
|
|
// 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;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-07-18 02:51:48 +00:00
|
|
|
function SiegeGame::gameOver(%game)
|
|
|
|
|
{
|
|
|
|
|
//call the default
|
|
|
|
|
DefaultGame::gameOver(%game);
|
|
|
|
|
|
|
|
|
|
cancel(%game.timeThread);
|
|
|
|
|
|
|
|
|
|
messageAll('MsgClearObjHud', "");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SiegeGame::sendDebriefing( %game, %client )
|
|
|
|
|
{
|
|
|
|
|
//if neither team captured
|
|
|
|
|
%winnerName = "";
|
|
|
|
|
if ( $teamScore[1] == 0 && $teamScore[2] == 0 )
|
|
|
|
|
%winner = -1;
|
|
|
|
|
|
|
|
|
|
//else see if team1 won
|
|
|
|
|
else if ( $teamScore[1] > 0 && ( $teamScore[2] == 0 || $teamScore[1] < $teamScore[2] ) )
|
|
|
|
|
{
|
|
|
|
|
%winner = 1;
|
|
|
|
|
%winnerName = $teamName[1];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//else see if team2 won
|
|
|
|
|
else if ($teamScore[2] > 0 && ($teamScore[1] == 0 || $teamScore[2] < $teamScore[1]))
|
|
|
|
|
{
|
|
|
|
|
%winner = 2;
|
|
|
|
|
%winnerName = $teamName[2];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//else see if it was a tie (right down to the millisecond - doubtful)
|
|
|
|
|
else if ($teamScore[1] == $teamScore[2])
|
|
|
|
|
%winner = 0;
|
|
|
|
|
|
|
|
|
|
//send the winner message
|
|
|
|
|
if (%winnerName $= 'Storm')
|
|
|
|
|
messageClient( %client, 'MsgGameOver', "Match has ended.~wvoice/announcer/ann.stowins.wav" );
|
|
|
|
|
else if (%winnerName $= 'Inferno')
|
|
|
|
|
messageClient( %client, 'MsgGameOver', "Match has ended.~wvoice/announcer/ann.infwins.wav" );
|
|
|
|
|
else
|
|
|
|
|
messageClient( %client, 'MsgGameOver', "Match has ended.~wvoice/announcer/ann.gameover.wav" );
|
|
|
|
|
|
|
|
|
|
// Mission result:
|
|
|
|
|
if (%winner > 0)
|
|
|
|
|
{
|
|
|
|
|
if (%winner == 1)
|
|
|
|
|
{
|
|
|
|
|
if ($teamScore[2] == 0)
|
|
|
|
|
messageClient(%client, 'MsgDebriefResult', "", '<just:center>%1 wins!', $TeamName[1]);
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
%timeDiffMS = $teamScore[2] - $teamScore[1];
|
|
|
|
|
messageClient(%client, 'MsgDebriefResult', "", '<just:center>%1 won by capturing the base %2 faster!', $TeamName[1], %game.formatTime(%timeDiffMS, true));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if ($teamScore[1] == 0)
|
|
|
|
|
messageClient(%client, 'MsgDebriefResult', "", '<just:center>%1 wins!', $TeamName[2]);
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
%timeDiffMS = $teamScore[1] - $teamScore[2];
|
|
|
|
|
messageClient(%client, 'MsgDebriefResult', "", '<just:center>%1 won by capturing the base %2 faster!', $TeamName[2], %game.formatTime(%timeDiffMS, true));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
messageClient( %client, 'MsgDebriefResult', "", '<just:center>The mission ended in a tie.' );
|
|
|
|
|
|
|
|
|
|
// Game summary:
|
|
|
|
|
messageClient( %client, 'MsgDebriefAddLine', "", '<spush><color:00dc00><font:univers condensed:18>SUMMARY:<spop>' );
|
|
|
|
|
if ( $teamScore[1] > 0 )
|
|
|
|
|
{
|
|
|
|
|
%timeStr = %game.formatTime($teamScore[1], true);
|
|
|
|
|
messageClient( %client, 'MsgDebriefAddLine', "", '<tab:5>\t%1 captured the base in %2.', $TeamName[1], %timeStr);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
messageClient( %client, 'MsgDebriefAddLine', "", '<tab:5>\t%1 failed to capture the base.', $TeamName[1]);
|
|
|
|
|
|
|
|
|
|
if ( $teamScore[2] > 0 )
|
|
|
|
|
{
|
|
|
|
|
%timeStr = %game.formatTime($teamScore[2], true);
|
|
|
|
|
messageClient( %client, 'MsgDebriefAddLine', "", '<tab:5>\t%1 captured the base in %2.', $TeamName[2], %timeStr);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
messageClient( %client, 'MsgDebriefAddLine', "", '<tab:5>\t%1 failed to capture the base.', $TeamName[2]);
|
|
|
|
|
|
|
|
|
|
// List out the team rosters:
|
|
|
|
|
messageClient( %client, 'MsgDebriefAddLine', "", '\n<tab:130><spush><color:00dc00><font:univers condensed:18>%1\t%2<spop>', $TeamName[1], $TeamName[2] );
|
|
|
|
|
%max = $TeamRank[1, count] > $TeamRank[2, count] ? $TeamRank[1, count] : $TeamRank[2, count];
|
|
|
|
|
for ( %line = 0; %line < %max; %line++ )
|
|
|
|
|
{
|
|
|
|
|
%plyr1 = $TeamRank[1, %line] $= "" ? "" : $TeamRank[1, %line].name;
|
|
|
|
|
%plyr2 = $TeamRank[2, %line] $= "" ? "" : $TeamRank[2, %line].name;
|
|
|
|
|
messageClient( %client, 'MsgDebriefAddLine', "", '<tab:5,135><clip:130>\t%1</clip>\t%2', %plyr1, %plyr2 );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Show observers:
|
|
|
|
|
%count = ClientGroup.getCount();
|
|
|
|
|
%header = false;
|
|
|
|
|
for ( %i = 0; %i < %count; %i++ )
|
|
|
|
|
{
|
|
|
|
|
%cl = ClientGroup.getObject( %i );
|
|
|
|
|
if ( %cl.team <= 0 )
|
|
|
|
|
{
|
|
|
|
|
if ( !%header )
|
|
|
|
|
{
|
|
|
|
|
messageClient( %client, 'MsgDebriefAddLine', "", '\n<spush><color:00dc00><font:univers condensed:18>OBSERVERS<spop>' );
|
|
|
|
|
%header = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
messageClient( %client, 'MsgDebriefAddLine', "", '<tab:5>\t%1', %cl.name );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SiegeGame::clientMissionDropReady(%game, %client)
|
|
|
|
|
{
|
|
|
|
|
messageClient(%client, 'MsgClientReady', "", %game.class);
|
|
|
|
|
|
|
|
|
|
for(%i = 1; %i <= %game.numTeams; %i++)
|
|
|
|
|
{
|
|
|
|
|
%isOffense = (%i == %game.offenseTeam);
|
|
|
|
|
messageClient(%client, 'MsgSiegeAddTeam', "", %i, $teamName[%i], %isOffense);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
messageClient(%client, 'MsgMissionDropInfo', '\c0You are in mission %1 (%2).', $MissionDisplayName, $MissionTypeDisplayName, $ServerName );
|
|
|
|
|
DefaultGame::clientMissionDropReady(%game, %client);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SiegeGame::assignClientTeam(%game, %client, %respawn)
|
|
|
|
|
{
|
|
|
|
|
DefaultGame::assignClientTeam(%game, %client, %respawn);
|
|
|
|
|
// if player's team is not on top of objective hud, switch lines
|
|
|
|
|
messageClient(%client, 'MsgCheckTeamLines', "", %client.team);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SiegeGame::resetScore(%game, %client)
|
|
|
|
|
{
|
|
|
|
|
%client.score = 0;
|
|
|
|
|
%client.kills = 0;
|
|
|
|
|
%client.deaths = 0;
|
2017-07-18 03:10:36 +00:00
|
|
|
%client.suicides = 0;
|
2017-07-18 02:51:48 +00:00
|
|
|
%client.objScore = 0;
|
|
|
|
|
%client.teamKills = 0;
|
|
|
|
|
%client.turretKills = 0;
|
|
|
|
|
%client.offenseScore = 0;
|
|
|
|
|
%client.defenseScore = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//--------------- Scoring functions -----------------
|
|
|
|
|
function SiegeGame::recalcScore(%game, %cl)
|
|
|
|
|
{
|
|
|
|
|
%killValue = %cl.kills * %game.SCORE_PER_KILL;
|
|
|
|
|
%deathValue = %cl.deaths * %game.SCORE_PER_DEATH;
|
|
|
|
|
|
|
|
|
|
if (%killValue - %deathValue == 0)
|
|
|
|
|
%killPoints = 0;
|
|
|
|
|
else
|
|
|
|
|
%killPoints = (%killValue * %killValue) / (%killValue - %deathValue);
|
|
|
|
|
|
|
|
|
|
%cl.offenseScore = %killPoints;
|
|
|
|
|
%cl.offenseScore += %cl.teamKills * %game.SCORE_PER_TEAMKILL; // -1
|
|
|
|
|
%cl.offenseScore += %cl.objScore;
|
|
|
|
|
|
|
|
|
|
%cl.defenseScore = %cl.turretKills * %game.SCORE_PER_TURRET_KILL; // 1
|
|
|
|
|
|
|
|
|
|
%cl.score = %cl.offenseScore + %cl.defenseScore;
|
|
|
|
|
%cl.score = mFloor(%cl.score);
|
|
|
|
|
%game.recalcTeamRanks(%cl);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SiegeGame::updateKillScores(%game, %clVictim, %clKiller, %damageType, %implement)
|
|
|
|
|
{
|
|
|
|
|
if(%game.testTurretKill(%implement)) //check for turretkill before awarded a non client points for a kill
|
|
|
|
|
{
|
|
|
|
|
%game.awardScoreTurretKill(%clVictim, %implement);
|
|
|
|
|
}
|
|
|
|
|
else if (%game.testKill(%clVictim, %clKiller)) //verify victim was an enemy
|
|
|
|
|
{
|
|
|
|
|
%game.awardScoreKill(%clKiller);
|
|
|
|
|
%game.awardScoreDeath(%clVictim);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (%game.testSuicide(%clVictim, %clKiller, %damageType)) //otherwise test for suicide
|
|
|
|
|
{
|
|
|
|
|
%game.awardScoreSuicide(%clVictim);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (%game.testTeamKill(%clVictim, %clKiller)) //otherwise test for a teamkill
|
|
|
|
|
%game.awardScoreTeamKill(%clVictim, %clKiller);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SiegeGame::testValidRepair(%game, %obj)
|
|
|
|
|
{
|
|
|
|
|
return ((%obj.lastDamagedByTeam != %obj.team) && (%obj.repairedBy.team == %obj.team));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SiegeGame::genOnRepaired(%game, %obj, %objName)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
if (%game.testValidRepair(%obj))
|
|
|
|
|
{
|
|
|
|
|
%repairman = %obj.repairedBy;
|
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).
2017-07-18 03:07:50 +00:00
|
|
|
messageTeam(%repairman.team, 'msgGenRepaired', '\c0%1 repaired the %2 generator!', %repairman.name, %obj.nameTag);
|
|
|
|
|
}
|
2017-07-18 02:51:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SiegeGame::stationOnRepaired(%game, %obj, %objName)
|
|
|
|
|
{
|
|
|
|
|
if (%game.testValidRepair(%obj))
|
|
|
|
|
{
|
|
|
|
|
%repairman = %obj.repairedBy;
|
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).
2017-07-18 03:07:50 +00:00
|
|
|
messageTeam(%repairman.team, 'msgStationRepaired', '\c0%1 repaired the %2 inventory station!', %repairman.name, %obj.nameTag);
|
2017-07-18 02:51:48 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SiegeGame::sensorOnRepaired(%game, %obj, %objName)
|
|
|
|
|
{
|
|
|
|
|
if (%game.testValidRepair(%obj))
|
|
|
|
|
{
|
|
|
|
|
%repairman = %obj.repairedBy;
|
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).
2017-07-18 03:07:50 +00:00
|
|
|
messageTeam(%repairman.team, 'msgSensorRepaired', '\c0%1 repaired the %2 pulse sensor!', %repairman.name, %obj.nameTag);
|
2017-07-18 02:51:48 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SiegeGame::turretOnRepaired(%game, %obj, %objName)
|
|
|
|
|
{
|
|
|
|
|
if (%game.testValidRepair(%obj))
|
|
|
|
|
{
|
|
|
|
|
%repairman = %obj.repairedBy;
|
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).
2017-07-18 03:07:50 +00:00
|
|
|
messageTeam(%repairman.team, 'msgTurretRepaired', '\c0%1 repaired the %2 turret!', %repairman.name, %obj.nameTag);
|
2017-07-18 02:51:48 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SiegeGame::vStationOnRepaired(%game, %obj, %objName)
|
|
|
|
|
{
|
|
|
|
|
if (%game.testValidRepair(%obj))
|
|
|
|
|
{
|
|
|
|
|
%repairman = %obj.repairedBy;
|
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).
2017-07-18 03:07:50 +00:00
|
|
|
messageTeam(%repairman.team, 'msgTurretRepaired', '\c0%1 repaired the %2 vehicle station!', %repairman.name, %obj.nameTag);
|
2017-07-18 02:51:48 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SiegeGame::halfTimeCountDown(%game, %time)
|
|
|
|
|
{
|
|
|
|
|
%game.secondHalfCountDown = true;
|
|
|
|
|
$MatchStarted = false;
|
|
|
|
|
|
|
|
|
|
%timeMS = %time * 1000;
|
|
|
|
|
%game.schedule(%timeMS, "startSecondHalf");
|
|
|
|
|
notifyMatchStart(%timeMS);
|
|
|
|
|
|
|
|
|
|
if(%timeMS > 30000)
|
|
|
|
|
schedule(%timeMS - 30000, 0, "notifyMatchStart", 30000);
|
|
|
|
|
if(%timeMS > 20000)
|
|
|
|
|
schedule(%timeMS - 20000, 0, "notifyMatchStart", 20000);
|
|
|
|
|
if(%timeMS > 10000)
|
|
|
|
|
schedule(%timeMS - 10000, 0, "notifyMatchStart", 10000);
|
|
|
|
|
if(%timeMS > 5000)
|
|
|
|
|
schedule(%timeMS - 5000, 0, "notifyMatchStart", 5000);
|
|
|
|
|
if(%timeMS > 4000)
|
|
|
|
|
schedule(%timeMS - 4000, 0, "notifyMatchStart", 4000);
|
|
|
|
|
if(%timeMS > 3000)
|
|
|
|
|
schedule(%timeMS - 3000, 0, "notifyMatchStart", 3000);
|
|
|
|
|
if(%timeMS > 2000)
|
|
|
|
|
schedule(%timeMS - 2000, 0, "notifyMatchStart", 2000);
|
|
|
|
|
if(%timeMS > 1000)
|
|
|
|
|
schedule(%timeMS - 1000, 0, "notifyMatchStart", 1000);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SiegeGame::applyConcussion(%game, %player)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SiegeGame::updateScoreHud(%game, %client, %tag)
|
|
|
|
|
{
|
|
|
|
|
%timeElapsedMS = getSimTime() - %game.startTimeMS;
|
|
|
|
|
%curTimeLeftMS = %game.timeLimitMS - %timeElapsedMS;
|
|
|
|
|
|
|
|
|
|
if (!$MatchStarted)
|
|
|
|
|
%curTimeLeftStr = %game.formatTime(%game.timelimitMS, false);
|
|
|
|
|
else
|
|
|
|
|
%curTimeLeftStr = %game.formatTime(%curTimeLeftMS, false);
|
|
|
|
|
|
|
|
|
|
// Send header:
|
|
|
|
|
if (%game.firstHalf)
|
|
|
|
|
messageClient( %client, 'SetScoreHudHeader', "", '<just:center>%1 has %2 to capture the base.',
|
|
|
|
|
$teamName[%game.offenseTeam], %curTimeLeftStr );
|
|
|
|
|
else
|
|
|
|
|
messageClient( %client, 'SetScoreHudHeader', "", '<just:center>%1 must capture the base within %2 to win.',
|
|
|
|
|
$teamName[%game.offenseTeam], %curTimeLeftStr );
|
|
|
|
|
|
|
|
|
|
// Send subheader:
|
|
|
|
|
messageClient( %client, 'SetScoreHudSubheader', "", '<tab:15,315>\t%1 (%2)\t%3 (%4)',
|
|
|
|
|
$TeamName[1], $TeamRank[1, count], $TeamName[2], $TeamRank[2, count] );
|
|
|
|
|
|
|
|
|
|
%index = 0;
|
|
|
|
|
while (true)
|
|
|
|
|
{
|
|
|
|
|
if (%index >= $TeamRank[1, count] && %index >= $TeamRank[2, count])
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
//get the team1 client info
|
|
|
|
|
%team1Client = "";
|
|
|
|
|
%team1ClientScore = "";
|
|
|
|
|
%col1Style = "";
|
|
|
|
|
if (%index < $TeamRank[1, count])
|
|
|
|
|
{
|
|
|
|
|
%team1Client = $TeamRank[1, %index];
|
|
|
|
|
%team1ClientScore = %team1Client.score $= "" ? 0 : %team1Client.score;
|
|
|
|
|
if ( %team1Client == %client )
|
|
|
|
|
%col1Style = "<color:dcdcdc>";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//get the team2 client info
|
|
|
|
|
%team2Client = "";
|
|
|
|
|
%team2ClientScore = "";
|
|
|
|
|
%col2Style = "";
|
|
|
|
|
if (%index < $TeamRank[2, count])
|
|
|
|
|
{
|
|
|
|
|
%team2Client = $TeamRank[2, %index];
|
|
|
|
|
%team2ClientScore = %team2Client.score $= "" ? 0 : %team2Client.score;
|
|
|
|
|
if ( %team2Client == %client )
|
|
|
|
|
%col2Style = "<color:dcdcdc>";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//if the client is not an observer, send the message
|
|
|
|
|
if (%client.team != 0)
|
|
|
|
|
{
|
|
|
|
|
messageClient( %client, 'SetLineHud', "", %tag, %index, '<tab:20,320>\t<spush>%3<clip:200>%1</clip><spop>\t%4<clip:200>%2</clip>',
|
|
|
|
|
%team1Client.name, %team2Client.name, %col1Style, %col2Style );
|
|
|
|
|
}
|
|
|
|
|
//else for observers, create an anchor around the player name so they can be observed
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
messageClient( %client, 'SetLineHud', "", %tag, %index, '<tab:20,320>\t<spush>%3<clip:200><a:gamelink\t%5>%1</a></clip><spop>\t%4<clip:200><a:gamelink\t%6>%2</a></clip>',
|
|
|
|
|
%team1Client.name, %team2Client.name, %col1Style, %col2Style, %team1Client, %team2Client );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
%index++;
|
|
|
|
|
}
|
|
|
|
|
|
2017-07-18 02:55:25 +00:00
|
|
|
// Tack on the list of observers:
|
|
|
|
|
%observerCount = 0;
|
|
|
|
|
for (%i = 0; %i < ClientGroup.getCount(); %i++)
|
|
|
|
|
{
|
|
|
|
|
%cl = ClientGroup.getObject(%i);
|
|
|
|
|
if (%cl.team == 0)
|
|
|
|
|
%observerCount++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (%observerCount > 0)
|
|
|
|
|
{
|
|
|
|
|
messageClient( %client, 'SetLineHud', "", %tag, %index, "");
|
|
|
|
|
%index++;
|
|
|
|
|
messageClient(%client, 'SetLineHud', "", %tag, %index, '<tab:10, 310><spush><font:Univers Condensed:22>\tOBSERVERS (%1)<rmargin:260><just:right>TIME<spop>', %observerCount);
|
|
|
|
|
%index++;
|
|
|
|
|
for (%i = 0; %i < ClientGroup.getCount(); %i++)
|
|
|
|
|
{
|
|
|
|
|
%cl = ClientGroup.getObject(%i);
|
|
|
|
|
//if this is an observer
|
|
|
|
|
if (%cl.team == 0)
|
|
|
|
|
{
|
|
|
|
|
%obsTime = getSimTime() - %cl.observerStartTime;
|
|
|
|
|
%obsTimeStr = %game.formatTime(%obsTime, false);
|
|
|
|
|
messageClient( %client, 'SetLineHud', "", %tag, %index, '<tab:20, 310>\t<clip:150>%1</clip><rmargin:260><just:right>%2',
|
|
|
|
|
%cl.name, %obsTimeStr );
|
|
|
|
|
%index++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-07-18 02:51:48 +00:00
|
|
|
//clear the rest of Hud so we don't get old lines hanging around...
|
|
|
|
|
messageClient( %client, 'ClearHud', "", %tag, %index );
|
|
|
|
|
}
|