--- deliantra/server/common/object.C 2006/12/20 11:36:38 1.75 +++ deliantra/server/common/object.C 2006/12/23 06:41:39 1.80 @@ -223,7 +223,7 @@ if (QUERY_FLAG (ob2, FLAG_IDENTIFIED)) SET_FLAG (ob2, FLAG_BEEN_APPLIED); - if ((ob1->flags ^ ob2->flags).reset (FLAG_INV_LOCKED).reset (FLAG_CLIENT_SENT).any () + if ((ob1->flag ^ ob2->flag).reset (FLAG_INV_LOCKED).reset (FLAG_CLIENT_SENT).any () || ob1->arch != ob2->arch || ob1->name != ob2->name || ob1->title != ob2->title @@ -469,48 +469,6 @@ op->key_values = 0; } -void object::clear () -{ - attachable_base::clear (); - - free_key_values (this); - - owner = 0; - name = 0; - name_pl = 0; - title = 0; - race = 0; - slaying = 0; - skill = 0; - msg = 0; - lore = 0; - custom_name = 0; - materialname = 0; - contr = 0; - below = 0; - above = 0; - inv = 0; - container = 0; - env = 0; - more = 0; - head = 0; - map = 0; - active_next = 0; - active_prev = 0; - - memset (static_cast(this), 0, sizeof (object_pod)); - - SET_FLAG (this, FLAG_REMOVED); - - /* What is not cleared is next, prev, and count */ - - expmul = 1.0; - face = blank_face; - - if (settings.casting_time) - casting_time = -1; -} - /* * copy_to first frees everything allocated by the dst object, * and then copies the contents of itself into the second @@ -526,7 +484,6 @@ bool is_removed = QUERY_FLAG (dst, FLAG_REMOVED); *(object_copy *)dst = *this; - *(object_pod *)dst = *this; if (self || cb) INVOKE_OBJECT (CLONE, this, ARG_OBJECT (dst)); @@ -748,7 +705,7 @@ return; } - mapspace &m = op->map->at (op->x, op->y); + mapspace &m = op->ms (); if (m.flags_ & P_NEED_UPDATE) /* nop */; @@ -1014,7 +971,7 @@ * to save cpu time. */ if ((otmp = in_player ()) && otmp->contr && !QUERY_FLAG (otmp, FLAG_NO_FIX_PLAYER)) - fix_player (otmp); + otmp->update_stats (); if (above != NULL) above->below = below; @@ -1094,7 +1051,7 @@ tmp->container = 0; } - tmp->contr->socket->floorbox_update (); + tmp->contr->ns->floorbox_update (); } /* See if player moving off should effect something */ @@ -1318,7 +1275,7 @@ if (op->below) op->below->above = op; else - op->map->at (op->x, op->y).bottom = op; + op->ms ().bottom = op; /* since *below* originator, no need to update top */ originator->below = op; @@ -1407,7 +1364,7 @@ op->above->below = op; op->below = NULL; - op->map->at (op->x, op->y).bottom = op; + op->ms ().bottom = op; } else { /* get inserted into the stack above top */ @@ -1421,7 +1378,7 @@ } if (op->above == NULL) - op->map->at (op->x, op->y).top = op; + op->ms ().top = op; } /* else not INS_BELOW_ORIGINATOR */ if (op->type == PLAYER) @@ -1431,8 +1388,8 @@ * it, so save a few ticks and start from there. */ if (!(flag & INS_MAP_LOAD)) - if (object *pl = op->map->at (op->x, op->y).player ()) - pl->contr->socket->floorbox_update (); + if (object *pl = op->ms ().player ()) + pl->contr->ns->floorbox_update (); /* If this object glows, it may affect lighting conditions that are * visible to others on this map. But update_all_los is really @@ -1726,7 +1683,7 @@ otmp = this->in_player (); if (otmp && otmp->contr) if (!QUERY_FLAG (otmp, FLAG_NO_FIX_PLAYER)) - fix_player (otmp); + otmp->update_stats (); op->map = 0; op->env = this;