I'm not sure if anyone has actually looked into this for the going on four years that it has existed, but A_OverlayPivotAlign sets the values halign and valign via |=, as per
the scripting definition for A_OverlayPivotAlign. This means it will never reset halign or valign back to PSPA_LEFT or PSPA_TOP, respectively, and further if you manage to set both to PSPA_CENTER and then PSPA_RIGHT/PSPA_BOTTOM you will be entering undefined behavior territory. Currently the only obscure workaround for resetting to PSPA_LEFT/PSPA_TOP is setting the values directly:
Code: Select all
let psp = invoker.Owner.Player.GetPSprite(PSP_WEAPON);
if(psp)
{
psp.halign = PSPA_LEFT; // 0
psp.valign = PSPA_TOP; // 0
}