Guest User

Untitled

a guest
Sep 22nd, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 0.83 KB | None | 0 0
  1. --- C:/Users/Io/AppData/Local/Temp/cl_init.lua-revBASE.svn000.tmp.lua   Sun Mar 25 20:32:04 2012
  2. +++ C:/Program Files (x86)/Steam/steamapps/bunyan93/garrysmod/garrysmod/addons/spacebuild/lua/entities/resource_node/cl_init.lua    Mon Aug 20 02:26:46 2012
  3. @@ -181,8 +181,10 @@
  4.                             TempY = TempY + extra
  5.                             for k, v in pairs(resources) do
  6.                                 if mode == 3 then
  7. +                                   surface.SetDrawColor(200,200,255,255)
  8.                                     surface.SetTextColor(200,200,255,255)
  9. -                                   amt = v.value/v.maxvalue
  10. +                                   amt = math.Clamp(v.value/v.maxvalue, 0, 1)
  11. +                                   if (amt ~= amt) then amt = 0 end -- in case of Nan
  12.                                     surface.SetTextPos(textStartPos+15, TempY)
  13.                                     surface.DrawText("   "..CAF.GetAddon("Resource Distribution").GetProperResourceName(k))
  14.                                     surface.DrawOutlinedRect(-20, TempY-5, -2*(textStartPos)+20, 40)
Add Comment
Please, Sign In to add comment