--- deliantra/server/common/map.C 2007/04/21 16:56:28 1.101 +++ deliantra/server/common/map.C 2007/05/17 21:32:08 1.102 @@ -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) 2001-2003 Mark Wedel & Crossfire Development Team @@ -176,8 +176,7 @@ if (!(mflags & P_IS_ALIVE) && !OB_TYPE_MOVE_BLOCK (ob, blocked)) return 0; - if (ob->head != NULL) - ob = ob->head; + ob = ob->head_ (); /* We basically go through the stack of objects, and if there is * some other object that has NO_PASS or FLAG_ALIVE set, return @@ -217,13 +216,18 @@ /* Broke apart a big nasty if into several here to make * this more readable. first check - if the space blocks * movement, can't move here. - * second - if a monster, can't move there, unles it is a + * second - if a monster, can't move there, unless it is a * hidden dm */ if (OB_MOVE_BLOCK (ob, tmp)) return 1; - if (QUERY_FLAG (tmp, FLAG_ALIVE) && tmp->head != ob && tmp != ob && - tmp->type != DOOR && !(QUERY_FLAG (tmp, FLAG_WIZ) && tmp->contr->hidden)) + + if (QUERY_FLAG (tmp, FLAG_ALIVE) + && tmp->head_ () != ob + && tmp != ob + && tmp->type != DOOR + && !tmp->flag [FLAG_WIZ] + && tmp->contr->hidden) return 1; } @@ -358,7 +362,7 @@ for (object *op = ms->bot; op; op = op->above) { /* already multipart - don't do anything more */ - if (!op->head && !op->more && op->arch->more) + if (op->head_ () == op && !op->more && op->arch->more) { op->remove (); op->expand_tail (); @@ -775,7 +779,7 @@ if (QUERY_FLAG (op, FLAG_IS_FLOOR) && QUERY_FLAG (op, FLAG_UNIQUE)) unique = 1; - if (op->head == NULL && (QUERY_FLAG (op, FLAG_UNIQUE) || unique)) + if (op->head_ () == op && (QUERY_FLAG (op, FLAG_UNIQUE) || unique)) { op->destroy_inv (false); op->destroy (); @@ -868,11 +872,8 @@ if (spaces) { for (mapspace *ms = spaces + size (); ms-- > spaces; ) - while (object *op = ms->bot) + while (object *op = ms->bot->head_ ()) { - if (op->head) - op = op->head; - op->destroy_inv (false); op->destroy (); }