Fixed: the weapon layer offsets were interpolated even after the player switched his weapon

This commit is contained in:
Leonard2 2016-07-08 11:13:58 +02:00
parent 75cb8c00a6
commit da6e12d5bc

View file

@ -220,7 +220,7 @@ DPSprite *player_t::GetPSprite(PSPLayers layer)
pspr->Caller = newcaller; pspr->Caller = newcaller;
if (newcaller != oldcaller) if (newcaller != oldcaller)
{ // Only reset flags if this layer was created now or if it was being used before. { // Only reset stuff if this layer was created now or if it was being used before.
if (layer >= PSP_TARGETCENTER) if (layer >= PSP_TARGETCENTER)
{ // The targeter layers were affected by those. { // The targeter layers were affected by those.
pspr->Flags = (PSPF_CVARFAST|PSPF_POWDOUBLE); pspr->Flags = (PSPF_CVARFAST|PSPF_POWDOUBLE);
@ -229,6 +229,9 @@ DPSprite *player_t::GetPSprite(PSPLayers layer)
{ {
pspr->Flags = (PSPF_ADDWEAPON|PSPF_ADDBOB|PSPF_CVARFAST|PSPF_POWDOUBLE); pspr->Flags = (PSPF_ADDWEAPON|PSPF_ADDBOB|PSPF_CVARFAST|PSPF_POWDOUBLE);
} }
pspr->oldx = pspr->x;
pspr->oldy = pspr->y;
} }
return pspr; return pspr;