- changed icon lookup for weapons in SBARINFO so that it uses the alternative HUD's method if the weapon does not have an icon defined.

SVN r3587 (trunk)
This commit is contained in:
Christoph Oelckers 2012-04-22 09:41:06 +00:00
commit b2e5e15d3c
3 changed files with 36 additions and 18 deletions

View file

@ -41,6 +41,7 @@
// classes.
////////////////////////////////////////////////////////////////////////////////
class CommandDrawImage : public SBarInfoCommand
{
public:
@ -169,8 +170,17 @@ class CommandDrawImage : public SBarInfoCommand
else if(type == WEAPONICON)
{
AWeapon *weapon = statusBar->CPlayer->ReadyWeapon;
if(weapon != NULL && weapon->Icon.isValid())
if(weapon != NULL)
{
FTextureID icon;
if (weapon->Icon.isValid())
{
icon = weapon->Icon;
}
else
{
icon = GetWeaponIcon(weapon);
}
texture = TexMan[weapon->Icon];
}
}