Use valptr for eobject highest_valid

This commit is contained in:
Kp 2015-06-13 22:42:16 +00:00
parent b9d6c577be
commit 32f256311d

View file

@ -273,8 +273,11 @@ static int compute_num_players(void)
int count = 0;
range_for (const auto i, highest_valid(Objects))
if (Objects[i].type == OBJ_PLAYER)
{
const auto &&objp = vcobjptr(static_cast<objnum_t>(i));
if (objp->type == OBJ_PLAYER)
count++;
}
return count;