--- deliantra/server/include/object.h 2006/12/26 08:54:59 1.70 +++ deliantra/server/include/object.h 2006/12/27 13:13:47 1.72 @@ -305,6 +305,12 @@ || (type == SPELL_EFFECT && (subtype == SP_BULLET || subtype == SP_MAGIC_MISSILE)); } + // temporary: wether the objetc can be saved in a map file + // 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; } + /* This return true if object has still randomitems which * could be expanded. */ @@ -320,6 +326,16 @@ return 0; } + // "temporary" helper function + MTH object *head_ () + { + return head ? head : this; + } + + // insert object at same map position as 'where' + // handles both inventory and map "positions" + MTH object *insert_at (object *where, object *originator = 0, int flags = 0); + // returns the mapspace this object is in mapspace &ms () const;