The targeter layers now use a proper Caller

This will avoid having to check for certain stuff and also allow them to not be destroyed when the ReadyWeapon is null like before
This commit is contained in:
Leonard2 2016-06-01 23:20:18 +02:00
commit e1f139ddcd
4 changed files with 33 additions and 19 deletions

View file

@ -3090,7 +3090,9 @@ void player_t::Serialize (FArchive &arc)
<< sx << sy
<< sprite << frame;
if (state != nullptr && ReadyWeapon != nullptr)
if (state != nullptr &&
((layer < PSP_TARGETCENTER && ReadyWeapon != nullptr) ||
(layer >= PSP_TARGETCENTER && mo->FindInventory(RUNTIME_CLASS(APowerTargeter), true))))
{
DPSprite *pspr;
pspr = GetPSprite(PSPLayers(layer));