On 07.04.2005 23:32, Jonathan Koren wrote:
Assuming I my understanding is correct, wouldn't it make more sense to conver these ids to use some sort of bitmask? Say the low bits identify individual units (i.e. medium tank, aa tank, heavy tank) and the high bits indicate a broad unit class (i.e. tank, boat, aircraft, artillery, train, person)? You can still use ran the range code if you want, but a bbetter sollution would be to match the unit type against the unit class bitmask.
What do you think?
Yes, I guess you're right. A bitmask would indeed be a better solution. I don't like the idea of selecting individual units, though, because it would be almost certainly more confusing than helpful. In general, a shop should be accessible by any unit. There may be reasonable exceptions like air fields or ports but the unit choices for those should be obvious, and it quickly gets murky if you select individual units.