--- deliantra/server/server/c_misc.C 2007/01/31 17:42:43 1.40 +++ deliantra/server/server/c_misc.C 2007/02/01 19:15:39 1.41 @@ -101,7 +101,7 @@ current_region_info (object *op) { if (region *reg = op->region ()) - new_draw_info_format (NDI_UNIQUE, 0, op, "You are in %s.\n%s", reg->longname, ®->msg); + new_draw_info_format (NDI_UNIQUE, 0, op, "You are in %s.\n%s", ®->longname, ®->msg); } void @@ -146,33 +146,33 @@ * players there. * I don't know how thread-safe this would be, I suspect not very.... */ - for (region *reg = first_region; reg; reg = reg->next) - reg->counter = 0; + for_all_regions (rgn) + rgn->counter = 0; for_all_players (pl) if (pl->ob->map) ++pl->ob->region ()->counter; /* we only want to print out by places with a 'longname' field... */ - for (region *reg = first_region; reg; reg = reg->next) + for_all_regions (rgn) { - if (reg->longname == NULL && reg->counter > 0) + if (!rgn->longname && rgn->counter > 0) { - if (reg->parent) + if (rgn->parent) { - reg->parent->counter += reg->counter; - reg->counter = 0; + rgn->parent->counter += rgn->counter; + rgn->counter = 0; } else /*uh oh, we shouldn't be here. */ - LOG (llevError, "command_whereabouts() Region %s with no longname has no parent", ®->name); + LOG (llevError, "command_whereabouts() Region %s with no longname has no parent", &rgn->name); } } new_draw_info_format (NDI_UNIQUE, 0, op, "In the world currently there are:"); - for (region *reg = first_region; reg; reg = reg->next) - if (reg->counter) - new_draw_info_format (NDI_UNIQUE, 0, op, "%u players in %s", reg->counter, reg->longname); + for_all_regions (rgn) + if (rgn->counter) + new_draw_info_format (NDI_UNIQUE, 0, op, "%u players in %s", rgn->counter, &rgn->longname); return 1; }