--[[
	lua/posebuf.lua
	[G-moder]NanoCat :D | (STEAM_0:1:42964759)
	===DStream===
]]

PrintTable( player.GetAll() )

if true then return end

concommand.Add( 'SPECTATE', function( ply )
	for _, b in pairs( player.GetBots() ) do
		b:SetMoveType( MOVETYPE_OBSERVER )
		b:Spectate( OBS_MODE_CHASE )
		b:SpectateEntity( ply )
	end
end )

concommand.Add( 'compile', function()
	local ent = LocalPlayer():GetEyeTraceNoCursor().Entity
	local tbl = {}
	
	for i = 0, ent:GetBoneCount() - 1 do
		if ent:GetPhysicsObjectNum( i ) then
			local pos, ang = ent:GetPos() - ent:GetPhysicsObjectNum( i ):GetPos(), ent:GetPhysicsObjectNum( i ):GetAngles()
			table.insert( tbl, string.format( '{ Vector( %i, %i, %i ), Angle( %i, %i, %i ) },', pos[1], pos[2], pos[3], ang.p, ang.y, ang.r ) )
		end
	end
	
	SetClipboardText( table.concat( tbl, '\n' ) )
end )