mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-07-15 08:04:39 +00:00
Fixed a Bug
This commit is contained in:
parent
eb6fb5d577
commit
7c3d783430
1 changed files with 21 additions and 22 deletions
|
|
@ -1,9 +1,9 @@
|
||||||
//Amount of players needed on server for CloakPack to be banned/unbanned
|
// Amount of players needed on server for CloakPack to be banned/unbanned
|
||||||
//
|
//
|
||||||
//$Host::AntiCloakEnable = 1;
|
// $Host::AntiCloakEnable = 1;
|
||||||
//$Host::AntiCloakPlayerCount = 6;
|
// $Host::AntiCloakPlayerCount = 6;
|
||||||
|
|
||||||
//Called in GetCounts.cs
|
// Called in GetCounts.cs
|
||||||
function ActivateAntiCloak()
|
function ActivateAntiCloak()
|
||||||
{
|
{
|
||||||
//CTF only
|
//CTF only
|
||||||
|
|
@ -13,24 +13,30 @@ function ActivateAntiCloak()
|
||||||
//echo("AntiCloakPlayerCount " @ $AntiCloakPlayerCount);
|
//echo("AntiCloakPlayerCount " @ $AntiCloakPlayerCount);
|
||||||
|
|
||||||
//If server is in Tourny mode and the team population is lower than the AntiCloakPlayerCount cloak is not selectable.
|
//If server is in Tourny mode and the team population is lower than the AntiCloakPlayerCount cloak is not selectable.
|
||||||
if( !$Host::TournamentMode && $TotalTeamPlayerCount < $Host::AntiCloakPlayerCount && $CloakpackRunOnce !$= 0)
|
if( !$Host::TournamentMode && $TotalTeamPlayerCount < $Host::AntiCloakPlayerCount )
|
||||||
{
|
{
|
||||||
$InvBanList[CTF, "CloakingPack"] = true;
|
if( $AntiCloakRunOnce !$= 0 )
|
||||||
|
{
|
||||||
|
$InvBanList[CTF, "CloakingPack"] = 1;
|
||||||
|
|
||||||
if(!isActivePackage(DisableCloakPack))
|
if(!isActivePackage(DisableCloakPack))
|
||||||
activatePackage(DisableCloakPack);
|
activatePackage(DisableCloakPack);
|
||||||
|
|
||||||
$CloakpackRunOnce = 0;
|
$AntiCloakRunOnce = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//All other cases it is.
|
//All other cases it is.
|
||||||
else if( $CloakpackRunOnce !$= 1 )
|
else
|
||||||
{
|
{
|
||||||
$InvBanList[CTF, "CloakingPack"] = false;
|
if( $AntiCloakRunOnce !$= 1 )
|
||||||
|
{
|
||||||
|
$InvBanList[CTF, "CloakingPack"] = 0;
|
||||||
|
|
||||||
if(isActivePackage(DisableCloakPack))
|
if(isActivePackage(DisableCloakPack))
|
||||||
deactivatePackage(DisableCloakPack);
|
deactivatePackage(DisableCloakPack);
|
||||||
|
|
||||||
$CloakpackRunOnce = 1;
|
$AntiCloakRunOnce = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -44,18 +50,11 @@ function CloakingPackImage::onActivate(%data, %obj, %slot)
|
||||||
if(%obj.client.armor $= "Light")
|
if(%obj.client.armor $= "Light")
|
||||||
{
|
{
|
||||||
if(%obj.canCloak() $= "true")
|
if(%obj.canCloak() $= "true")
|
||||||
{
|
|
||||||
messageClient(%obj.client, 'MsgCloakingPackInvalid', '\c2Cloakpack is disabled until %1 players.', $Host::AntiCloakPlayerCount );
|
messageClient(%obj.client, 'MsgCloakingPackInvalid', '\c2Cloakpack is disabled until %1 players.', $Host::AntiCloakPlayerCount );
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//Nothing
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
messageClient(%obj.client, 'MsgCloakingPackInvalid', '\c2Cloaking available for light armors only.');
|
messageClient(%obj.client, 'MsgCloakingPackInvalid', '\c2Cloaking available for light armors only.');
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue