So, again, you've got to forgive me, I just started working with SourceMod about three weeks back, so I am sure there are bugs, badly done logic, and other terrible things in the code. But, I've updated the Git repo with the latest version. Fixes the crash from the goofy event hooks, and includes a few more fixes:
- Updated event handler for player_hurt to get the actual entity name that hurt it. Before, if you threw a grenade then fired a gun before the grenade went off, a player killed by that grenade would show your gun as the killing weapon.
- Objective destroyed now only credits the player that destroyed it TODO: Add assist event to logs
- Started work on fixing objective capture code to only credit the players who cap it. I created a global array that triggers on touching or leaving a CP that I'm trying to use for scoring, but it's not fully functional.
- Updated weapon name strings, I have a script that parses the language files from the game assets and creates this list.
- Changed back from old behavior that would "rename" weapon_c4_clicker to grenade_c4. All weapon names are used throughout now, the player_hurt event now changes grenade_m67 to weapon_m67 for instance.
Also, I created a couple tools for HLStatsX, in conjunction with my other Insurgency web tools, to help keep people's HLStatsX database up to date. If you go to
http://ins.jballou.com/create-hlstatsdump.php you can cut and paste a SQL dump that -SHOULD- safely add whatever weapons/awards/maps/ribbons you may be missing. I am working on a script to create the image files now for icons/ribbons. Also got heatmaps working, see them in action at
http://stats.jballou.com/
Things I want to do:
- General cleanup, have someone who knows SourceMod better than I do review the code and help neaten it up.
- I see in the datamaps/netprops that there are entries for theater files, weapons, and more. Ideally, I should be able to interrogate the theater parser handle in the engine and get a listing of all weapons. This would be much better than the current static file method, especially for mod servers that have other weapons.
- Find a way to use SourceMod to access the "closed caption" files that Insurgency uses for translation localization. See https://raw.githubusercontent.com/ja...cy_english.txt for the file.
- Look through the events listed in https://raw.githubusercontent.com/ja.../modevents.res and see if there is anything else to add to this.
- Log round starts and ends in HLStatsX, ideally so I can show per-match heatmaps and stats
- Package changes as a package or patch to make it easier to install onto standard HLStatsX
Any suggestions or help would be greatly appreciated. Thanks!