ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/socket/loop.C
(Generate patch)

Comparing deliantra/server/socket/loop.C (file contents):
Revision 1.35 by root, Tue Jan 2 11:08:36 2007 UTC vs.
Revision 1.37 by root, Mon Jan 8 18:18:36 2007 UTC

1/* 1/*
2 CrossFire, A Multiplayer game for X-windows 2 CrossFire, A Multiplayer game for X-windows
3 3
4 Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team
4 Copyright (C) 2002-2003 Mark Wedel & The Crossfire Development Team 5 Copyright (C) 2002-2003 Mark Wedel & The Crossfire Development Team
5 Copyright (C) 1992 Frank Tore Johansen 6 Copyright (C) 1992 Frank Tore Johansen
6 7
7 This program is free software; you can redistribute it and/or modify 8 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by 9 it under the terms of the GNU General Public License as published by
142 client *s = clients [i]; 143 client *s = clients [i];
143 player *pl = s->pl; 144 player *pl = s->pl;
144 145
145 if (pl && pl->ns && !pl->ns->destroyed ()) 146 if (pl && pl->ns && !pl->ns->destroyed ())
146 { 147 {
148 client *ns = pl->ns;
149
147 /* Update the players stats once per tick. More efficient than 150 /* Update the players stats once per tick. More efficient than
148 * sending them whenever they change, and probably just as useful 151 * sending them whenever they change, and probably just as useful
149 */ 152 */
150 esrv_update_stats (pl); 153 esrv_update_stats (pl);
151 154
152 if (pl->last_weight != -1 && pl->last_weight != WEIGHT (pl->ob)) 155 if (ns->last_weight != -1 && ns->last_weight != WEIGHT (pl->ob))
153 { 156 {
154 esrv_update_item (UPD_WEIGHT, pl->ob, pl->ob); 157 esrv_update_item (UPD_WEIGHT, pl->ob, pl->ob);
155 if (pl->last_weight != WEIGHT (pl->ob)) 158 if (ns->last_weight != WEIGHT (pl->ob))
156 LOG (llevError, "esrv_update_item(UPD_WEIGHT) did not set player weight: is %lu, should be %lu\n", 159 LOG (llevError, "esrv_update_item(UPD_WEIGHT) did not set player weight: is %lu, should be %lu\n",
157 (unsigned long) pl->last_weight, WEIGHT (pl->ob)); 160 (unsigned long) ns->last_weight, WEIGHT (pl->ob));
158 } 161 }
159 162
160 draw_client_map (pl->ob); 163 draw_client_map (pl->ob);
161 164
162 if (s->update_look) 165 if (s->update_look)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines