--- deliantra/server/include/object.h 2016/11/16 22:14:05 1.269 +++ deliantra/server/include/object.h 2018/11/18 16:32:27 1.275 @@ -1,7 +1,8 @@ /* * This file is part of Deliantra, the Roguelike Realtime MMORPG. * - * Copyright (©) 2005,2006,2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann / Robin Redeker / the Deliantra team + * Copyright (©) 2018 Marc Alexander Lehmann / the Deliantra team + * Copyright (©) 2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016 Marc Alexander Lehmann / Robin Redeker / the Deliantra team * Copyright (©) 2001 Mark Wedel & Crossfire Development Team * Copyright (©) 1992 Frank Tore Johansen * @@ -437,7 +438,7 @@ // can be different if originator is causing op to // move (originator is pushing op) // returns 0 if the object is not able to move to the - // desired space, 1 otherwise (in which case we also + // desired space, 1 otherwise (in which case we also // move the object accordingly. This function is // very similiar to move_object. int move (int dir, object *originator); @@ -584,7 +585,7 @@ MTH bool has_dialogue () const { return msg_has_dialogue (&msg); } - /* need_identify returns true if the item should be identified. This + /* need_identify returns true if the item should be identified. This * function really should not exist - by default, any item not identified * should need it. */ @@ -805,6 +806,10 @@ MTH int anim_frames () const { return anim ().num_animations; } MTH int anim_facings () const { return anim ().facings; } + // sets a new animation frame, if the object has animation frames, + // and updates the face + MTH void update_anim_frame (int frame); + MTH utf8_string as_string (); // low-level management, statistics, ... @@ -945,10 +950,10 @@ /* Used by update_object to know if the object being passed is * being added or removed. */ -#define UP_OBJ_INSERT 1 -#define UP_OBJ_REMOVE 2 -#define UP_OBJ_CHANGE 3 -#define UP_OBJ_FACE 4 /* Only thing that changed was the face */ +#define UP_OBJ_INSERT 1 // object was inserted +#define UP_OBJ_REMOVE 2 // object was removed +#define UP_OBJ_CHANGE 3 // object has changed in some unspecified way +#define UP_OBJ_FACE 4 // only thing that changed was the face /* These are flags passed to insert_ob_in_map and * insert_ob_in_ob. Note that all flags may not be meaningful @@ -961,7 +966,7 @@ * originator - saves cpu time if you know the inserted object * is not meaningful in terms of having an effect. * INS_ON_TOP: Always put object on top. Generally only needed when loading - * files from disk and ordering needs to be preserved. + * files from disk and ordering needs to be preserved. * INS_BELOW_ORIGINATOR: Insert new object immediately below originator - * Use for treasure chests so the new object is the highest thing * beneath the player, but not actually above it. Note - the