diff --git a/Runtime/GuiSys/CCompoundTargetReticle.cpp b/Runtime/GuiSys/CCompoundTargetReticle.cpp index 8415c92e9..9fcbd19e7 100644 --- a/Runtime/GuiSys/CCompoundTargetReticle.cpp +++ b/Runtime/GuiSys/CCompoundTargetReticle.cpp @@ -349,7 +349,7 @@ void CCompoundTargetReticle::UpdateCurrLockOnGroup(float dt, const CStateManager const TUniqueId targetId = mgr.GetPlayer().GetOrbitTargetId(); if (targetId != xf0_targetId) { if (targetId != kInvalidUniqueId) { - if (const TCastToConstPtr point = mgr.GetObjectById(targetId)) { + if (TCastToConstPtr(mgr.GetObjectById(targetId))) { CSfxManager::SfxStart(SFXui_lockon_grapple, 1.f, 0.f, false, 0x7f, false, kInvalidAreaId); } else { CSfxManager::SfxStart(SFXui_lockon_poi, 1.f, 0.f, false, 0x7f, false, kInvalidAreaId);