diff --git a/source/src/client.cpp b/source/src/client.cpp index 065e0815..915d5e8c 100644 --- a/source/src/client.cpp +++ b/source/src/client.cpp @@ -240,7 +240,7 @@ void addmsg(int type, const char *fmt, ...) loopi(len) messages.add(buf[i]); } -static int lastupdate = 0, lastping = 0; +static int lastupdate = -1000, lastping = 0; bool senditemstoserver = false; // after a map change, since server doesn't have map data void sendpackettoserv(int chan, ENetPacket *packet) diff --git a/source/src/main.cpp b/source/src/main.cpp index f42bcc12..2a84024a 100644 --- a/source/src/main.cpp +++ b/source/src/main.cpp @@ -451,17 +451,14 @@ int main(int argc, char **argv) serverslice(0); + fps = (1000.0f/elapsed+fps*10)/11; frames++; computeraytable(camera1->o.x, camera1->o.y); if(frames>4) SDL_GL_SwapBuffers(); extern void updatevol(); updatevol(); - if(frames>3) - { - fps = (1000.0f/elapsed+fps*10)/11; - gl_drawframe(screen->w, screen->h, fpshighfps ? fps/highfps : 1.0f), fps); - } - //SDL_Delay(100); + if(frames>3) gl_drawframe(screen->w, screen->h, fpshighfps ? fps/highfps : 1.0f), fps); + SDL_Event event; int lasttype = 0, lastbut = 0; while(SDL_PollEvent(&event))