Skip to content

Medical Treatment - Improve litter placement#10886

Merged
PabstMirror merged 5 commits intoacemod:masterfrom
rekterakathom:litter-improvements
May 3, 2025
Merged

Medical Treatment - Improve litter placement#10886
PabstMirror merged 5 commits intoacemod:masterfrom
rekterakathom:litter-improvements

Conversation

@rekterakathom
Copy link
Copy Markdown
Contributor

When merged this pull request will: Improve the placement of medical litter objects

  • Use a raycast to find a suitable position for litter objects
  • Align litter objects to surface normal
  • Prevent litter from spawning below terrain
  • Fix packing bandage p3d being ~1.2 meters below origin
  • Remove obsolete code from fnc_createLitterServer (leading slashes are accepted since ~ Arma 3 2.08)

Images before and after: https://imgur.com/a/xIq9W8D

IMPORTANT

  • If the contribution affects the documentation, please include your changes in this pull request so the documentation will appear on the website.
  • Development Guidelines are read, understood and applied.
  • Title of this PR uses our standard template Component - Add|Fix|Improve|Change|Make|Remove {changes}.

@johnb432 johnb432 added the kind/enhancement Release Notes: **IMPROVED:** label May 2, 2025
@johnb432 johnb432 added this to the 3.20.0 milestone May 2, 2025
[QGVAR(createLitterServer), [_x, _position, random 360]] call CBA_fnc_serverEvent;
private _raycast = lineIntersectsSurfaces [_position vectorAdd [0,0,1], _position vectorAdd [0,0,-1e11], _patient, _medic, true, 1, "ROADWAY", "FIRE"];

_position = [_position, (_raycast # 0) # 0] select (_raycast isNotEqualTo []);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could also just exit if raycast is [] as it probably means something is weird
but it's fine as is

Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
@PabstMirror PabstMirror merged commit 258bb10 into acemod:master May 3, 2025
3 checks passed
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.

4 participants