Permalink
Browse files

Fixed hints on low FPS

Being stuck in top left corner.
1 parent d02a17b commit 02f5990b35c52d168e99470ac323e4e1a4ab88ba @robotboy655 robotboy655 committed Apr 20, 2016
Showing with 3 additions and 3 deletions.
  1. +3 −3 garrysmod/lua/includes/modules/notification.lua
@@ -108,7 +108,7 @@ local function UpdateNotice( i, Panel, Count )
ideal_x = ideal_x + w * 2
end
- local spd = FrameTime() * 15
+ local spd = RealFrameTime() * 15
y = y + Panel.VelY * spd
x = x + Panel.VelX * spd
@@ -121,8 +121,8 @@ local function UpdateNotice( i, Panel, Count )
if ( math.abs( dist ) < 2 && math.abs( Panel.VelX ) < 0.1 ) then Panel.VelX = 0 end
-- Friction.. kind of FPS independant.
- Panel.VelX = Panel.VelX * ( 0.95 - FrameTime() * 8 )
- Panel.VelY = Panel.VelY * ( 0.95 - FrameTime() * 8 )
+ Panel.VelX = Panel.VelX * ( 0.95 - RealFrameTime() * 8 )
+ Panel.VelY = Panel.VelY * ( 0.95 - RealFrameTime() * 8 )
Panel.fx = x
Panel.fy = y

0 comments on commit 02f5990

Please sign in to comment.