Alright so I thought I would write a bot for the first time since I've got nothing else to do. Anyways, set one was targetting enemies, so after a few minutes I found the target function
0042AF7C. It's a "thiscall" function and it takes 1 parameter (pointer to enemy). Speaking of which, why is there support for calling "thiscall" or "fastcall" functions in MHS?
Anyways, I hooked the function and grabbed the parameter a couple times.
13A79CA8
13B330C8
13B9F2D8
Obviously given the closeness and pattern of the pointers, you can see that they are contained in an array. (Not sure if this contains players or other objects as well). Anyways, I'm wondering how I could find this array WITHOUT having to record hooks. I.E I want to be able to identify entities right off the bat, without my bot having to study the game structure for a few minutes every time I restart game. I would also needto be able to determine the 'size' of each enemy structure so that I could parse out each enemy. So does anyone know any methods to accomplish this?
If my hex skills haven't failed me, I could assume that the enemy structure is at least a multiple of 16 bytes (given that each pointer ends with 8 the only way that could happen equally is that if objects between them were multiples of 10h) 10h = 16 decimal.
So does anyone know any methods for:
1. Finding the beginning/end/size of an array of enemies
2. Finding the size of each enemy