-
Notifications
You must be signed in to change notification settings - Fork 10
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
Fix strip on wearable #143
Conversation
- Wearable like `tf_wearable_demo_shield` cannot stripped by current method. - So set `m_bOnlyIterateItemViewAttributes` to true instead. There won't be any problem using this method for wearables.
{ | ||
char classname[36]; | ||
GetEntityClassname(entity, classname, sizeof(classname)); | ||
if(!StrContains(classname, "tf_wearable")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommend checking against tf_weapon
instead (because tf_powerup_bottle exists)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forgot that. I changed checking.
{ | ||
char classname[36]; | ||
GetEntityClassname(entity, classname, sizeof(classname)); | ||
if(StrContains(classname, "tf_weapon")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will cause it do the reserve as StrContains
returns -1 with no matches and returns 0 when the string starts with the match.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry. I fixed it.
tf_wearable_demo_shield
cannot stripped by current method.m_bOnlyIterateItemViewAttributes
to true instead. There won't be any problem using this method for wearable.Using ff2r's strip option(Attributes mean
dmg taken from fire reduced
anddmg taken from blast reduced
)Using cwx's
keep_static_attrs
(strip) option(It usem_bOnlyIterateItemViewAttributes
)