07.03.2013, 12:56
...and thats a clever way of doing it - if you WOULD have created an array for it (like new HousePickupID[10000]), and the pickupids for houses started at 4000, then the first 4000 cells of the array contained just zeros.
using an additional house variable as pointer (holding the pickupid as value stored in it) is the fastest way. no linear/binary search, just an extra [].
btw, i didnt expect this topic to "solve itself" - a good sign that i started my day reading this.
using an additional house variable as pointer (holding the pickupid as value stored in it) is the fastest way. no linear/binary search, just an extra [].
btw, i didnt expect this topic to "solve itself" - a good sign that i started my day reading this.