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

l4d2_sound_manipulation strange check #12

Closed
Electr0 opened this issue Aug 17, 2019 · 1 comment

Comments

@Electr0
Copy link
Contributor

commented Aug 17, 2019

in callback public Action:SoundHook(clients[64], &numClients, String:sample[256], &entity)

if (StrContains(sample, "World", true) == -1
&& StrContains(sample, "look", false) == -1
&& StrContains(sample, "ask", false) == -1
&& StrContains(sample, "followme", false) == -1
&& StrContains(sample, "gettingrevived", false) == -1
&& StrContains(sample, "alertgiveitem", false) == -1
&& StrContains(sample, "imwithyou", false) == -1
&& StrContains(sample, "laughter", false) == -1
&& StrContains(sample, "name", false) == -1
&& StrContains(sample, "leadon", false) == -1
&& StrContains(sample, "moveon", false) == -1
&& StrContains(sample, "friendlyfire", false) == -1
&& StrContains(sample, "splat", false) == -1)
{
return Plugin_Stop;
}

may be this should be:
if (StrContains(sample, "World", true) == -1
|| StrContains(sample, "look", false) == -1
|| StrContains(sample, "ask", false) == -1
|| StrContains(sample, "followme", false) == -1
|| StrContains(sample, "gettingrevived", false) == -1
|| StrContains(sample, "alertgiveitem", false) == -1
|| StrContains(sample, "imwithyou", false) == -1
|| StrContains(sample, "laughter", false) == -1
|| StrContains(sample, "name", false) == -1
|| StrContains(sample, "leadon", false) == -1
|| StrContains(sample, "moveon", false) == -1
|| StrContains(sample, "friendlyfire", false) == -1
| StrContains(sample, "splat", false) == -1)
{
return Plugin_Stop;
}

because "&&" required pass all checks and in this check it looks weird

@SirPlease

This comment has been minimized.

Copy link
Owner

commented Aug 18, 2019

As you've decompiled the plugin with Lysis, this is an issue on their part as the local file has never used "&&", because as you stated, it would never pass all of them in the same soundfile.

@SirPlease SirPlease closed this Aug 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.