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
Remove redundant aimpos handling from CHudManager
  • Loading branch information
ProfLander committed Jun 17, 2025
commit 5e838336f044307d9b5d595ddd1a57b4d8d43282
35 changes: 0 additions & 35 deletions src/xrGame/HUDManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,42 +164,7 @@ void CHUDManager::OnFrame()
pUIGame->OnFrame();

PP.CameraPick();

g_player_hud->OnFrame();

// If aim position is enabled...
if (!FireposActive() && AimposActive())
{
// And we have a valid actor...
CActor* pActor = Actor();
if (pActor)
{
// And a valid HUD item...
PIItem pItem = pActor->inventory().ActiveItem();
if (pItem)
{
CHudItem* pHudItem = pItem->cast_hud_item();
if (pHudItem)
{
attachable_hud_item* hi = pHudItem->HudItemData();
if (hi)
{
// Ensure the HUD item's transform is valid
hud_item_measures measures = hi->m_measures;
Fmatrix matrix = hi->m_item_transform;
if (matrix.k.square_magnitude() > 0.0)
{
// Aim along barrel rotation
matrix.mulB_43(hi->m_model->LL_GetTransform(measures.m_fire_bone));
matrix.mulB_43(Fmatrix().translate(measures.m_fire_point_offset));
PP.defs.dir = matrix.k;
}
}
}
}
}
}

DoPick(PP);
}

Expand Down