mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-01-19 16:14:44 +00:00
Merge branch 'Dev' into Stable
This commit is contained in:
commit
f8a73b752b
|
|
@ -330,48 +330,6 @@ addRotationMap("GodsRiftLak","Lakrabbit",true,false,-1,-1);
|
|||
addRotationMap("SolsDescentLak","Lakrabbit",true,true,-1,-1);
|
||||
addRotationMap("Crater71Lak","Lakrabbit",true,false,6,-1);
|
||||
//-------------------------------------------------------------------------------
|
||||
addRotationMap("darrellw-Starlight","Lakrabbit",true,false,-1,-1);
|
||||
addRotationMap("Hybrid-SunChips","Lakrabbit",true,false,-1,-1);
|
||||
addRotationMap("Hybrid-TealMagic","Lakrabbit",true,false,-1,-1);
|
||||
addRotationMap("Tacocat-AshnDust","Lakrabbit",true,false,-1,-1);
|
||||
addRotationMap("Tacocat-Breaker","Lakrabbit",true,true,-1,-1);
|
||||
addRotationMap("Tacocat-DantesHill","Lakrabbit",true,true,-1,-1);
|
||||
addRotationMap("Tacocat-DeepCool","Lakrabbit",true,false,-1,-1);
|
||||
addRotationMap("Tacocat-EmeraldRun","Lakrabbit",true,true,-1,-1);
|
||||
addRotationMap("Tacocat-FairField","Lakrabbit",true,true,-1,-1);
|
||||
addRotationMap("Tacocat-FireBrand","Lakrabbit",true,true,-1,-1);
|
||||
addRotationMap("Tacocat-FroastyLak","Lakrabbit",true,false,-1,-1);
|
||||
addRotationMap("Tacocat-IronGiant","Lakrabbit",true,false,-1,-1);
|
||||
addRotationMap("Tacocat-Jagged","Lakrabbit",true,true,-1,-1);
|
||||
addRotationMap("Tacocat-LucidCold","Lakrabbit",true,true,-1,-1);
|
||||
addRotationMap("Tacocat-MiddlePassage","Lakrabbit",true,true,-1,-1);
|
||||
addRotationMap("Tacocat-Mirage","Lakrabbit",true,true,-1,-1);
|
||||
addRotationMap("Tacocat-Muave","Lakrabbit",true,true,-1,-1);
|
||||
addRotationMap("Tacocat-Silencio","Lakrabbit",true,true,-1,-1);
|
||||
addRotationMap("Tacocat-SnowCrevice","Lakrabbit",true,true,-1,-1);
|
||||
addRotationMap("Tacocat-Spire","Lakrabbit",true,true,-1,-1);
|
||||
addRotationMap("Tacocat-TheStill","Lakrabbit",true,true,-1,-1);
|
||||
addRotationMap("Tacocat-Toxica","Lakrabbit",true,true,-1,-1);
|
||||
addRotationMap("Tacocat-WhiteCap","Lakrabbit",true,true,-1,-1);
|
||||
addRotationMap("Tacocat-Moonscape","Lakrabbit",true,true,-1,-1);
|
||||
addRotationMap("Tacocat-Temporal","Lakrabbit",true,false,-1,-1);
|
||||
addRotationMap("Tacocat-Vein","Lakrabbit",true,false,-1,-1);
|
||||
addRotationMap("DarkTiger-LakIce","Lakrabbit",true,true,-1,-1);
|
||||
addRotationMap("Tacocat-BigSky","Lakrabbit",true,false,-1,-1);
|
||||
addRotationMap("Tacocat-Thawed","Lakrabbit",true,true,-1,-1);
|
||||
addRotationMap("Tacocat-Circular","Lakrabbit",true,true,-1,-1);
|
||||
addRotationMap("Tacocat-RollingGreen","Lakrabbit",true,true,-1,-1);
|
||||
addRotationMap("Tacocat-Hellmire","Lakrabbit",true,true,-1,-1);
|
||||
addRotationMap("Tacocat-HighLaktane","Lakrabbit",true,false,-1,-1);
|
||||
addRotationMap("Tacocat-Hillview","Lakrabbit",true,true,-1,-1);
|
||||
addRotationMap("Tacocat-IceCap","Lakrabbit",true,false,-1,-1);
|
||||
addRotationMap("Tacocat-Yerba","Lakrabbit",true,true,-1,-1);
|
||||
addRotationMap("Tacocat-ColdFoot","Lakrabbit",true,true,-1,-1);
|
||||
addRotationMap("Tacocat-Dunes","Lakrabbit",true,true,-1,-1);
|
||||
addRotationMap("Tacocat-Rusted","Lakrabbit",true,true,-1,-1);
|
||||
addRotationMap("Tacocat-FrostRun","Lakrabbit",true,true,-1,-1);
|
||||
addRotationMap("Tacocat-Zambre","Lakrabbit",true,false,-1,-1);
|
||||
addRotationMap("Tacocat-SoylentJade","Lakrabbit",true,true,-1,-1);
|
||||
//addRotationMap("EscaladeLak","Lakrabbit",true,false,-1,-1);
|
||||
//addRotationMap("MagmaticLak","Lakrabbit",true,false,-1,-1);
|
||||
//addRotationMap("HillsOfSorrow","Lakrabbit",true,false,-1,-1);
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ $Host::AllowAdminKick = 1;
|
|||
$Host::AllowAdminPassVote = 1;
|
||||
$Host::allowAdminPlayerVotes = "0";
|
||||
$Host::AllowAdminStopVote = 1;
|
||||
$Host::AllowAdminStopVotes = 1;
|
||||
$Host::AllowAdminVotes = 1;
|
||||
$Host::AllowMapScript = "True";
|
||||
$Host::AllowPlayerVoteChangeMission = 1;
|
||||
|
|
|
|||
|
|
@ -952,6 +952,9 @@ function CTFGame::gameOver(%game)
|
|||
}
|
||||
for(%j = 1; %j <= %game.numTeams; %j++)
|
||||
$TeamScore[%j] = 0;
|
||||
|
||||
%game.voteOT = 0;
|
||||
%game.overtime = 0;
|
||||
}
|
||||
|
||||
function CTFGame::onClientDamaged(%game, %clVictim, %clAttacker, %damageType, %implement, %damageLoc)
|
||||
|
|
@ -1266,7 +1269,13 @@ function CTFGame::checkTimeLimit(%game, %forced)
|
|||
{
|
||||
%teamOneCaps = mFloor($TeamScore[1] / %game.SCORE_PER_TEAM_FLAG_CAP);
|
||||
%teamTwoCaps = mFloor($TeamScore[2] / %game.SCORE_PER_TEAM_FLAG_CAP);
|
||||
if(%teamOneCaps == %teamTwoCaps && $CTF::Overtime && (($TeamRank[1, count] + $TeamRank[2, count]) > 6)){
|
||||
if(%game.scheduleVote !$= "" && !%game.voteOT && !$Host::TournamentMode)
|
||||
{
|
||||
messageAll('MsgOvertime', '\c2Vote Overtime Initiated.~wfx/powered/turret_heavy_activate.wav');
|
||||
%game.voteOT = 1;
|
||||
}
|
||||
else if(%teamOneCaps == %teamTwoCaps && $CTF::Overtime && (($TeamRank[1, count] + $TeamRank[2, count]) > 6))
|
||||
{
|
||||
if(!%game.overtime)
|
||||
{
|
||||
%game.overtime = 1;
|
||||
|
|
@ -1276,19 +1285,30 @@ function CTFGame::checkTimeLimit(%game, %forced)
|
|||
UpdateClientTimes($CTF::Overtime * 60 * 1000);
|
||||
EndCountdown($CTF::Overtime * 60 * 1000);
|
||||
%game.timeCheck = %game.schedule($CTF::Overtime * 60 * 1000, "timeLimitReached");
|
||||
|
||||
//Cancel vote if any
|
||||
if(%game.scheduleVote !$= "")
|
||||
{
|
||||
messageAll('closeVoteHud', "");
|
||||
cancel(Game.scheduleVote);
|
||||
Game.scheduleVote = "";
|
||||
Game.kickClient = "";
|
||||
clearVotes();
|
||||
|
||||
//Stop vote chimes
|
||||
for(%i = 0; %i < $Host::EnableVoteSoundReminders; %i++)
|
||||
{
|
||||
if(isEventPending(Game.voteReminder[%i]))
|
||||
cancel(Game.voteReminder[%i]);
|
||||
Game.voteReminder[%i] = "";
|
||||
}
|
||||
messageAll('MsgOvertime', "\c2Vote has been cancelled due to Sudden-Death Overtime.");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(%game.scheduleVote !$= "" && !%game.voteOT)
|
||||
{
|
||||
messageAll('MsgOvertime', '\c2Vote Overtime Initiated.~wfx/powered/turret_heavy_activate.wav');
|
||||
%game.voteOT = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
%game.timeLimitReached();
|
||||
}
|
||||
%game.timeLimitReached();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -689,6 +689,9 @@ function LCTFGame::gameOver(%game)
|
|||
|
||||
if (isActivePackage(LCTFOneMine))
|
||||
deactivatePackage(LCTFOneMine);
|
||||
|
||||
%game.voteOT = 0;
|
||||
%game.overtime = 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1566,7 +1569,13 @@ function LCTFGame::checkTimeLimit(%game, %forced)
|
|||
{
|
||||
%teamOneCaps = mFloor($TeamScore[1] / %game.SCORE_PER_TEAM_FLAG_CAP);
|
||||
%teamTwoCaps = mFloor($TeamScore[2] / %game.SCORE_PER_TEAM_FLAG_CAP);
|
||||
if(%teamOneCaps == %teamTwoCaps && $LCTF::Overtime && (($TeamRank[1, count] + $TeamRank[2, count]) > 6)){
|
||||
if(%game.scheduleVote !$= "" && !%game.voteOT && !$Host::TournamentMode)
|
||||
{
|
||||
messageAll('MsgOvertime', '\c2Vote Overtime Initiated.~wfx/powered/turret_heavy_activate.wav');
|
||||
%game.voteOT = 1;
|
||||
}
|
||||
else if(%teamOneCaps == %teamTwoCaps && $LCTF::Overtime && (($TeamRank[1, count] + $TeamRank[2, count]) > 6))
|
||||
{
|
||||
if(!%game.overtime)
|
||||
{
|
||||
%game.overtime = 1;
|
||||
|
|
@ -1576,19 +1585,30 @@ function LCTFGame::checkTimeLimit(%game, %forced)
|
|||
UpdateClientTimes($LCTF::Overtime * 60 * 1000);
|
||||
EndCountdown($LCTF::Overtime * 60 * 1000);
|
||||
%game.timeCheck = %game.schedule($LCTF::Overtime * 60 * 1000, "timeLimitReached");
|
||||
|
||||
//Cancel vote if any
|
||||
if(%game.scheduleVote !$= "")
|
||||
{
|
||||
messageAll('closeVoteHud', "");
|
||||
cancel(Game.scheduleVote);
|
||||
Game.scheduleVote = "";
|
||||
Game.kickClient = "";
|
||||
clearVotes();
|
||||
|
||||
//Stop vote chimes
|
||||
for(%i = 0; %i < $Host::EnableVoteSoundReminders; %i++)
|
||||
{
|
||||
if(isEventPending(Game.voteReminder[%i]))
|
||||
cancel(Game.voteReminder[%i]);
|
||||
Game.voteReminder[%i] = "";
|
||||
}
|
||||
messageAll('MsgOvertime', "\c2Vote has been cancelled due to Sudden-Death Overtime.");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(%game.scheduleVote !$= "" && !%game.voteOT)
|
||||
{
|
||||
messageAll('MsgOvertime', '\c2Vote Overtime Initiated.~wfx/powered/turret_heavy_activate.wav');
|
||||
%game.voteOT = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
%game.timeLimitReached();
|
||||
}
|
||||
%game.timeLimitReached();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -166,6 +166,23 @@
|
|||
// 1 - Players get 999 or unlimited DiscJumps
|
||||
//
|
||||
|
||||
datablock ItemData(LakFakeFlag2) : flag
|
||||
{
|
||||
lightColor = "0.1 0.1 0.9 1.0";
|
||||
className = LakFakeFlag;
|
||||
lightTime = "100";
|
||||
lightRadius = "5";
|
||||
};
|
||||
|
||||
datablock ItemData(LakFakeFlag4) : LakFakeFlag2
|
||||
{
|
||||
lightColor = "0.9 0.9 0.1 1.0";
|
||||
};
|
||||
|
||||
datablock ItemData(LakFakeFlag8) : LakFakeFlag2
|
||||
{
|
||||
lightColor = "0.1 0.9 0.1 1.0";
|
||||
};
|
||||
|
||||
package LakRabbitGame {
|
||||
|
||||
|
|
@ -417,7 +434,12 @@ function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %am
|
|||
|
||||
// no splash damage vote
|
||||
if(Game.noSplashDamage && %percentDam < 98 && $lastObjExplode && !$lastObjExplode.isHandNade && %damageType != $DamageType::Mine)
|
||||
%amount = 0.0;
|
||||
{
|
||||
if(!%targetObject.holdingFlag)
|
||||
%amount = 0.0;
|
||||
else if(((getSimTime() - %targetObject.client.rabbitSplash) < 15000)) //Turn on splash for rabbit after not making a shot for an alotted time
|
||||
%amount = 0.0;
|
||||
}
|
||||
|
||||
switch$(%damageType)
|
||||
{
|
||||
|
|
@ -435,6 +457,10 @@ function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %am
|
|||
%sound = %defaultSound;
|
||||
}
|
||||
|
||||
%tgPos = %targetObject.getPosition();
|
||||
%terrHeight = getTerrainHeight(getWords(%tgPos,0,1));
|
||||
%playerHeight = mAbs(getWord(%tgPos,2) - %terrHeight);
|
||||
|
||||
// special knockback if you hit too close, max 15% chance (point blank).. 5% at 30meters, 1% chance for any MA
|
||||
|
||||
// Slap based on a Disc headshot
|
||||
|
|
@ -483,6 +509,42 @@ function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %am
|
|||
messageAll('msgSlapmessage','\c0%1 is taking a short tour around the map.', %targetObject.client.name );
|
||||
}
|
||||
}
|
||||
else if(%ma && getRandom(1,35) <= %chance && %playerHeight >= 100 && %targetObject.holdingFlag)
|
||||
{
|
||||
|
||||
Game.playerDroppedFlag(%targetObject);
|
||||
|
||||
%position = %targetObject.getPosition();
|
||||
%count = 40;
|
||||
%ttl = 60000;
|
||||
%player = %targetObject;
|
||||
if( %position $= "" )
|
||||
{
|
||||
error("No position passed!");
|
||||
return 0;
|
||||
}
|
||||
if( %count <= 0 )
|
||||
{
|
||||
error("Number of flags to spew must be greater than 0!");
|
||||
return 0;
|
||||
}
|
||||
|
||||
%flagArr[0] = LakFakeFlag8;
|
||||
%flagArr[1] = LakFakeFlag2;
|
||||
%flagArr[2] = LakFakeFlag4;
|
||||
|
||||
while( %count > 0 )
|
||||
{
|
||||
%index = mFloor(getRandom() * 3);
|
||||
// throwDummyFlag(location, Datablock);
|
||||
LakRabbitGame::throwDummyFlag(%position, %flagArr[%index], %player, %ttl);
|
||||
%count--;
|
||||
}
|
||||
|
||||
%targetObject.blowup();
|
||||
%targetObject.scriptKill($DamageType::Explosion);
|
||||
%sound = '~wfx/misc/MA1.wav';
|
||||
}
|
||||
%weapon = "Disc";
|
||||
case $DamageType::Grenade:
|
||||
if($lastObjExplode.isHandNade) //Hand grenades
|
||||
|
|
@ -746,10 +808,15 @@ function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %am
|
|||
}
|
||||
|
||||
// borlak -- make a sound when you hit someone
|
||||
if(%sound $= "" && %sourceObject.client.team != %targetObject.client.team)
|
||||
messageClient(%sourceObject.client,'MsgHitSound','~wfx/misc/diagnostic_beep.wav');
|
||||
else if(%sound !$= "")
|
||||
// if(%sound $= "" && %sourceObject.client.team != %targetObject.client.team)
|
||||
// messageClient(%sourceObject.client,'MsgHitSound','~wfx/misc/diagnostic_beep.wav');
|
||||
// else if(%sound !$= ""){
|
||||
if(%sound !$= ""){
|
||||
messageAll('msgSpecialHitSound', %sound);
|
||||
if(%sourceObject.holdingFlag){
|
||||
%sourceObject.client.rabbitSplash = getSimTime();
|
||||
}
|
||||
}
|
||||
|
||||
// borlak -- rabbit should be able to kill heavies/mediums fast(er) in duel mode
|
||||
if(%targetObject.client.armor $= "Heavy" || %targetObject.client.armor $= "Medium")
|
||||
|
|
@ -1905,6 +1972,7 @@ function LakRabbitGame::playerTouchFlag(%game, %player, %flag)
|
|||
cancel(%game.updateFlagThread[%flag]); // z0dd - ZOD, 8/4/02. Cancel this flag's thread to KineticPoet's flag updater
|
||||
%player.freeDJ = 0;
|
||||
%flag.bounced = 0;
|
||||
%player.client.rabbitSplash = getSimTime();
|
||||
|
||||
%player.client.startTime = getSimTime();
|
||||
%player.holdingFlag = %flag;
|
||||
|
|
@ -2017,6 +2085,45 @@ function LakRabbitGame::resetFlag(%game, %flag)
|
|||
cancel(%game.updateFlagThread[%flag]); // z0dd - ZOD, 8/4/02. Cancel this flag's thread to KineticPoet's flag updater
|
||||
}
|
||||
|
||||
function LakRabbitGame::checkTimeLimit(%game, %forced)
|
||||
{
|
||||
// Don't add extra checks:
|
||||
if ( %forced )
|
||||
cancel( %game.timeCheck );
|
||||
|
||||
// if there is no time limit, check back in a minute to see if it's been set
|
||||
if(($Host::TimeLimit $= "") || $Host::TimeLimit == 0)
|
||||
{
|
||||
%game.timeCheck = %game.schedule(20000, "checkTimeLimit");
|
||||
return;
|
||||
}
|
||||
|
||||
%curTimeLeftMS = ($Host::TimeLimit * 60 * 1000) + $missionStartTime - getSimTime();
|
||||
|
||||
if (%curTimeLeftMS <= 0)
|
||||
{
|
||||
if(%game.scheduleVote !$= "" && !%game.voteOT && !$Host::TournamentMode)
|
||||
{
|
||||
messageAll('MsgOvertime', '\c2Vote Overtime Initiated.~wfx/powered/turret_heavy_activate.wav');
|
||||
%game.voteOT = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
%game.timeLimitReached();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(%curTimeLeftMS >= 20000)
|
||||
%game.timeCheck = %game.schedule(20000, "checkTimeLimit");
|
||||
else
|
||||
%game.timeCheck = %game.schedule(%curTimeLeftMS + 1, "checkTimeLimit");
|
||||
|
||||
//now synchronize everyone's clock
|
||||
messageAll('MsgSystemClock', "", $Host::TimeLimit, %curTimeLeftMS);
|
||||
}
|
||||
}
|
||||
|
||||
// ----- These functions are native to Rabbit
|
||||
|
||||
function LakRabbitGame::timeLimitReached(%game)
|
||||
|
|
@ -2092,6 +2199,9 @@ function LakRabbitGame::gameOver(%game)
|
|||
// borlak -- delete variables
|
||||
deleteVariables("$LakFired*");
|
||||
deleteVariables("$LakDamaged*");
|
||||
|
||||
%game.voteOT = 0;
|
||||
%game.overtime = 0;
|
||||
}
|
||||
|
||||
function LakRabbitGame::resetScore(%game, %client)
|
||||
|
|
@ -2617,96 +2727,41 @@ function LakRabbitGame::applyConcussion(%game, %player)
|
|||
%game.dropFlag( %player );
|
||||
}
|
||||
|
||||
//--------------------------------Footnotes---------------------------------------
|
||||
//
|
||||
//
|
||||
//To make vote options work in evo admin mod, demonstration only below
|
||||
//
|
||||
//function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %playerVote)
|
||||
//{
|
||||
// parent::serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %playerVote);
|
||||
//
|
||||
// // sonic9k 11/6/2003 - Added support for LakRabbit DuelMode option
|
||||
// //
|
||||
// case "VoteDuelMode":
|
||||
// if( %isAdmin && !%client.ForceVote )
|
||||
// {
|
||||
// adminStartNewVote(%client, %typename, %arg1, %arg2, %arg3, %arg4);
|
||||
// adminLog(%client, " has toggled " @ %arg1 @ " (" @ %arg2 @ ")");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// if(Game.scheduleVote !$= "")
|
||||
// {
|
||||
// messageClient(%client, 'voteAlreadyRunning', '\c2A vote is already in progress.');
|
||||
// return;
|
||||
// }
|
||||
// %actionMsg = ($Host::LakRabbitDuelMode ? "disable Duel mode" : "enable Duel mode");
|
||||
// for(%idx = 0; %idx < ClientGroup.getCount(); %idx++)
|
||||
// {
|
||||
// %cl = ClientGroup.getObject(%idx);
|
||||
// if(!%cl.isAIControlled())
|
||||
// {
|
||||
// messageClient(%cl, 'VoteStarted', '\c2%1 initiated a vote to %2.', %client.name, %actionMsg);
|
||||
// %clientsVoting++;
|
||||
// }
|
||||
// }
|
||||
// playerStartNewVote(%client, %typename, %arg1, %arg2, %arg3, %arg4, %clientsVoting);
|
||||
// }
|
||||
// //
|
||||
// // sonic9k 11/6/2003 - Added support for LakRabbit SplashDamage option
|
||||
// //
|
||||
// case "VoteSplashDamage":
|
||||
// if( %isAdmin && !%client.ForceVote )
|
||||
// {
|
||||
// adminStartNewVote(%client, %typename, %arg1, %arg2, %arg3, %arg4);
|
||||
// adminLog(%client, " has toggled " @ %arg1 @ " (" @ %arg2 @ ")");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// if(Game.scheduleVote !$= "")
|
||||
// {
|
||||
// messageClient(%client, 'voteAlreadyRunning', '\c2A vote is already in progress.');
|
||||
// return;
|
||||
// }
|
||||
// %actionMsg = ($Host::LakRabbitNoSplashDamage ? "enable SplashDamage" : "disable SplashDamage");
|
||||
// for(%idx = 0; %idx < ClientGroup.getCount(); %idx++)
|
||||
// {
|
||||
// %cl = ClientGroup.getObject(%idx);
|
||||
// if(!%cl.isAIControlled())
|
||||
// {
|
||||
// messageClient(%cl, 'VoteStarted', '\c2%1 initiated a vote to %2.', %client.name, %actionMsg);
|
||||
// %clientsVoting++;
|
||||
// }
|
||||
// }
|
||||
// playerStartNewVote(%client, %typename, %arg1, %arg2, %arg3, %arg4, %clientsVoting);
|
||||
// }
|
||||
// //
|
||||
// // chocotaco 8/7/2018 - Added support for LakRabbit Pro option
|
||||
// //
|
||||
// case "VotePro":
|
||||
// if( %isAdmin && !%client.ForceVote )
|
||||
// {
|
||||
// adminStartNewVote(%client, %typename, %arg1, %arg2, %arg3, %arg4);
|
||||
// adminLog(%client, " has toggled " @ %arg1 @ " (" @ %arg2 @ ")");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// if(Game.scheduleVote !$= "")
|
||||
// {
|
||||
// messageClient(%client, 'voteAlreadyRunning', '\c2A vote is already in progress.');
|
||||
// return;
|
||||
// }
|
||||
// %actionMsg = ($Host::LakRabbitPubPro ? "disable Pro mode" : "enable Pro mode");
|
||||
// for(%idx = 0; %idx < ClientGroup.getCount(); %idx++)
|
||||
// {
|
||||
// %cl = ClientGroup.getObject(%idx);
|
||||
// if(!%cl.isAIControlled())
|
||||
// {
|
||||
// messageClient(%cl, 'VoteStarted', '\c2%1 initiated a vote to %2.', %client.name, %actionMsg);
|
||||
// %clientsVoting++;
|
||||
// }
|
||||
// }
|
||||
// playerStartNewVote(%client, %typename, %arg1, %arg2, %arg3, %arg4, %clientsVoting);
|
||||
// }
|
||||
//}
|
||||
function LakRabbitGame::throwDummyFlag(%position, %datablock, %player, %ttl)
|
||||
{
|
||||
%client = %player.client;
|
||||
|
||||
// create a flag and throw it
|
||||
%droppedflag = new Item() {
|
||||
position = %position;
|
||||
rotation = "0 0 1 " @ (getRandom() * 360);
|
||||
scale = "1 1 1";
|
||||
dataBlock = %datablock;
|
||||
collideable = "0";
|
||||
static = "0";
|
||||
rotate = "1";
|
||||
team = "0";
|
||||
isFake = 1;
|
||||
};
|
||||
MissionCleanup.add(%droppedflag);
|
||||
|
||||
%vec = (-1.0 + getRandom() * 2.0) SPC (-1.0 + getRandom() * 2.0) SPC getRandom();
|
||||
%vec = VectorScale(%vec, getrandom(250,1000) + (getRandom() * 300));
|
||||
|
||||
// Add player's velocity
|
||||
if (%player !$= "")
|
||||
{
|
||||
%droppedflag.setCollisionTimeout(%player);
|
||||
%vec = vectorAdd(%vec, %player.getVelocity());
|
||||
}
|
||||
|
||||
%droppedflag.applyImpulse(%pos, %vec);
|
||||
|
||||
%droppedFlag.die = schedule(getrandom(1500,3500), 0, "removeLakFakeFlag", %droppedflag);
|
||||
}
|
||||
|
||||
function removeLakFakeFlag(%flag)
|
||||
{
|
||||
%flag.startFade(600, 0, true);
|
||||
%flag.schedule(601, "delete");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -502,8 +502,6 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
|
|||
{
|
||||
if(%arg1 $= "999") %time = "unlimited"; else %time = %arg1;
|
||||
%msg = %client.nameBase @ " initiated a vote to change the time limit to " @ %time SPC "minutes.";
|
||||
// VoteOvertime
|
||||
StartVOTimeVote(%game);
|
||||
|
||||
$CMHasVoted[%client.guid]++;
|
||||
}
|
||||
|
|
@ -583,11 +581,12 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
|
|||
case "stopRunningVote":
|
||||
if(%client.isSuperAdmin || (%client.isAdmin && $Host::AllowAdminStopVote))
|
||||
{
|
||||
if($VOStatus $="InProgress") //Dont allow a stop vote after time has expired, then no new time is set - VoteOverTime
|
||||
{
|
||||
messageClient(%client, "", "\c2Can't stop time vote after time has expired.");
|
||||
return;
|
||||
}
|
||||
// %curTimeLeftMS = ($Host::TimeLimit * 60 * 1000) + $missionStartTime - getSimTime();
|
||||
// if(%curTimeLeftMS <= 0) //Dont allow a stop vote after time has expired, then no new time is set - VoteOverTime
|
||||
// {
|
||||
// messageClient(%client, "", "\c2Can't stop vote after time has expired.");
|
||||
// return;
|
||||
// }
|
||||
|
||||
stopCurrentVote(%client);
|
||||
adminLog(%client, " stopped the vote in progress.");
|
||||
|
|
@ -1223,8 +1222,6 @@ function DefaultGame::voteChangeTimeLimit( %game, %admin, %newLimit )
|
|||
{
|
||||
messageAll('MsgVotePassed', '\c2The mission time limit was set to %1 minutes by vote.', %display);
|
||||
$Host::TimeLimit = %newLimit;
|
||||
// VoteOvertime
|
||||
ResetVOTimeChanged(%game);
|
||||
// Reset the voted time limit when changing mission
|
||||
$TimeLimitChanged = 1;
|
||||
|
||||
|
|
@ -1243,9 +1240,6 @@ function DefaultGame::voteChangeTimeLimit( %game, %admin, %newLimit )
|
|||
votePercentLog(%newLimit, %typeName, %key, %game.totalVotesFor, %game.totalVotesAgainst, %totalVotes, %game.totalVotesNone);
|
||||
//Show Vote %
|
||||
messageAll('', '\c1Vote %6: \c0Yea: %1 Nay: %2 Abstain: %7 Total: %3 [%4%5]', %game.totalVotesFor, %game.totalVotesAgainst, %totalVotes, mfloor((%game.totalVotesFor/(ClientGroup.getCount() - %game.totalVotesNone)) * 100), "%", %key, %game.totalVotesNone);
|
||||
|
||||
// VoteOvertime
|
||||
ResetVOall(%game);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,99 +0,0 @@
|
|||
// Vote OverTime Script
|
||||
//
|
||||
// Dont allow the match to end if a time vote is pending
|
||||
// Or if the timelimit has changed
|
||||
//
|
||||
// Changes were also made in how time votes are handled in scripts/autoexec/VoteMenu.cs
|
||||
// DefaultGame::voteChangeMission, DefaultGame::voteChangeTimeLimit, serverCmdStartNewVote
|
||||
//
|
||||
// The VoteChangeTimeLimit functions in evo dictate VOStatus conditions
|
||||
|
||||
$VOStatus = "Normal";
|
||||
|
||||
package VoteOverTime
|
||||
{
|
||||
|
||||
function DefaultGame::checkTimeLimit(%game, %forced)
|
||||
{
|
||||
// Don't add extra checks:
|
||||
if ( %forced )
|
||||
cancel( %game.timeCheck );
|
||||
|
||||
// if there is no time limit, check back in a minute to see if it's been set
|
||||
if(($Host::TimeLimit $= "") || $Host::TimeLimit == 0)
|
||||
{
|
||||
%game.timeCheck = %game.schedule(20000, "checkTimeLimit");
|
||||
return;
|
||||
}
|
||||
|
||||
%curTimeLeftMS = ($Host::TimeLimit * 60 * 1000) + $missionStartTime - getSimTime();
|
||||
|
||||
if (%curTimeLeftMS <= 0)
|
||||
{
|
||||
//Vote Overtime
|
||||
//Check if Time Vote is starting or active or if the timelimit has changed.
|
||||
//If the timelimit has changed, don't end the game.
|
||||
switch$($VOStatus)
|
||||
{
|
||||
case Starting:
|
||||
if($missionRunning)
|
||||
{
|
||||
messageAll('', '\c2Vote Overtime Initiated.~wfx/powered/turret_heavy_activate.wav', %display);
|
||||
$VOStatus = "InProgress";
|
||||
}
|
||||
case InProgress:
|
||||
//Do Nothing
|
||||
case TimeChanged:
|
||||
//Do Nothing
|
||||
case Normal:
|
||||
// time's up, put down your pencils
|
||||
%game.timeLimitReached();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(%curTimeLeftMS >= 20000)
|
||||
%game.timeCheck = %game.schedule(20000, "checkTimeLimit");
|
||||
else
|
||||
%game.timeCheck = %game.schedule(%curTimeLeftMS + 1, "checkTimeLimit");
|
||||
|
||||
//now synchronize everyone's clock
|
||||
messageAll('MsgSystemClock', "", $Host::TimeLimit, %curTimeLeftMS);
|
||||
}
|
||||
}
|
||||
|
||||
function DefaultGame::gameOver(%game)
|
||||
{
|
||||
Parent::gameOver(%game);
|
||||
|
||||
//Reset everything to do with Vote Overtime
|
||||
ResetVOall(%game);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Various Flags for the different situations
|
||||
// Starting a TimeVote - Sets flags so the game wont end during this vote
|
||||
function StartVOTimeVote(%game)
|
||||
{
|
||||
if(!$Host::TournamentMode)
|
||||
$VOStatus = "Starting";
|
||||
}
|
||||
|
||||
// Tribes wont change the time after its reached zero and you cant change it again afterwards until a gameover/map change.
|
||||
// But this serves its purpose for extending the game whether it works (technically) or not.
|
||||
function ResetVOTimeChanged(%game)
|
||||
{
|
||||
$VOStatus = "TimeChanged";
|
||||
}
|
||||
|
||||
// Reset everything. So everything functions normally after a map change.
|
||||
function ResetVOall(%game)
|
||||
{
|
||||
$VOStatus = "Normal";
|
||||
}
|
||||
|
||||
|
||||
// Prevent package from being activated if it is already
|
||||
if (!isActivePackage(VoteOverTime))
|
||||
activatePackage(VoteOverTime);
|
||||
Loading…
Reference in a new issue