- consolidated the 3 nearly identical code fragments handling the weapon's YAdjust for the different renderers into a utility function in DPSprite.
This commit is contained in:
parent
4392b4e96d
commit
ead28db007
5 changed files with 31 additions and 39 deletions
|
|
@ -296,18 +296,7 @@ void RenderPolyPlayerSprites::RenderSprite(PolyRenderThread *thread, DPSprite *p
|
|||
viewheight == renderTarget->GetHeight() ||
|
||||
(renderTarget->GetWidth() > (BASEXCENTER * 2))))
|
||||
{ // Adjust PSprite for fullscreen views
|
||||
AWeapon *weapon = dyn_cast<AWeapon>(pspr->GetCaller());
|
||||
if (weapon != nullptr && weapon->YAdjust != 0)
|
||||
{
|
||||
if (renderToCanvas || viewheight == renderTarget->GetHeight())
|
||||
{
|
||||
vis.texturemid -= weapon->YAdjust;
|
||||
}
|
||||
else
|
||||
{
|
||||
vis.texturemid -= StatusBar->GetDisplacement() * weapon->YAdjust;
|
||||
}
|
||||
}
|
||||
vis.texturemid -= pspr->GetYAdjust(renderToCanvas || viewheight == renderTarget->GetHeight());
|
||||
}
|
||||
if (pspr->GetID() < PSP_TARGETCENTER)
|
||||
{ // Move the weapon down for 1280x1024.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue