I was commissioned to write a plugin that changes the stun (not to revert it, though). I don't have the time nor motivation to write a properly reverted version, but here's some notes in case someone decides to take this on.
- Detour / hook CTFStunBall::ApplyBallImpactEffectOnVictim() with a pre-callback. I wrote mine before dynhooks was a thing, but either should be fine. Perform your stun logic there, and return MRES_Supercede.
- Projectiles use initial launch time to determine what distance they've traveled. It should be stored at m_iType + 0x04 on the projectile, but you may want to verify using a disassembly on the function mentioned right above around where gpGlobals is referenced (on Linux)
__________________