Small refactor
This commit is contained in:
parent
75eecf7da3
commit
05700047ca
|
@ -916,9 +916,8 @@ std::vector<Object*> get_all_party_members_objects(bool include_hidden)
|
||||||
std::vector<Object*> value;
|
std::vector<Object*> value;
|
||||||
for (int index = 0; index < gPartyMembersLength; index++) {
|
for (int index = 0; index < gPartyMembersLength; index++) {
|
||||||
auto p_object = gPartyMembers[index].object;
|
auto p_object = gPartyMembers[index].object;
|
||||||
if (include_hidden) {
|
bool is_not_hidden = PID_TYPE(p_object->pid) == OBJ_TYPE_CRITTER && !critterIsDead(p_object) && !((p_object->flags & OBJECT_HIDDEN) != 0);
|
||||||
value.push_back(p_object);
|
if (include_hidden || is_not_hidden) {
|
||||||
} else if (PID_TYPE(p_object->pid) == OBJ_TYPE_CRITTER && !critterIsDead(p_object) && !((p_object->flags & OBJECT_HIDDEN) != 0)) {
|
|
||||||
value.push_back(p_object);
|
value.push_back(p_object);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue