--- deliantra/server/common/anim.C 2007/04/12 14:18:04 1.22 +++ deliantra/server/common/anim.C 2007/05/17 21:32:08 1.24 @@ -1,5 +1,5 @@ /* - * CrossFire, A Multiplayer game for X-windows + * CrossFire, A Multiplayer game * * Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team * Copyright (C) 2002-2003 Mark Wedel & Crossfire Development Team @@ -41,6 +41,9 @@ animation & animation::create (const char *name, uint8 frames, uint8 facings) { + if (animations.size () == MAXANIMNUM) + cleanup ("trying to create new animation, but MAXANIMNUM animations in use."); + animations.push_back (animation ()); animation &anim = animations.back (); @@ -104,7 +107,7 @@ return; } - if (op->head) + if (op->head_ () != op) { dir = op->head->direction; @@ -185,7 +188,7 @@ * as such, we call it last, and only call it for the head * piece, and not for the other tail pieces. */ - if (!op->head) + if (op->head_ () == op) update_object (op, UP_OBJ_FACE); }