More ammo led fixes. It's not over yet, though.

Every time I find another bug in this that I have to fix, I wish harder and harder for scripted textures to be a thing in GZDoom. I have managed to fix ONE issue with this, but another remains that appears entirely unfixable. I just cannot wrap my head around why this is broken in some Eviternity maps still. I've debugged everything I could, I've checked all possible parameters that could be responsible for the odd vertical offsetting, but nothing. ABSOLUTELY NOTHING explains why it's happening. It's just broken, simply broken like that, there is no explanation for it, the engine is just mocking me at this point. I seriously really REALLY wish there was a better way to do this, but alas, no, there simply isn't. Unless someone goes and makes it possible to draw directly to textures like in UT99, this will remain forever broken. That's just how it is. This is the last time I try to fix any more bugs related to this specific part of the code. The mod is supposed to no longer receive updates, so I'll just stop. No more. If I have to live with this constant reminder of the engine's nonsense, so will all who play the mod as well. -- Marisa
This commit is contained in:
Marisa the Magician 2022-07-16 12:01:16 +02:00
commit 58587fcd4d

View file

@ -25,13 +25,14 @@ Class PulseGunLED : Actor
roll = 180;
angle = 180;
double halfstretch = (1.+level.pixelstretch)/2.;
if ( !base ) base = Spawn("AmmoLEDScreen",(PULSELEDBASE,PULSELEDBASE-128.,pos.z+64.*halfstretch-GetFloorTerrain().footclip*16.));
double zofs = (ceilingz>floorz)?CurSector.GetFloorTerrain(0).footclip*16.:0.;
if ( !base ) base = Spawn("AmmoLEDScreen",(PULSELEDBASE,PULSELEDBASE-128.,pos.z+64.*halfstretch-zofs));
for ( int i=0; i<3; i++ )
{
if ( !digits[i] )
digits[i] = Spawn("LEDFont",(PULSELEDBASE+1.,PULSELEDBASE-72.+48.*i,pos.z+50.*halfstretch-GetFloorTerrain().footclip*16.));
digits[i] = Spawn("LEDFont",(PULSELEDBASE+1.,PULSELEDBASE-72.+48.*i,pos.z+50.*halfstretch-zofs));
}
if ( !bar ) bar = Spawn("AmmoCountBar",(PULSELEDBASE+1.,PULSELEDBASE-98.,pos.z-26.*halfstretch-GetFloorTerrain().footclip*16.));
if ( !bar ) bar = Spawn("AmmoCountBar",(PULSELEDBASE+1.,PULSELEDBASE-98.,pos.z-26.*halfstretch-zofs));
}
override void Tick()
{
@ -80,11 +81,12 @@ Class FlakCannonLED : Actor
roll = 180;
angle = 180;
double halfstretch = (1.+level.pixelstretch)/2.;
if ( !base ) base = Spawn("AmmoLEDScreen",(FLAKLEDBASE,FLAKLEDBASE-64.,floorz+32.*halfstretch-GetFloorTerrain().footclip*16.));
double zofs = (ceilingz>floorz)?CurSector.GetFloorTerrain(0).footclip*16.:0.;
if ( !base ) base = Spawn("AmmoLEDScreen",(FLAKLEDBASE,FLAKLEDBASE-64.,floorz+32.*halfstretch-zofs));
for ( int i=0; i<3; i++ )
{
if ( !digits[i] )
digits[i] = Spawn("LEDFont",(FLAKLEDBASE+1.,FLAKLEDBASE-30.+20.*i,floorz+16.*halfstretch-GetFloorTerrain().footclip*16.));
digits[i] = Spawn("LEDFont",(FLAKLEDBASE+1.,FLAKLEDBASE-30.+20.*i,floorz+16.*halfstretch-zofs);
}
}
override void Tick()
@ -123,11 +125,12 @@ Class MinigunLED : Actor
roll = 180;
angle = 180;
double halfstretch = (1.+level.pixelstretch)/2.;
if ( !base ) base = Spawn("AmmoLEDScreen",(MINILEDBASE,MINILEDBASE-32.,floorz+32.*halfstretch-GetFloorTerrain().footclip*16.));
double zofs = (ceilingz>floorz)?CurSector.GetFloorTerrain(0).footclip*16.:0.;
if ( !base ) base = Spawn("AmmoLEDScreen",(MINILEDBASE,MINILEDBASE-32.,floorz+32.*halfstretch-zofs));
for ( int i=0; i<3; i++ )
{
if ( !digits[i] )
digits[i] = Spawn("LEDFont",(MINILEDBASE+1.,MINILEDBASE-30.+20.*i,floorz+16.*halfstretch-GetFloorTerrain().footclip*16.));
digits[i] = Spawn("LEDFont",(MINILEDBASE+1.,MINILEDBASE-30.+20.*i,floorz+16.*halfstretch-zofs));
}
}
override void Tick()
@ -166,11 +169,12 @@ Class UTRocketLauncherLED : Actor
roll = 180;
angle = 180;
double halfstretch = (1.+level.pixelstretch)/2.;
if ( !base ) base = Spawn("AmmoLEDScreen",(ROCKETLEDBASE,ROCKETLEDBASE-32.,floorz+32.*halfstretch-GetFloorTerrain().footclip*16.));
double zofs = (ceilingz>floorz)?CurSector.GetFloorTerrain(0).footclip*16.:0.;
if ( !base ) base = Spawn("AmmoLEDScreen",(ROCKETLEDBASE,ROCKETLEDBASE-32.,floorz+32.*halfstretch-zofs));
for ( int i=0; i<3; i++ )
{
if ( !digits[i] )
digits[i] = Spawn("LEDFont",(ROCKETLEDBASE+1.,ROCKETLEDBASE-30.+20.*i,floorz+16.*halfstretch-GetFloorTerrain().footclip*16.));
digits[i] = Spawn("LEDFont",(ROCKETLEDBASE+1.,ROCKETLEDBASE-30.+20.*i,floorz+16.*halfstretch-zofs));
}
}
override void Tick()
@ -195,7 +199,7 @@ Class LEDFont : Actor
StencilColor "FF 00 00";
Radius .1;
Height 0.;
RenderRadius 256;
RenderRadius 131072;
+NOBLOCKMAP;
+NOGRAVITY;
+NOINTERACTION;
@ -218,7 +222,7 @@ Class AmmoCountBar : Actor
{
Radius .1;
Height 0.;
RenderRadius 256;
RenderRadius 131072;
+NOBLOCKMAP;
+NOGRAVITY;
+NOINTERACTION;
@ -239,7 +243,7 @@ Class AmmoLEDScreen : Actor
{
Radius .1;
Height 0.;
RenderRadius 256;
RenderRadius 131072;
+NOBLOCKMAP;
+NOGRAVITY;
+NOINTERACTION;