- Adjust AmbientGlow shader to work EXACTLY like in UE1 (don't ask how I figured this out).
 - Fix Enforcer sometimes reloading when reloading is disabled.
 - Fix Enforcer pickups having no ambient glow.
This commit is contained in:
Marisa the Magician 2019-10-29 21:25:52 +01:00
commit 1a05b9b14d
6 changed files with 15 additions and 15 deletions

View file

@ -61,7 +61,7 @@ This mod requires GZDoom 4.2.3 or later.
## In progress ## In progress
- N/A, this is the 1.0.3 release - N/A, this is the 1.0.4 release
## Planned ## Planned

View file

@ -484,6 +484,10 @@ HardwareShader Texture "models/JEClip.png"
{ {
Shader "shaders/glsl/AmbientGlow.fp" Shader "shaders/glsl/AmbientGlow.fp"
} }
HardwareShader Texture "models/Jautot1.png"
{
Shader "shaders/glsl/AmbientGlow.fp"
}
HardwareShader Texture "models/BladeHopperT.png" HardwareShader Texture "models/BladeHopperT.png"
{ {
Shader "shaders/glsl/AmbientGlow.fp" Shader "shaders/glsl/AmbientGlow.fp"

View file

@ -1,8 +1,7 @@
// imitation of the Unreal Engine 1.x ambient glow effect, timing may be off // imitation of the Unreal Engine 1.x ambient glow effect
#define PI 3.14159265
vec4 ProcessLight( vec4 color ) vec4 ProcessLight( vec4 color )
{ {
float glow = (1.0+sin(timer*2*PI))*0.25; float glow = 0.25+0.2*sin(timer*8);
return vec4(min(color.rgb+vec3(glow),1.0),color.a); return vec4(min(color.rgb+vec3(glow),1.0),color.a);
} }

View file

@ -1,11 +1,9 @@
// imitation of the Unreal Engine 1.x ambient glow effect, timing may be off // imitation of the Unreal Engine 1.x ambient glow effect
// combining with brightmaps requires the brightmap to be embedded into the // plus brightmapping
// alpha channel of the diffuse texture
#define PI 3.14159265
vec4 ProcessLight( vec4 color ) vec4 ProcessLight( vec4 color )
{ {
float bright = texture(brighttex,vTexCoord.st).x; float bright = texture(brighttex,vTexCoord.st).x;
float glow = (1.0+sin(timer*2*PI))*0.25; float glow = 0.25+0.2*sin(timer*8);
return vec4(min(color.rgb+vec3(bright)+vec3(glow),1.0),color.a); return vec4(min(color.rgb+vec3(bright)+vec3(glow),1.0),color.a);
} }

View file

@ -1,8 +1,7 @@
// imitation of the Unreal Engine 1.x ambient glow effect, timing may be off // imitation of the Unreal Engine 1.x ambient glow effect
#define PI 3.14159265
vec4 ProcessLight( vec4 color ) vec4 ProcessLight( vec4 color )
{ {
float glow = (1.0+sin(timer*2*PI))*0.25; float glow = 0.25+0.2*sin(timer*8);
return vec4(min(color.rgb+vec3(glow),1.0),color.a); return vec4(min(color.rgb+vec3(glow),1.0),color.a);
} }

View file

@ -527,7 +527,7 @@ Class Enforcer : UTWeapon
Dummy: Dummy:
TNT1 A 1 TNT1 A 1
{ {
if ( (invoker.clipcount <= 0) && (invoker.Ammo1.Amount > 0) ) player.SetPSprite(PSP_WEAPON,ResolveState("Reload")); if ( flak_enforcerreload && (invoker.clipcount <= 0) && (invoker.Ammo1.Amount > 0) ) player.SetPSprite(PSP_WEAPON,ResolveState("Reload"));
else if ( flak_enforcerreload && ((invoker.clipcount < min(invoker.default.clipcount,invoker.Ammo1.Amount)) || (invoker.slaveclipcount < min(invoker.default.slaveclipcount,invoker.Ammo1.Amount))) ) A_WeaponReady(WRF_ALLOWRELOAD); else if ( flak_enforcerreload && ((invoker.clipcount < min(invoker.default.clipcount,invoker.Ammo1.Amount)) || (invoker.slaveclipcount < min(invoker.default.slaveclipcount,invoker.Ammo1.Amount))) ) A_WeaponReady(WRF_ALLOWRELOAD);
else A_WeaponReady(); else A_WeaponReady();
if ( !invoker.slaveactive && (CountInv("Enforcer") > 1) ) if ( !invoker.slaveactive && (CountInv("Enforcer") > 1) )
@ -600,7 +600,7 @@ Class Enforcer : UTWeapon
{ {
if ( invoker.clipcount >= invoker.default.clipcount ) if ( invoker.clipcount >= invoker.default.clipcount )
{ {
invoker.slavereload = (invoker.slaveactive&&(invoker.slaveclipcount<min(invoker.default.slaveclipcount,invoker.Ammo1.Amount))); invoker.slavereload = (flak_enforcerreload&&invoker.slaveactive&&(invoker.slaveclipcount<min(invoker.default.slaveclipcount,invoker.Ammo1.Amount)));
return ResolveState("Idle"); return ResolveState("Idle");
} }
return ResolveState(null); return ResolveState(null);
@ -619,7 +619,7 @@ Class Enforcer : UTWeapon
A_PlaySound("enforcer/reload",CHAN_WEAPON); A_PlaySound("enforcer/reload",CHAN_WEAPON);
if ( self is 'UTPlayer' ) if ( self is 'UTPlayer' )
UTPlayer(self).PlayReloading(); UTPlayer(self).PlayReloading();
invoker.slavereload = (invoker.slaveactive&&(invoker.slaveclipcount<min(invoker.default.slaveclipcount,invoker.Ammo1.Amount))); invoker.slavereload = (flak_enforcerreload&&invoker.slaveactive&&(invoker.slaveclipcount<min(invoker.default.slaveclipcount,invoker.Ammo1.Amount)));
Vector3 x, y, z, origin; Vector3 x, y, z, origin;
[x,y,z] = dt_CoordUtil.GetAxes(pitch,angle,roll); [x,y,z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),x*4.+y*4.-z*8.); origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),x*4.+y*4.-z*8.);