All pastes #496026 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-05-19 00:23 UTC
rendered paste body
function GM:PlayerInitialSpawn(ply)
	-- do the rest of the stuff
	ply.lastSpawns = {}
end

local lastCachedSpawns = 0

function GM:Think()
	if lastCachedSpawns + 2 < CurTime() then
		for _,pl in pairs(player.GetAll())
			if pl:Alive() && pl:GetVelocity():Length() > 180 then
				if table.Count(pl.lastSpawns) >= 4 then
					table.Remove(pl.lastSpawns,1)
				end
				table.Insert(pl.lastSpawns,pl:GetPos())
			end
		end
		lastCachedSpawns = CurTime()
	end
end