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

[Custom Weapons] Exhaustible weapons refer to temporary string for classname #27

Closed
fnky opened this issue Feb 9, 2017 · 1 comment
Closed
Labels

Comments

@fnky
Copy link
Collaborator

fnky commented Feb 9, 2017

Exhaustible weapons (ItemInfo.iFlags & ITEM_FLAG_EXHAUSTIBLE) refer to a temporary string for the classname. This causes problems when you try to pick up dropped instances of these weapons. To fix this, go to CASItemRegistry::RegisterItem and change the following line:

UTIL_PrecacheOtherWeapon( szName.CStr() );

To:

UTIL_PrecacheOtherWeapon( ALLOC_STRING( szName.CStr() ) );

This will ensure it uses a string that is valid for the duration of the map.

@fnky fnky added the bug label Feb 10, 2017
@baso88
Copy link
Owner

baso88 commented Mar 5, 2017

Fix for this issue will be part of the upcoming SC update (5.11).

@baso88 baso88 closed this as completed Mar 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants