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

Fix weapon pickup through walls #1662

Merged
merged 3 commits into from
Oct 8, 2024
Merged

Fix weapon pickup through walls #1662

merged 3 commits into from
Oct 8, 2024

Conversation

MrXonte
Copy link
Contributor

@MrXonte MrXonte commented Oct 8, 2024

Add check for trace start solid to prevent teleporting weapon through walls.

Edgecases can occur where weapons can be picked up through walls (even thick 16 unit walls didn't prevent this). This is because the trace can start solid (most likely if the weapon is too large for the space its resting, in my case a relatively small func_detail shelf) and then the tr.Fraction will return 1.0 through a solid wall, causing weapons the be teleported and picked up.

fixed bug that allows weapons to be picked up through walls. When trace starts solid (for example large weapon spawned too close to wall) then tr.Fraction can return 1.0 through solid walls.
@TimGoll
Copy link
Member

TimGoll commented Oct 8, 2024

What a nice catch, wow! This was probably mostly an error when auto pickup is enabled, am I right?

Could you please add yourself to the changelog?

added myself to changelog
@TimGoll TimGoll added the type/bug Something isn't working label Oct 8, 2024
@TimGoll TimGoll added this to the v0.14.1b milestone Oct 8, 2024
@MrXonte
Copy link
Contributor Author

MrXonte commented Oct 8, 2024

Yep! Absolutely no issue without auto pickup since you cant select the weapons through walls, unfortunately people were raiding my traitor room on my current mapping project with auto pickup.
Added myself to the changelog :)

@TimGoll TimGoll merged commit d3801d6 into TTT-2:master Oct 8, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants