gemidyne/microtf2

antiflood.smx from native SM interferes with Typing boss game

FlaminSarge opened this issue · 3 comments

Describe the bug
antiflood.smx, the native SourceMod chat flood prevention plugin, seems to interfere with the Bossgame7, as users that get limited can't put in answers (Bossgame7 doesn't even see their chat messages as antiflood catches them beforehand).
The cvar controlling this behavior is sm_flood_time.

Expected behavior
Ideally, players that are still alive during Bossgame7 will not be affected by sm_flood_time, but those that are not alive would still be limited. Potentially achievable by hooking the flood-related forwards in Bossgame7 and overriding the result for living players.

Screenshots
If applicable, add screenshots to help explain the bug

Do you know what version of the gamemode this bug occurred on?

  • Version: 5.2.1

Additional info
N/A

Thanks for catching this one. I have started implementing the OnClientFloodCheck forward within Bossgame7 to override the check result.
I need to test, but I have a gut feeling I might not be able to override antiflood's check result this way (looking at SM's ChatTriggers.cpp looks like it's using ET_Event so returning highest return value). I'm hoping I am wrong though!

The fallback would be to read the cvar, set it to 0 whilst bossgame7 runs, then set it back to what it originally was.

I'll comment the result here - I am looking to put this into master first then dev so the bugfix isn't waiting on the release of v6

I have tested using the forwards, but returning false in OnClientFloodCheck does not allow the gamemode to override the flood check. I am going to release v5.2.2 shortly which uses the convar method to fix this issue

Fixed in v5.2.2