--- deliantra/server/socket/loop.C 2007/01/02 11:08:36 1.35 +++ deliantra/server/socket/loop.C 2007/01/14 21:20:51 1.38 @@ -1,6 +1,7 @@ /* CrossFire, A Multiplayer game for X-windows + Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team Copyright (C) 2002-2003 Mark Wedel & The Crossfire Development Team Copyright (C) 1992 Frank Tore Johansen @@ -88,7 +89,7 @@ bool skipping = false; while (!cmd_queue.empty () - && !(state == ST_PLAYING && pl->ob && pl->ob->speed_left < 0)) + && !(state == ST_PLAYING && pl->ob && pl->ob->speed_left <= 0)) { command &cmd = cmd_queue.front (); @@ -144,17 +145,19 @@ if (pl && pl->ns && !pl->ns->destroyed ()) { + client *ns = pl->ns; + /* Update the players stats once per tick. More efficient than * sending them whenever they change, and probably just as useful */ esrv_update_stats (pl); - if (pl->last_weight != -1 && pl->last_weight != WEIGHT (pl->ob)) + if (ns->last_weight != -1 && ns->last_weight != WEIGHT (pl->ob)) { esrv_update_item (UPD_WEIGHT, pl->ob, pl->ob); - if (pl->last_weight != WEIGHT (pl->ob)) + if (ns->last_weight != WEIGHT (pl->ob)) LOG (llevError, "esrv_update_item(UPD_WEIGHT) did not set player weight: is %lu, should be %lu\n", - (unsigned long) pl->last_weight, WEIGHT (pl->ob)); + (unsigned long) ns->last_weight, WEIGHT (pl->ob)); } draw_client_map (pl->ob);