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.34 by root, Wed Dec 27 15:04:39 2006 UTC vs.
Revision 1.35 by root, Tue Jan 2 11:08:36 2007 UTC

135 if ((time (NULL) - cst_lst.time_start) >= CS_LOGTIME) 135 if ((time (NULL) - cst_lst.time_start) >= CS_LOGTIME)
136 write_cs_stats (); 136 write_cs_stats ();
137#endif 137#endif
138 138
139 //TODO: should not be done here, either 139 //TODO: should not be done here, either
140 for (sockvec::iterator i = clients.begin (); i != clients.end (); ++i) 140 for (int i = 0; i < clients.size (); ++i)
141 { 141 {
142 client *s = *i; 142 client *s = clients [i];
143 player *pl = s->pl;
143 144
144 if (player *pl = s->pl) 145 if (pl && pl->ns && !pl->ns->destroyed ())
145 { 146 {
146 /* Update the players stats once per tick. More efficient than 147 /* Update the players stats once per tick. More efficient than
147 * sending them whenever they change, and probably just as useful 148 * sending them whenever they change, and probably just as useful
148 */ 149 */
149 esrv_update_stats (pl); 150 esrv_update_stats (pl);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines