Target visibilityPosted: February 13, 2011
As you may know, when you aim at an enemy ingame, their name fades in near the top of the screen. This name won’t show up when obstacles block the target from sight and it has a little bit of leeway in that you don’t have to be aiming exactly at them. This made it ideal for determining target visibility. Unfortunately, it has some drawbacks. Firstly, the name won’t show up when the target is too far away, even if they’re in range. Secondly, the leeway I mentioned earlier is limited. In laggy servers or when using slow moving projectiles like rockets, the aimbot needs to aim far ahead of the target to get a hit. That means the name won’t show up anymore. A third drawback is that opening the ingame framerate monitor (ctrl+F12) interferes.
I see 3 alternate solutions:
- Use whatever function the game uses to determine target visibility
- Compare target distance with the depth buffer at their location
- Extract the level geometry and perform ray casting
I’m not a fan of option 2 because it requires a Direct X wrapper and the depth buffer is only so precise. Furthermore, I want something that will work even if the target isn’t within the view frustum. I see option 1 as a plan B because option 3 gives me the most options and opportunities. Option 3 would allow me to automatically generate node graphs or display the map within GuiltySpark. Mind you, those improvements are a long way off and I might not get to them. The priority is target visibility.
Sky told me the map cache data is at 0x40440000, so I fired up Cheat Engine and checked it out:
A list of tags starts 0x10 from the start. It wasn’t too hard to figure out the tag reference structure. What I need to do is scan through the list to find the sbsp tag, then follow its data pointer to get the actual BSP data. The next step is to figure out what I need from the BSP to do target visibility calculations. The picture shows that what’s in memory is basically the same as what’s in the .map file. If what’s in the .map file is similar to the structure of the various tag files, then examining the .scenario_structure_bsp tags with Guerilla (part of Halo CE’s editing kit) will make it easier to understand the sbsp tag in memory.
While we’re at it, here’s a list of changes made to GuiltySpark since 1.0.20
- Added random number data source ($48)
- The last 10 commands are now stored and can be listed with the “history” command. The command itself is not stored
- Added “!!” command to re-execute the last command and “!<#>” to re-execute the <#>th last command. Not stored in history
- Pressing the up arrow key in the command input box cycles through previous commands
- Renamed “clear” command to “deleteall” in case people confuse “clear” for “cls”
- Added a “where <#>” command to focus the graph view on the given node
- Node numbers are no longer drawn over by links and are 1 pt larger for easier reading