Permalink
Browse files

Fixed a duplicator lag exploit

Those naughty people
  • Loading branch information...
1 parent d70259d commit 41f314f4b6858259d514c66984c014d11e92fc0d @robotboy655 robotboy655 committed Jun 19, 2015
@@ -26,7 +26,7 @@ if ( CLIENT ) then
-- And send it to the server
--
net.Start( "ArmDupe" )
- net.WriteUInt( dupe.data:len(), 32 )
+ net.WriteUInt( dupe.data:len(), 32 )
net.WriteData( dupe.data, dupe.data:len() )
net.SendToServer()
@@ -41,14 +41,18 @@ if ( SERVER ) then
--
util.AddNetworkString( "ArmDupe" )
+ local LastDupeArm = 0
net.Receive( "ArmDupe", function( len, client )
-
+ if ( LastDupeArm > CurTime() ) then return end
+
+ LastDupeArm = CurTime() + 1
+
local len = net.ReadUInt( 32 )
local data = net.ReadData( len )
if ( !IsValid( client ) ) then return end
- -- Hook.. can arn dupe..
+ -- Hook.. can arm dupe..
local uncompressed = util.Decompress( data )
if ( !uncompressed ) then
@@ -73,4 +77,3 @@ if ( SERVER ) then
end )
end
-

0 comments on commit 41f314f

Please sign in to comment.