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

Prevents Spitter acid damage if the player controlling the Spitter enters spectator mode or switches teams before dying #837

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

altair-sossai
Copy link
Contributor

Prevents an exploit where Spitter players switch to spectator mode before dying while positioned over survivors, causing double acid damage.

@SirPlease
Copy link
Owner

I feel like this plugin can be optimized and shouldn't be reliant on whether or not a player uses a spectate command 👀

@altair-sossai altair-sossai changed the title Add Spitter Spec Acid Blocker to prevent acid damage on spec switch Prevents Spitter acid damage if the player controlling the Spitter enters spectator mode or switches teams before dying Dec 31, 2024
int type = GetEventInt(event, "type");

// I don't know why 6144, but it works
if (type == 0 || type == 6144)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think because we're generally preventing acid from spitter's suicide, this could be replaced with client == attacker which is more reliable.


// I don't know why 6144, but it works
if (type == 0 || type == 6144)
g_bBlocked[client] = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not something significant here but I feel like it would be better storing the game tick (or game time), in which way we don't need left4dhooks forwards for resets, as a single OnMapStart will do.

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