mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-07-12 14:44:34 +00:00
Taken out
This commit is contained in:
parent
6df93c6801
commit
3bd55afd38
2 changed files with 0 additions and 253 deletions
|
|
@ -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);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -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);
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue