Merge branch 'NoEvo'

This commit is contained in:
ChocoTaco1 2021-02-28 14:07:47 -05:00
commit d04c29d477
15 changed files with 138 additions and 354 deletions

View file

@ -1,6 +1,7 @@
$Host::AdminPassword = "changethis";
$Host::AllowAdmin2Admin = 0;
$Host::AllowAdminBan = 0;
$Host::AllowAdminKick = 1;
$Host::AllowAdminPassVote = 1;
$Host::allowAdminPlayerVotes = "0";
$Host::AllowAdminStopVote = 1;

View file

@ -421,12 +421,13 @@ function CTFGame::playerTouchEnemyFlag(%game, %player, %flag)
%flag.carrier = %player; //this %flag is carried by %player
// attach the camera to the flag.carrier
for(%i = 0; %i < ClientGroup.getCount(); %i++)
for(%i = 0; %i < $Observers; %i++)
{
%cl = ClientGroup.getObject(%i);
if(%cl.team <= 0 && %cl.observingFlag && %cl.flagObsTeam == %flag.team)
observeFlag(%cl, %player.client, 2, %flag.team);
%cl = $ObserverArray[%i];
if(%cl.observingFlag)
observeFlag(%cl, %player.client, 2, %flag.team);
}
%player.mountImage(FlagImage, $FlagSlot, true, %game.getTeamSkin(%flag.team));
%game.playerGotFlagTarget(%player);
@ -568,13 +569,14 @@ function CTFGame::playerDroppedFlag(%game, %player)
%flag.carrier = ""; //flag isn't held anymore
$flagStatus[%flag.team] = "<In the Field>";
// attach the camera again to the flag
for(%i = 0; %i < ClientGroup.getCount(); %i++)
// attach the camera to the flag
for(%i = 0; %i < $Observers; %i++)
{
%cl = ClientGroup.getObject(%i);
if(%cl.team <= 0 && %cl.observingFlag && %cl.flagObsTeam == %flag.team)
observeFlag(%cl, $TeamFlag[%flag.team], 1, %flag.team);
%cl = $ObserverArray[%i];
if(%cl.observingFlag)
observeFlag(%cl, $TeamFlag[%flag.team], 1, %flag.team);
}
%player.unMountImage($FlagSlot);
%flag.hide(false); //Does the throwItem function handle this?
@ -601,16 +603,12 @@ function CTFGame::flagCap(%game, %player)
%flag = %player.holdingFlag;
%flag.carrier = "";
// when a player cap the flag, continue observing the player
for(%i = 0; %i < ClientGroup.getCount(); %i++)
// when a player cap the flag, attach to flag again
for(%i = 0; %i < $Observers; %i++)
{
%cl = ClientGroup.getObject(%i);
if(%cl.team <= 0 && %cl.observingFlag && %cl.flagObsTeam == %flag.team)
{
%cl.observingFlag = false;
%cl.flagObserved = "";
%cl.flagObsTeam = "";
}
%cl = $ObserverArray[%i];
if(%cl.observingFlag)
observeFlag(%cl, $TeamFlag[%flag.team], 1, %flag.team);
}
%held = %game.formatTime(getSimTime() - %game.flagHeldTime[%flag], false); // z0dd - ZOD, 8/15/02. How long did player hold flag?
@ -760,20 +758,12 @@ function CTFGame::flagReturn(%game, %flag, %player)
%otherTeam = 1;
%teamName = %game.getTeamName(%flag.team);
// when the flag return, stop observing the flag, and go in observerFly mode
for(%i = 0; %i < ClientGroup.getCount(); %i++)
// when the flag return, attach to flag again
for(%i = 0; %i < $Observers; %i++)
{
%cl = ClientGroup.getObject(%i);
if(%cl.team <= 0 && %cl.observingFlag && %cl.flagObsTeam == %flag.team)
{
%cl.camera.mode = "observerFly";
%cl.camera.setFlyMode();
updateObserverFlyHud(%cl);
%cl.observingFlag = false;
%cl.flagObserved = "";
%cl.flagObsTeam = "";
}
%cl = $ObserverArray[%i];
if(%cl.observingFlag)
observeFlag(%cl, $TeamFlag[%flag.team], 1, %flag.team);
}
if (%player !$= "")

View file

@ -658,12 +658,13 @@ function SCtFGame::playerTouchEnemyFlag(%game, %player, %flag)
%flag.carrier = %player; //this %flag is carried by %player
// attach the camera to the flag.carrier
for(%i = 0; %i < ClientGroup.getCount(); %i++)
for(%i = 0; %i < $Observers; %i++)
{
%cl = ClientGroup.getObject(%i);
if(%cl.team <= 0 && %cl.observingFlag && %cl.flagObsTeam == %flag.team)
observeFlag(%cl, %player.client, 2, %flag.team);
%cl = $ObserverArray[%i];
if(%cl.observingFlag)
observeFlag(%cl, %player.client, 2, %flag.team);
}
%player.mountImage(FlagImage, $FlagSlot, true, %game.getTeamSkin(%flag.team));
%game.playerGotFlagTarget(%player);
@ -793,13 +794,14 @@ function SCtFGame::playerDroppedFlag(%game, %player)
%flag.carrier = ""; //flag isn't held anymore
$flagStatus[%flag.team] = "<In the Field>";
// attach the camera again to the flag
for(%i = 0; %i < ClientGroup.getCount(); %i++)
// attach the camera to the flag
for(%i = 0; %i < $Observers; %i++)
{
%cl = ClientGroup.getObject(%i);
if(%cl.team <= 0 && %cl.observingFlag && %cl.flagObsTeam == %flag.team)
observeFlag(%cl, $TeamFlag[%flag.team], 1, %flag.team);
%cl = $ObserverArray[%i];
if(%cl.observingFlag)
observeFlag(%cl, $TeamFlag[%flag.team], 1, %flag.team);
}
%player.unMountImage($FlagSlot);
%flag.hide(false); //Does the throwItem function handle this?
@ -826,16 +828,12 @@ function SCtFGame::flagCap(%game, %player)
%flag = %player.holdingFlag;
%flag.carrier = "";
// when a player cap the flag, continue observing the player
for(%i = 0; %i < ClientGroup.getCount(); %i++)
// when a player cap the flag, attach to flag again
for(%i = 0; %i < $Observers; %i++)
{
%cl = ClientGroup.getObject(%i);
if(%cl.team <= 0 && %cl.observingFlag && %cl.flagObsTeam == %flag.team)
{
%cl.observingFlag = false;
%cl.flagObserved = "";
%cl.flagObsTeam = "";
}
%cl = $ObserverArray[%i];
if(%cl.observingFlag)
observeFlag(%cl, $TeamFlag[%flag.team], 1, %flag.team);
}
%held = %game.formatTime(getSimTime() - %game.flagHeldTime[%flag], false); // z0dd - ZOD, 8/15/02. How long did player hold flag?
@ -979,20 +977,12 @@ function SCtFGame::flagReturn(%game, %flag, %player)
%otherTeam = 1;
%teamName = %game.getTeamName(%flag.team);
// when the flag return, stop observing the flag, and go in observerFly mode
for(%i = 0; %i < ClientGroup.getCount(); %i++)
// when the flag return, attach to flag again
for(%i = 0; %i < $Observers; %i++)
{
%cl = ClientGroup.getObject(%i);
if(%cl.team <= 0 && %cl.observingFlag && %cl.flagObsTeam == %flag.team)
{
%cl.camera.mode = "observerFly";
%cl.camera.setFlyMode();
updateObserverFlyHud(%cl);
%cl.observingFlag = false;
%cl.flagObserved = "";
%cl.flagObsTeam = "";
}
%cl = $ObserverArray[%i];
if(%cl.observingFlag)
observeFlag(%cl, $TeamFlag[%flag.team], 1, %flag.team);
}
if (%player !$= "")

View file

@ -109,9 +109,11 @@ function resetBuyVehicle(%client)
// Info: Delay on calculating flag stats
function ShapeBase::throwObject(%this,%obj)
{
//------------------------------------------------------------------
// z0dd - ZOD, 4/15/02. Allow respawn switching during tourney wait.
if(!$MatchStarted)
return;
if(!$MatchStarted && $Host::TournamentMode) //Added Tourney check
return;
//------------------------------------------------------------------
// z0dd - ZOD, 5/26/02. Remove anti-hover so flag can be thrown properly
if(%obj.getDataBlock().getName() $= "Flag")
@ -121,9 +123,9 @@ function ShapeBase::throwObject(%this,%obj)
if(Game.Class $= CTFGame || Game.Class $= PracticeCTFGame || Game.Class $= SCtFGame)
%obj.searchSchedule = Game.schedule(10, "startFlagCollisionSearch", %obj);
}
%srcCorpse = (%this.getState() $= "Dead"); // z0dd - ZOD, 4/14/02. Flag tossed from corpse
//------------------------------------------------------------------
%srcCorpse = (%this.getState() $= "Dead"); // z0dd - ZOD, 4/14/02. Flag tossed from corpse
//if the object is being thrown by a corpse, use a random vector
if (%srcCorpse && %obj.getDataBlock().getName() !$= "Flag") // z0dd - ZOD, 4/14/02. Except for flags..
{
@ -151,14 +153,16 @@ function ShapeBase::throwObject(%this,%obj)
if (%obj.getDataBlock().getName() $= "Flag")
{
%vec = vectorScale(%vec, (%srcCorpse ? 40 : 75)); // z0dd - ZOD, 4/14/02. Throw flag force. Value was 40
// ------------------------------------------------------------
// z0dd - ZOD, 9/27/02. Delay on grabbing flag after tossing it
%this.flagTossWait = true;
%this.schedule(1000, resetFlagTossWait);
// ------------------------------------------------------------
// Delay on calculating stats
%this.flagStatsWait = true;
%this.schedule(5000, resetFlagStatsWait);
%this.schedule(5000, resetFlagStatsWait);
// ------------------------------------------------------------
}
//
@ -167,7 +171,7 @@ function ShapeBase::throwObject(%this,%obj)
%obj.setCollisionTimeout(%this);
%data = %obj.getDatablock();
%data.onThrow(%obj, %this);
%data.onThrow(%obj,%this);
//call the AI hook
AIThrowObject(%obj);

View file

@ -33,7 +33,7 @@ function Autobalance( %game )
return;
$Autobalance::UseAllMode = 0;
$Autobalance::FallbackTime = "";
$Autobalance::FallbackTime = getSimTime();
%otherTeam = $BigTeam == 1 ? 2 : 1;
$Autobalance::AMThreshold = mCeil(MissionGroup.CTF_scoreLimit/3) * 100;
@ -101,9 +101,7 @@ function DefaultGame::onClientKilled(%game, %clVictim, %clKiller, %damageType, %
if($TeamRank[$BigTeam, count] - $TeamRank[%otherTeam, count] >= 2)
{
%fallback = 0;
if($Autobalance::FallbackTime $= "")
$Autobalance::FallbackTime = getSimTime();
else if((getSimTime() - $Autobalance::FallbackTime) < $Autobalance::Fallback)
if((getSimTime() - $Autobalance::FallbackTime) > $Autobalance::Fallback)
%fallback = 1;
//damageType 0: If someone switches to observer or disconnects

View file

@ -52,7 +52,15 @@ function GetTeamCounts(%game)
//Variables
$TotalTeamPlayerCount = $TeamRank[1, count] + $TeamRank[2, count];
$AllPlayerCount = $HostGamePlayerCount;
$Observers = $HostGamePlayerCount - ($TeamRank[1, count] + $TeamRank[2, count]);
//Observers
$Observers = 0;
for(%i = 0; %i < ClientGroup.getCount(); %i++)
{
%cl = ClientGroup.getObject(%i);
if(%cl.team $= 0)
$ObserverArray[$Observers++] = %cl;
}
//echo("$PlayerCount[0] " @ $HostGamePlayerCount - ($TeamRank[1, count] + $TeamRank[2, count]));
//echo("$PlayerCount[1] " @ $TeamRank[1, count]);

View file

@ -1,111 +0,0 @@
//exec("scripts/autoexec/NoFlagZone.cs");
$TurleCampTime = 10000; //10secs
//Trigger Zone Collision Patch
//MemPatch so mines, grenades, and flags
//Dont interact with the trigger zone
memPatch("604358","0C");
function CTFGame::onEnterTrigger(%game, %triggerName, %data, %obj, %colobj)
{
%client = %colobj.client;
switch$(%obj.type)
{
case NOFLAGZONE:
if(%client.player.holdingFlag !$= "" && $Host::NoBaseRapePlayerCount > $TotalTeamPlayerCount && %obj.team == %client.team)
{
//%colobj.throwObject(%colobj.holdingFlag);
CTFGame::zoneTossFlag(%game, %colobj, %obj);
}
//Has issues
case TURTLEDAMAGE:
if(%client.player.holdingFlag !$= "")
{
//schedule a warning in 10 seconds
%client = %colobj.client;
%client.turtledamage = 1;
%client.campingThread = %game.schedule($TurleCampTime, "CampingDamage", %client, true);
}
}
}
function CTFGame::zoneTossFlag(%game, %player, %obj)
{
// ------------------------------------------------------------------------------
// z0dd - ZOD - SquirrelOfDeath, 9/27/02. Delay on grabbing flag after tossing it
%player.flagTossWait = true;
%player.schedule(1000, resetFlagTossWait);
// ------------------------------------------------------------------------------
%client = %player.client;
%flag = %player.holdingFlag;
%flag.setVelocity("0 0 0");
%flag.setTransform(%player.getWorldBoxCenter());
%flag.setCollisionTimeout(%player);
%held = %game.formatTime(getSimTime() - %game.flagHeldTime[%flag], false); // z0dd - ZOD, 8/15/02. How long did player hold flag?
if($Host::ClassicEvoStats)
%game.totalFlagHeldTime[%flag] = 0;
%game.playerDroppedFlag(%player);
//Need home to be away from the trigger box location
%vec = vectorNormalize(vectorSub(%player.getWorldBoxCenter(),%obj.getWorldBoxCenter()));
// normalize the vector, scale it, and add an extra "upwards" component
%vecNorm = VectorNormalize(%vec);
%vec = VectorScale(%vecNorm, 1000);
%vec = vectorAdd(%vec, "0 0 300");
// z0dd - ZOD, 6/09/02. Remove anti-hover so flag can be thrown properly
%flag.static = false;
// z0dd - ZOD, 10/02/02. Hack for flag collision bug.
%flag.searchSchedule = %game.schedule(10, "startFlagCollisionSearch", %flag);
// apply the impulse to the flag object
%flag.applyImpulse(%obj.getWorldBoxCenter(), %vec);
// z0dd - ZOD 3/30/02. Above message was sending the wrong varible to objective hud.
messageClient(%player.client, 'MsgCTFFlagDropped', '\c1You are not allowed to have the flag in this area. (Held: %4)~wfx/misc/flag_drop.wav', %client.name, 0, %flag.team, %held); // Yogi, 8/18/02. 3rd param changed 0 -> %client.name
logEcho(%player.client.nameBase@" (pl "@%player@"/cl "@%player.client@") lost flag (No flag zone)"@" (Held: "@%held@")");
}
function CTFGame::onLeaveTrigger(%game, %triggerName, %data, %obj, %colobj)
{
%client.turtledamage = 0;
%client = %colobj.client;
cancel(%client.campingThread);
}
function CTFGame::CampingDamage(%game, %client, %firstWarning)
{
%player = %client.player;
if(isEventPending(%client.campingThread))
cancel(%client.campingThread);
//make sure we're still alive...
if (!isObject(%player) || %player.getState() $= "Dead")
return;
//if the match hasn't yet started, don't warn or apply damage yet...
if (!$MatchStarted)
{
%client.campingThread = %game.schedule($TurleCampTime / 2, "CampingDamage", %client, true);
}
else if (%firstWarning)
{
messageClient(%client, 'MsgHuntersNoCampZone', '\c2No turtling inside the base.', 1);
%client.campingThread = %game.schedule($TurleCampTime / 2, "CampingDamage", %client, false);
}
else if(%client.turtledamage)
{
%player.setDamageFlash(0.1);
%player.damage(0, %player.position, 0.05, $DamageType::NexusCamping);
%client.campingThread = %game.schedule(1000, "CampingDamage", %client, false);
}
}

View file

@ -132,8 +132,7 @@ if (!isActivePackage(PizzaThings))
function serverCmdObserveFirstFlag(%client)
{
// works only for CTF
if(Game.class !$= CTFGame)
if(Game.class !$= CTFGame && Game.class !$= SCtFGame)
return;
// client must be an observer
@ -151,8 +150,7 @@ function serverCmdObserveFirstFlag(%client)
function serverCmdObserveSecondFlag(%client)
{
// works only for CTF
if(Game.class !$= CTFGame)
if(Game.class !$= CTFGame && Game.class !$= SCtFGame)
return;
// client must be an observer
@ -176,7 +174,7 @@ function observeFlag(%client, %target, %type, %flagTeam)
if(!isObject(%client) || !isObject(%target) || !isObject(%client.camera))
return;
if(Game.class !$= CTFGame)
if(Game.class !$= CTFGame && Game.class !$= SCtFGame)
return;
if(%client.team > 0)
@ -225,11 +223,11 @@ function observeFlag(%client, %target, %type, %flagTeam)
%found = false;
for(%i = 0; %i < %count; %i++)
{
if(ClientGroup.getObject(%i) == %target)
{
%found = true;
break;
}
if(ClientGroup.getObject(%i) == %target)
{
%found = true;
break;
}
}
if(!%found)
return;

View file

@ -15,7 +15,7 @@ function DefaultGame::testTeamKill(%game, %victimID, %killerID)
return true;
// Ignore this map
if($CurrentMission $= "Mac_FlagArena" || $CurrentMission $= "Machineeggs")
if($CurrentMission $= "Mac_FlagArena" || $CurrentMission $= "Machineeggs" || $CurrentMission $= "DMP_SimpleFlagArena")
return true;
// warn the player

View file

@ -250,6 +250,47 @@ function serverCmdThrow(%client, %data)
%client.tossTime = getSimTime();
}
//Vehicle Respawn bug fix - Respawn schedules carrying into map changes
function VehicleData::respawn(%data, %marker)
{
if($MatchStarted + $missionRunning == 2 && isObject(%marker))
{
%mask = $TypeMasks::PlayerObjectType | $TypeMasks::VehicleObjectType | $TypeMasks::TurretObjectType;
InitContainerRadiusSearch(%marker.getWorldBoxCenter(), %data.checkRadius, %mask);
if(containerSearchNext() == 0)
{
%newObj = %data.create(%marker.curTeam, %marker);
%newObj.startFade(1000, 0, false);
%newObj.setTransform(%marker.getTransform());
setTargetSensorGroup(%newObj.target, %newObj.team);
MissionCleanup.add(%newObj);
}
else
{
%marker.schedule = %data.schedule(3000, "respawn", %marker);
}
}
}
function VehicleData::createPositionMarker(%data, %obj)
{
%marker = new Trigger(PosMarker)
{
dataBlock = markerTrigger;
mountable = %obj.mountable;
disableMove = %obj.disableMove;
resetPos = %obj.resetPos;
data = %obj.getDataBlock().getName();
deployed = %obj.deployed;
curTeam = %obj.team;
respawnTime = %obj.respawnTime;
};
%marker.setTransform(%obj.getTransform());
MissionCleanup.add(%marker);
return %marker;
}
};
// Prevent package from being activated if it is already

View file

@ -1,5 +1,6 @@
//$Host::AllowAdmin2Admin = 0;
//$Host::AllowAdminBan = 0;
//$Host::AllowAdminKick = 1;
//$Host::AllowAdminVotes = 1;
//$Host::AllowAdminStopVote = 1;
//$Host::AllowAdminPassVote = 1;
@ -735,10 +736,14 @@ function DefaultGame::voteKickPlayer(%game, %admin, %client)
}
}
//Log Vote %
votePercentLog(%client, %typeName, %key, %game.votesFor[%game.kickTeam], %game.votesAgainst[%game.kickTeam], %totalVotes, %game.totalVotesNone);
//Show Vote %
messageAll('', '\c1Vote %6: \c0Yea: %1 Nay: %2 Total: %3 [%4%5]', %game.votesFor[%game.kickTeam], %game.votesAgainst[%game.kickTeam], %totalVotes, mfloor((%game.votesFor[%game.kickTeam] / %totalVotes) * 100), "%", %key);
//Vote Only
if(%cause $= "(vote)")
{
//Log Vote %
votePercentLog(%client, %typeName, %key, %game.votesFor[%game.kickTeam], %game.votesAgainst[%game.kickTeam], %totalVotes, %game.totalVotesNone);
//Show Vote %
messageAll('', '\c1Vote %6: \c0Yea: %1 Nay: %2 Total: %3 [%4%5]', %game.votesFor[%game.kickTeam], %game.votesAgainst[%game.kickTeam], %totalVotes, mfloor((%game.votesFor[%game.kickTeam] / %totalVotes) * 100), "%", %key);
}
%game.kickTeam = "";
%game.kickGuid = "";
@ -1144,12 +1149,13 @@ function DefaultGame::sendGamePlayerPopupMenu( %game, %client, %targetClient, %k
// Admin only options on players:
else if ( %isAdmin ) // z0dd - ZOD, 9/29/02. Removed T2 demo code from here
{
if ( !%isTargetBot && !%isTargetAdmin )
if ( !%isTargetBot && !%isTargetAdmin && (%isSuperAdmin || %isAdmin && $Host::AllowAdmin2Admin))
messageClient( %client, 'MsgPlayerPopupItem', "", %key, "AdminPlayer", "", 'Make Admin', 2 );
if ( !%isTargetSelf && %outrankTarget )
{
messageClient( %client, 'MsgPlayerPopupItem', "", %key, "KickPlayer", "", 'Kick', 3 );
if(%isSuperAdmin || %isAdmin && $Host::AllowAdminKick)
messageClient( %client, 'MsgPlayerPopupItem', "", %key, "KickPlayer", "", 'Kick', 3 );
if ( !%isTargetBot )
{
@ -1160,11 +1166,11 @@ function DefaultGame::sendGamePlayerPopupMenu( %game, %client, %targetClient, %k
messageClient( %client, 'MsgPlayerPopupItem', "", %key, "StripAdmin", "", 'Strip admin', 14 );
messageClient( %client, 'MsgPlayerPopupItem', "", %key, "SendMessage", "", 'Send Private Message', 15 );
messageClient( %client, 'MsgPlayerPopupItem', "", %key, "PrintClientInfo", "", 'Client Info', 16 ); // z0dd - ZOD - MeBad, 7/13/03. Send client information.
if( %client.isSuperAdmin )
{
messageClient( %client, 'MsgPlayerPopupItem', "", %key, "BanPlayer", "", 'Ban', 4 );
messageClient( %client, 'MsgPlayerPopupItem', "", %key, "PrintClientInfo", "", 'Client Info', 16 ); // z0dd - ZOD - MeBad, 7/13/03. Send client information.
messageClient( %client, 'MsgPlayerPopupItem', "", %key, "BanPlayer", "", 'Ban', 4 );
if ( %targetClient.isGagged )
messageClient( %client, 'MsgPlayerPopupItem', "", %key, "UnGagPlayer", "", 'UnGag Player', 17);

View file

@ -1,142 +0,0 @@
// altWarmup.cs
//
// This script allows players time before a match to pick teams
// Puts everyone in observer at mission end
//
// exec("scripts/autoexec/altWarmup.cs");
// Enable or Disable
$AW::EnableALTWarmUp = 0;
// Normal Warmup Time (In Seconds) - 20 is 20 Seconds
$AW::DefaultWarmUpTime = 20;
// The amount of time you want to allow for players to switch teams (In seconds) - 60 is 60 seconds
$AW::ALTWarmUpTime = 60;
// Minimum Population to Activate
$AW::MinALTWarmUpPop = 8;
package altWarmup
{
function DefaultGame::setupClientTeams(%game)
{
if($AW::EnableALTWarmUp)
{
$Host::warmupTime = $AW::DefaultWarmUpTime;
if($HostGamePlayerCount >= $AW::MinALTWarmUpPop && ($CurrentMissionType $= "CTF" || $CurrentMissionType $= "SCtF"))
%altWarmup = 1;
}
if(%altWarmup)
{
$Host::warmupTime = $AW::ALTWarmUpTime;
for(%i = 0; %i < ClientGroup.getCount(); %i ++)
{
%client = ClientGroup.getObject(%i);
//Put everyone in observer
%client.team = 0;
%client.lastTeam = 0;
}
}
else
parent::setupClientTeams(%game);
}
// Re-done for our needs
// If team change time too low can crash server --z0dd - ZOD
function serverCmdClientJoinTeam(%client, %team, %admin)
{
// z0dd - ZOD, 4/10/04. ilys - if the client does not enter a team, uses a team less than -1,
// more than the number of teams for the gametype or zero, set his team to -1 (switch)
if(%team $= "" || %team < -1 || %team == 0 || %team > Game.numTeams)
%team = -1;
if( %team == -1 )
{
if( %client.team == 1 )
%team = 2;
else
%team = 1;
}
if(isObject(Game) && Game.kickClient != %client)
{
if(%client.team != %team)
{
if(!$MatchStarted)
{
if(!%client.waitStart || (getSimTime() - %client.waitStart) > 5000 || %client.isAdmin)
{
%client.waitStart = getSimTime();
if(%client.team == 0)
clearBottomPrint(%client);
if(%client.isAIControlled())
Game.AIChangeTeam( %client, %team );
else
Game.clientChangeTeam( %client, %team, %fromObs );
}
else
{
%wait = mFloor((5000 - (getSimTime() - %client.waitStart)) / 1000);
messageClient(%client, "", '\c3WAIT MESSAGE:\cr You must wait another %1 seconds', %wait);
}
}
// z0dd - ZOD, 9/17/02. Fair teams, check for Team Rabbit 2 as well.
else
{
if(($FairTeams && !%client.isAdmin) && ($CurrentMissionType !$= TR2))
{
%otherTeam = %team == 1 ? 2 : 1;
if(!%admin.isAdmin && %team != 0 && ($TeamRank[%team, count]+1) > $TeamRank[%otherTeam, count])
{
messageClient(%client, 'MsgFairTeams', '\c2Teams will be uneven, please choose another team.');
return;
}
}
if(!%client.waitStart || (getSimTime() - %client.waitStart) > 15000 || %client.isAdmin)
{
%client.waitStart = getSimTime();
if(%client.team == 0)
clearBottomPrint(%client);
if(%client.isAIControlled())
Game.AIChangeTeam( %client, %team );
else
Game.clientChangeTeam( %client, %team, %fromObs );
}
else
{
%wait = mFloor((15000 - (getSimTime() - %client.waitStart)) / 1000);
messageClient(%client, "", '\c3WAIT MESSAGE:\cr You must wait another %1 seconds', %wait);
}
}
}
}
}
// So flag snatch sound wont play at the end of the match
function CTFGame::playerTouchEnemyFlag(%game, %player, %flag)
{
if(!$missionRunning)
return;
parent::playerTouchEnemyFlag(%game, %player, %flag);
}
function SCtFGame::playerTouchEnemyFlag(%game, %player, %flag)
{
if(!$missionRunning)
return;
parent::playerTouchEnemyFlag(%game, %player, %flag);
}
};
// Prevent package from being activated if it is already
if (!isActivePackage(altWarmup))
activatePackage(altWarmup);

View file

@ -217,13 +217,13 @@ function CreateServer(%mission, %missionType)
// z0dd - ZOD, 07/19/03. fix for stuttering dual processor servers.
// Moved here because it seems server must be created first.
if(($Host::ClassicUseHighPerformanceCounter $= "0") || ($Host::ClassicUseHighPerformanceCounter == 0))
{
setPerfCounterEnable(0);
}
else
{
else if(($Host::ClassicUseHighPerformanceCounter $= "1") || ($Host::ClassicUseHighPerformanceCounter == 1))
setPerfCounterEnable(1);
}
else if(($Host::ClassicUseHighPerformanceCounter $= "2") || ($Host::ClassicUseHighPerformanceCounter == 2))
setPerfCounterEnable(2);
else if(($Host::ClassicUseHighPerformanceCounter $= "3") || ($Host::ClassicUseHighPerformanceCounter == 3))
setPerfCounterEnable(3);
// Load Banlist
ClassicLoadBanlist();

View file

@ -179,8 +179,9 @@ $Host::ServerRules4 = " \c1try2HaveFun\c4(\c2%client, %attitude\c4); \c1thisI
$Host::AnimateWithTransitions = 1; //????????????? T1 engine var may or may not help timescale ?????????????
$Host::AllowAdmin2Admin = 0;
$Host::AllowAdminBan = 0;
$Host::AllowAdminKick = 1;
$Host::AllowAdminPassVote = 1;
$Host::AllowAdminStopVotes = 1;
$Host::AllowAdminStopVote = 1;
$Host::AllowAdminVotes = 1;
$Host::AllowPlayerVoteChangeMission = 1;
$Host::AllowPlayerVoteSkipMission = 1;

View file

@ -669,7 +669,7 @@ datablock GrenadeProjectileData(BasicGrenade)
emitterDelay = -1;
directDamage = 0.0;
hasDamageRadius = true;
indirectDamage = 0.34; //was 0.40
indirectDamage = 0.40;
damageRadius = 15.0;
radiusDamageType = $DamageType::Grenade;
kickBackStrength = 1500;