Helping out the guys working on the Touhou Fortress 2
modification, I felt kinda bad for having our voice actors record lines that aren't ever used.
The Scout, Heavy, Sniper, and Spy have "meleedare" lines that don't actually play, so this plugin attempts to freshen your TF2 experience and maybe make you smile as your character utters a humorous saying when you pull out your melee weapon.
This is a beta; since it's difficult to determine what conditions make for a good "meleedare" line, I'll let the community give suggestions as to what works and what doesn't. Additionally, without a place to test on my own, I'll need you guys to help me find and squash those pesky bugs.
Currently (v0.1), only the Scout, Heavy, and Sniper will play their lines. The plugin monitors your current weapon and, when it detects that you've switched to your melee weapon, checks the following requirements:
(0. You have not "meleedare"d in the last 5 seconds.)
1. There is at least one enemy within 1024 units of your position.
2. Said enemy is NOT a Spy. (Later versions will check if the Spy is uncloaked and not disguised as an enemy.)
3. The enemy is in your FOV (acos(0.3) = 72.5423969 degrees)
4. You are in the enemy's FOV.
I'm unsure of what we could do to trigger the Spy's meleedare line since his melee fights aren't so much melee duels as they are "oh crap I need to get away, let me attack blindly and hope for a facestab."
But yeah, I'll leave it to you, the community, to figure out ideal or additional conditions.