From 9672fe674f6335318cf11855299679f9d94a619b Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Sat, 30 Aug 2008 09:16:29 +0000 Subject: fixed so you can disconnect and reconnet without crashing --- src/game/client/components/maplayers.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/game/client/components/maplayers.cpp') diff --git a/src/game/client/components/maplayers.cpp b/src/game/client/components/maplayers.cpp index 8ed6264b..1c72a200 100644 --- a/src/game/client/components/maplayers.cpp +++ b/src/game/client/components/maplayers.cpp @@ -27,7 +27,6 @@ static void mapscreen_to_group(float center_x, float center_y, MAPITEM_GROUP *gr gfx_mapscreen(points[0], points[1], points[2], points[3]); } - static void envelope_eval(float time_offset, int env, float *channels) { channels[0] = 0; @@ -56,6 +55,9 @@ static void envelope_eval(float time_offset, int env, float *channels) void MAPLAYERS::on_render() { + if(client_state() != CLIENTSTATE_ONLINE) + return; + vec2 center = gameclient.camera->center; //float center_x = gameclient.camera->center.x; //float center_y = gameclient.camera->center.y; -- cgit 1.4.1