Fixed regression (with kp's help) in multi_do_player_deres which made conditional check for map_objnum_local_to_remote fail for the wrong reasons

This commit is contained in:
zico 2015-05-25 11:48:05 +02:00
parent d29d52be7f
commit 74b66a7f5a

View file

@ -1710,14 +1710,13 @@ static void multi_do_player_deres(const playernum_t pnum, const ubyte *buf)
// if (Net_create_loc != remote_created)
// Int3(); // Probably out of object array space, see Rob
range_for (const auto i, partial_range(Net_create_objnums, remote_created))
range_for (const auto i, partial_range(Net_create_objnums, std::min(Net_create_loc, static_cast<unsigned>(remote_created))))
{
short s;
s = GET_INTEL_SHORT(buf + count);
if ((i < Net_create_loc) && (s > 0) &&
(i > 0))
if ((s > 0) && (i > 0))
map_objnum_local_to_remote((short)i, s, pnum);
count += 2;
}