Re: a bug with water sectors?

From: Lincoln Chan (linc@CSUA.Berkeley.EDU)
Date: 04/12/95


check_eq is unnecessary, why use it?


  if ((world[ch->in_room].sector_type == SECT_WATER_NOSWIM) ||
      (world[EXIT(ch, dir)->to_room].sector_type == SECT_WATER_NOSWIM)) {
    for (obj = ch->carrying; obj; obj = obj->next_content)
      if (GET_OBJ_TYPE(obj) == ITEM_BOAT) {
        has_boat = TRUE;
      }

    if (!has_boat)
      for (equip_pos = 0; equip_pos < NUM_WEARS; equip_pos++)
        if (GET_OBJ_TYPE(ch->equipment[equip_pos]) == ITEM_BOAT)
          has_boat = TRUE;

    if (!has_boat) {
      send_to_char("You need a boat to go there.\r\n", ch);
      return 0;

linc aka Aladdin of Eternity DikuMUD



This archive was generated by hypermail 2b30 : 12/07/00 PST