From: Clyne Sullivan Date: Tue, 29 Sep 2015 12:47:33 +0000 (-0400) Subject: fixed entity lags X-Git-Url: https://code.bitgloo.com/?a=commitdiff_plain;h=4031320180ff5e6c6452fc58575f5d7eac8eddbe;p=clyne%2Fgamedev.git fixed entity lags --- 4031320180ff5e6c6452fc58575f5d7eac8eddbe diff --cc src/main.cpp index cb3c086,4be52fd..6c4047c --- a/src/main.cpp +++ b/src/main.cpp @@@ -172,10 -174,10 +174,11 @@@ void render() fps=1000/deltaTime; d=deltaTime; debugDiv=0; + }else if(debugDiv%10==0){ rndy = player->loc.y; } - ui::putText(player->loc.x-SCREEN_WIDTH/2,SCREEN_HEIGHT-ui::fontSize,"FPS: %d\nD: %d G:%d\nRes: %ux%u\nE: %d\nPOS: (x)%.2f\n (y)%.2f",fps,d,player->ground,SCREEN_WIDTH,SCREEN_HEIGHT,entity.size(),player->loc.x,rndy); + ui::putText(player->loc.x-SCREEN_WIDTH/2,SCREEN_HEIGHT-ui::fontSize,"FPS: %d\nD: %d G:%d\nRes: %ux%u\nE: %d\nPOS: (x)%+.2f\n (y)%+.2f", + fps,d,player->ground,SCREEN_WIDTH,SCREEN_HEIGHT,entity.size(),player->loc.x,rndy); } ui::draw(); // Draw any UI elements if they need to be