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

Eyetele puts you into the wall at acute angles and protruding elements #1208

Closed
lvaness opened this issue Feb 1, 2021 · 1 comment
Closed
Labels
Outcome: Resolved This was resolved, and will be in a future update. Priority: High Something essential that should be done in this release, as soon as possible. Size: Trivial Something that is estimated to be only a few lines of code or will take minutes to do. "Quick Wins" Type: Bug Something that should work/look one way isn't quite doing that.

Comments

@lvaness
Copy link
Member

lvaness commented Feb 1, 2021

Describe the bug
When using mom_eyetele while almost parallel to the wall you're looking at, the command will get you stuck inside the wall.

To Reproduce
Steps to reproduce the behavior:

  • Boot up any map, like triggertest
  • Align yourself almost parallel to a wall, so that you can barely still target it (I can get some example angles if this is unclear)
  • use mom_eyetele on the wall you're aligned to

Expected behavior
You should end up infront of the wall

Desktop/Branch (please complete the following information):

  • OS: Linux
  • Branch: 0.8.7

Additional context
Replacing the UTIL_TraceLine for a UTIL_TraceHull might be enough, this would also solve getting stuck when there are protruding walls in the way:
20210201154405_1
20210201154415_1

Also, it looks like the command tries to account for the bbox by removing 32 units from the end position, however the bounding box extends ~45 units in the diagonal direction and the amount needed to account for this at every angle tends to infinity with increasing angle. This fact will get you stuck inside diagonal walls, as well.

The only downside would be that if the corridor to where you aimed is too small at one single point and then gets bigger after, you still would get blocked halfway trough although there's enough space at the end (like you couldn't peek through a small hole to teleport, it would need to be player-sized) and solving both at once could turn out complicated, so I guess it depends what's considered more important. EDIT: A compromise could be to trace a line first, then trace a hull backwards and then rely on CGameTrace::fractionleftsolid (if it works like it should) to get nearest point on the line where the player actually fits.

Also, this (probably?) being mostly a mapping command, having to noclip might not be a problem anyway.

@lvaness lvaness added the Type: Bug Something that should work/look one way isn't quite doing that. label Feb 1, 2021
@Gocnak Gocnak added Priority: High Something essential that should be done in this release, as soon as possible. Size: Trivial Something that is estimated to be only a few lines of code or will take minutes to do. "Quick Wins" labels Feb 4, 2021
@Gocnak Gocnak added this to To do in 0.9.0 Release Feb 6, 2021
@Gocnak Gocnak moved this from To Do to In Progress in 0.9.0 Release Feb 6, 2021
@Gocnak
Copy link
Member

Gocnak commented Feb 6, 2021

For now I just replaced it with UTIL_HullTrace, as it fixed the clearly bad logic of using a single point to represent the player hull. Since this can be used while noclipping, I figured the point of squeezing through a hole or something can just be negated by noclipping through it.

@Gocnak Gocnak added the Outcome: Resolved This was resolved, and will be in a future update. label Feb 6, 2021
@Gocnak Gocnak closed this as completed Feb 6, 2021
0.9.0 Release automation moved this from In Progress to Done Feb 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Outcome: Resolved This was resolved, and will be in a future update. Priority: High Something essential that should be done in this release, as soon as possible. Size: Trivial Something that is estimated to be only a few lines of code or will take minutes to do. "Quick Wins" Type: Bug Something that should work/look one way isn't quite doing that.
Projects
No open projects
0.9.0 Release
  
Done
Development

No branches or pull requests

2 participants