local BAIT = {}

BAIT.ClassName = "hula flyer"
BAIT.Model = "models/props_lab/huladoll.mdl"
BAIT.Base = "fishing_bait_base_move"

BAIT.Description = [[
Moves swiftly through 
water as you pull it in.
]]

function BAIT:MoveHook(hook_phys, ply)
	self.time = (self.time or 0) + hook_phys:GetVelocity():Length()

	local vel = (ply:GetPos() - self:GetPos()):Cross(Vector(0, 0, 1))
	vel = vel:GetNormalized() * math.sin(self.time / 4000)
	vel = vel * (ply:KeyDown(IN_ATTACK2) and 1 or 0)
	vel = vel * hook_phys:GetVelocity():Length()

	self:AddHookVelocity(vel)
end

fishing.RegisterBait(BAIT)