From e6c4db94d81306fda59b8fb32ae07fb3f0c8bf08 Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Sun, 29 Jul 2007 13:21:33 +0000 Subject: fixed some problems with the snapshot handling. added fps meter. fixed error when connecting to several servers --- src/game/client/game_client.cpp | 1 + src/game/client/mapres_tilemap.cpp | 8 ++++++-- src/game/server/game_server.cpp | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) (limited to 'src/game') diff --git a/src/game/client/game_client.cpp b/src/game/client/game_client.cpp index eef3e692..365205a4 100644 --- a/src/game/client/game_client.cpp +++ b/src/game/client/game_client.cpp @@ -1205,6 +1205,7 @@ void modc_render() { menu_active = !menu_active; } + if (!menu_active) { if(inp_key_down(input::enter)) diff --git a/src/game/client/mapres_tilemap.cpp b/src/game/client/mapres_tilemap.cpp index f1f29d8f..3b2a5006 100644 --- a/src/game/client/mapres_tilemap.cpp +++ b/src/game/client/mapres_tilemap.cpp @@ -5,12 +5,16 @@ #include -bool must_init = true; void *batches[32] = {0}; int tilemap_init() { - must_init = true; + for(int i = 0; i < 32; i++) + if(batches[i]) + { + gfx_destoy_batch(batches[i]); + batches[i] = 0; + } return 0; } diff --git a/src/game/server/game_server.cpp b/src/game/server/game_server.cpp index d1b3c44b..fa7493bf 100644 --- a/src/game/server/game_server.cpp +++ b/src/game/server/game_server.cpp @@ -1826,6 +1826,8 @@ void mods_init() if(type != -1) { + // LOL, the only new in the entire game code + // perhaps we can get rid of it. seams like a stupid thing to have powerup *ppower = new powerup(type, subtype); ppower->pos = vec2(it->x, it->y); } -- cgit 1.4.1