The jetpack seems to be less effective as your ping goes up, i tested it with other players and myself using net_fakelag 200.
My boost wouldn't be nearly as powerful if i had net_fakelag on and my bots would stay the same.
I have a jetpack function in shared.lua -
Code:
local meta = FindMetaTable("Player")
if (!meta) then return end
function meta:JetPack()
--Vector(0,0,self:GetVelocity()[3]) <cool
local boostmagnitude = 10
if (self.boost > 0) then
--self.boost = self.boost - global_boostreductionrate
self:SetGroundEntity(NULL)
--self:SetGroundEntity(NULL)
self:SetVelocity(self:GetUp() * boostmagnitude)
local effectdata = EffectData()
effectdata:SetOrigin(self:GetPos())
util.Effect( "pixiehit", effectdata)
end
end
I am running it here, in init.lua -
Code:
function Handlejetpack()
for k,v in pairs(player.GetAll()) do if v.jetpack == true then v:JetPack() else v:JetPackRegen() end end
end
--hook.Add("Think", "handlingjets", Handlejetpack)
timer.Create( "JetPackCheckTimer", 0.01, 0, Handlejetpack)
The jetpack is toggled here -
Code:
function Toggleonjet(pl, key)
if key == IN_ATTACK2 then
pl.jetpack = true
end
end
hook.Add("KeyPress", "tooto", Toggleonjet)
function Toggleoffjet(pl, key)
if key == IN_ATTACK2 then
pl.jetpack = false
end
end
hook.Add("KeyRelease", "foekfosokf", Toggleoffjet)
I'd be grateful if anyone could shed any light on the problem.
Here is a video example, I have net_fakelag on 200 here and a bot(the bot has no ping of course).
http://farmpolice.com/content/videos...YELsIgmGr.webm