--- deliantra/server/include/object.h 2007/08/16 06:36:56 1.143 +++ deliantra/server/include/object.h 2007/08/27 06:29:17 1.146 @@ -278,6 +278,7 @@ MTH int slottype () const; MTH static object *create (); + const mapxy &operator =(const mapxy &pos); object &operator =(const object &src); MTH void copy_to (object *dst); MTH object *clone (); // create + copy_to @@ -297,6 +298,13 @@ do_remove (); } + void move_to (const mapxy &pos) + { + remove (); + *this = pos; + insert_at (this, this); + } + static bool can_merge_slow (object *op1, object *op2); // this is often used in time-critical code, so optimise @@ -385,7 +393,7 @@ // contr => is a player // head => only save head of a multitile object // owner => can not reference owner yet - MTH bool can_map_save () const { return !contr && !head && !owner && !flag [FLAG_NO_MAP_SAVE]; } + MTH bool can_map_save () const { return !head && (!owner || owner->contr) && !contr && !flag [FLAG_NO_MAP_SAVE]; } /* This return true if object has still randomitems which * could be expanded. @@ -496,7 +504,7 @@ MTH struct region *region () const; void statusmsg (const char *msg, int color = NDI_BLACK); - void errormsg (const char *msg, int color = NDI_RED); + void failmsg (const char *msg, int color = NDI_RED); protected: void link ();