TacoServer/Classic/scripts/autoexec/AntiLouExploitFixes.cs
2022-12-20 18:42:50 -05:00

44 lines
1.1 KiB
C#

//Taco October 2018
//removed alot of things that were already included in the classic code
//and checked if evo wasnt double overriding functions
package AntiLouExploitFixes
{
// VehicleData::onRemove(%this, %obj)
// Info: this is called after the MPB is destroyed. Reset the variable
function VehicleData::onRemove(%this, %obj)
{
if(%obj.station.isDestroyed)
%obj.station.isDestroyed = 0;
parent::onRemove(%this, %obj);
}
function serverCmdPlayAnim(%client, %anim)
{
// Not used in Classic
}
// Fix a problem with the package system
// dropping the first package when a non-active
// package is deactivated
function DeactivatePackage(%this)
{
if(!isActivePackage(%this)) return;
parent::DeactivatePackage(%this);
}
// Prevents clients from being vulnerable to crashing via NULL voice exploit
function alxGetWaveLen(%wavFile) {
if ( strstr( %wavFile , ".wav" ) == -1 ) return $MaxMessageWavLength + 1;
echo("Length check: " @ %wavFile);
parent::alxGetWaveLen(%wavFile);
}
};
// Prevent package from being activated if it is already
if (!isActivePackage(AntiLouExploitFixes))
activatePackage(AntiLouExploitFixes);