… | |
… | |
76 | ob->remove (); |
76 | ob->remove (); |
77 | ob->enemy = 0; // sometimes keeps an extra refcount on itself |
77 | ob->enemy = 0; // sometimes keeps an extra refcount on itself |
78 | ob->map = 0; |
78 | ob->map = 0; |
79 | party = 0; |
79 | party = 0; |
80 | |
80 | |
81 | combat_ob = ranged_ob = 0; //TODO, should be special marker, non-refcounted, not this |
|
|
82 | |
|
|
83 | players.erase (this); |
81 | players.erase (this); |
84 | } |
82 | } |
85 | |
83 | |
86 | // connect the player with a specific client |
84 | // connect the player with a specific client |
87 | // also changes, rationalises, and fixes some incorrect settings |
85 | // also changes, rationalises, and fixes some incorrect settings |
… | |
… | |
236 | disconnect (); |
234 | disconnect (); |
237 | |
235 | |
238 | attachable::do_destroy (); |
236 | attachable::do_destroy (); |
239 | |
237 | |
240 | if (ob) |
238 | if (ob) |
241 | { |
|
|
242 | ob->destroy_inv (false); |
|
|
243 | ob->destroy (); |
239 | ob->destroy (); |
244 | } |
|
|
245 | |
240 | |
246 | ob = observe = viewpoint = 0; |
241 | ob = observe = viewpoint = 0; |
247 | } |
242 | } |
248 | |
243 | |
249 | player::~player () |
244 | player::~player () |