Merge branch 'Dev' into Stable

This commit is contained in:
ChocoTaco 2025-04-26 18:46:39 -04:00
commit 83fd350b44
7 changed files with 3117 additions and 3116 deletions

View file

@ -878,6 +878,12 @@ function buildMissionList()
for( %word = 0; ( %misType = getWord( %typeList, %word ) ) !$= ""; %word++ ) for( %word = 0; ( %misType = getWord( %typeList, %word ) ) !$= ""; %word++ )
{ {
//---------------------------------------------------------------------------------
// z0dd - ZOD - Founder(founder@mechina.com): Append Tribe Practice to CTF missions
if(%misType $= "CTF")
%typeList = rtrim(%typeList) @ " PracticeCTF SCtF Hybrid LCTF";
//---------------------------------------------------------------------------------
// Eolk - remove gametype skip code // Eolk - remove gametype skip code
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// z0dd - ZOD, 01/02/03. Don't include TR2 gametype if it's turned off // z0dd - ZOD, 01/02/03. Don't include TR2 gametype if it's turned off

View file

@ -500,6 +500,14 @@ function LCTFGame::missionLoadDone(%game)
//%game.campThread_2 = schedule( 1000, 0, "checkVehicleCamping", 2 ); //%game.campThread_2 = schedule( 1000, 0, "checkVehicleCamping", 2 );
deleteNonLCTFObjects(); deleteNonLCTFObjects();
if($Host::LCTFOneMine){
//Prevent package from being activated if it is already
if (!isActivePackage(LCTFOneMine))
activatePackage(LCTFOneMine);
}
else if (isActivePackage(LCTFOneMine))
deactivatePackage(LCTFOneMine);
} }
function LCTFGame::clientMissionDropReady(%game, %client) function LCTFGame::clientMissionDropReady(%game, %client)
@ -648,6 +656,9 @@ function LCTFGame::gameOver(%game)
} }
for(%j = 1; %j <= %game.numTeams; %j++) for(%j = 1; %j <= %game.numTeams; %j++)
$TeamScore[%j] = 0; $TeamScore[%j] = 0;
if (isActivePackage(LCTFOneMine))
deactivatePackage(LCTFOneMine);
} }
@ -2282,6 +2293,21 @@ function LCTFGame::sendGameVoteMenu(%game, %client, %key)
else else
messageClient( %client, 'MsgVoteItem', "", %key, 'LCTFProMode', 'Disable Pro Mode (Disc, SL, GL Only)', 'Disable Pro Mode (Disc, SL, GL Only)' ); messageClient( %client, 'MsgVoteItem', "", %key, 'LCTFProMode', 'Disable Pro Mode (Disc, SL, GL Only)', 'Disable Pro Mode (Disc, SL, GL Only)' );
} }
if(!%isAdmin || (%isAdmin && %client.ForceVote))
{
if(!$Host::LCTFOneMine)
messageClient( %client, 'MsgVoteItem', "", %key, 'LCTFOneMine', 'Enable One Mine Inventory', 'Vote to enable One Mine Inventory' );
else
messageClient( %client, 'MsgVoteItem', "", %key, 'LCTFOneMine', 'Disable One Mine Inventory', 'Vote to disable One Mine Inventory' );
}
else
{
if(!$Host::LCTFOneMine)
messageClient( %client, 'MsgVoteItem', "", %key, 'LCTFOneMine', 'Enable One Mine Inventory', 'Enable One Mine Inventory' );
else
messageClient( %client, 'MsgVoteItem', "", %key, 'LCTFOneMine', 'Disable One Mine Inventory', 'Disable One Mine Inventory' );
}
} }
} }
@ -2320,6 +2346,8 @@ function LCTFGame::evalVote(%game, %typeName, %admin, %arg1, %arg2, %arg3, %arg4
//%game.VoteArmorClass(%admin, %arg1, %arg2, %arg3, %arg4); //%game.VoteArmorClass(%admin, %arg1, %arg2, %arg3, %arg4);
case "LCTFProMode": case "LCTFProMode":
%game.LCTFProMode(%admin, %arg1, %arg2, %arg3, %arg4); %game.LCTFProMode(%admin, %arg1, %arg2, %arg3, %arg4);
case "LCTFOneMine":
%game.LCTFOneMine(%admin, %arg1, %arg2, %arg3, %arg4);
} }
parent::evalVote(%game, %typeName, %admin, %arg1, %arg2, %arg3, %arg4); parent::evalVote(%game, %typeName, %admin, %arg1, %arg2, %arg3, %arg4);
@ -2470,6 +2498,86 @@ function LCTFGame::LCTFProMode(%game, %admin, %arg1, %arg2, %arg3, %arg4)
} }
} }
} }
//--------------------------------LCTFOneMine--------------------------------
//
$VoteMessage["LCTFOneMine"] = "turn";
//Set Mine Max
package LCTFOneMine
{
//Set Mine Max
function Player::maxInventory(%this, %data){
if(isObject(%data)){
if(%data.getName() $= "Mine" && Game.class $= "LCTFGame"){
return 1;
}
}
return ShapeBase::maxInventory(%this, %data);
}
};
function LCTFGame::LCTFOneMine(%game, %admin, %arg1, %arg2, %arg3, %arg4)
{
if( $countdownStarted && $MatchStarted )
{
if(%admin)
{
killeveryone();
if($Host::LCTFOneMine)
{
messageAll('MsgAdminForce', '\c2The Admin has disabled One Mine Inventory.');
if (isActivePackage(LCTFOneMine))
deactivatePackage(LCTFOneMine);
$Host::LCTFOneMine = false;
}
else
{
messageAll('MsgAdminForce', '\c2The Admin has enabled One Mine Inventory.');
if (!isActivePackage(LCTFOneMine))
activatePackage(LCTFOneMine);
$Host::LCTFOneMine = true;
}
}
else
{
%totalVotes = %game.totalVotesFor + %game.totalVotesAgainst;
if(%totalVotes > 0 && (%game.totalVotesFor / ClientGroup.getCount()) > ($Host::VotePasspercent / 100))
{
killeveryone();
if($Host::LCTFOneMine)
{
messageAll('MsgVotePassed', '\c2One Mine Inventory Disabled.');
if (isActivePackage(LCTFOneMine))
deactivatePackage(LCTFOneMine);
$Host::LCTFOneMine = false;
}
else
{
messageAll('MsgVotePassed', '\c2One Mine Inventory Enabled.');
if (!isActivePackage(LCTFOneMine))
activatePackage(LCTFOneMine);
$Host::LCTFOneMine = true;
}
}
else
messageAll('MsgVoteFailed', '\c2Mode change did not pass: %1 percent.', mFloor(%game.totalVotesFor/ClientGroup.getCount() * 100));
}
}
}
// For voting to work properly - evo admin.ovl // For voting to work properly - evo admin.ovl
// //
// case "LCTFProMode": // case "LCTFProMode":

View file

@ -1,151 +0,0 @@
// MidAir Detection Replacement
// For CTF, LCTF, DM
// Script By: DarkTiger
// v1.0
//
$MADR::Minimum = 10;
//Replacing Classic Midair Hit Detection
//
//function ProjectileData::onCollision(%data, %projectile, %targetObject, %modifier, %position, %normal)
//{
// if(!isObject(%targetObject) && !isObject(%projectile.sourceObject))
// return;
// if(!(%targetObject.getType() & ($TypeMasks::StaticTSObjectType | $TypeMasks::InteriorObjectType |
// $TypeMasks::TerrainObjectType | $TypeMasks::WaterObjectType)))
// {
// if(%projectile.sourceObject.team !$= %targetObject.team)
// {
// if(%targetObject.getDataBlock().getClassName() $= "PlayerData" && %data.getName() $= "DiscProjectile")
// {
// %mask = $TypeMasks::StaticShapeObjectType | $TypeMasks::InteriorObjectType | $TypeMasks::TerrainObjectType;
// %start = %targetObject.getWorldBoxCenter();
// %distance = mFloor(VectorDist(%start, %projectile.initialPosition));
// %end = getWord(%start, 0) SPC getWord(%start, 1) SPC getWord(%start, 2) - 15;
// %grounded = ContainerRayCast(%start, %end, %mask, 0);
// if(!%grounded)
// {
// %projectile.sourceObject.client.scoreMidAir++;
// messageClient(%projectile.sourceObject.client, 'MsgMidAir', '\c0You received a %1 point bonus for a successful mid air shot.~wfx/misc/bounty_bonus.wav', Game.SCORE_PER_MIDAIR, %data.radiusDamageType, %distance);
// messageTeamExcept(%projectile.sourceObject.client, 'MsgMidAir', '\c5%1 hit a mid air shot.', %projectile.sourceObject.client.name, %data.radiusDamageType, %distance);
// Game.recalcScore(%projectile.sourceObject.client);
// }
// }
// }
// Parent::onCollision(%data, %projectile, %targetObject, %modifier, %position, %normal);
// }
//}
package midAirMsg
{
function detonateGrenade(%obj) // from lakRabbitGame.cs for grenade tracking
{
%obj.maNade = 1;
$maObjExplode = %obj;
parent::detonateGrenade(%obj);
}
function ProjectileData::onExplode(%data, %proj, %pos, %mod)
{
%cl = %proj.sourceObject.client;
if(isObject(%cl))
%cl.expData = %data TAB %proj.initialPosition TAB %pos;
parent::onExplode(%data, %proj, %pos, %mod);
}
function DefaultGame::onClientDamaged(%game, %clVictim, %clAttacker, %damageType, %implement, %damageLoc)
{
if(%game.class $= "CTFGame" || %game.class $= "DMGame" || %game.class $= "SCtFGame") // did it this way so dont have to copy paste 3 fucntions
{
if(isObject(%clVictim.player) && isObject(%clAttacker.player))
{
if(%clVictim != %clAttacker && %clVictim.team != %clAttacker.team)
{
%dist = vectorDist(%clAttacker.player.getPosition(), %clVictim.player.getPosition());
switch$(%damageType)
{
//case $DamageType::Blaster:
//if(maRayTestDis(%clVictim.player) >= $MADR::Minimum)
//maMessage(%clAttacker,"Blaster",%dist);
case $DamageType::Plasma:
if(maRayTestDis(%clVictim.player) >= $MADR::Minimum && maDirect(%clAttacker))
maMessage(%clAttacker,"Plasma Rifle",%dist);
case $DamageType::Disc:
if(maRayTestDis(%clVictim.player) >= $MADR::Minimum && maDirect(%clAttacker))
maMessage(%clAttacker,"Spinfusor",%dist);
case $DamageType::Grenade:
if($dtObjExplode.dtNade)
{//for hand genades method out of lakRabbit
//if(maRayTestDis(%clVictim.player) >= $MADR::Minimum)
//maMessage(%clAttacker,"Hand Grenade",%dist);
}
else //Grenade Launcher
{
if(maRayTestDis(%clVictim.player) >= $MADR::Minimum && maDirect(%clAttacker))
maMessage(%clAttacker,"Grenade Launcher",%dist);
}
//case $DamageType::Laser:
//if(maRayTestDis(%clVictim.player) >= $MADR::Minimum)
//maMessage(%clAttacker,"Laser Rifle",%dist);
case $DamageType::Mortar:
if(maRayTestDis(%clVictim.player) >= $MADR::Minimum && maDirect(%clAttacker))
maMessage(%clAttacker,"Fusion Mortar",%dist);
//case $DamageType::ShockLance:
//if(maRayTestDis(%clVictim.player) >= $MADR::Minimum)
//maMessage(%clAttacker,"ShockLance",%dist);
//case $DamageType::Mine:
//if(maRayTestDis(%clVictim.player) >= $MADR::Minimum)
//maMessage(%clAttacker,"Mine",%dist);
}
}
}
}
parent::onClientDamaged(%game, %clVictim, %clAttacker, %damageType, %implement, %damageLoc);
}
};
// Prevent package from being activated if it is already
if(!isActivePackage(midAirMsg))
activatePackage(midAirMsg);
function maDirect(%client)// tests for direct hit with aoe weapons
{
%field = %client.expData;
%data = getField(%field,0); %sPos = getField(%field,1); %ePos = getField(%field,2);
if(%data.hasDamageRadius)
{
%mask = $TypeMasks::PlayerObjectType;
%vec = vectorNormalize(vectorSub(%ePos,%sPos));
%ray = containerRayCast(%ePos, VectorAdd(%ePos, VectorScale(VectorNormalize(%vec), 5)), %mask, -1);
if(%ray)
return 1;
}
return 0;
}
function maRayTestDis(%targetObject)// tests for height of target
{
%mask = $TypeMasks::StaticShapeObjectType | $TypeMasks::InteriorObjectType | $TypeMasks::TerrainObjectType | $TypeMasks::ForceFieldObjectType | $TypeMasks::VehicleObjectType;
%rayStart = %targetObject.getWorldBoxCenter();
%rayEnd = VectorAdd(%rayStart,"0 0" SPC -5000);
%ray = ContainerRayCast(%rayStart, %rayEnd, %mask, %targetObject);
if(%ray)
return vectorDist(%rayStart,getWords(%ray,1,3)) - 1.15;
return 0;
}
function maMessage(%client,%porjName,%distance)// Send message
{
%client.scoreMidAir++;
messageClient(%client, 'MsgMidAir', '\c0You received a %1 point bonus for a successful mid air shot. [%2m, %3]~wfx/misc/bounty_bonus.wav', Game.SCORE_PER_MIDAIR, mFloor(%distance), %porjName);
messageTeamExcept(%client, 'MsgMidAir', '\c5%1 hit a mid air shot. [%2m, %3]', %client.name, mFloor(%distance), %porjName);
Game.recalcScore(%client);
}

View file

@ -51,10 +51,12 @@ function DefaultGame::sendGameVoteMenu(%game, %client, %key)
{ {
if(!$Host::TournamentMode) if(!$Host::TournamentMode)
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTournamentMode', 'change server to Tournament.', 'Vote Tournament Mode'); messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTournamentMode', 'change server to Tournament.', 'Vote Tournament Mode');
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeMission', 'change the mission to', 'Vote to Change the Mission'); if(!$MatchStarted && !$CountdownStarted && $Host::TournamentMode)
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteNextMission', 'set next mission to', 'Vote to Set the Next Mission'); messageClient(%client, 'MsgVoteItem', "", %key, 'VoteMatchStart', 'Start Match', 'Vote to Start the Match');
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeTimeLimit', 'change the time limit', 'Vote to Change the Time Limit'); messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeMission', 'change the mission to', 'Vote to Change the Mission');
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteSkipMission', 'skip the mission to', 'Vote to Skip Mission' ); messageClient(%client, 'MsgVoteItem', "", %key, 'VoteNextMission', 'set next mission to', 'Vote to Set the Next Mission');
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteChangeTimeLimit', 'change the time limit', 'Vote to Change the Time Limit');
messageClient(%client, 'MsgVoteItem', "", %key, 'VoteSkipMission', 'skip the mission to', 'Vote to Skip Mission' );
if(%multipleTeams) if(%multipleTeams)
{ {
if($teamDamage) if($teamDamage)
@ -86,23 +88,26 @@ function DefaultGame::sendGameVoteMenu(%game, %client, %key)
//Mission Info Header - Mission Name, Type, Caps to Win //Mission Info Header - Mission Name, Type, Caps to Win
if(%client.canVote && %game.scheduleVote $= "") if(%client.canVote && %game.scheduleVote $= "")
{ {
if($voteNext)
%showNM = " - Next Map:" SPC $HostMissionName[$voteNextMap] SPC "(" @ $HostTypeName[$voteNextType] @ ")";
switch$($CurrentMissionType) switch$($CurrentMissionType)
{ {
case CTF or SCtF or LCTF: case CTF or SCtF or LCTF:
if($Host::TournamentMode) %showTL = " - Time Limit:" SPC $Host::TimeLimit SPC "Minutes";
%showTL = " - Time Limit:" SPC $Host::TimeLimit SPC "Minutes";
if($voteNext)
%showNM = " - Next Map:" SPC $HostMissionName[$voteNextMap] SPC "(" @ $HostTypeName[$voteNextType] @ ")";
messageClient(%client, 'MsgVoteItem', "", %key, '', $MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC MissionGroup.CTF_scoreLimit SPC "Caps to Win", messageClient(%client, 'MsgVoteItem', "", %key, '', $MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC MissionGroup.CTF_scoreLimit SPC "Caps to Win",
$MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC MissionGroup.CTF_scoreLimit SPC "Caps to Win" @ %showTL @ %showNM); $MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC MissionGroup.CTF_scoreLimit SPC "Caps to Win" @ %showTL @ %showNM);
case LakRabbit: case LakRabbit:
%cap = "2000 Points to Win"; %cap = "2000 Points to Win";
messageClient(%client, 'MsgVoteItem', "", %key, '', $MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC %cap, messageClient(%client, 'MsgVoteItem', "", %key, '', $MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC %cap,
$MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC %cap); $MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC %cap @ %showNM);
case DM: case DM:
%cap = "25 Points to Win"; %cap = "25 Points to Win";
messageClient(%client, 'MsgVoteItem', "", %key, '', $MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC %cap, messageClient(%client, 'MsgVoteItem', "", %key, '', $MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC %cap,
$MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC %cap); $MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC %cap @ %showNM);
default:
messageClient(%client, 'MsgVoteItem', "", %key, '', $MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ "):" SPC %cap,
$MissionDisplayName SPC "(" @ $MissionTypeDisplayName @ ")" @ %showNM);
} }
} }
@ -515,7 +520,7 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
} }
case "VoteMatchStart": case "VoteMatchStart":
if(!%isAdmin) if(!%isAdmin || (%isAdmin && %client.ForceVote))
{ {
if($MatchStarted || $CountdownStarted) if($MatchStarted || $CountdownStarted)
return; return;
@ -865,6 +870,13 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
if(!%isAdmin || (%isAdmin && %client.ForceVote)) if(!%isAdmin || (%isAdmin && %client.ForceVote))
%msg = %client.nameBase @ " initiated a vote to " @ (Game.LCTFProMode == 0 ? "enable" : "disable") @ " pro mode."; %msg = %client.nameBase @ " initiated a vote to " @ (Game.LCTFProMode == 0 ? "enable" : "disable") @ " pro mode.";
case "LCTFOneMine":
if(!$CurrentMissionType $= "LCTF")
return;
if(!%isAdmin || (%isAdmin && %client.ForceVote))
%msg = %client.nameBase @ " initiated a vote to " @ (Game.LCTFOneMine == 0 ? "enable" : "disable") @ " one mine mode.";
case "showServerRules": case "showServerRules":
if (($Host::ServerRules[1] !$= "") && (!%client.CantView)) if (($Host::ServerRules[1] !$= "") && (!%client.CantView))
{ {

View file

@ -15,7 +15,7 @@
// Note See bottom of file for full log // Note See bottom of file for full log
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//-----------Settings----------- //-----------Settings-----------
$dtStats::version = 10.53; $dtStats::version = 10.58;
//disable stats system //disable stats system
$dtStats::Enable = $Host::dtStatsEnable $= "" ? ($Host::dtStatsEnable = 1) : $Host::dtStatsEnable; $dtStats::Enable = $Host::dtStatsEnable $= "" ? ($Host::dtStatsEnable = 1) : $Host::dtStatsEnable;
if(!$dtStats::Enable){ return;}// so it disables with a restart if(!$dtStats::Enable){ return;}// so it disables with a restart
@ -28,17 +28,22 @@ $dtStats::midAirHeight = 10;
//only enable if evo system is not available //only enable if evo system is not available
$dtStats::midAirMessage = $Host::dtStatsMidAirMessage $= "" ? ($Host::dtStatsMidAirMessage = 1) : $Host::dtStatsMidAirMessage; $dtStats::midAirMessage = $Host::dtStatsMidAirMessage $= "" ? ($Host::dtStatsMidAirMessage = 1) : $Host::dtStatsMidAirMessage;
$dtStats::midAirMessage = isFile("scripts/autoexec/MidairDetection.cs") == 0 ? $dtStats::midAirMessage : 0;
//capture best cap times restart required if changed //capture best cap times restart required if changed
//only enable if evo system is not available //only enable if evo system is not available
$dtStats::ctfTimes = $Host::dtStatsCTFTimes $= "" ? ($Host::dtStatsCTFTimes = 0) : $Host::dtStatsCTFTimes; $dtStats::ctfTimes = $Host::dtStatsCTFTimes $= "" ? ($Host::dtStatsCTFTimes = 1) : $Host::dtStatsCTFTimes;
$dtStats::ctfTimes = $Host::ClassicEvoStats $= "" ? $dtStats::ctfTimes : 0;
//number of players before it starts counting captimes //number of players before it starts counting captimes
$dtStats::ctfTimesPlayerLimit = $Host::dtStatsCTFTimesPlayerLimit $= "" ? ($Host::dtStatsCTFTimesPlayerLimit = 8) : $Host::dtStatsCTFTimesPlayerLimit; $dtStats::ctfTimesPlayerLimit = $Host::dtStatsCTFTimesPlayerLimit $= "" ? ($Host::dtStatsCTFTimesPlayerLimit = 8) : $Host::dtStatsCTFTimesPlayerLimit;
//converts the debrief into easer to read teams for ctf and lctf //converts the debrief into easer to read teams for ctf and lctf
$dtStats::teamDebrief = $Host::dtStatsTeamDebrief $= "" ? ($Host::dtStatsTeamDebrief = 1) : $Host::dtStatsTeamDebrief; $dtStats::teamDebrief = $Host::dtStatsTeamDebrief $= "" ? ($Host::dtStatsTeamDebrief = 1) : $Host::dtStatsTeamDebrief;
$dtStats::teamDebrief = isFile("scripts/autoexec/EvoStats.cs") == 0 ? $dtStats::teamDebrief : 0;
//extends the debrief with extra stats done in the evo style //extends the debrief with extra stats done in the evo style
$dtStats::evoStyleDebrief = $Host::dtStatsEvoStyleDebrief $= "" ? ($Host::dtStatsEvoStyleDebrief = 1) : $Host::dtStatsEvoStyleDebrief ; $dtStats::evoStyleDebrief = $Host::dtStatsEvoStyleDebrief $= "" ? ($Host::dtStatsEvoStyleDebrief = 1) : $Host::dtStatsEvoStyleDebrief ;
$dtStats::evoStyleDebrief = isFile("scripts/autoexec/EvoStats.cs") == 0 ? $dtStats::evoStyleDebrief : 0;
// 30 sec min after not making an action reset // 30 sec min after not making an action reset
@ -1768,7 +1773,7 @@ $statsName["scoreMax"] = "Highest Score" TAB "Kmh";
$statsName["grabSpeedMax"] = "Max Grab Speed" TAB "Kmh"; $statsName["grabSpeedMax"] = "Max Grab Speed" TAB "Kmh";
$statsName["flagCatchSpeedMax"] = "Flag Catch Speed" TAB "Khm"; $statsName["flagCatchSpeedMax"] = "Flag Catch Speed" TAB "Khm";
$statsName["maFlagCatchSpeedMax"] = "MidAir Flag Speed" TAB "Kmh"; $statsName["maFlagCatchSpeedMax"] = "MidAir Flag Speed" TAB "Kmh";
$statsName["interceptSpeedMax"] = "Flag Intercept Speed" TAB "Kmh"; $statsName["interceptSpeedMax"] = "Intercept Speed" TAB "Kmh";
$statsName["interceptFlagSpeedMax"] = "Flag Speed Grab" TAB "Kmh"; $statsName["interceptFlagSpeedMax"] = "Flag Speed Grab" TAB "Kmh";
$statsName["maHitDistMax"] = "Midair Distance" TAB "Meter"; $statsName["maHitDistMax"] = "Midair Distance" TAB "Meter";
$statsName["maHitHeightMax"] = "Highest MidAir" TAB "Meter"; $statsName["maHitHeightMax"] = "Highest MidAir" TAB "Meter";
@ -3028,7 +3033,7 @@ package dtStats{
function CTFGame::awardScoreFlagCap(%game, %cl, %flag){ function CTFGame::awardScoreFlagCap(%game, %cl, %flag){
parent::awardScoreFlagCap(%game, %cl, %flag); parent::awardScoreFlagCap(%game, %cl, %flag);
%cl.dtStats.stat["flagCaps"] = %cl.flagCaps; %cl.dtStats.stat["flagCaps"]++;
dtMinMax("flagCaps", "flag", 1, %cl.dtStats.stat["flagCaps"], %cl); dtMinMax("flagCaps", "flag", 1, %cl.dtStats.stat["flagCaps"], %cl);
} }
function CTFGame::awardScoreFlagTouch(%game, %cl, %flag){ function CTFGame::awardScoreFlagTouch(%game, %cl, %flag){
@ -3228,7 +3233,7 @@ package dtStats{
} }
function LCTFGame::awardScoreFlagCap(%game, %cl, %flag){ function LCTFGame::awardScoreFlagCap(%game, %cl, %flag){
parent::awardScoreFlagCap(%game, %cl, %flag); parent::awardScoreFlagCap(%game, %cl, %flag);
%cl.dtStats.stat["flagCaps"] = %cl.flagCaps; %cl.dtStats.stat["flagCaps"]++;
dtMinMax("flagCaps", "flag", 1, %cl.dtStats.stat["flagCaps"], %cl); dtMinMax("flagCaps", "flag", 1, %cl.dtStats.stat["flagCaps"], %cl);
} }
function LCTFGame::awardScoreFlagTouch(%game, %cl, %flag){ function LCTFGame::awardScoreFlagTouch(%game, %cl, %flag){
@ -3283,7 +3288,7 @@ package dtStats{
} }
function SCtFGame::awardScoreFlagCap(%game, %cl, %flag){ function SCtFGame::awardScoreFlagCap(%game, %cl, %flag){
parent::awardScoreFlagCap(%game, %cl, %flag); parent::awardScoreFlagCap(%game, %cl, %flag);
%cl.dtStats.stat["flagCaps"] = %cl.flagCaps; %cl.dtStats.stat["flagCaps"]++;
dtMinMax("flagCaps", "flag", 1, %cl.dtStats.stat["flagCaps"], %cl); dtMinMax("flagCaps", "flag", 1, %cl.dtStats.stat["flagCaps"], %cl);
} }
function SCtFGame::awardScoreFlagTouch(%game, %cl, %flag){ function SCtFGame::awardScoreFlagTouch(%game, %cl, %flag){
@ -3400,8 +3405,15 @@ package dtStats{
else %othertotdistance = mFloor(%cl.totalDistance); else %othertotdistance = mFloor(%cl.totalDistance);
if(%cl.totalShockHits == 0) %shockhits = 0; if(%cl.totalShockHits == 0) %shockhits = 0;
else %shockhits = mFloor(%cl.totalShockHits); else %shockhits = mFloor(%cl.totalShockHits);
messageClient( %client, 'MsgDebriefAddLine', "", '<lmargin:0><clip%%:18> %1</clip><lmargin%%:23>%2<lmargin%%:34>%3<lmargin%%:44>%4<lmargin%%:52>%5<lmargin%%:62>%6<lmargin%%:70>%7<lmargin%%:80>%8%%<lmargin%%:90>%9',
%cl.name, %score, %kills, %mas, %avgSpeed, %avgDistance, %othertotdistance, %shockPercent, %shockhits); if(%client == %cl){
messageClient( %client, 'MsgDebriefAddLine', "", '<color:ffff00><lmargin:0><clip%%:18> %1</clip><lmargin%%:23>%2<lmargin%%:34>%3<lmargin%%:44>%4<lmargin%%:52>%5<lmargin%%:62>%6<lmargin%%:70>%7<lmargin%%:80>%8%%<lmargin%%:90>%9',
StripMLControlChars(getTaggedString(%cl.name)), %score, %kills, %mas, %avgSpeed, %avgDistance, %othertotdistance, %shockPercent, %shockhits);
}
else{
messageClient( %client, 'MsgDebriefAddLine', "", '<color:c8c8c8><lmargin:0><clip%%:18> %1</clip><lmargin%%:23>%2<lmargin%%:34>%3<lmargin%%:44>%4<lmargin%%:52>%5<lmargin%%:62>%6<lmargin%%:70>%7<lmargin%%:80>%8%%<lmargin%%:90>%9',
StripMLControlChars(getTaggedString(%cl.name)), %score, %kills, %mas, %avgSpeed, %avgDistance, %othertotdistance, %shockPercent, %shockhits);
}
if(%score) %totscore += %score; if(%score) %totscore += %score;
if(%kills) %totkills += %kills; if(%kills) %totkills += %kills;
@ -3415,7 +3427,6 @@ package dtStats{
if(%shockhits){ %totshockhits += %shockhits; } if(%shockhits){ %totshockhits += %shockhits; }
} }
messageClient( %client, 'MsgDebriefAddLine', "", '<spush><lmargin:0><Font:Arial:15><color:00FF7F>%1<lmargin%%:23>%2<lmargin%%:34>%3<lmargin%%:44>%4<lmargin%%:52>%5<lmargin%%:62>%6<lmargin%%:70>%7<lmargin%%:80>%8%%<lmargin%%:90>%9<spop>\n', messageClient( %client, 'MsgDebriefAddLine', "", '<spush><lmargin:0><Font:Arial:15><color:00FF7F>%1<lmargin%%:23>%2<lmargin%%:34>%3<lmargin%%:44>%4<lmargin%%:52>%5<lmargin%%:62>%6<lmargin%%:70>%7<lmargin%%:80>%8%%<lmargin%%:90>%9<spop>\n',
" Totals:", %totscore, %totkills, %totmas, mFloor(%totspeed/%speeds), mFloor(%totdistance/%dists), %alltotdistance, mFloor(%totshockpercent/%shocks), %totshockhits); " Totals:", %totscore, %totkills, %totmas, mFloor(%totspeed/%speeds), mFloor(%totdistance/%dists), %alltotdistance, mFloor(%totshockpercent/%shocks), %totshockhits);
extendedDebrief(%game, %client); extendedDebrief(%game, %client);
@ -4980,7 +4991,7 @@ function CTFHud(%game, %client, %tag){// defaultGame/evo
messageClient(%client, 'SetLineHud', "", %tag, %index, '<tab:11,295>\t<spush>%5<clip:200>%1</clip><rmargin:260><just:right>%2<spop><rmargin:555><just:left>\t%6<clip:200>%3</clip><just:right>%4', %team1Client.name, %team1ClientScore, %team2Client.name, %team2ClientScore, %col1Style, %col2Style); messageClient(%client, 'SetLineHud', "", %tag, %index, '<tab:11,295>\t<spush>%5<clip:200>%1</clip><rmargin:260><just:right>%2<spop><rmargin:555><just:left>\t%6<clip:200>%3</clip><just:right>%4', %team1Client.name, %team1ClientScore, %team2Client.name, %team2ClientScore, %col1Style, %col2Style);
} }
else{ //else for observers, create an anchor around the player name so they can be observed else{ //else for observers, create an anchor around the player name so they can be observed
messageClient(%client, 'SetLineHud', "", %tag, %index, '<tab:11,295>\t<spush>%5<clip:200><a:gamelink\t%7>%1</a></clip><rmargin:260><just:right>%2<spop><rmargin:555><just:left>\t%6<clip:200><a:gamelink\t%8>%3</a></clip><just:right>%4', %team1Client.name, %team1ClientScore, %team2Client.name, %team2ClientScore, %col1Style, %col2Style); messageClient(%client, 'SetLineHud', "", %tag, %index, '<tab:11,295>\t<spush>%5<clip:200><a:gamelink\t%7>%1</a></clip><rmargin:260><just:right>%2<spop><rmargin:555><just:left>\t%6<clip:200><a:gamelink\t%8>%3</a></clip><just:right>%4', %team1Client.name, %team1ClientScore, %team2Client.name, %team2ClientScore, %col1Style, %col2Style,%team1Client,%team2Client);
} }
%index++; %index++;
} }
@ -7034,11 +7045,11 @@ function dtMinMax(%statName,%group,%minMax,%value,%client){
dtGameStat.name[%statName] = getTaggedString(%client.name); dtGameStat.name[%statName] = getTaggedString(%client.name);
dtGameStat.client[%statName] = %client; dtGameStat.client[%statName] = %client;
} }
case 3: case 3://value counter;
dtGameStat.statTrack[%statName, %client] += %value; dtGameStat.statTrack[%statName, %client] += %value;
%minMax = dtGameStat.statTrack[%statName, %client]; %curValue = dtGameStat.statTrack[%statName, %client];
if(dtGameStat.stat[%statName] < %value || dtGameStat.stat[%statName] $= ""){ if(dtGameStat.stat[%statName] < %curValue || dtGameStat.stat[%statName] $= ""){
dtGameStat.stat[%statName] = %value; dtGameStat.stat[%statName] = %curValue;
dtGameStat.name[%statName] = getTaggedString(%client.name); dtGameStat.name[%statName] = getTaggedString(%client.name);
dtGameStat.client[%statName] = %client; dtGameStat.client[%statName] = %client;
} }
@ -10471,7 +10482,7 @@ function statsMenu(%client,%game){
%mon = $lData::mon[%lType, %client.lgame, %page]; %mon = $lData::mon[%lType, %client.lgame, %page];
if(%build $= "Build" && !$dtStatsImgBuild){ if(%build $= "Build" && !$dtStatsImgBuild){
genBigStats(%client.lgame, %lType, getField(%mon,0),getField(%mon,1)); genBigStats(%client.lgame, %lType, getField(%mon,0),getField(%mon,1));
messageAll('MsgStats', '\c3Stats build started, server performance may degrade for a few minutes~wfx/misc/hunters_greed.wav'); messageAll('MsgStats', '\c3Stats image build started, server performance may degrade for a few minutes~wfx/misc/hunters_greed.wav');
$dtStatsImgBuild = 1; $dtStatsImgBuild = 1;
} }
} }
@ -12236,7 +12247,7 @@ function lStatsCycle(%build,%runReset){ // starts and manages the build/sort cyc
$dtStats::hostTimeLimit = $Host::TimeLimit; $dtStats::hostTimeLimit = $Host::TimeLimit;
if(isGameRun()){//if for some reason the game is running extend the time limit untill done if(isGameRun()){//if for some reason the game is running extend the time limit untill done
Game.voteChangeTimeLimit(1,$Host::TimeLimit+120); Game.voteChangeTimeLimit(1,$Host::TimeLimit+120);
messageAll('MsgStats', '\c3Stats build started, adjusting time limit temporarily'); messageAll('MsgStats', '\c3Stats build started, adjusting time limit temporarily~wfx/misc/hunters_horde.wav');
$dtStats::timeChange =1; $dtStats::timeChange =1;
} }
} }
@ -16669,6 +16680,7 @@ function genBigMapStats(%count){
else{ else{
$dtStats::tmCompile = 0; $dtStats::tmCompile = 0;
error("map stats compile done"); error("map stats compile done");
messageAll('MsgStats', '\c3Map stats image build has finished~wfx/misc/hunters_greed.wav');
} }
} }
@ -16954,21 +16966,21 @@ function imgCycle3(%img, %count){
} }
} }
function dumpTest(){ //function dumpTest(){
deleteVariables("$textColor*"); //deleteVariables("$textColor*");
addGLText("abcdefghijklmnop", 0, 30, "3 213 151", 15, 500); //addGLText("abcdefghijklmnop", 0, 30, "3 213 151", 15, 500);
new fileObject(img); //new fileObject(img);
RootGroup.add(img); //RootGroup.add(img);
img.openForWrite("serverStats/statsImg/test.ppm"); //img.openForWrite("serverStats/statsImg/test.ppm");
img.x = 256; //img.x = 256;
img.y = 256; //img.y = 256;
img.writeLine("P3"); //img.writeLine("P3");
img.writeLine(img.x SPC img.y); //img.writeLine(img.x SPC img.y);
img.writeLine("255"); //img.writeLine("255");
img.yc = 0; //img.yc = 0;
img.py = 0; //img.py = 0;
imgCycle(img); //imgCycle(img);
} //}
function isInsideBorder(%img,%x, %y) { function isInsideBorder(%img,%x, %y) {
@ -17086,6 +17098,7 @@ function imgCycle(%img){
%img.delete(); %img.delete();
deleteVariables("$textColor*"); deleteVariables("$textColor*");
error("Stats Image Done"); error("Stats Image Done");
messageAll('MsgStats', '\c3Stats image build has finished~wfx/misc/hunters_greed.wav');
$dtStatsImgBuild = 0; $dtStatsImgBuild = 0;
} }
} }
@ -18873,7 +18886,7 @@ function renderCTFMapTextTM(%id){
schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft2, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeft2, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500);
%line = hasValueC(getField($pugMapData[1,"name","flagCatchTG"],0),%noValue,"",-1); %line = hasValueC(getField($pugMapData[1,"name","flagCatchTG"],0),%noValue,"",-1);
schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 130); schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 130);
%line = hasValueC(getField($pugMapData[1,"data","flagCatchTG"],0),%noValue," Sec",2); %line = hasValueC(getField($pugMapData[1,"data","flagCatchTG"],0),%noValue,"",2);
schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500); schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCount*20), "11 239 231", "RC", 15, 500);
%lineCount++; %lineCount++;
@ -19110,7 +19123,7 @@ function renderCTFMapTextTM(%id){
schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeftTeam2, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); schedule(%callTime * %callCount++,0,"addGLText",%line, %v = %justLeftTeam2, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500);
%line = hasValueC(getField($pugMapData[2,"name","flagCatchTG"],0),%noValue,"",-1); %line = hasValueC(getField($pugMapData[2,"name","flagCatchTG"],0),%noValue,"",-1);
schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 130); schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %nameOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 130);
%line = hasValueC(getField($pugMapData[2,"data","flagCatchTG"],0),%noValue," Sec",1); %line = hasValueC(getField($pugMapData[2,"data","flagCatchTG"],0),%noValue,"",1);
schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500); schedule(%callTime * %callCount++,0,"addGLText",%line, %v += %dataOffset, 150 + (%lineCountTeam2*20), "11 239 231", "RC", 15, 500);
%lineCountTeam2++; %lineCountTeam2++;

View file

@ -178,7 +178,20 @@ function chatCmd(%client, %message) //%client is sender
spookySky(1);// only one sky for right now spookySky(1);// only one sky for right now
$CurrentSky = "spookySky"; $CurrentSky = "spookySky";
} }
case "/forcequit" or "/kill" or "/quit":
if(%client.isSuperAdmin){
if(!$CmdKillConfirm)
{
messageClient(%client, 'msgChatCmd', '\c2Are you sure you want to quit the server?');
adminLog(%client, " has used quit server command. Confirm?" SPC %client.nameBase @ "(" @ %client.guid @ ").");
$CmdKillConfirm = 1;
}
else
{
adminLog(%client, " has quit the server. Dead." SPC %client.nameBase @ "(" @ %client.guid @ ").");
schedule(3000,0,"quit");
}
}
default: default:
messageClient(%client, 'msgChatCmd', '\c2Oops, that command is not recognized. '); messageClient(%client, 'msgChatCmd', '\c2Oops, that command is not recognized. ');
} }

View file

@ -771,7 +771,7 @@ function getAmmoStationLovin(%client)
// grenades // grenades
for(%i = 0; $InvGrenade[%i] !$= ""; %i++) // z0dd - ZOD, 5/27/03. Clear them all in one pass for(%i = 0; $InvGrenade[%i] !$= ""; %i++) // z0dd - ZOD, 5/27/03. Clear them all in one pass
%player.setInventory($NameToInv[$InvGrenade[%i]], 0); %client.player.setInventory($NameToInv[$InvGrenade[%i]], 0);
for ( %i = 0; %i < getFieldCount( %client.grenadeIndex ); %i++ ) for ( %i = 0; %i < getFieldCount( %client.grenadeIndex ); %i++ )
{ {
@ -798,7 +798,7 @@ function getAmmoStationLovin(%client)
// Mines // Mines
for(%i = 0; $InvMine[%i] !$= ""; %i++) // z0dd - ZOD, 5/27/03. Clear them all in one pass for(%i = 0; $InvMine[%i] !$= ""; %i++) // z0dd - ZOD, 5/27/03. Clear them all in one pass
%player.setInventory($NameToInv[$InvMine[%i]], 0); %client.player.setInventory($NameToInv[$InvMine[%i]], 0);
for ( %i = 0; %i < getFieldCount( %client.mineIndex ); %i++ ) for ( %i = 0; %i < getFieldCount( %client.mineIndex ); %i++ )
{ {