@@ -3410,8 +3410,9 @@ void AHuman::Update()
3410
3410
if (!pDevice->IsFull () && m_Controller.IsState (WEAPON_RELOAD) && !m_pItemInReach)
3411
3411
{
3412
3412
pDevice->Reload ();
3413
- if (m_pBGArm && m_pBGArm->IsAttached ())
3413
+ if (m_pBGArm && m_pBGArm->IsAttached () && GetEquippedBGItem () == NULL ) {
3414
3414
m_pBGArm->SetHandPos (m_Pos + m_HolsterOffset.GetXFlipped (m_HFlipped));
3415
+ }
3415
3416
m_DeviceSwitchSound.Play (m_Pos);
3416
3417
3417
3418
// Interrupt sharp aiming
@@ -3422,15 +3423,17 @@ void AHuman::Update()
3422
3423
// Detect reloading and move hand accordingly
3423
3424
if (pDevice->IsReloading ())
3424
3425
{
3425
- if (m_pBGArm && m_pBGArm->IsAttached ())
3426
+ if (m_pBGArm && m_pBGArm->IsAttached () && GetEquippedBGItem () == NULL ) {
3426
3427
m_pBGArm->SetHandPos (m_Pos + m_HolsterOffset.GetXFlipped (m_HFlipped));
3428
+ }
3427
3429
}
3428
3430
3429
3431
// Detect reloading being completed and move hand accordingly
3430
3432
if (pDevice->DoneReloading ())
3431
3433
{
3432
- if (m_pBGArm && m_pBGArm->IsAttached ())
3434
+ if (m_pBGArm && m_pBGArm->IsAttached () && GetEquippedBGItem () == NULL ) {
3433
3435
m_pBGArm->SetHandPos (pDevice->GetMagazinePos ());
3436
+ }
3434
3437
}
3435
3438
}
3436
3439
}
@@ -4905,16 +4908,20 @@ void AHuman::DrawHUD(BITMAP *pTargetBitmap, const Vector &targetPos, int whichSc
4905
4908
// Ammo
4906
4909
if (pHeldFirearm)
4907
4910
{
4911
+ MovableObject *bgHeldItem = GetEquippedBGItem ();
4912
+ HDFirearm const *bgHeldFirearm = bgHeldItem == NULL ? NULL : dynamic_cast <HDFirearm *>(bgHeldItem);
4913
+
4908
4914
str[0 ] = -56 ; str[1 ] = 0 ;
4909
4915
pSymbolFont->DrawAligned (&allegroBitmap, drawPos.m_X - 10 , drawPos.m_Y + m_HUDStack, str, GUIFont::Left);
4910
- if (pHeldFirearm->IsReloading ())
4911
- sprintf_s (str, sizeof (str), " %s" , " Reloading..." );
4912
- else
4913
- {
4914
- if (pHeldFirearm->GetRoundInMagCount () < 0 )
4915
- sprintf_s (str, sizeof (str), " %s" , " Infinite" );
4916
- else
4917
- sprintf_s (str, sizeof (str), " %i" , pHeldFirearm->GetRoundInMagCount ());
4916
+ std::string fgWeaponString = pHeldFirearm->GetRoundInMagCount () < 0 ? " Infinite" : std::to_string (pHeldFirearm->GetRoundInMagCount ());
4917
+ fgWeaponString = pHeldFirearm->IsReloading () ? " Reloading" : fgWeaponString;
4918
+
4919
+ if (bgHeldItem && bgHeldFirearm) {
4920
+ std::string bgWeaponString = bgHeldFirearm->GetRoundInMagCount () < 0 ? " Infinite" : std::to_string (bgHeldFirearm->GetRoundInMagCount ());
4921
+ bgWeaponString = bgHeldFirearm->IsReloading () ? " Reloading" : bgWeaponString;
4922
+ sprintf_s (str, sizeof (str), " %s | %s" , fgWeaponString.c_str (), bgWeaponString.c_str ());
4923
+ } else {
4924
+ sprintf_s (str, sizeof (str), " %s" , fgWeaponString.c_str ());
4918
4925
}
4919
4926
pSmallFont->DrawAligned (&allegroBitmap, drawPos.m_X - 0 , drawPos.m_Y + m_HUDStack + 3 , str, GUIFont::Left);
4920
4927
0 commit comments