- fixed: The targeter drawer did not check the return value of its setup function.

This caused invalid items to be passed to the renderer.
This commit is contained in:
Christoph Oelckers 2018-05-10 09:09:24 +02:00
parent 50cdcc79c8
commit e1ad4b618d
1 changed files with 4 additions and 3 deletions

View File

@ -534,9 +534,10 @@ void HWDrawInfo::PrepareTargeterSprites()
if (psp->GetState() != nullptr && (psp->GetID() != PSP_TARGETCENTER || CrosshairImage == nullptr))
{
hudsprite.weapon = psp;
hudsprite.GetWeaponRect(this, psp, psp->x, psp->y, player);
if (hudsprite.GetWeaponRect(this, psp, psp->x, psp->y, player))
{
AddHUDSprite(&hudsprite);
}
}
}
}