All pastes #422981 Raw Edit

Something

public lua v1 · immutable
·published 2007-04-03 20:54 UTC
rendered paste body
		local suns = ents.FindByClass( "env_sun" )		for _, ent in ipairs( suns ) do			if ent:IsValid() then				local values = ent:GetKeyValues()				for key, value in pairs(values) do					if ((key == "target") and (string.len(value) > 0)) then						Msg("[" .. key .. "] " .. value .. "\n")						local targets = ents.FindByName( "sun_target" )						for _, target in pairs( targets ) do							SunAngle = (target:GetPos() - ent:GetPos()):Normalize()						end					end				end...