@@ -4316,9 +4316,8 @@ void AHuman::DrawHUD(BITMAP *pTargetBitmap, const Vector &targetPos, int whichSc
4316
4316
}
4317
4317
// Held-related GUI stuff
4318
4318
else if (m_pFGArm || m_pBGArm) {
4319
- HDFirearm *fgHeldFirearm = dynamic_cast <HDFirearm *>(m_pFGArm->GetHeldDevice ());
4320
- MovableObject *bgHeldItem = GetEquippedBGItem ();
4321
- const HDFirearm *bgHeldFirearm = dynamic_cast <HDFirearm *>(bgHeldItem);
4319
+ HDFirearm *fgHeldFirearm = dynamic_cast <HDFirearm *>(GetEquippedItem ());
4320
+ HDFirearm *bgHeldFirearm = dynamic_cast <HDFirearm *>(GetEquippedBGItem ());
4322
4321
4323
4322
if (fgHeldFirearm || bgHeldFirearm) {
4324
4323
str[0 ] = -56 ; str[1 ] = 0 ;
@@ -4335,7 +4334,7 @@ void AHuman::DrawHUD(BITMAP *pTargetBitmap, const Vector &targetPos, int whichSc
4335
4334
}
4336
4335
}
4337
4336
4338
- if (bgHeldItem && bgHeldFirearm) {
4337
+ if (bgHeldFirearm) {
4339
4338
std::string bgWeaponString;
4340
4339
if (bgHeldFirearm->IsReloading ()) {
4341
4340
bgWeaponString = " Reloading" ;
@@ -4367,7 +4366,7 @@ void AHuman::DrawHUD(BITMAP *pTargetBitmap, const Vector &targetPos, int whichSc
4367
4366
m_HUDStack -= 11;
4368
4367
}
4369
4368
*/
4370
- std::string equippedItemsString = (m_pFGArm->HoldsSomething () ? m_pFGArm->GetHeldMO ()->GetPresetName () : " EMPTY" ) + (m_pBGArm->HoldsSomething () ? " | " + m_pBGArm->GetHeldMO ()->GetPresetName () : " " );
4369
+ std::string equippedItemsString = (m_pFGArm && m_pFGArm ->HoldsSomething () ? m_pFGArm->GetHeldMO ()->GetPresetName () : " EMPTY" ) + (m_pBGArm && m_pBGArm->HoldsSomething () ? " | " + m_pBGArm->GetHeldMO ()->GetPresetName () : " " );
4371
4370
pSmallFont->DrawAligned (&allegroBitmap, drawPos.GetFloorIntX () + 1 , drawPos.GetFloorIntY () + m_HUDStack + 3 , equippedItemsString, GUIFont::Centre);
4372
4371
m_HUDStack -= 9 ;
4373
4372
/*
0 commit comments