--- deliantra/server/socket/loop.C 2006/12/22 16:34:00 1.32 +++ deliantra/server/socket/loop.C 2006/12/25 11:25:50 1.33 @@ -136,29 +136,12 @@ write_cs_stats (); #endif - for (sockvec::iterator i = clients.begin (); i != clients.end (); ) - { - client *s = *i; - - if (s->destroyed ()) - { - clients.erase (i); - delete s; - } - else - ++i; - } - - /* We need to do some of the processing below regardless */ - - /* Check for any input on the sockets */ + //TODO: should not be done here, either for (sockvec::iterator i = clients.begin (); i != clients.end (); ++i) { client *s = *i; - player *pl = s->pl; - //TODO: should not be done here, either - if (!s->destroyed () && pl) + if (player *pl = s->pl) { /* Update the players stats once per tick. More efficient than * sending them whenever they change, and probably just as useful @@ -178,6 +161,8 @@ if (s->update_look) esrv_draw_look (pl->ob); } + + s->refcnt_chk (); } }