ReGameDLL_CS icon indicating copy to clipboard operation
ReGameDLL_CS copied to clipboard

Free for all mode (CVar "mp_freeforall") does not handle HLStatsX web addon.

Open StevenKal opened this issue 3 years ago • 0 comments

When the free for all mode is enabled via the CVar "mp_freeforall", killing a teammate is still counted as "team kill" by an external web addon/tool as HLStatsX. The reason is due to the fact this program "reads the logs", and detects same team for killer & victim, so still count this as TK. As result, this indirectly "fake" the stats via this web tool, and killers loose points via it while they should receive positive ones, like for an enemy kill. A lot of servers run such web tool to list players's stats in details, so this worth to add proper FFA support for it.

This can easily by fixed by "tricking/swapping" the killer's or victim's team name retrieved from the "GetTeam" function in the "CHalfLifeMultiplay::DeathNotice" one, inside the "if (pKiller->flags & FL_CLIENT)" check ("multiplay_gamerules.cpp" file).

But as this will "fake the real team name", I might recommend to add a mode "2", allowing the users to enable this option, then edit in "game.cfg" file by adding that follows to the description of the CVar "mp_freeforall": // 2 - enabled, but also make victim's team name always different for a "teammate kill" in order to support third-party addons like HLStatsX (which read the server's logs to generate their stats)

EDIT: At the same time I can also suggest you to make work the CVar "mp_mirrordamage" (redirect damage to attacker when FF ON without FFA enabled, a feature apparently scheduled but never implemented, even in ReGameDLL_CS). Set a mode with values "1" & "2", where on "1" this let the "X attacked a teammate" message, and on "2" no such message... or maybe only to attacker, discutable.

StevenKal avatar Mar 08 '21 11:03 StevenKal