Fix missing melee icon in JKO

and don't draw crosshair when melee active
This commit is contained in:
Simon 2023-06-01 23:04:31 +01:00
parent 468e7b23a1
commit 9efd9ed081
4 changed files with 7 additions and 0 deletions

View file

@ -1894,6 +1894,7 @@ static void CG_DrawCrosshair3D(int type) // 0 - force, 1 - weapons
} }
if ( type == 1 && (cg.snap->ps.weapon == WP_NONE || if ( type == 1 && (cg.snap->ps.weapon == WP_NONE ||
cg.snap->ps.weapon == WP_MELEE ||
cg.snap->ps.weapon == WP_SABER || cg.snap->ps.weapon == WP_SABER ||
cg.snap->ps.weapon == WP_STUN_BATON || cg.snap->ps.weapon == WP_STUN_BATON ||
cg.snap->ps.weapon == WP_THERMAL )) cg.snap->ps.weapon == WP_THERMAL ))

View file

@ -116,6 +116,12 @@ void CG_RegisterWeapon( int weaponNum ) {
weaponInfo->weaponMidpoint[i] = mins[i] + 0.5 * ( maxs[i] - mins[i] ); weaponInfo->weaponMidpoint[i] = mins[i] + 0.5 * ( maxs[i] - mins[i] );
} }
//Bit of a hack - default weapons.dat on JK2 is missing the melee icon!
if (weaponNum == WP_MELEE)
{
strcpy((char *)weaponData[weaponNum].weaponIcon, "gfx/hud/w_icon_melee");
}
// setup the shader we will use for the icon // setup the shader we will use for the icon
if (weaponData[weaponNum].weaponIcon[0]) if (weaponData[weaponNum].weaponIcon[0])
{ {

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB