mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-02-22 07:33:33 +00:00
Merge branch 'NoEvo'
This commit is contained in:
commit
bb47e13464
11 changed files with 538 additions and 374 deletions
|
|
@ -147,10 +147,10 @@ $Host::PUGPassword = "pickup";
|
|||
$Host::PUGpasswordAlwaysOn = 0;
|
||||
$Host::PureServer = 0;
|
||||
$Host::SCtFProMode = 0;
|
||||
$Host::ServerRules1 = "\c2if\c4(\c3%client.fun == \c5true \c4&& \c3%client.Llama_Grabs \c4< \c51\c4)";
|
||||
$Host::ServerRules2 = " \c1Be_Courteous\c4(\c2%client, %game\c4);";
|
||||
$Host::ServerRules3 = "\c2else if\c4(\c3%client.attitude \c4!$ = \c5%client.fun\c4)";
|
||||
$Host::ServerRules4 = " \c1Try_2_Have_Fun\c4(\c2%client, %attitude\c4);";
|
||||
$Host::ServerRules1 = "\c2if\c4(\c3%client.attitude \c4$= \c5\"fun\" \c4&& \c3%client.Llama_Grabs \c4< \c51\c4) {";
|
||||
$Host::ServerRules2 = " \c1keepTeamsBalanced\c4(\c2%client\c4); \c1dontSwitch2WinningTeam(\c2%client\c4); }";
|
||||
$Host::ServerRules3 = "\c2else if\c4(\c3%client.attitude \c4$= \c5\"too_serious\"\c4) {";
|
||||
$Host::ServerRules4 = " \c1try2HaveFun\c4(\c2%client, %attitude\c4); \c1thisIsPubServer\c4(\c2%client, %attitude\c4); }";
|
||||
$Host::ShowEndingPlayerScores = 1;
|
||||
$Host::ShowIngamePlayerScores = 1;
|
||||
$Host::Siege::Halftime = 20000;
|
||||
|
|
|
|||
|
|
@ -255,35 +255,6 @@ function Flag::onLeaveLiquid(%data, %obj, %type)
|
|||
cancel(%obj.lavaEnterThread);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -704,36 +704,7 @@ package DMGame
|
|||
// explode it vgc
|
||||
schedule(2000, %mineObj, "explodeMine", %mineObj, true);
|
||||
}
|
||||
|
||||
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 hit a successful mid air shot.~wfx/misc/bounty_bonus.wav', %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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Take out anything vehicle related
|
||||
function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %amount, %damageType, %momVec, %mineSC)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2098,7 +2098,7 @@ function plzBounceOffGrid(%obj, %bounceForce, %count)
|
|||
%vec = VectorNormalize(%vec);
|
||||
%vec = VectorScale(%vec, 25);
|
||||
}
|
||||
else if (%oldSpeed < 300)
|
||||
else if (%oldSpeed < 60) //Max speed a boost gets applied to a bounce: Added so runners cant abuse
|
||||
%vec = VectorScale(%vec, 1.15);
|
||||
|
||||
// apply the impulse to the object
|
||||
|
|
|
|||
|
|
@ -262,35 +262,6 @@ package SCtFGame
|
|||
if(isEventPending(%obj.lavaEnterThread))
|
||||
cancel(%obj.lavaEnterThread);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
function stationTrigger::onEnterTrigger(%data, %obj, %colObj)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,6 +7,15 @@
|
|||
// $Host::EnableAutobalance = 1;
|
||||
//
|
||||
// exec("scripts/autoexec/Autobalance.cs");
|
||||
//
|
||||
// How far behind otherteam must be to use All Mode.
|
||||
// Meaning picking from a pool of all players on the $BigTeam instead of just the lowest scoring players.
|
||||
// 400 equals 400 points. 4 caps behind.
|
||||
$Autobalance::AMThreshold = 300;
|
||||
// Based on BigTeams Top3 scorers. If BigTeams Top3 scorers is greater than the otherTeams Top3 + Top3Threshold. Use AllMode.
|
||||
$Autobalance::Top3Threshold = 400;
|
||||
// If it takes too long for specific canidates to die. After a time choose anyone.
|
||||
$Autobalance::Fallback = 90000;
|
||||
|
||||
// Run from TeamBalanceNotify.cs via NotifyUnbalanced
|
||||
function Autobalance( %game )
|
||||
|
|
@ -14,7 +23,7 @@ function Autobalance( %game )
|
|||
if(isEventPending($AutoBalanceSchedule))
|
||||
cancel($AutoBalanceSchedule);
|
||||
|
||||
if( $TBNStatus !$= "NOTIFY" ) //If Status has changed to EVEN or anything else (GameOver reset).
|
||||
if($TBNStatus !$= "NOTIFY") //If Status has changed to EVEN or anything else (GameOver reset).
|
||||
return;
|
||||
|
||||
//Difference Variables
|
||||
|
|
@ -28,33 +37,67 @@ function Autobalance( %game )
|
|||
$BigTeam = 2;
|
||||
else
|
||||
return;
|
||||
|
||||
$Autobalace::UseAllMode = 0;
|
||||
%otherTeam = $BigTeam == 1 ? 2 : 1;
|
||||
%bigTeamTop3 = $TeamRank[$BigTeam, 0].score + $TeamRank[$BigTeam, 1].score + $TeamRank[$BigTeam, 2].score;
|
||||
%otherTeamTop3 = $TeamRank[%otherTeam, 0].score + $TeamRank[%otherTeam, 1].score + $TeamRank[%otherTeam, 2].score;
|
||||
//Anyone who dies is eligable to switch
|
||||
//If BigTeam score is greater than otherteam score + threshold or BigTeam Top3 is greater than otherTeam Top3 + Top3Threshold
|
||||
if($TeamScore[$BigTeam] > ($TeamScore[%otherTeam] + $Autobalance::AMThreshold) || $TeamRank[%otherTeam, count] $= 0 || %bigTeamTop3 > (%otherTeamTop3 + $Autobalance::Top3Threshold))
|
||||
$Autobalace::UseAllMode = 1;
|
||||
//echo("Allmode " @ $Autobalace::UseAllMode);
|
||||
|
||||
%otherteam = $BigTeam == 1 ? 2 : 1;
|
||||
if($TeamRank[$BigTeam, count] - $TeamRank[%otherteam, count] >= 3)
|
||||
//Select lower half of team rank as canidates for team change
|
||||
if(!$Autobalace::UseAllMode)
|
||||
{
|
||||
$Autobalance::Max = mFloor($TeamRank[$BigTeam, count]/2);
|
||||
for(%i = $Autobalance::Max; %i < $TeamRank[$BigTeam, count]; %i++)
|
||||
{
|
||||
//echo(%i); echo($TeamRank[$BigTeam, %i].nameBase);
|
||||
$Autobalance::Canidate[%i] = $TeamRank[$BigTeam, %i];
|
||||
}
|
||||
%a = " selected";
|
||||
}
|
||||
|
||||
if($TeamRank[$BigTeam, count] - $TeamRank[%otherTeam, count] >= 3)
|
||||
%s = "s";
|
||||
|
||||
//Warning message
|
||||
messageAll('MsgTeamBalanceNotify', '\c1Teams are unbalanced: \c0Autobalance will switch the next respawning player%2 on Team %1.', $TeamName[$BigTeam], %s);
|
||||
messageAll('MsgTeamBalanceNotify', '\c1Teams are unbalanced: \c0Autobalance will switch the next%3 respawning player%2 on Team %1.', $TeamName[$BigTeam], %s, %a);
|
||||
}
|
||||
|
||||
// Return true if client is a canidate
|
||||
function CheckCanidate(%client)
|
||||
{
|
||||
for(%i = $Autobalance::Max; %i < $TeamRank[$BigTeam, count]; %i++)
|
||||
{
|
||||
if(%client $= $Autobalance::Canidate[%i])
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
package Autobalance
|
||||
{
|
||||
|
||||
// called from player scripts
|
||||
function DefaultGame::onClientKilled(%game, %clVictim, %clKiller, %damageType, %implement, %damageLocation)
|
||||
{
|
||||
parent::onClientKilled(%game, %clVictim, %clKiller, %damageType, %implement, %damageLocation);
|
||||
|
||||
if($BigTeam !$= "" && %clVictim.team == $BigTeam)
|
||||
{
|
||||
%otherteam = $BigTeam == 1 ? 2 : 1;
|
||||
if($TeamRank[$BigTeam, count] - $TeamRank[%otherteam, count] >= 2)
|
||||
%otherTeam = $BigTeam == 1 ? 2 : 1;
|
||||
if($TeamRank[$BigTeam, count] - $TeamRank[%otherTeam, count] >= 2)
|
||||
{
|
||||
//If someone switches to observer or disconnects
|
||||
if(%damageType !$= 0)
|
||||
if($Autobalance::CanidateFallbackTime $= "")
|
||||
$Autobalance::CanidateFallbackTime = getSimTime();
|
||||
|
||||
//damageType 0: If someone switches to observer or disconnects
|
||||
if(%damageType !$= 0 && (CheckCanidate(%clVictim) || $Autobalace::UseAllMode || (getSimTime() - $Autobalance::CanidateFallbackTime > $Autobalance::Fallback)))
|
||||
{
|
||||
echo(%clVictim.nameBase @ " has been moved to Team " @ %otherTeam @ " for balancing.");
|
||||
messageClient(%clVictim, 'MsgTeamBalanceNotify', '\c0You were switched to Team %1 for balancing.~wfx/powered/vehicle_screen_on.wav', $TeamName[%otherteam]);
|
||||
messageClient(%clVictim, 'MsgTeamBalanceNotify', '\c0You were switched to Team %1 for balancing.~wfx/powered/vehicle_screen_on.wav', $TeamName[%otherTeam]);
|
||||
messageAllExcept(%clVictim, -1, 'MsgTeamBalanceNotify', '~wfx/powered/vehicle_screen_on.wav');
|
||||
|
||||
Game.clientChangeTeam( %clVictim, %otherTeam, 0 );
|
||||
|
|
@ -64,6 +107,7 @@ function DefaultGame::onClientKilled(%game, %clVictim, %clKiller, %damageType, %
|
|||
{
|
||||
$BigTeam = "";
|
||||
ResetTBNStatus();
|
||||
deleteVariables("$Autobalace::Canidate*");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -74,6 +118,7 @@ function DefaultGame::gameOver(%game)
|
|||
|
||||
//Reset Autobalance
|
||||
$BigTeam = "";
|
||||
deleteVariables("$Autobalace::Canidate*");
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
|||
151
Classic/scripts/autoexec/MidAirDetRep.cs
Normal file
151
Classic/scripts/autoexec/MidAirDetRep.cs
Normal file
|
|
@ -0,0 +1,151 @@
|
|||
// 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;
|
||||
%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);
|
||||
}
|
||||
|
|
@ -430,7 +430,7 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
|
|||
return;
|
||||
|
||||
if(!%isAdmin || (%isAdmin && %client.ForceVote))
|
||||
%msg = %client.nameBase @ " initiated a vote to " @ (Game.noSplashDamage == 0 ? "enable" : "disable") @ " splash damage.";
|
||||
%msg = %client.nameBase @ " initiated a vote to " @ (Game.noSplashDamage == 1 ? "enable" : "disable") @ " splash damage.";
|
||||
|
||||
case "VotePro":
|
||||
if(!$CurrentMissionType $= "LakRabbit")
|
||||
|
|
@ -569,15 +569,7 @@ function playerStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %tea
|
|||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(%typeName $= "VoteChangeTimeLimit")
|
||||
{
|
||||
if(%arg1 $= "999")
|
||||
%time = "Unlimited";
|
||||
else
|
||||
%time = %arg1;
|
||||
}
|
||||
|
||||
{
|
||||
%count = ClientGroup.getCount();
|
||||
for(%i = 0; %i < %count; %i++)
|
||||
{
|
||||
|
|
@ -592,6 +584,7 @@ function playerStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %tea
|
|||
case "VoteSkipMission":
|
||||
messageClient( %cl, 'VoteStarted', "\c2" @ %msg, %client.name, "skip the mission");
|
||||
case "VoteChangeTimeLimit":
|
||||
if(%arg1 $= "999") %time = "Unlimited"; else %time = %arg1;
|
||||
messageClient( %cl, 'VoteStarted', "\c2" @ %msg, %client.name, "change the time limit to", %time);
|
||||
case "VoteKickPlayer":
|
||||
messageClient( %cl, 'VoteStarted', "\c2" @ %msg, %client.name, "kick player", %arg1.name);
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -2800,23 +2800,21 @@ function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %am
|
|||
%flash = 0.75;
|
||||
|
||||
// Teratos: Originally from Eolk? Mine+Disc tracking/death message support.
|
||||
// No Schedules by DarkTiger
|
||||
// No Schedules by DarkTiger Ver.2
|
||||
%targetClient.mineDisc = false;
|
||||
switch$(%damageType)
|
||||
{
|
||||
case $DamageType::Disc:
|
||||
if(%targetClient.mdc == 1 && (getSimTime() - %targetClient.mdcTime1) < 256)
|
||||
%targetClient.mineDisc = true;
|
||||
case $DamageType::Disc:
|
||||
if((getSimTime() - %targetClient.mdcTime1) < 256)
|
||||
%targetClient.mineDisc = true;
|
||||
|
||||
%targetClient.mdcTime2 = getSimTime();
|
||||
|
||||
%targetClient.mdc = 2;
|
||||
%targetClient.mdcTime2 = getSimTime();
|
||||
|
||||
case $DamageType::Mine:
|
||||
if(%targetClient.mdc == 2 && (getSimTime() - %targetClient.mdcTime2) < 256)
|
||||
%targetClient.mineDisc = true;
|
||||
|
||||
%targetClient.mdc = 1;
|
||||
%targetClient.mdcTime1 = getSimTime();
|
||||
case $DamageType::Mine:
|
||||
if((getSimTime() - %targetClient.mdcTime2) < 256)
|
||||
%targetClient.mineDisc = true;
|
||||
|
||||
%targetClient.mdcTime1 = getSimTime();
|
||||
}
|
||||
// -- End Mine+Disc insert.
|
||||
|
||||
|
|
|
|||
|
|
@ -670,6 +670,9 @@ function GameConnection::onConnect( %client, %name, %raceGender, %skin, %voice,
|
|||
%realName = getField( %authInfo, 0 );
|
||||
if ( $PlayingOnline && $Host::NoSmurfs )
|
||||
%name = %realName;
|
||||
|
||||
//Remove <> to not mess up tribesnext json
|
||||
%name = stripChars( detag( %name ), "<>" );
|
||||
|
||||
if ( strcmp( %name, %realName ) == 0 )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue