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

Random knife bug #242

Open
shubhamdev8 opened this issue Nov 13, 2021 · 14 comments
Open

Random knife bug #242

shubhamdev8 opened this issue Nov 13, 2021 · 14 comments

Comments

@shubhamdev8
Copy link

I just updated the plugin from release 1.7.5 to build #53 and I saw a bug in the random knife feature.
As soon I select a random knife from the knives menu, I can set the knife's skin to random and all it does is again change my knife to random and if I spam it enough suddenly my knife would disappear and it will give me a MP5-SD.
I have attached a video to make it easier to understand.
https://drive.google.com/file/d/1DxDGlxCvlnX7lrwlpo5xDhLNOYWhHYe3/view?usp=sharing

sm version

SourceMod 1.10.0.6524, by AlliedModders LLC
To see running plugins, type "sm plugins"
To see credits, type "sm credits"
Visit http://www.sourcemod.net/

metamod version

Metamod:Source Version Information
Metamod:Source version 1.11.0-dev+1145
Plugin interface version: 16:14
SourceHook version: 5:5
Loaded As: Valve Server Plugin
Compiled on: Jul 11 2021 22:32:15
Built from: alliedmodders/metamod-source@0bb53f2
Build ID: 1145:0bb53f2
http://www.metamodsource.net/

plugins list

"[Retakes] Autoplant" (2.3.1) by B3none
"eStickers" (0.3.4) by ESK0
"Anti-Flood" (1.10.0.6524) by AlliedModders LLC
"Gloves" (1.0.5) by kgns | oyunhost.net
"Nextmap" (1.10.0.6524) by AlliedModders LLC
"Fun Commands" (1.10.0.6524) by AlliedModders LLC
"Fun Votes" (1.10.0.6524) by AlliedModders LLC
"[Retakes] VIP Queue" (1.2.1) by B3none
"Nikooo777" (1.0) by Nikooo777
"Basic Ban Commands" (1.10.0.6524) by AlliedModders LLC
"RandomCycle" (1.10.0.6524) by AlliedModders LLC
"MyWeaponAllocator" (2.5) by shanapu
"Admin Menu" (1.10.0.6524) by AlliedModders LLC
"Basic Chat" (1.10.0.6524) by AlliedModders LLC
"Instant Defuse" (2.0) by Eyal282
"MapChooser" (1.10.0.6524) by AlliedModders LLC
"Admin Help" (1.10.0.6524) by AlliedModders LLC
"Basic Votes" (1.10.0.6524) by AlliedModders LLC
"Updater" (1.2.2) by GoD-Tony
"Sound Commands" (1.10.0.6524) by AlliedModders LLC
"Basic Comm Control" (1.10.0.6524) by AlliedModders LLC
"Admin File Reader" (1.10.0.6524) by AlliedModders LLC
"Fix Hint Color Messages" (1.2.2 Franc1sco franug github version) by Phoenix (˙·٠●Феникс●٠·˙)
"Client Preferences" (1.10.0.6524) by AlliedModders LLC
"Reserved Slots" (1.10.0.6524) by AlliedModders LLC
"[Retakes] Bombsite HUD" (2.5.1) by B3none
"Rock The Vote" (1.10.0.6524) by AlliedModders LLC
"Fix Competitive Warmup" (1.0) by Ilusion9
"AFK Manager" (4.3.0) by Rothgar
"eItems" (0.19.1) by ESK0
"Player Commands" (1.10.0.6524) by AlliedModders LLC
"CS:GO Retakes" (0.3.4+184) by splewis
"Basic Commands" (1.10.0.6524) by AlliedModders LLC
"Basic Info Triggers" (1.10.0.6524) by AlliedModders LLC
"Friendly Fire Damage" (2.0) by Ilusion9
"Weapons & Knives" (1.7.5) by kgns | oyunhost.net

exts list

"Automatic Updater" (1.10.0.6524) by AlliedModders LLC: Updates SourceMod gamedata files
"Webternet" (1.10.0.6524) by AlliedModders LLC: Extension for interacting with URLs
"cURL Extension" (1.3.0.0) by ben: cURL Extension
"CS Tools" (1.10.0.6524) by AlliedModders LLC: CS extended functionality
"BinTools" (1.10.0.6524) by AlliedModders LLC: Low-level C/C++ Calling API
"SDK Tools" (1.10.0.6524) by AlliedModders LLC: Source SDK Tools
"SDK Hooks" (1.10.0.6524) by AlliedModders LLC: Source SDK Hooks
"PTaH" (1.1.3) by Phoenix (˙·٠●Феникс●٠·˙): Additional CS:GO Hooks and Natives
"Top Menus" (1.10.0.6524) by AlliedModders: Creates sorted nested menus
"Client Preferences" (1.10.0.6524) by AlliedModders: Saves client preference settings
"SQLite" (1.10.0.6524) by AlliedModders LLC: SQLite Driver
"SteamWorks Extension" (1.2.3) by Kyle Sanderson: Exposes SteamWorks functions to Developers
"Socket" (3.0.1) by Player: Socket extension for SourceMod
"Regex" (1.10.0.6524) by AlliedModders LLC: Provides regex natives for plugins
"REST in Pawn" (1.3.1) by Tsunami: Provides HTTP and JSON natives for plugins
"MySQL-DBI" (1.10.0.6524) by AlliedModders LLC: MySQL driver implementation for DBI

@VaaLaaKi
Copy link

VaaLaaKi commented Nov 16, 2021

That's the problem for me too.

@pcheloveker
Copy link

Same problem. Sometimes mp5 or mp7 (default skin)
This also appears on only awp and only pistol servers and spoils the game.

@kgns
Copy link
Owner

kgns commented Nov 28, 2021

make sure to only use the released versions, not automatic builds from master branch, which is not tested and supported until it becomes a release of its own

@pcheloveker
Copy link

make sure to only use the released versions, not automatic builds from master branch, which is not tested and supported until it becomes a release of its own

Thanks! I really made a mistake with the version.

@crashzk
Copy link
Contributor

crashzk commented Dec 10, 2021

I have the same problem, version with automatic compilation of the master branch.

I will be downloading the officially released version, would there be any forecast for the Random Knife version?

@crashzk
Copy link
Contributor

crashzk commented Dec 12, 2021

I'm still testing it, but I believe the solution would be to remove the index 47 from this line since it would be from the MP5-SD.

int g_iKnifeIndices[] = {
33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52
};

I'm testing it here and I'll get back to you as soon as possible.

@crashzk
Copy link
Contributor

crashzk commented Dec 12, 2021

I'm still testing it, but I believe the solution would be to remove the index 47 from this line since it would be from the MP5-SD.

int g_iKnifeIndices[] = {
33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52
};

I'm testing it here and I'll get back to you as soon as possible.

This change apparently worked, MP5-SD no longer comes when I choose Random Knife. But the bug of when choosing a random knife skin to change the knife still continues.

@kgns
Copy link
Owner

kgns commented Dec 12, 2021

I'm still testing it, but I believe the solution would be to remove the index 47 from this line since it would be from the MP5-SD.

int g_iKnifeIndices[] = {
33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52
};

I'm testing it here and I'll get back to you as soon as possible.

great find! yes that would be the bug.

random knife giving random knives on every skin change is the way it's supposed to work right now. need more thoughts about how it should work for better ux

@crashzk
Copy link
Contributor

crashzk commented Dec 12, 2021

random knife giving random knives on every skin change is the way it's supposed to work right now. need more thoughts about how it should work for better ux

It's currently like this, if I select the random knife option in the knife menu, every time I go I change the knife, so far perfect.

But if I go with the option to choose a skin for the knife that I'm currently using, whenever I choose a skin, the knife changes and stays in this infinite loop.

I believe it should be like, knife that he is changed to the skin he chose, only when he dies and changes the knife that he can choose another skin for the new knife.

https://vimeo.com/655766099

Short video showing the bug, I believe that leaving it as I mentioned is perfect.

@crashzk
Copy link
Contributor

crashzk commented Dec 12, 2021

So far I've just done a PR to fix Random Knives

@kgns
Copy link
Owner

kgns commented Dec 12, 2021

again, it's not a bug, it is how it is coded at the moment and it works as it is supposed to currently. i'll take a look at improving how it works later on

@crashzk
Copy link
Contributor

crashzk commented Dec 12, 2021

again, it's not a bug, it is how it is coded at the moment and it works as it is supposed to currently. i'll take a look at improving how it works later on

I understand, I believe that from this method the player can choose skins that he doesn't have for certain knives.

In any case, we are waiting, who knows, more opinions may appear on how they would like it to be.

@crashzk
Copy link
Contributor

crashzk commented Dec 21, 2021

again, it's not a bug, it is how it is coded at the moment and it works as it is supposed to currently. i'll take a look at improving how it works later on

I understand, I believe that from this method the player can choose skins that he doesn't have for certain knives.

In any case, we are waiting, who knows, more opinions may appear on how they would like it to be.

Another observation, I noticed that whenever the restart round/game the knife changes. I believe it's better to switch only if the player dies.

@crashzk
Copy link
Contributor

crashzk commented Jul 26, 2022

@kgns can the version of the dev branch already be merged into the master branch?

I ask because the latest version of the plugin 1.7.7 does not have some fixes, such as the Random Knife option.

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

No branches or pull requests

5 participants