Helladen Posted February 26, 2011 Author Share Posted February 26, 2011 Basically this value is inaccurate, I've tested this and the old code added 1 to the I which it made it 1 off the actual high index. This may have the same effect with the other high indexes, I'm not sure. This also fixes the high index from not resetting, because if there are 0 NPCs on the map then it will not change it.**Client only!**Find:``` ' Get the npc high Index For I = MAX_MAP_NPCS To 1 Step -1 If MapNpc(I).Num > 0 Then Npc_HighIndex = I + 1 Exit For End If Next```Replace it with:``` ' Get the npc high Index For I = MAX_MAP_NPCS To 1 Step -1 If MapNpc(I).Num > 0 Then Npc_HighIndex = I Exit For End If Next```Above this add:``` Npc_HighIndex = 0```Below it erase this:``` ' Make sure we're not overflowing If Npc_HighIndex > MAX_MAP_NPCS Then Npc_HighIndex = MAX_MAP_NPCS``` Link to comment Share on other sites More sharing options...
Helladen Posted February 26, 2011 Author Share Posted February 26, 2011 Updated. :P Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now