mirror of
https://github.com/Ragora/TribesReplay.git
synced 2026-03-28 08:09:15 +00:00
v22649 (04/28/01):
- Fixed buddy filter. You can now use the Filter option on the JOIN screen to find games that have players in them that are listed on your buddy list. (Use the Email or Warrior Browser functions to add/remove people from your buddy list.) - You can now add a player to your server admin lists (so that server admins can auto-admin players when they join a server, if desired). How this is done: If you are a SuperAdmin (owner of the server), you can go into the lobby and right-click on a player's name. You will then have the ability to add them to your Admin or SuperAdmin lists. - "Vote Spamming" has been prevented in-game. - Added "quickbuy" keyboard shortcuts to use at vehicle station. (Default keys are the 1-6 number keys. 1 is Wildcat, 6 is Havoc). (NOTE: These key bindings are not currently editable. However, since you are on the vehicle purchase pad when they are in effect, they cannot interfere with any custom keys you've created, so you should have no problems.) - Moved some of the CD check from script into code, where it should be. - Missile reticle is improved aesthetically. This is part 1 of 2 of the missile reticle changes. The second part will be in the next patch. - Team Damage ON/OFF can be changed by Admins/SuperAdmins as well as being voted on by players. If you are an Admin or SuperAdmin, then just go to Lobby and look up where the "Vote" options are listed. There are options there to toggle the Team Damage flag. Regular players can also Vote to Enable/Disable Team Damage in the same spot. - Default server prefs have been changed so that the default time limit is now 30 minutes (instead of 20) and Team Damage is OFF. - The "sticking" mouse button problem is now fixed. - Deployables are now easier to place on walls and other surfaces. There were some inconsistencies on which surfaces could be placed upon and those are now resolved. - (gameplay change) Flag captures are now worth 100 points, instead of 1 point. Additionally, each time someone grabs the flag *from the enemy flag stand* they will gain 1 point, regardless of whether they actually capture it or not. You will ONLY get this single point if the flag was actually on the flagstand. You will NOT get the point by touching the flag anywhere else on the field. This change will help prevent tie situations and will reward aggressive offensive play. NOTE: The "touch" point can only be gained once every 20 seconds...so a "scrum" around the flag base will not result in a large group of points being gained. - (gameplay change) Deployable inventory stations can no longer be deployed directly next to each other. They must be at least 20 meters apart in order to be deployed properly. - (gameplay change) Many team damage fixes occurred. When Team Damage is OFF the following are now true: Friendly teammates are no longer prevented from destroying deployables. The ELF will no longer drain energy from friendly players. If a friendly player blinds another friendly player with Whiteout grenades, then a message is displayed in the Chat HUD so that the blinded person knows who did it. (There are more Team Damage changes coming in the next patch.) - (gameplay change) Medium now has a standard loadout of 12 grenades in the grenade launcher instead of 10. Light: 10; Medium: 12; Heavy: 15. - (gameplay change) Deployable pulse sensors now have a range of 150m instead of 120m to make them a more attractive option to deploy. - (gameplay change) Ejection speed increased slightly to more easily accomodate jumping out of moving vehicles. - (gameplay change) Siege: Alcatraz. The generators have been moved around a bit. There are two entrances to that base. One is the "front door" and the other is the "back door". (The back door is the one that has a team-pass-only force field blocking enemies from the switch room.) There is now an upper generator down the chute from the "front door" that powers the "back door" force field. Additionally, there is a solar panel outside that powers the base turrets and sentry turrets. None of these generators have to be destroyed to get to the switch, but their destruction makes it MUCH easier to do so. There are four generators total on this map (all are waypointed now), and the destruction of all four is necessary before the base power will go down. - (gameplay change) Siege: Caldera. The generator has been moved out of the switch room and into the very big main room that has the inventory stations in it. It is no longer necessary to destroy the generators in a particular sequence. Destroying the two main generators (Primary and Secondary) will drop the force field that protects the switch. Both gens must be down in order for the switch force field to drop.
This commit is contained in:
parent
116be1648d
commit
a7153c654d
49 changed files with 3968 additions and 2625 deletions
|
|
@ -1,7 +1,6 @@
|
|||
if($Host::TimeLimit $= "")
|
||||
$Host::TimeLimit = 20;
|
||||
|
||||
$teamDamage = 1;
|
||||
$SB::WODec = 0.004; // whiteout
|
||||
$SB::DFDec = 0.02; // damageFlash
|
||||
|
||||
|
|
@ -35,7 +34,7 @@ function CreateServer(%mission, %missionType)
|
|||
exec("scripts/turret.cs");
|
||||
exec("scripts/weapTurretCode.cs");
|
||||
exec("scripts/pack.cs");
|
||||
exec("scripts/vehicles/vehicle_spec_fx.cs"); // Must exist before other vehicle files or CRASH BOOM
|
||||
exec("scripts/vehicles/vehicle_spec_fx.cs"); // Must exist before other vehicle files or CRASH BOOM
|
||||
exec("scripts/vehicles/serverVehicleHud.cs");
|
||||
exec("scripts/vehicles/vehicle_shrike.cs");
|
||||
exec("scripts/vehicles/vehicle_bomber.cs");
|
||||
|
|
@ -43,7 +42,7 @@ function CreateServer(%mission, %missionType)
|
|||
exec("scripts/vehicles/vehicle_wildcat.cs");
|
||||
exec("scripts/vehicles/vehicle_tank.cs");
|
||||
exec("scripts/vehicles/vehicle_mpb.cs");
|
||||
exec("scripts/vehicles/vehicle.cs"); // Must be added after all other vehicle files or EVIL BAD THINGS
|
||||
exec("scripts/vehicles/vehicle.cs"); // Must be added after all other vehicle files or EVIL BAD THINGS
|
||||
exec("scripts/ai.cs");
|
||||
exec("scripts/item.cs");
|
||||
exec("scripts/station.cs");
|
||||
|
|
@ -69,7 +68,7 @@ function CreateServer(%mission, %missionType)
|
|||
for(%file = findFirstFile(%search); %file !$= ""; %file = findNextFile(%search))
|
||||
{
|
||||
%type = fileBase(%file); // get the name of the script
|
||||
exec("scripts/" @ %type @ ".cs");
|
||||
exec("scripts/" @ %type @ ".cs");
|
||||
}
|
||||
|
||||
$missionSequence = 0;
|
||||
|
|
@ -88,8 +87,19 @@ function CreateServer(%mission, %missionType)
|
|||
schedule(0,0,startHeartbeat);
|
||||
|
||||
// setup the bots for this server
|
||||
if( $Host::BotsEnabled )
|
||||
initGameBots( %mission, %missionType );
|
||||
|
||||
// load the mission...
|
||||
loadMission(%mission, %missionType, true);
|
||||
}
|
||||
|
||||
function initGameBots( %mission, %mType )
|
||||
{
|
||||
echo( "adding bots..." );
|
||||
|
||||
AISystemEnabled( false );
|
||||
if ( $HostGameBotCount > 0 && %missionType !$= "SinglePlayer" )
|
||||
if ( $Host::BotCount > 0 && %mType !$= "SinglePlayer" )
|
||||
{
|
||||
// Make sure this mission is bot enabled:
|
||||
for ( %idx = 0; %idx < $HostMissionCount; %idx++ )
|
||||
|
|
@ -100,20 +110,23 @@ function CreateServer(%mission, %missionType)
|
|||
|
||||
if ( $BotEnabled[%idx] )
|
||||
{
|
||||
if ( $HostGameBotCount > 16 )
|
||||
if ( $Host::BotCount > 16 )
|
||||
$HostGameBotCount = 16;
|
||||
if ( $HostGameBotCount > $Host::MaxPlayers - 1 )
|
||||
else
|
||||
$HostGameBotCount = $Host::BotCount;
|
||||
|
||||
if ( $Host::BotCount > $Host::MaxPlayers - 1 )
|
||||
$HostGameBotCount = $Host::MaxPlayers - 1;
|
||||
|
||||
//set the objective reassessment timeslice var
|
||||
$AITimeSliceReassess = 0;
|
||||
//set the objective reassessment timeslice var
|
||||
$AITimeSliceReassess = 0;
|
||||
aiConnectMultiple( $HostGameBotCount, $Host::MinBotDifficulty, $Host::MaxBotDifficulty, -1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
$HostGameBotCount = 0;
|
||||
}
|
||||
}
|
||||
|
||||
loadMission(%mission, %missionType, true);
|
||||
}
|
||||
|
||||
function findNextCycleMission()
|
||||
|
|
@ -165,27 +178,25 @@ function DestroyServer()
|
|||
$missionRunning = false;
|
||||
allowConnections(false);
|
||||
stopHeartbeat();
|
||||
MissionGroup.delete();
|
||||
MissionCleanup.delete();
|
||||
if(isObject(game))
|
||||
{
|
||||
game.deactivatePackages();
|
||||
game.delete();
|
||||
}
|
||||
MissionGroup.delete();
|
||||
MissionCleanup.delete();
|
||||
if(isObject(game))
|
||||
{
|
||||
game.deactivatePackages();
|
||||
game.delete();
|
||||
}
|
||||
if(isObject($ServerGroup))
|
||||
$ServerGroup.delete();
|
||||
|
||||
// delete all the connections:
|
||||
while(ClientGroup.getCount())
|
||||
{
|
||||
%client = ClientGroup.getObject(0);
|
||||
if (%client.isAIControlled())
|
||||
%client.drop();
|
||||
else
|
||||
%client.delete();
|
||||
}
|
||||
|
||||
%HostGuidList = "";
|
||||
{
|
||||
%client = ClientGroup.getObject(0);
|
||||
if (%client.isAIControlled())
|
||||
%client.drop();
|
||||
else
|
||||
%client.delete();
|
||||
}
|
||||
|
||||
// delete all the data blocks...
|
||||
// this will cause problems if there are any connections
|
||||
|
|
@ -209,7 +220,7 @@ function Disconnect()
|
|||
|
||||
function DisconnectedCleanup()
|
||||
{
|
||||
// clear the chat hud message vector
|
||||
// clear the chat hud message vector
|
||||
HudMessageVector.clear();
|
||||
if ( isObject( PlayerListGroup ) )
|
||||
PlayerListGroup.delete();
|
||||
|
|
@ -225,9 +236,9 @@ function DisconnectedCleanup()
|
|||
clientCmdclearBottomPrint();
|
||||
clientCmdClearCenterPrint();
|
||||
|
||||
// clear the inventory and weapons hud
|
||||
weaponsHud.clearAll();
|
||||
inventoryHud.clearAll();
|
||||
// clear the inventory and weapons hud
|
||||
weaponsHud.clearAll();
|
||||
inventoryHud.clearAll();
|
||||
|
||||
// back to the launch screen
|
||||
Canvas.setContent(LaunchGui);
|
||||
|
|
@ -240,10 +251,11 @@ function DisconnectedCleanup()
|
|||
if ( !EmailGui.checkingEmail && EmailGui.checkSchedule $= "" )
|
||||
CheckEmail( true );
|
||||
|
||||
IRCClient::onLeaveGame();
|
||||
IRCClient::onLeaveGame();
|
||||
}
|
||||
|
||||
function kick(%client, %admin)
|
||||
// we pass the guid as well, in case this guy leaves the server.
|
||||
function kick( %client, %admin, %guid )
|
||||
{
|
||||
if(%admin)
|
||||
messageAll( 'MsgAdminForce', '\c2The Admin has kicked %1.', %client.name );
|
||||
|
|
@ -252,21 +264,30 @@ function kick(%client, %admin)
|
|||
|
||||
messageClient(%client, 'onClientKicked', "");
|
||||
messageAllExcept( %client, -1, 'MsgClientDrop', "", %client.name, %client );
|
||||
|
||||
if (%client.isAIControlled())
|
||||
|
||||
if( %client.isAIControlled() )
|
||||
{
|
||||
$HostGameBotCount--;
|
||||
%client.drop();
|
||||
}
|
||||
else
|
||||
{
|
||||
// kill and delete this client
|
||||
if( isObject(%client.player) )
|
||||
%client.player.scriptKill(0);
|
||||
|
||||
%client.schedule(700, "delete");
|
||||
|
||||
BanList::add( %client.guid, %client.getAddress(), $Host::KickBanTime );
|
||||
%count = ClientGroup.getCount();
|
||||
for( %i = 0; %i < %count; %i++ )
|
||||
{
|
||||
%cl = ClientGroup.getObject( %i );
|
||||
if( %cl.guid == %guid )
|
||||
{
|
||||
// kill and delete this client
|
||||
if( isObject( %cl.player ) )
|
||||
%cl.player.scriptKill(0);
|
||||
|
||||
%cl.schedule(700, "delete");
|
||||
|
||||
BanList::add( %guid, "0", $Host::KickBanTime );
|
||||
Game.kickGuid = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -342,18 +363,18 @@ function GameConnection::onConnect( %client, %name, %raceGender, %skin, %voice,
|
|||
}
|
||||
|
||||
// Sex/Race defaults
|
||||
switch$ ( %raceGender )
|
||||
{
|
||||
case "Human Male":
|
||||
%client.sex = "Male";
|
||||
%client.race = "Human";
|
||||
case "Human Female":
|
||||
%client.sex = "Female";
|
||||
%client.race = "Human";
|
||||
case "Bioderm":
|
||||
%client.sex = "Male";
|
||||
%client.race = "Bioderm";
|
||||
}
|
||||
switch$ ( %raceGender )
|
||||
{
|
||||
case "Human Male":
|
||||
%client.sex = "Male";
|
||||
%client.race = "Human";
|
||||
case "Human Female":
|
||||
%client.sex = "Female";
|
||||
%client.race = "Human";
|
||||
case "Bioderm":
|
||||
%client.sex = "Male";
|
||||
%client.race = "Bioderm";
|
||||
}
|
||||
%client.armor = "Light";
|
||||
|
||||
// Override the connect name if this server does not allow smurfs:
|
||||
|
|
@ -373,7 +394,6 @@ function GameConnection::onConnect( %client, %name, %raceGender, %skin, %voice,
|
|||
else
|
||||
%name = "\cp\c7" @ %tag @ "\c6" @ %name @ "\co";
|
||||
|
||||
addToServerGuidList( %client.guid );
|
||||
%client.sendGuid = %client.guid;
|
||||
}
|
||||
else
|
||||
|
|
@ -426,16 +446,16 @@ function GameConnection::onConnect( %client, %name, %raceGender, %skin, %voice,
|
|||
%name = %nameTry;
|
||||
}
|
||||
|
||||
%smurfName = %name;
|
||||
%smurfName = %name;
|
||||
// Tag the name with the "smurf" color:
|
||||
%name = "\cp\c8" @ %name @ "\co";
|
||||
}
|
||||
|
||||
%client.name = addTaggedString(%name);
|
||||
if(%client.isSmurf)
|
||||
%client.nameBase = %smurfName;
|
||||
else
|
||||
%client.nameBase = %realName;
|
||||
if(%client.isSmurf)
|
||||
%client.nameBase = %smurfName;
|
||||
else
|
||||
%client.nameBase = %realName;
|
||||
%client.justConnected = true;
|
||||
%client.isReady = false;
|
||||
|
||||
|
|
@ -449,8 +469,8 @@ function GameConnection::onConnect( %client, %name, %raceGender, %skin, %voice,
|
|||
// full reset of client target manager
|
||||
clientResetTargets(%client, false);
|
||||
|
||||
%client.voice = %voice;
|
||||
%client.voiceTag = addtaggedString(%voice);
|
||||
%client.voice = %voice;
|
||||
%client.voiceTag = addtaggedString(%voice);
|
||||
|
||||
//set the voice pitch based on a lookup table from their chosen voice
|
||||
%client.voicePitch = getValidVoicePitch(%voice, %voicePitch);
|
||||
|
|
@ -468,18 +488,18 @@ function GameConnection::onConnect( %client, %name, %raceGender, %skin, %voice,
|
|||
for(%cl = 0; %cl < %count; %cl++)
|
||||
{
|
||||
%recipient = ClientGroup.getObject(%cl);
|
||||
if((%recipient != %client))
|
||||
if((%recipient != %client))
|
||||
{
|
||||
// These should be "silent" versions of these messages...
|
||||
messageClient(%client, 'MsgClientJoin', "",
|
||||
%recipient.name,
|
||||
%recipient,
|
||||
%recipient.target,
|
||||
%recipient.isAIControlled(),
|
||||
%recipient.isAdmin,
|
||||
%recipient.isSuperAdmin,
|
||||
%recipient.isSmurf,
|
||||
%recipient.sendGuid);
|
||||
messageClient(%client, 'MsgClientJoin', "",
|
||||
%recipient.name,
|
||||
%recipient,
|
||||
%recipient.target,
|
||||
%recipient.isAIControlled(),
|
||||
%recipient.isAdmin,
|
||||
%recipient.isSuperAdmin,
|
||||
%recipient.isSmurf,
|
||||
%recipient.sendGuid);
|
||||
|
||||
messageClient(%client, 'MsgClientJoinTeam', "", %recipient.name, $teamName[%recipient.team], %recipient, %recipient.team );
|
||||
}
|
||||
|
|
@ -535,8 +555,6 @@ function GameConnection::onDrop(%client, %reason)
|
|||
if(isObject(Game))
|
||||
Game.onClientLeaveGame(%client);
|
||||
|
||||
if ( !%client.isSmurf )
|
||||
removeFromServerGuidList( %client.guid );
|
||||
if ( $CurrentMissionType $= "SinglePlayer" )
|
||||
messageAllExcept(%client, -1, 'MsgClientDrop', "", %client.name, %client);
|
||||
else
|
||||
|
|
@ -551,27 +569,28 @@ function GameConnection::onDrop(%client, %reason)
|
|||
$HostGamePlayerCount--;
|
||||
|
||||
// reset the server if everyone has left the game
|
||||
if( $HostGamePlayerCount == 0 && $Host::Dedicated)
|
||||
if( $HostGamePlayerCount - $HostGameBotCount == 0 && $Host::Dedicated)
|
||||
schedule(0, 0, "resetServerDefaults");
|
||||
}
|
||||
|
||||
function dismountPlayers()
|
||||
{
|
||||
// make sure all palyers are dismounted from vehicles and have normal huds
|
||||
// make sure all palyers are dismounted from vehicles and have normal huds
|
||||
%count = ClientGroup.getCount();
|
||||
for(%cl = 0; %cl < %count; %cl++)
|
||||
{
|
||||
%client = ClientGroup.getObject(%cl);
|
||||
%player = %client.player;
|
||||
if(%player.isMounted()) {
|
||||
%player.unmount();
|
||||
commandToClient(%client, 'setHudMode', 'Standard', "", 0);
|
||||
}
|
||||
%player = %client.player;
|
||||
if(%player.isMounted()) {
|
||||
%player.unmount();
|
||||
commandToClient(%client, 'setHudMode', 'Standard', "", 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function loadMission( %missionName, %missionType, %firstMission )
|
||||
{
|
||||
cls();
|
||||
buildLoadInfo( %missionName, %missionType );
|
||||
|
||||
// reset all of these
|
||||
|
|
@ -624,7 +643,7 @@ function loadMissionStage1(%missionName, %missionType, %firstMission)
|
|||
|
||||
$CurrentMission = %missionName;
|
||||
$CurrentMissionType = %missionType;
|
||||
|
||||
|
||||
createInvBanCount();
|
||||
echo("LOADING MISSION: " @ %missionName);
|
||||
|
||||
|
|
@ -708,6 +727,12 @@ function loadMissionStage2()
|
|||
$CountdownStarted = false;
|
||||
AISystemEnabled( false );
|
||||
|
||||
// Set the team damage here so that the game type can override it:
|
||||
if ( $Host::TournamentMode )
|
||||
$TeamDamage = 1;
|
||||
else
|
||||
$TeamDamage = $Host::TeamDamageOn;
|
||||
|
||||
Game.missionLoadDone();
|
||||
|
||||
// start all the clients in the mission
|
||||
|
|
@ -807,11 +832,12 @@ function GameConnection::dataBlocksDone( %client, %missionSequence )
|
|||
return;
|
||||
%client.currentPhase = 2;
|
||||
|
||||
// targets require ShapeBase datablocks (only needed on first connection)
|
||||
if(!%client.receivedTargets)
|
||||
// only want to set this once... (targets will not be updated/sent until a
|
||||
// client has this flag set)
|
||||
if(!%client.getReceivedDataBlocks())
|
||||
{
|
||||
%client.setReceivedDataBlocks(true);
|
||||
sendTargetsToClient(%client);
|
||||
%client.receivedTargets = true;
|
||||
}
|
||||
|
||||
commandToClient(%client, 'MissionStartPhase2', $missionSequence);
|
||||
|
|
@ -863,6 +889,11 @@ function serverSetClientTeamState( %client )
|
|||
{
|
||||
dataBlock = Observer;
|
||||
};
|
||||
|
||||
if( isObject( %client.rescheduleVote ) )
|
||||
Cancel( %client.rescheduleVote );
|
||||
%client.canVote = true;
|
||||
%client.rescheduleVote = "";
|
||||
|
||||
MissionCleanup.add( %client.camera ); // we get automatic cleanup this way.
|
||||
|
||||
|
|
@ -954,16 +985,16 @@ function serverSetClientTeamState( %client )
|
|||
function HideHudHACK(%visible)
|
||||
{
|
||||
//compassHud.setVisible(%visible);
|
||||
//enerDamgHud.setVisible(%visible);
|
||||
//enerDamgHud.setVisible(%visible);
|
||||
retCenterHud.setVisible(%visible);
|
||||
reticleFrameHud.setVisible(%visible);
|
||||
//invPackHud.setVisible(%visible);
|
||||
weaponsHud.setVisible(%visible);
|
||||
outerChatHud.setVisible(%visible);
|
||||
objectiveHud.setVisible(%visible);
|
||||
outerChatHud.setVisible(%visible);
|
||||
objectiveHud.setVisible(%visible);
|
||||
chatHud.setVisible(%visible);
|
||||
navHud.setVisible(%visible);
|
||||
//watermarkHud.setVisible(%visible);
|
||||
//watermarkHud.setVisible(%visible);
|
||||
hudClusterBack.setVisible(%visible);
|
||||
inventoryHud.setVisible(%visible);
|
||||
clockHUD.setVisible(%visible);
|
||||
|
|
@ -985,10 +1016,10 @@ function ServerPlay3D(%profile,%transform)
|
|||
function clientCmdSetFirstPerson(%value)
|
||||
{
|
||||
$firstPerson = %value;
|
||||
if(%value)
|
||||
ammoHud.setVisible(true);
|
||||
else
|
||||
ammoHud.setVisible(false);
|
||||
if(%value)
|
||||
ammoHud.setVisible(true);
|
||||
else
|
||||
ammoHud.setVisible(false);
|
||||
}
|
||||
|
||||
function clientCmdVehicleMount()
|
||||
|
|
@ -1013,7 +1044,7 @@ function serverCmdSAD( %client, %password )
|
|||
%client.isAdmin = true;
|
||||
%client.isSuperAdmin = true;
|
||||
%name = getTaggedString( %client.name );
|
||||
MessageAll( 'MsgAdminForce', "\c2" @ %name @ " has become Admin by force.", %client );
|
||||
MessageAll( 'MsgSuperAdminPlayer', '\c2%2 has become a Super Admin by force.', %client, %client.name );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1284,7 +1315,7 @@ function serverCmdChangePlayersTeam( %clientRequesting, %client, %team)
|
|||
}
|
||||
}
|
||||
else
|
||||
commandToClient(%client, 'setHudMode', 'Standard', "", 0);
|
||||
commandToClient(%client, 'setHudMode', 'Standard', "", 0);
|
||||
|
||||
%multiTeam = (Game.numTeams > 1);
|
||||
if(%multiTeam)
|
||||
|
|
@ -1310,16 +1341,16 @@ function serverCmdForcePlayerToObserver( %clientRequesting, %client )
|
|||
|
||||
function serverCmdTogglePlayerMute(%client, %who)
|
||||
{
|
||||
if (%client.muted[%who])
|
||||
{
|
||||
%client.muted[%who] = false;
|
||||
messageClient(%client, 'MsgPlayerUnmuted', '%1 has been unmuted.', %who.name);
|
||||
}
|
||||
else
|
||||
{
|
||||
%client.muted[%who] = true;
|
||||
messageClient(%client, 'MsgPlayerMuted', '%1 has been muted.', %who.name);
|
||||
}
|
||||
if (%client.muted[%who])
|
||||
{
|
||||
%client.muted[%who] = false;
|
||||
messageClient(%client, 'MsgPlayerUnmuted', '%1 has been unmuted.', %who.name);
|
||||
}
|
||||
else
|
||||
{
|
||||
%client.muted[%who] = true;
|
||||
messageClient(%client, 'MsgPlayerMuted', '%1 has been muted.', %who.name);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
|
@ -1400,7 +1431,7 @@ function serverCmdClientPickedTeam( %client, %option )
|
|||
%client.observerMode = "pregame";
|
||||
%client.notReady = true;
|
||||
%client.camera.getDataBlock().setMode( %client.camera, "pre-game", %client.player );
|
||||
commandToClient(%client, 'setHudMode', 'Observer');
|
||||
commandToClient(%client, 'setHudMode', 'Observer');
|
||||
|
||||
|
||||
%client.setControlObject( %client.camera );
|
||||
|
|
@ -1448,7 +1479,7 @@ function dumpGameString()
|
|||
|
||||
function isOnAdminList(%client)
|
||||
{
|
||||
if( !%totalRecords = getRecordCount( $Host::AdminList ) )
|
||||
if( !%totalRecords = getFieldCount( $Host::AdminList ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
@ -1456,7 +1487,6 @@ function isOnAdminList(%client)
|
|||
for(%i = 0; %i < %totalRecords; %i++)
|
||||
{
|
||||
%record = getField( getRecord( $Host::AdminList, 0 ), %i);
|
||||
echo( "record: " @ %record @ "guid: " @ %client.guid );
|
||||
if(%record == %client.guid)
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1466,7 +1496,7 @@ function isOnAdminList(%client)
|
|||
|
||||
function isOnSuperAdminList(%client)
|
||||
{
|
||||
if( !%totalRecords = getRecordCount( $Host::superAdminList ) )
|
||||
if( !%totalRecords = getFieldCount( $Host::superAdminList ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
@ -1474,7 +1504,6 @@ function isOnSuperAdminList(%client)
|
|||
for(%i = 0; %i < %totalRecords; %i++)
|
||||
{
|
||||
%record = getField( getRecord( $Host::superAdminList, 0 ), %i);
|
||||
echo( "record: " @ %record @ "guid: " @ %client.guid );
|
||||
if(%record == %client.guid)
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1487,13 +1516,15 @@ function ServerCmdAddToAdminList( %admin, %client )
|
|||
if( !%admin.isSuperAdmin )
|
||||
return;
|
||||
|
||||
%count = getRecordCount( $Host::AdminList );
|
||||
%count = getFieldCount( $Host::AdminList );
|
||||
|
||||
for ( %i = 0; %i < %count; %i++ )
|
||||
{
|
||||
%id = getRecord( $Host::AdminList, %i );
|
||||
%id = getField( $Host::AdminList, %i );
|
||||
if ( %id == %client.guid )
|
||||
{
|
||||
return; // They're already there!
|
||||
}
|
||||
}
|
||||
|
||||
if( %count == 0 )
|
||||
|
|
@ -1507,11 +1538,11 @@ function ServerCmdAddToSuperAdminList( %admin, %client )
|
|||
if( !%admin.isSuperAdmin )
|
||||
return;
|
||||
|
||||
%count = getRecordCount( $Host::SuperAdminList );
|
||||
%count = getFieldCount( $Host::SuperAdminList );
|
||||
|
||||
for ( %i = 0; %i < %count; %i++ )
|
||||
{
|
||||
%id = getRecord( $Host::SuperAdminList, %i );
|
||||
%id = getField( $Host::SuperAdminList, %i );
|
||||
if ( %id == %client.guid )
|
||||
return; // They're already there!
|
||||
}
|
||||
|
|
@ -1699,8 +1730,8 @@ function Countdown(%timeMS)
|
|||
$countdownStarted = true;
|
||||
Game.matchStart = Game.schedule( %timeMS, "StartMatch" );
|
||||
|
||||
if (%timeMS > 30000)
|
||||
notifyMatchStart(%timeMS);
|
||||
if (%timeMS > 30000)
|
||||
notifyMatchStart(%timeMS);
|
||||
|
||||
if(%timeMS >= 30000)
|
||||
Game.thirtyCount = schedule(%timeMS - 30000, Game, "notifyMatchStart", 30000);
|
||||
|
|
@ -1785,7 +1816,7 @@ function CancelCountdown()
|
|||
|
||||
function CancelEndCountdown()
|
||||
{
|
||||
//cancel the mission end countdown...
|
||||
//cancel the mission end countdown...
|
||||
if(Game.endsixtyCount !$= "")
|
||||
cancel(Game.endsixtyCount);
|
||||
if(Game.endthirtyCount !$= "")
|
||||
|
|
@ -1824,38 +1855,53 @@ function resetServerDefaults()
|
|||
exec( "scripts/ServerDefaults.cs" );
|
||||
exec( "prefs/ServerPrefs.cs" );
|
||||
|
||||
loadMission( $CurrentMission, $CurrentMissionType );
|
||||
// kick all bots...
|
||||
removeAllBots();
|
||||
|
||||
// add bots back if they were there before..
|
||||
if( $Host::botsEnabled )
|
||||
initGameBots( $Host::Map, $Host::MissionType );
|
||||
|
||||
// load the missions
|
||||
loadMission( $Host::Map, $Host::MissionType );
|
||||
}
|
||||
|
||||
function removeAllBots()
|
||||
{
|
||||
while( ClientGroup.getCount() )
|
||||
{
|
||||
%client = ClientGroup.getObject(0);
|
||||
if(%client.isAIControlled())
|
||||
%client.drop();
|
||||
else
|
||||
%client.delete();
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Guid list maintenance functions:
|
||||
function addToServerGuidList( %guid )
|
||||
function getServerGUIDList()
|
||||
{
|
||||
%count = getFieldCount( $HostGuidList );
|
||||
%count = ClientGroup.getCount();
|
||||
for ( %i = 0; %i < %count; %i++ )
|
||||
{
|
||||
if ( getField( $HostGuidList, %i ) == %guid )
|
||||
return;
|
||||
}
|
||||
|
||||
$HostGuidList = $HostGuidList $= "" ? %guid : $HostGuidList TAB %guid;
|
||||
}
|
||||
|
||||
function removeFromServerGuidList( %guid )
|
||||
{
|
||||
%count = getFieldCount( $HostGuidList );
|
||||
for ( %i = 0; %i < %count; %i++ )
|
||||
{
|
||||
if ( getField( $HostGuidList, %i ) == %guid )
|
||||
%cl = ClientGroup.getObject( %i );
|
||||
if ( isObject( %cl ) && !%cl.isSmurf && !%cl.isAIControlled() )
|
||||
{
|
||||
$HostGuidList = removeField( $HostGuidList, %i );
|
||||
return;
|
||||
%guid = getField( %cl.getAuthInfo(), 3 );
|
||||
if ( %guid != 0 )
|
||||
{
|
||||
if ( %list $= "" )
|
||||
%list = %guid;
|
||||
else
|
||||
%list = %list TAB %guid;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Huh, didn't find it.
|
||||
return( %list );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// will return the first admin found on the server
|
||||
function getAdmin()
|
||||
{
|
||||
|
|
@ -1874,20 +1920,20 @@ function getAdmin()
|
|||
|
||||
function serverCmdSetPDAPose(%client, %val)
|
||||
{
|
||||
// if client is in a vehicle, return
|
||||
if(%client.player.isMounted())
|
||||
return;
|
||||
// if client is in a vehicle, return
|
||||
if(%client.player.isMounted())
|
||||
return;
|
||||
|
||||
if(%val)
|
||||
{
|
||||
// play "PDA" animation thread on player
|
||||
%client.player.setActionThread("PDA", false);
|
||||
}
|
||||
else
|
||||
{
|
||||
// cancel PDA animation thread
|
||||
%client.player.setActionThread("root", true);
|
||||
}
|
||||
if(%val)
|
||||
{
|
||||
// play "PDA" animation thread on player
|
||||
%client.player.setActionThread("PDA", false);
|
||||
}
|
||||
else
|
||||
{
|
||||
// cancel PDA animation thread
|
||||
%client.player.setActionThread("root", true);
|
||||
}
|
||||
}
|
||||
|
||||
function serverCmdProcessGameLink(%client, %arg1, %arg2, %arg3, %arg4, %arg5)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue