Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix incorrect g_get_target_pos output during weapon wall penetration
  • Loading branch information
ProfLander committed Jun 18, 2025
commit 5cc8a34b06f363e2dc3ad0a898adbd6ecf42fa24
6 changes: 5 additions & 1 deletion src/xrGame/level_script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1854,7 +1854,11 @@ Fvector g_get_target_pos(ETraceTarget tt)
SPickParam* pp = get_pick(tt);
if (pp)
{
return Fvector().mad(pp->defs.start, pp->defs.dir, pp->result.range);
CActor* pActor = Actor();
Fmatrix mat = pp->barrel_matrix;
if (pActor && pActor->HUDview())
Device.hud_to_world(mat);
return Fvector().mad(mat.c, mat.k, pp->result.range);
}
return Fvector().set(0, 0, 0);
}
Expand Down