int LocalObjectSelectNextinMine(void) { int rval, first_obj; rval = ObjectSelectNextInMine(); first_obj = Cur_object_index; if (Cur_object_index != -1) { while (!is_legal_type_for_this_window(Cur_object_index)) { ObjectSelectNextInMine(); if (Cur_object_index == first_obj) break; } Cur_goody_type = Objects[Cur_object_index].contains_type; Cur_goody_id = Objects[Cur_object_index].contains_id; if (Objects[Cur_object_index].contains_count < 0) Objects[Cur_object_index].contains_count = 0; Cur_goody_count = Objects[Cur_object_index].contains_count; } if (Cur_object_index != first_obj) set_view_target_from_segment(Cursegp); return rval; }
static int LocalObjectSelectNextinMine(void) { int rval, first_obj; rval = ObjectSelectNextInMine(); first_obj = Cur_object_index; if (Cur_object_index != object_none) { while (!is_legal_type_for_this_window(Cur_object_index)) { ObjectSelectNextInMine(); if (Cur_object_index == first_obj) break; } const auto &&objp = vobjptr(Cur_object_index); Cur_goody_type = objp->contains_type; Cur_goody_id = objp->contains_id; if (objp->contains_count < 0) objp->contains_count = 0; Cur_goody_count = objp->contains_count; } if (Cur_object_index != first_obj) set_view_target_from_segment(Cursegp); return rval; }