Simplify halfstretch math.

This commit is contained in:
Marisa the Magician 2021-06-04 00:46:05 +02:00
commit c70fa25af7

View file

@ -24,7 +24,7 @@ Class PulseGunLED : Actor
SetZ(floorz);
roll = 180;
angle = 180;
double halfstretch = 1.+(level.pixelstretch-1.)/2.;
double halfstretch = (1.+level.pixelstretch)/2.;
if ( !base ) base = Spawn("AmmoLEDScreen",(PULSELEDBASE,PULSELEDBASE-128.,floorz+64.*halfstretch));
for ( int i=0; i<3; i++ )
{
@ -79,7 +79,7 @@ Class FlakCannonLED : Actor
SetZ(floorz);
roll = 180;
angle = 180;
double halfstretch = 1.+(level.pixelstretch-1.)/2.;
double halfstretch = (1.+level.pixelstretch)/2.;
if ( !base ) base = Spawn("AmmoLEDScreen",(FLAKLEDBASE,FLAKLEDBASE-64.,floorz+32.*halfstretch));
for ( int i=0; i<3; i++ )
{
@ -122,7 +122,7 @@ Class MinigunLED : Actor
SetZ(floorz);
roll = 180;
angle = 180;
double halfstretch = 1.+(level.pixelstretch-1.)/2.;
double halfstretch = (1.+level.pixelstretch)/2.;
if ( !base ) base = Spawn("AmmoLEDScreen",(MINILEDBASE,MINILEDBASE-32.,floorz+32.*halfstretch));
for ( int i=0; i<3; i++ )
{
@ -165,7 +165,7 @@ Class UTRocketLauncherLED : Actor
SetZ(floorz);
roll = 180;
angle = 180;
double halfstretch = 1.+(level.pixelstretch-1.)/2.;
double halfstretch = (1.+level.pixelstretch)/2.;
if ( !base ) base = Spawn("AmmoLEDScreen",(ROCKETLEDBASE,ROCKETLEDBASE-32.,floorz+32.*halfstretch));
for ( int i=0; i<3; i++ )
{