-
Notifications
You must be signed in to change notification settings - Fork 638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HL] Permanent crosshair #692
Comments
This also applies to ammo counter when you wear your HEV suit but have no weapons. |
This happens because the client isn't told when the player has no weapons. To fix this First add a boolean at the start of this method: Lines 3949 to 3951 in c7240b9
const bool fullHUDInitRequired = m_fInitHUD != FALSE;
if (m_fInitHUD) Then later in the method: Lines 4164 to 4173 in c7240b9
// Update all the items
for ( int i = 0; i < MAX_ITEM_TYPES; i++ )
{
if ( m_rgpPlayerItems[i] ) // each item updates it's successors
m_rgpPlayerItems[i]->UpdateClientData( this );
}
//Active item is becoming null, or we're sending all HUD state to client
//Only if we're not in Observer mode, which uses the target player's weapon
if (pev->iuser1 == OBS_NONE && !m_pActiveItem && ((m_pClientActiveItem != m_pActiveItem) || fullHUDInitRequired))
{
//Tell ammo hud that we have no weapon selected
MESSAGE_BEGIN(MSG_ONE, gmsgCurWeapon, NULL, pev);
WRITE_BYTE(0);
WRITE_BYTE(0);
WRITE_BYTE(0);
MESSAGE_END();
}
// Cache and client weapon change
m_pClientActiveItem = m_pActiveItem;
m_iClientFOV = m_iFOV; This will tell the client the player no longer has any weapon selected if the player's active item is null (weapon just removed) or if the hud is being fully initialized and all state is being updated. Additionally this code can be removed: Lines 852 to 856 in c7240b9
Since The ammo counter issue is tracked at #3063 and has a fix. |
Load some save, select a weapon with a crosshair, start a new game. The crosshair is still visible.
http://youtu.be/eT_-c8mgmww
Protocol version 48
Exe version 1.1.2.2/Stdio (valve)
Exe build: 11:45:32 Mar 1 2013 (5971)
Processor Information:
Vendor: AuthenticAMD
Speed: 3214 Mhz
4 logical processors
4 physical processors
HyperThreading: Unsupported
FCMOV: Supported
SSE2: Supported
SSE3: Supported
SSSE3: Supported
SSE4a: Supported
SSE41: Unsupported
SSE42: Unsupported
Network Information:
Network Speed:
Operating System Version:
Windows 7 (64 bit)
NTFS: Supported
Crypto Provider Codes: Supported 311 0x0 0x0 0x0
Video Card:
Driver: ATI Radeon HD 5700 Series
Sound card:
Audio device: Glosniki (ASUS Xonar DS Audio D
Memory:
RAM: 8191 Mb
The text was updated successfully, but these errors were encountered: