Skip to content
Open
Changes from all commits
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
12 changes: 8 additions & 4 deletions dmc/cl_dll/ammo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -824,6 +824,7 @@ int CHudAmmo::Draw(float flTime)
int iCrossY;
int iCrossLength;
char *chCrossHair = "+"; // Heh
cvar_t *pCrosshair = gEngfuncs.pfnGetCvarPointer("crosshair");

/*if (!(gHUD.m_iWeaponBits & (1<<(WEAPON_SUIT)) ))
return 1;*/
Expand Down Expand Up @@ -867,11 +868,14 @@ int CHudAmmo::Draw(float flTime)
y = ScreenHeight - gHUD.m_iFontHeight - gHUD.m_iFontHeight/2;

/******************* DRAW CROSSHAIR *********************/
iCrossLength = gHUD.m_scrinfo.charWidths[ *chCrossHair ];
iCrossY = ScreenHeight / 2 - gHUD.m_scrinfo.iCharHeight / 2;
iCrossX = ScreenWidth / 2 - iCrossLength / 2;
if ( pCrosshair->value )
{
iCrossLength = gHUD.m_scrinfo.charWidths[ *chCrossHair ];
iCrossY = ScreenHeight / 2 - gHUD.m_scrinfo.iCharHeight / 2;
iCrossX = ScreenWidth / 2 - iCrossLength / 2;

gHUD.DrawHudString( iCrossX, iCrossY, iCrossX + 50, chCrossHair, 170, 170, 170 );
gHUD.DrawHudString( iCrossX, iCrossY, iCrossX + 50, chCrossHair, 170, 170, 170 );
}
/******************* DRAW CROSSHAIR *********************/

// Does weapon have any ammo at all?
Expand Down