Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced "botpopstop" plugin + added Tank anti-rock protect on his spawn #744

Closed
wants to merge 1 commit into from

Conversation

BRU7U5
Copy link
Contributor

@BRU7U5 BRU7U5 commented Mar 4, 2024

  • Deprecated "botpopstop" plugin and replaced by "l4d2_block_bot_pills"

This plugin blocks bot from using pills using "Actions" extension.

  • Added "l4d2_tank_spawn_antirock_protect"

This plugin blocks a Tank player from randomly activate throw attack after his spawn.

- Deprecated "botpopstop" plugin and replaced by "l4d2_block_bot_pills"
> This plugin blocks bot from using pills using "Actions" extention.

- Added "l4d2_tank_spawn_antirock_protect"
> This plugin blocks a Tank player from randomly activate throw attack after his spawn.
@SirPlease
Copy link
Owner

Very nice suggestion of the anti-rock one, relatable mistake I've made many times. 😅
I'll gladly accept the PR once I've ran a few tests on the block bot addition, I'm unsure about a few things with it.

@BRU7U5
Copy link
Contributor Author

BRU7U5 commented Mar 5, 2024

Of course, thanks! If you need help with testing or making changes to this PR - I'm willing to help.

@jensewe
Copy link
Contributor

jensewe commented Mar 13, 2024

Nice works! Some minor suggestions here.


  1. It's probably true that no action's name is below length of 8, at least in official. But some custom actions created by plugins could probably be that case. Gotta take care of them and avoid potential errors at here.

2..

public Action L4D_OnCThrowActivate(int ability)
{
if (GetGameTime() - g_fSpawnTime < g_cvAntiRockProtectTime.FloatValue)
return Plugin_Handled;
return Plugin_Continue;
}

Generally there's only single tank across the whole map flow for most maps, except Dead Center 4 where there could be double tanks. This might unexpectedly block rock attempts of previous tanks whenever a new tank spawns.

@BRU7U5
Copy link
Contributor Author

BRU7U5 commented Mar 19, 2024

Thank you very much for the good suggestions! I will try to fix potential problems quickly as soon as I have free time

@SirPlease
Copy link
Owner

Apologies for getting back to you so late, a hunch I had was that this wouldn't prevent Survivor Bots from taking pills if they had the pills in-hand while a threat was in the area.
After testing, the bots will indeed still instantly take the pills when in-hand as they replace a player (which may be unintentional as they could've been wanting to pass pills before crashing)

I've added a simple method to prevent the bot from taking the pills instantly while also adding a full check for SurvivorTakePills which should resolve @jensewe 's valid concerns 😄

I've also gone ahead and addressed the possible issue within l4d2_tank_spawn_antirock_protect.

@SirPlease SirPlease closed this in 295cb8a Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants