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

Possibility of removing static attribs #36

Open
TheBluekr opened this issue Jun 30, 2019 · 3 comments
Open

Possibility of removing static attribs #36

TheBluekr opened this issue Jun 30, 2019 · 3 comments

Comments

@TheBluekr
Copy link

Title explains it.
Maybe it is an idea to add a native to remove static attributes from a weapon/client. Currently there's a native to get static attributes but support ends there. Attempting to remove the attribute using TF2Attrib_RemoveByDefIndex or TF2Attrib_RemoveByName natives doesn't work, haven't tested TF2Attrib_RemoveAll yet.

@FlaminSarge
Copy link
Owner

Static attributes exist on the item definition rather than on any given item. I think you can only disable static attributes entirely, not individually. TF2Items has a flag for that when creating items, but existing items use whatever property they spawned with (I think it's a netprop).

@TheBluekr
Copy link
Author

You mean the "PRESERVE_ATTRIBUTES" flag? I've tried overriding the weapon handle when "TF2Items_OnGiveNamedItem" gets called while not preserving the attributes yet it persists. I haven't tried the netprop part though. (Did try setting attribute 868 "crit_dmg_falloff" to 0 using tf2items_manager on Ambassador for example.)

@FlaminSarge
Copy link
Owner

You should be able to override any static attributes using instance attributes (SetByName/etc) but I don't remember if that combines or overrides (e.g. if you need -1 or 0)

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

2 participants