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

Comparing deliantra/server/socket/init.C (file contents):
Revision 1.28 by root, Thu Dec 21 23:37:06 2006 UTC vs.
Revision 1.30 by root, Fri Dec 22 16:34:00 2006 UTC

157} 157}
158 158
159client::~client () 159client::~client ()
160{ 160{
161 if (pl) 161 if (pl)
162 {
163 pl->save ();
164 leave (pl, 1);
162 pl->ns = 0; 165 pl->ns = 0;
166
167 delete pl;
168 }
163 169
164 if (fd >= 0) 170 if (fd >= 0)
165 close (fd); 171 close (fd);
166 172
167 sfree<uint8> (faces_sent, nrofpixmaps); 173 sfree<uint8> (faces_sent, nrofpixmaps);
171} 177}
172 178
173void 179void
174client::destroy () 180client::destroy ()
175{ 181{
182 INVOKE_CLIENT (DESTROY, this);
183
176 state = ST_DEAD; 184 state = ST_DEAD;
177 185
178 socket_ev.suspend (); 186 socket_ev.suspend ();
179 cmd_ev.suspend (); 187 cmd_ev.suspend ();
180} 188}
202void 210void
203free_all_newserver (void) 211free_all_newserver (void)
204{ 212{
205 LOG (llevDebug, "Freeing all new client/server information.\n"); 213 LOG (llevDebug, "Freeing all new client/server information.\n");
206 free_socket_images (); 214 free_socket_images ();
207}
208
209/** Sends the 'goodbye' command to the player, and closes connection. */
210void
211final_free_player (player *pl)
212{
213 free_player (pl);
214} 215}
215 216
216client * 217client *
217client::create (int fd, const char *peername) 218client::create (int fd, const char *peername)
218{ 219{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines