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

Medical - Improve keybind to open med menu for vehicle occupant under cursor #8160

Merged
merged 4 commits into from
Oct 11, 2021

Conversation

ampersand38
Copy link
Contributor

When merged this pull request will:

  • Add lineIntersectsSurfaces check to medical menu keybind
  • Allows it to be used to open medical menu for vehicle occupant being looked at
  • https://youtu.be/noIHrXAi8qc

@PabstMirror PabstMirror added this to the 3.13.7 milestone Mar 11, 2021
@PabstMirror PabstMirror added the kind/enhancement Release Notes: **IMPROVED:** label Mar 11, 2021
@jokoho48
Copy link
Member

if I see it correct with this PR you can Interact with Units through walls. the easiest way to fix that is the check if _target has Any Crew in it and only then do the lis

@PabstMirror
Copy link
Contributor

limiting lineIntersectsSurfaces object limit to 1 (instead of -1) should fix?
or add same vehicle check to line 47 (vehicle _intersectObject) == (vehicle ace_player)

@jokoho48
Copy link
Member

I think limiting the return amount to 1 would be the best solution I think.
checking If the player is in the same vehicle would not work because the interaction is meant to be usable also from outside of the vehicle(at least if I understood the video correctly)

@ampersand38
Copy link
Contributor Author

ampersand38 commented Mar 21, 2021

When in a vehicle, despite having ACE_player in in ignored object, the player unit is still in the results.
While player is outside, it makes sense to not be able to access medical through the chassis or a closed door. While player is in the vehicle with the patient, it may be allowable to look "through/around" some of the vehicle parts.
So maybe only look "through" the player object as well as the player's vehicle?

@jonpas
Copy link
Member

jonpas commented Aug 22, 2021

Very nice improvement!

@jonpas
Copy link
Member

jonpas commented Oct 10, 2021

Unaddressed review, stale?

Co-authored-by: commy2 <commy-2@gmx.de>
@PabstMirror
Copy link
Contributor

Works good on helicopters and cars
But I think armor/tanks aren't great.

I think it's because you are in the "cargo" LOD, which often seems to not really line up with the real location your actual bodies are and I don't think there is away to select it in LIS (I hope I'm making sense)

I still am ok merging it even if it doesn't always work

@jonpas jonpas merged commit 0b2b4d7 into acemod:master Oct 11, 2021
@ampersand38 ampersand38 deleted the med-menu-key-lineIntersectsSurfaces branch October 21, 2021 20:30
AndreasBrostrom pushed a commit to AndreasBrostrom/ACE3 that referenced this pull request Dec 3, 2021
… cursor (acemod#8160)

* add lineIntersectsSurfaces to med menu key

* fix _target = nil if no intersections

* only look through player and player vehicle

* Update addons/medical_gui/XEH_postInit.sqf

Co-authored-by: commy2 <commy-2@gmx.de>

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
Co-authored-by: commy2 <commy-2@gmx.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Release Notes: **IMPROVED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants