From c70fa25af74ceaa1b9a09859d06ac32e926f4057 Mon Sep 17 00:00:00 2001 From: Marisa Kirisame Date: Fri, 4 Jun 2021 00:46:05 +0200 Subject: [PATCH] Simplify halfstretch math. --- zscript/ammoled.zsc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zscript/ammoled.zsc b/zscript/ammoled.zsc index 40242ed..8eb295f 100644 --- a/zscript/ammoled.zsc +++ b/zscript/ammoled.zsc @@ -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++ ) {