From 2585bdd529b8e9e26a768c73991c86397ccf2893 Mon Sep 17 00:00:00 2001 From: puzl Date: Mon, 15 May 2006 00:15:10 +0000 Subject: [PATCH] o Fixed crosshair issues. git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@487 67975925-1194-0748-b3d5-c16f83f1a3a1 --- releases/3.2.0/source/cl_dll/ammo.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/releases/3.2.0/source/cl_dll/ammo.cpp b/releases/3.2.0/source/cl_dll/ammo.cpp index 54fa552..28affc7 100644 --- a/releases/3.2.0/source/cl_dll/ammo.cpp +++ b/releases/3.2.0/source/cl_dll/ammo.cpp @@ -675,11 +675,16 @@ void CHudAmmo::Think(void) } if ( (int)CVAR_GET_FLOAT(kvCustomCrosshair) != m_customCrosshair ) { m_customCrosshair=(int)CVAR_GET_FLOAT(kvCustomCrosshair); - WEAPON* currentWeapon = gWR.GetWeapon(gHUD.GetCurrentWeaponID()); - if ( currentWeapon ) { - gWR.LoadWeaponSprites(currentWeapon, m_customCrosshair); - gHUD.SetCurrentCrosshair(currentWeapon->hCrosshair, currentWeapon->rcCrosshair, 255, 255, 255); + for ( int i=0; i < MAX_WEAPONS; i++ ) { + WEAPON *weapon = gWR.GetWeapon(i); + if ( weapon ) { + gWR.LoadWeaponSprites(weapon, m_customCrosshair); + if ( gHUD.GetHUDPlayMode() != PLAYMODE_READYROOM && gHUD.GetCurrentWeaponID() == weapon->iId ) { + gHUD.SetCurrentCrosshair(weapon->hCrosshair, weapon->rcCrosshair, 255, 255, 255); + } + } } + } if(gHUD.GetIsAlien()) //check for hive death causing loss of current weapon