FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix for non-bullet guns returned as 0 in weapon data by NexiusTailer · Pull Request #1046 · openmultiplayer/open.mp · GitHub

Fix for non-bullet guns returned as 0 in weapon data - #1046

Merged
AmyrAhmady merged 1 commit into
openmultiplayer:masterfrom
NexiusTailer:patch-1
Jan 20, 2025
Merged

AmyrAhmady merged 1 commit into
openmultiplayer:masterfrom
NexiusTailer:patch-1

Conversation

NexiusTailer commented Jan 19, 2025 •
edited
Loading

Copy link
Copy Markdown
Contributor

This pretty simply fixes an issue described in #1008 by removing the whole check which was the cause of a problem with GetPlayerWeaponData, when player got some non-bullet (e.g. melee, gift or special weapons) with 0 ammo and it still was in his hands, but after switching weapons back and forth, GetPlayerWeaponData has suddenly start returning 0 as weaponid in its slot which is wrong.

A bit more complicated solution with keeping the initial point of this check would be to add the extra condition like "do the clearing of both weapon and ammo in the slot only if this type of weapon (generally) has ammo but now a player has it 0". After some time I consider this whole check not so crucial, because an "issue" it's aimed to fix doesn't even seem as a real one, and the way of fixing is strange since it doesn't change anything until scrolling the weapons. So, I decided to fix it with this way provided, just by removing it completely.

AmyrAhmady merged commit c403591 into openmultiplayer:master Jan 20, 2025
NexiusTailer deleted the patch-1 branch January 20, 2025 22:23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

2 participants


Back | FazBrowse Home | New Git URL