


addEvent("onClientCreateCustomProjectile", true)
addEventHandler("onClientCreateCustomProjectile",  resourceRoot, 
function (projectileData)
	initializeCustomProjectile(projectileData)
end)


addEvent("onClientUpdateProjectile", true)
addEventHandler("onClientUpdateProjectile", resourceRoot, 
function(projectileUpdateBuffer)
	for i=1, #projectileUpdateBuffer do
		local projectileUpdate = projectileUpdateBuffer[i]
		local projectileData = findProjectileData(projectileUpdate[1])
		if projectileData then
			projectileData.updateVersion = projectileUpdate[2]
			table.remove(projectileUpdate, 2)
			updateProjectile (projectileData, unpack(projectileUpdate))
		end
	end
end, false)




