mirror of
https://github.com/ChocoTaco1/TacoServer.git
synced 2026-07-10 21:54:32 +00:00
Merge branch 'NoEvo'
This commit is contained in:
commit
917b8a6b13
8 changed files with 114 additions and 53 deletions
|
|
@ -24,4 +24,18 @@ function suppressTraversalRootPatch()
|
|||
memPatch("56AD8A", "90909090909090909090909090909090909090909090");
|
||||
memPatch("56D114", "90909090909090909090909090909090909090909090");
|
||||
$tvpatched = 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Netrate patch by bahke
|
||||
// 32 packets per second
|
||||
|
||||
$pref::Net::PacketSize = $Host::ClassicPacketSize;
|
||||
|
||||
memPatch("A3A100","5052BA00000000B8000000005150526800000000E8C7D6B4FF5A585981C20100000039C27CE65A58E95F8CB8FF");
|
||||
memPatch("A3A200","5052BA00000000B8000000005150526800000000E8C7D5B4FF5A585981C20100000039C27CE65A58E9FC8AB8FF");
|
||||
memPatch("5C2D22","E9D97447009090");
|
||||
memPatch("5C2D85","E9767347009090");
|
||||
memPatch("0058665C","9090909090909090");
|
||||
memPatch("00586682","90909090909090909090");
|
||||
memPatch("005866AB","90909090909090909090");
|
||||
memPatch("58781A","EB0C");
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
//exec("scripts/autoexec/TKwarn.cs");
|
||||
|
||||
package TKwarn
|
||||
{
|
||||
|
||||
|
|
@ -12,18 +14,22 @@ function DefaultGame::testTeamKill(%game, %victimID, %killerID)
|
|||
if($Host::TournamentMode || %killerID.isAdmin || %killerID.isAIcontrolled() || %victimID.isAIcontrolled())
|
||||
return true;
|
||||
|
||||
// Ignore this map
|
||||
if($CurrentMission $= "Mac_FlagArena")
|
||||
return true;
|
||||
|
||||
// warn the player
|
||||
if((%killerID.teamkills == $Host::TKWarn1 - 1) && $Host::TKWarn1 != 0)
|
||||
centerprint(%killerID, "<font:Univers Bold:26><color:ff2222>You have teamkilled " @ %killerID.teamkills + 1 @ " players.\nCut it out!", 5, 3);
|
||||
centerprint(%killerID, "You are recieving this warning for inappropriate teamkilling.\nBehave or you will be kicked.", 10, 2);
|
||||
// warn the player of his imminent kick
|
||||
else if((%killerID.teamkills == $Host::TKWarn2 - 1) && $Host::TKWarn2 != 0)
|
||||
centerprint(%killerID, "<font:Univers Bold:26><color:ff2222>You have teamkilled " @ %killerID.teamkills + 1 @ " players.\nWith " @ $Host::TKMax @ " teamkills, you will be kicked.", 5, 3);
|
||||
centerprint(%killerID, "You are recieving this second warning for inappropriate teamkilling.\nBehave or you will be kicked.", 10, 2);
|
||||
// kick the player
|
||||
else if((%killerID.teamkills >= $Host::TKMax - 1) && $Host::TKMax != 0)
|
||||
{
|
||||
Game.kickClientName = %killerID.name;
|
||||
kick(%killerID, false, %killerID.guid);
|
||||
adminLog( %killerID, " was autokicked for too many teamkills." );
|
||||
TKkick(%killerID, true, %killerID.guid);
|
||||
adminLog( %killerID, " was autokicked for teamkilling." );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
@ -32,4 +38,68 @@ function DefaultGame::testTeamKill(%game, %victimID, %killerID)
|
|||
|
||||
// Prevent package from being activated if it is already
|
||||
if (!isActivePackage(TKwarn))
|
||||
activatePackage(TKwarn);
|
||||
activatePackage(TKwarn);
|
||||
|
||||
// we pass the guid as well, in case this guy leaves the server.
|
||||
function TKkick( %client, %admin, %guid )
|
||||
{
|
||||
messageAll( 'MsgAdminForce', '\c2%1 has been autokicked for teamkilling.', %client.name ); // z0dd - ZOD, 7/13/03. Tell who kicked
|
||||
|
||||
messageClient(%client, 'onClientKicked', "");
|
||||
messageAllExcept( %client, -1, 'MsgClientDrop', "", Game.kickClientName, %client );
|
||||
|
||||
if( %client.isAIControlled() )
|
||||
{
|
||||
if($Host::ClassicCanKickBots || %admin.isAdmin)
|
||||
{
|
||||
if(!$Host::ClassicBalancedBots)
|
||||
{
|
||||
$HostGameBotCount--;
|
||||
%client.drop();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( $playingOnline ) // won games
|
||||
{
|
||||
%count = ClientGroup.getCount();
|
||||
%found = false;
|
||||
for( %i = 0; %i < %count; %i++ ) // see if this guy is still here...
|
||||
{
|
||||
%cl = ClientGroup.getObject( %i );
|
||||
if( %cl.guid == %guid )
|
||||
{
|
||||
%found = true;
|
||||
|
||||
// kill and delete this client, their done in this server.
|
||||
if( isObject( %cl.player ) )
|
||||
%cl.player.scriptKill(0);
|
||||
|
||||
if ( isObject( %cl ) )
|
||||
{
|
||||
%client.setDisconnectReason( "You have been kicked out of the game for teamkilling." ); // z0dd - ZOD, 7/13/03. Tell who kicked
|
||||
%cl.schedule(700, "delete");
|
||||
}
|
||||
// ban by IP as well
|
||||
BanList::add( %guid, %client.getAddress(), $Host::KickBanTime );
|
||||
}
|
||||
}
|
||||
if( !%found )
|
||||
BanList::add( %guid, "0", $Host::KickBanTime ); // keep this guy out for a while since he left.
|
||||
}
|
||||
else // lan games
|
||||
{
|
||||
// kill and delete this client
|
||||
if( isObject( %client.player ) )
|
||||
%client.player.scriptKill(0);
|
||||
|
||||
if ( isObject( %client ) )
|
||||
{
|
||||
%client.setDisconnectReason( "You have been kicked out of the game for teamkilling." );
|
||||
%client.schedule(700, "delete");
|
||||
}
|
||||
BanList::add( 0, %client.getAddress(), $Host::KickBanTime );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -161,20 +161,6 @@ function Armor::damageObject(%data, %targetObject, %sourceObject, %position, %am
|
|||
Parent::damageObject(%data, %targetObject, %sourceObject, %position, %amount, %damageType, %momVec, %mineSC);
|
||||
}
|
||||
|
||||
//Item 'Use' Console spam fix
|
||||
function serverCmdUse(%client,%data)
|
||||
{
|
||||
// Item names from the client must converted
|
||||
// into DataBlocks
|
||||
// %data = ItemDataBlock[%item];
|
||||
//if(isObject(%client.player)) // z0dd - ZOD, 5/18/03. Console spam fix
|
||||
//%client.player.use(%data);
|
||||
|
||||
//Spam Fix 7/2020
|
||||
if(isObject(%client.player) && isObject(%client.getControlObject()))
|
||||
%client.getControlObject().use(%data);
|
||||
}
|
||||
|
||||
// Global water viscosity
|
||||
function DefaultGame::missionLoadDone(%game)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -325,9 +325,20 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, %
|
|||
return;
|
||||
}
|
||||
|
||||
if(%arg1 < $Host::TimeLimit)
|
||||
//If proposed time is lower than server set or higher than unlimited
|
||||
if(%arg1 < $Host::TimeLimit || %arg1 > 999)
|
||||
{
|
||||
messageClient(%client, "", "\c2Invalid time selection.");
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
//If proposed time is something other than what is selectable
|
||||
if(%arg1 !$= "90" && %arg1 !$= "120" && %arg1 !$= "150" && %arg1 !$= "180" && %arg1 !$= "240" && %arg1 !$= "360" && %arg1 !$= "480" && %arg1 !$= "999")
|
||||
{
|
||||
messageClient(%client, "", "\c2Only selectable times allowed.");
|
||||
return;
|
||||
}
|
||||
|
||||
if((!%isAdmin && $Host::AllowPlayerVoteTimeLimit) || (%isAdmin && %client.ForceVote))
|
||||
{
|
||||
if(%arg1 $= "999") %time = "unlimited"; else %time = %arg1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue