-
-
Notifications
You must be signed in to change notification settings - Fork 445
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
New functions setWeaponRenderEnabled & isWeaponRenderEnabled #3917
Conversation
On a side note regarding why it should be used instead of other ways to hide weapon model, see this comment |
It's much better this way instead of replacing models, because replacing models for “new” weapons consumes memory. |
You have to reset the state after quit/on server join. |
@FileEX |
@lynconsix I disagree. See my previous comment for details, there's no need to add extra steps on top of already horribly performing GTA function. If you want to selectively disable certain weapons, just use old methods (after all you should still rather use something like pAttach for any weapon, considering it's more smoother alternative) |
Done |
I do agree with @lynconsix to have a modelid param for obvious reasons. Without that this new feature will only be used by servers where every weapon model is changed. (if this PR gets merged like this - it is still nice) off topic: |
This can already be done using: engineSetModelLODDistance(weaponModelID, 0.001) What can't be done however, is disabling GTA function call which i've already mentioned twice (and seems to be totally ignored), being secondary purpose of it. Adding selectivity would force it to process anyways, which completely excludes it. |
This PR adds functions that allow disabling the rendering of weapons. Some servers do not use the original weapons and replace them with their own system. To remove the original weapons, they need to replace the model with an empty one or manipulate the weapon model's LOD distance. The function only toggles the rendering of the weapon object, so shooting, aiming, etc., can still be done
Thanks to @ds1-e for idea