2020-03-23 20:23:42 +00:00
|
|
|
//Taco October 2018
|
|
|
|
|
//removed alot of things that were already included in the classic code
|
|
|
|
|
//and checked if evo wasnt double overriding functions
|
|
|
|
|
|
2022-07-14 15:40:02 +00:00
|
|
|
package AntiLouExploitFixes
|
2020-03-23 20:23:42 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
|
|
// VehicleData::onRemove(%this, %obj)
|
|
|
|
|
// Info: this is called after the MPB is destroyed. Reset the variable
|
|
|
|
|
function VehicleData::onRemove(%this, %obj)
|
|
|
|
|
{
|
2022-12-20 23:42:50 +00:00
|
|
|
if(%obj.station.isDestroyed)
|
|
|
|
|
%obj.station.isDestroyed = 0;
|
2022-07-14 15:40:02 +00:00
|
|
|
|
2020-03-23 20:23:42 +00:00
|
|
|
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)
|
|
|
|
|
{
|
2022-12-20 23:42:50 +00:00
|
|
|
if(!isActivePackage(%this)) return;
|
|
|
|
|
parent::DeactivatePackage(%this);
|
2020-03-23 20:23:42 +00:00
|
|
|
}
|
|
|
|
|
|
2020-08-17 23:04:43 +00:00
|
|
|
// Prevents clients from being vulnerable to crashing via NULL voice exploit
|
|
|
|
|
function alxGetWaveLen(%wavFile) {
|
2022-12-20 23:42:50 +00:00
|
|
|
if ( strstr( %wavFile , ".wav" ) == -1 ) return $MaxMessageWavLength + 1;
|
|
|
|
|
echo("Length check: " @ %wavFile);
|
|
|
|
|
parent::alxGetWaveLen(%wavFile);
|
2020-08-17 23:04:43 +00:00
|
|
|
}
|
|
|
|
|
|
2020-03-23 20:23:42 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// Prevent package from being activated if it is already
|
|
|
|
|
if (!isActivePackage(AntiLouExploitFixes))
|
|
|
|
|
activatePackage(AntiLouExploitFixes);
|