mirror of
https://github.com/Ragora/T2-BoL.git
synced 2026-04-29 15:25:03 +00:00
Did stuff.
This commit is contained in:
parent
09f43122e6
commit
8c96cba3e1
132 changed files with 56515 additions and 1448 deletions
|
|
@ -9,24 +9,45 @@
|
|||
// #description = Adds a new command-line to Tribes 2 for shortcuts: -safeMode
|
||||
// #status = Release
|
||||
|
||||
package SafeMode{
|
||||
function DispatchLaunchMode()
|
||||
package SafeModeOverrides
|
||||
{
|
||||
parent::DispatchLaunchMode();
|
||||
function TCPObject::onLine(){ return true;}
|
||||
function TCPObject::connect(){ return true; }
|
||||
function TCPObject::disconnect(){ return true; }
|
||||
function TCPObject::listen(){ return true; }
|
||||
function TCPObject::send(){ return true; }
|
||||
|
||||
// check T2 command line arguments
|
||||
for(%i = 1; %i < $Game::argc ; %i++)
|
||||
{
|
||||
%arg = $Game::argv[%i];
|
||||
%nextArg = $Game::argv[%i+1];
|
||||
%hasNextArg = $Game::argc - %i > 1;
|
||||
function HTTPObject::onLine(){ return true; }
|
||||
function HTTPObject::connect(){ return true; }
|
||||
function HTTPObject::disconnect(){ return true; }
|
||||
function HTTPObject::listen(){ return true; }
|
||||
function HTTPObject::send(){ return true;}
|
||||
function HTTPObject::post(){ return true; }
|
||||
|
||||
if( !stricmp(%arg, "-Safemode")) //If enabled, cuts off all TCP & HTTP object connections, preventing UE's when running T2 without internet
|
||||
{
|
||||
exec("scripts/Safemode.cs");
|
||||
}
|
||||
}
|
||||
}
|
||||
function SecureHTTPObject::onLine(){ return true; }
|
||||
function SecureHTTPObject::connect(){ return true; }
|
||||
function SecureHTTPObject::disconnect(){ return true; }
|
||||
function SecureHTTPObject::listen(){ return true; }
|
||||
function SecureHTTPObject::send(){ return true; }
|
||||
function SecureHTTPObject::post(){ return true; }
|
||||
};
|
||||
activatePackage(SafeMode);
|
||||
|
||||
package SafeMode
|
||||
{
|
||||
function DispatchLaunchMode()
|
||||
{
|
||||
parent::DispatchLaunchMode();
|
||||
|
||||
// check T2 command line arguments
|
||||
for(%i = 1; %i < $Game::argc ; %i++)
|
||||
{
|
||||
%arg = $Game::argv[%i];
|
||||
%nextArg = $Game::argv[%i+1];
|
||||
%hasNextArg = $Game::argc - %i > 1;
|
||||
|
||||
if( !stricmp(%arg, "-Safemode")) //If enabled, cuts off all TCP & HTTP object connections, preventing UE's when running T2 without internet
|
||||
activatePackage(SafeModeOverrides);
|
||||
}
|
||||
}
|
||||
};
|
||||
activatePackage(SafeMode);
|
||||
Loading…
Add table
Add a link
Reference in a new issue