Skip to content

Commit

Permalink
Fix TSE weapons icon scale
Browse files Browse the repository at this point in the history
  • Loading branch information
tx00100xt committed Jan 16, 2024
1 parent d01991e commit b2ddfc7
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions SamTSE/Sources/EntitiesMP/Common/HUD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ extern FLOAT hud_fOpacity;
extern FLOAT hud_fScaling;
extern FLOAT hud_tmWeaponsOnScreen;
extern INDEX hud_bShowMatchInfo;
extern INDEX hud_bWeaponsIconScale; // HUD weapons icons scale: 0 - small, 1 - big

// player statistics sorting keys
enum SortKeys {
Expand Down Expand Up @@ -1123,13 +1124,21 @@ extern void DrawHUD( const CPlayer *penPlayerCurrent, CDrawPort *pdpCurrent, BOO
if( _awiWeapons[i].wi_paiAmmo!=NULL && _awiWeapons[i].wi_paiAmmo->ai_iAmmoAmmount==0) {
_fCustomScalingAdjustment = 0.9f; //#### 0.7f - 1.0f
HUD_DrawBorder( fCol, fRow, fOneUnit, fOneUnit, 0x22334400);
_fCustomScalingAdjustment = 0.5f;
if (hud_bWeaponsIconScale) {
_fCustomScalingAdjustment = 0.75f;
} else {
_fCustomScalingAdjustment = 0.5f;
}
HUD_DrawIcon( fCol, fRow, *_awiWeapons[i].wi_ptoWeapon, 0x22334400, 1.0f, FALSE);
// yes ammo
} else {
_fCustomScalingAdjustment = 1.0f; //#### 0.7f - 1.0f
HUD_DrawBorder( fCol, fRow, fOneUnit, fOneUnit, colBorder);
_fCustomScalingAdjustment = 0.5f;
if (hud_bWeaponsIconScale) {
_fCustomScalingAdjustment = 0.75f;
} else {
_fCustomScalingAdjustment = 0.5f;
}
HUD_DrawIcon( fCol, fRow, *_awiWeapons[i].wi_ptoWeapon, colIcon, 1.0f, FALSE);
}
// advance to next position
Expand Down

0 comments on commit b2ddfc7

Please sign in to comment.