14-01-2007, 03:02 PM
Quote:Resizing the array is fine, and I mentioned that,
Oops, sorry about that. I was skim-reading. :oops:
Quote:you'd have to interrupt some of the looping that already goes on, like packet handling,
I wouldn't see many places where you'd have to watch out too much. I recently just noticed I went all this time having vbGORE with a constant array size for the users, and got a few errors on the opening/closing of new characters after changing it. So yeah, it is pretty easy to mess up, but often easy to fix if you know how your code works (which I'm sure anyone who has spent a few months in Mirage does). I guess that wouldn't really help much for the looping, though, since you can still sort them into a large array just as easily - it just allows you to use as little ram as needed, while allowing for as large of arrays as needed.
What would be nice, is to keep an array pointing to which NPCs to update. This would allow you to completely ignore NPCs with no users on the map (as long as you handle accordingly when a user changes maps, logs in, and logs off). Though not sure if it'd be worth the cost of updating/maintaining that array in the long run, though, since you can often skip through a NPC not using any AI very quickly (just a matter of one or two "If X (>,