Skip to content

Fixed incorrect default iMaxClip value for grenades#1109

Merged
s1lentq merged 1 commit intorehlds:masterfrom
dystopm:fix-grenades-imaxclip
Sep 26, 2025
Merged

Fixed incorrect default iMaxClip value for grenades#1109
s1lentq merged 1 commit intorehlds:masterfrom
dystopm:fix-grenades-imaxclip

Conversation

@dystopm
Copy link
Contributor

@dystopm dystopm commented Sep 1, 2025

Purpose

The default maximum values ​​for the grenade MaxClip were incorrectly assigned in GetItemInfo. This was a simple, harmless typo. This also fixes the values ​​for knife and C4, only in the WeaponInfo structure, which has no repercussions.

Approach

Modify gunClipSize values from g_weaponInfo_default array on NoClip weapons.

Learning

The first appearance of these incorrect values ​​dates back to 2016 in the commit 183a9f6

Specific lines:

p->iMaxClip = info ? info->gunClipSize : WEAPON_NOCLIP;

p->iMaxClip = info ? info->gunClipSize : WEAPON_NOCLIP;

p->iMaxClip = info ? info->gunClipSize : WEAPON_NOCLIP;

This also fixes the values ​​for knife and C4, only in the WeaponInfo structure, which has no repercussions.
@TheKrytyk
Copy link

@s1lentq please add to master all requests

@s1lentq s1lentq merged commit 78beea2 into rehlds:master Sep 26, 2025
5 checks passed
@dystopm dystopm deleted the fix-grenades-imaxclip branch September 28, 2025 18:12
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