Skip to content

Conversation

@voided
Copy link
Contributor

@voided voided commented Jul 30, 2014

As of late there's a pretty valid usecase for having to remove wearables.

Example botkiller fob
TF2 botkiller weapons equip skull "fobs" to weapons that can't be cleanly removed without unequipping them from the player with a call to RemoveWearable.

Everyone seems to be implementing this function call within their own plugins, so it may be a better option to consolidate this behavior within the TF2 extension.

@winstliu
Copy link
Contributor

👍

Any chance we could also get TF2_RemoveWeaponSlot to call this?

@voided
Copy link
Contributor Author

voided commented Jul 30, 2014

@50Wliu I had planned to tackle that afterwards, if this PR got accepted.

It's a considerably more tricky (and slightly off-topic) problem that may be better suited to a discussion in an AM bug.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does removing the wearable destroy the entity? I don't know, but I feel that the function doc should clarify.

@voided
Copy link
Contributor Author

voided commented Jul 30, 2014

CBasePlayer::RemoveWearable does a call to UTIL_Remove, so I've updated the doxygen comment to describe that behavior.

@psychonic
Copy link
Member

Looks good.

psychonic added a commit that referenced this pull request Jul 30, 2014
Implement TF2_RemoveWearable native (r=psychonic).
@psychonic psychonic merged commit 8d5fe31 into alliedmodders:master Jul 30, 2014
@voided voided deleted the tf2-removewearable branch July 30, 2014 22:51
@voided
Copy link
Contributor Author

voided commented Jul 30, 2014

@50Wliu I've filed a bug that you can CC yourself on if you want to follow any changes to TF2_RemoveWeaponSlot.

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