From 775172a7a86fa7f07445c388c8e94a43d0d9bd02 Mon Sep 17 00:00:00 2001 From: Marisa Kirisame Date: Thu, 24 Jan 2019 22:33:09 +0100 Subject: [PATCH] Various changes to feel closer to vanilla UT, mainly in terms of projectile gravity and velocity. Reduced the smoke on the minigun and casings for better performance. Corrected the number of chunks (was 6, should be 8) fired by the flak cannon. Reduced flak chunk spread (should be ~5.5 degrees, was double of that) on the weapon and slugs. Reduced the size of the shock rifle combo shockwave mesh to be closer to vanilla UT. Misc. tweaks to health item textures. Reduced the blur in the Redeemer view shader, it was too strong. Fix expiration messages on powerups appearing on level changes. Address complaints about how I change Kinsie's test map. Shouldn't be too dark now. --- gldefs.txt | 2 +- modeldef.misc | 2 +- modeldef.shock | 4 ++-- shaders/glsl/FizzDistortX.fp | 5 ++-- shaders/glsl/RedeemerView.fp | 6 ++--- zscript/biorifle.zsc | 4 ++-- zscript/eightball.zsc | 20 ++++++++-------- zscript/enforcer.zsc | 5 ++-- zscript/flakcannon.zsc | 45 +++++++++++++++++++++++++++--------- zscript/minigun.zsc | 4 ++-- zscript/powerups.zsc | 4 ++-- zscript/pulsegun.zsc | 2 +- zscript/ripper.zsc | 2 +- zscript/shockrifle.zsc | 2 +- zscript/sniperrifle.zsc | 2 +- zscript/translocator.zsc | 3 ++- zscript/utcommon.zsc | 12 +++++----- zscript/utgore.zsc | 6 +++-- zscript/warheadlauncher.zsc | 6 ++--- 19 files changed, 81 insertions(+), 55 deletions(-) diff --git a/gldefs.txt b/gldefs.txt index 8f96065..755eeea 100644 --- a/gldefs.txt +++ b/gldefs.txt @@ -583,7 +583,7 @@ HardwareShader PostProcess scene Texture StaticTexture "textures/static1.png" Uniform float Timer } -SkyBox "BlueSky" fliptop +SkyBox "KGDaySky" fliptop { "graphics/SkySetB_front.png" "graphics/SkySetB_right.png" diff --git a/modeldef.misc b/modeldef.misc index f00dcec..adcdfa1 100644 --- a/modeldef.misc +++ b/modeldef.misc @@ -64,7 +64,7 @@ Model "UTHealthBox" Model 0 "hboxbeta_d.3d" // indices start at 1 for this mesh SurfaceSkin 0 1 "jhboxbeta1.png" - SurfaceSkin 0 2 "fizzfull" + SurfaceSkin 0 2 "fizzside" SurfaceSkin 0 3 "fizzfull" Scale 0.08 0.08 0.096 ZOffset 4 diff --git a/modeldef.shock b/modeldef.shock index ddb8eef..56c84fd 100644 --- a/modeldef.shock +++ b/modeldef.shock @@ -35,7 +35,7 @@ Model "ShockRifleWave" Path "models" Model 0 "shockrwm_d.3d" Skin 0 "shocktt1.png" - Scale 1.2 1.0 1.0 + Scale 0.6 0.5 0.5 PitchOffset 90 FrameIndex SWAV A 0 0 @@ -47,7 +47,7 @@ Model "SuperShockRifleWave" Path "models" Model 0 "shockrwm_d.3d" Skin 0 "sshocktt1.png" - Scale 1.2 1.0 1.0 + Scale 0.6 0.5 1.5 PitchOffset 90 FrameIndex SWAV A 0 0 diff --git a/shaders/glsl/FizzDistortX.fp b/shaders/glsl/FizzDistortX.fp index 3e62195..2cf77af 100644 --- a/shaders/glsl/FizzDistortX.fp +++ b/shaders/glsl/FizzDistortX.fp @@ -7,12 +7,11 @@ vec4 ProcessTexel() { vec2 coord = vTexCoord.st; vec2 dist = 2.0*texture(warptex,vTexCoord.st).xy-1.0; - dist.x *= abs(mod(dist.y+timer*3.34536,4)-2)-1; - coord.x += dist.x*0.12; + dist.y *= abs(mod(dist.x+timer*3.34536,4)-2)-1; + coord.y += dist.y*0.12; dist = 2.0*texture(warptex,vTexCoord.st*2.0).xy-1.0; dist.y *= abs(mod(dist.x+timer*5.45363,4)-2)-1; coord.y -= dist.y*0.09; coord.y = clamp(coord.y,0.0,1.0); - coord.x += timer*0.5346; return getTexel(coord); } diff --git a/shaders/glsl/RedeemerView.fp b/shaders/glsl/RedeemerView.fp index d4137c3..78c0a10 100644 --- a/shaders/glsl/RedeemerView.fp +++ b/shaders/glsl/RedeemerView.fp @@ -5,14 +5,12 @@ void main() vec2 sz = textureSize(InputTexture,0); vec2 px = 1.0/vec2(1920.0); px.y *= sz.x/sz.y; - float cnt = 1.0; - for ( int j=-5; j<=5; j++ ) for ( int i=-5; i<=5; i++ ) + for ( int j=-1; j<=1; j++ ) for ( int i=-1; i<=1; i++ ) { nc = TexCoord+px*vec2(i,j); tinted += texture(InputTexture,nc); - cnt += 1.0; } - tinted /= cnt; + tinted /= 10.0; vec2 coord = TexCoord; coord *= 4.0; coord.y *= px.x/px.y; diff --git a/zscript/biorifle.zsc b/zscript/biorifle.zsc index e78e576..20ca347 100644 --- a/zscript/biorifle.zsc +++ b/zscript/biorifle.zsc @@ -528,8 +528,8 @@ Class BioGel : Actor Radius 3; Height 3; Scale 2; - Speed 18; - Gravity 0.5; + Speed 11; + Gravity 0.25; PROJECTILE; -NOGRAVITY; +SKYEXPLODE; diff --git a/zscript/eightball.zsc b/zscript/eightball.zsc index b5bbe21..404e13f 100644 --- a/zscript/eightball.zsc +++ b/zscript/eightball.zsc @@ -111,7 +111,7 @@ Class UTRocket : Actor DamageType 'RocketDeath'; Radius 2; Height 2; - Speed 20; + Speed 15; PROJECTILE; +SKYEXPLODE; +EXPLODEONWATER; @@ -145,21 +145,21 @@ Class UTRocket : Actor int numpt = Random[Eightball](15,30); for ( int i=0; i 45. ) vel = Vel.unit()*45.; + if ( vel.length() > 30. ) vel = Vel.unit()*30.; Vector3 dir = vel.unit(); - if ( waterlevel <= 0 ) vel = dir*min(vel.length()+1,32); + if ( waterlevel <= 0 ) vel = dir*min(vel.length()+1,24); angle = atan2(dir.y,dir.x); pitch = asin(-dir.z); for ( int i=0; i<3; i++ ) @@ -228,7 +228,8 @@ Class UTGrenade : UTRocket WallBounceFactor 0.75; BounceFactor 0.75; ReactionTime 85; - Speed 20; + Speed 15; + Gravity 0.35; } override void PostBeginPlay() { @@ -309,7 +310,8 @@ Class UTRocketLauncher : UTWeapon { LockedTarget = null; LockedOn = false; - Owner.A_PlaySound("utrl/seeklost",CHAN_WEAPON); + if ( Owner.player.ReadyWeapon == self ) + Owner.A_PlaySound("utrl/seeklost",CHAN_WEAPON); } if ( LockedTarget ) crosshair = 99; else crosshair = 0; @@ -368,7 +370,7 @@ Class UTRocketLauncher : UTWeapon Vector3 dir = (x2+cos(a)*y2*s*0.004+sin(a)*z2*s*0.004).unit(); p = Spawn("UTGrenade",origin+cos(a)*y*s+sin(a)*z*s); p.vel = x*(vel dot x)*0.4 + dir*p.speed*FRandom[Eightball](1.0,1.2); - p.vel.z += 6; + p.vel.z += 3.5; p.target = self; } } diff --git a/zscript/enforcer.zsc b/zscript/enforcer.zsc index 8610c82..b825b25 100644 --- a/zscript/enforcer.zsc +++ b/zscript/enforcer.zsc @@ -103,6 +103,7 @@ Class UTCasing : Actor +USEBOUNCESTATE; +INTERPOLATEANGLES; Mass 1; + Gravity 0.35; BounceType "Hexen"; WallBounceFactor 0.65; BounceFactor 0.65; @@ -126,7 +127,7 @@ Class UTCasing : Actor if ( deadtimer > 300 ) A_FadeOut(0.05); return; } - heat -= 0.02; + heat -= 0.05; if ( heat <= 0 ) return; let s = Spawn("UTSmallSmoke",pos); s.alpha *= heat; @@ -376,7 +377,7 @@ Class Enforcer : UTWeapon } origin += x*8.0+ydir*y*6.0-z*2.0; let c = Spawn("UTCasing",origin); - c.vel = x*FRandom[Junk](-2,2)+y*ydir*FRandom[Junk](3,6)+z*FRandom[Junk](3,5); + c.vel = x*FRandom[Junk](-1.5,1.5)+y*ydir*FRandom[Junk](2,4)+z*FRandom[Junk](2,3); } override String GetObituary( Actor victim, Actor inflictor, Name mod, bool playerattack ) diff --git a/zscript/flakcannon.zsc b/zscript/flakcannon.zsc index 0b28847..fb1d066 100644 --- a/zscript/flakcannon.zsc +++ b/zscript/flakcannon.zsc @@ -163,7 +163,7 @@ Class FlakChunk : Actor Obituary "%o was ripped to shreds by %k's Flak Cannon."; Radius 2; Height 2; - Speed 50; + Speed 32; DamageFunction Random[Flak](15,20); DamageType 'Shredded'; BounceType "Hexen"; @@ -243,13 +243,16 @@ Class FlakChunk : Actor } else A_SprayDecal("WallCrack",-8); A_Gravity(); + gravity = 0.35; invoker.rollvel = FRandom[Flak](50,100)*RandomPick[Flak](-1,1)*(vel.length()/speed); invoker.pitchvel = FRandom[Flak](50,100)*RandomPick[Flak](-1,1)*(vel.length()/speed); invoker.yawvel = FRandom[Flak](50,100)*RandomPick[Flak](-1,1)*(vel.length()/speed); vel = (vel.unit()+(FRandom[Flak](-0.2,0.2),FRandom[Flak](-0.2,0.2),FRandom[Flak](-0.2,0.2))).unit()*vel.length(); + // TODO chunks in vanilla have a special variation on the standard reflect formula that causes them to bounce differently when hitting a surface head-on + // (0.5 to 0.8 reduction perpendicular to the surface normal, to be specific) + // I have no idea how I'll even implement this reduction reliably A_PlaySound("flak/bounce",volume:0.3); A_AlertMonsters(); - bBOUNCEAUTOOFFFLOORONLY = true; if ( vel.length() < 5.0 ) ExplodeMissile(); } override int DoSpecialDamage( Actor target, int damage, Name damagetype ) @@ -386,7 +389,8 @@ Class FlakSlug : Actor DamageType 'FlakDeath'; Radius 2; Height 2; - Speed 40; + Gravity 0.35; + Speed 20; PROJECTILE; -NOGRAVITY; +SKYEXPLODE; @@ -398,7 +402,7 @@ Class FlakSlug : Actor override void PostBeginPlay() { Super.PostBeginPlay(); - vel.z += 4; + vel.z += 3; } override void Tick() { @@ -423,16 +427,26 @@ Class FlakSlug : Actor double a, s; [x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll); Actor p; + Vector3 spawnofs; + if ( BlockingMobj ) spawnofs = level.Vec3Diff(pos,BlockingMobj.Vec3Offset(0,0,BlockingMobj.height/2)).unit()*8; + else if ( BlockingFloor ) spawnofs = BlockingFloor.floorplane.Normal*8; + else if ( BlockingCeiling ) spawnofs = BlockingCeiling.ceilingplane.Normal*8; + else if ( BlockingLine ) + { + spawnofs = (-BlockingLine.delta.y,BlockingLine.delta.x,0).unit()*8; + if ( !BlockingLine.sidedef[1] || (CurSector == BlockingLine.frontsector) ) + spawnofs *= -1; + } for ( int i=0; i<5; i++ ) { - p = Spawn("FlakChunk",pos); + p = Spawn("FlakChunk",Vec3Offset(spawnofs.x,spawnofs.y,spawnofs.z)); p.bHITOWNER = true; a = FRandom[Flak](0,360); - s = FRandom[Flak](0,0.2); + s = FRandom[Flak](0,0.1); Vector3 dir = (x+y*cos(a)*s+z*sin(a)*s).unit(); p.angle = atan2(dir.y,dir.x); p.pitch = -asin(dir.z); - p.vel = (cos(p.angle)*cos(p.pitch),sin(p.angle)*cos(p.pitch),-sin(p.pitch))*p.speed*FRandom[Flak](0.5,1.5); + p.vel = (cos(p.angle)*cos(p.pitch),sin(p.angle)*cos(p.pitch),-sin(p.pitch))*(p.speed+FRandom[Flak](-3,3)); p.target = target; } int numpt = Random[Flak](8,12); @@ -521,16 +535,25 @@ Class FlakCannon : UTWeapon A_OverlayFlags(-2,PSPF_RENDERSTYLE|PSPF_FORCESTYLE,true); A_OverlayRenderstyle(-2,STYLE_Add); [x, y, z] = dt_Matrix4.GetAxes(BulletSlope(),angle,roll); + Vector3 offsets[8]; // vanilla adds these to each chunk + offsets[0] = (0,0,0); + offsets[1] = -z; + offsets[2] = 2*y+z; + offsets[3] = -y; + offsets[4] = 2*y-z; + offsets[5] = (0,0,0); + offsets[6] = y-z; + offsets[7] = 2*y+z; Actor p; - for ( int i=0; i<6; i++ ) + for ( int i=0; i<8; i++ ) { - p = Spawn("FlakChunk",origin); + p = Spawn("FlakChunk",level.Vec3Offset(origin,offsets[i])); a = FRandom[Flak](0,360); - s = FRandom[Flak](0,0.2); + s = FRandom[Flak](0,0.1); Vector3 dir = (x+y*cos(a)*s+z*sin(a)*s).unit(); p.angle = atan2(dir.y,dir.x); p.pitch = -asin(dir.z); - p.vel = (cos(p.angle)*cos(p.pitch),sin(p.angle)*cos(p.pitch),-sin(p.pitch))*p.speed; + p.vel = (cos(p.angle)*cos(p.pitch),sin(p.angle)*cos(p.pitch),-sin(p.pitch))*(p.speed+FRandom[Flak](-3,3)); p.target = self; } int numpt = Random[Flak](20,30); diff --git a/zscript/minigun.zsc b/zscript/minigun.zsc index 35b6110..f58e761 100644 --- a/zscript/minigun.zsc +++ b/zscript/minigun.zsc @@ -151,7 +151,7 @@ Class Minigun : UTWeapon t.pitch = asin(-dir.z); MinigunTracer(t).dest = d.HitLocation; } - for ( int i=0; i<4; i++ ) + for ( int i=0; i<2; i++ ) { let s = Spawn("UTViewSmoke",origin); UTViewSmoke(s).ofs = (10,2,-2); @@ -162,7 +162,7 @@ Class Minigun : UTWeapon } origin += x*8.0+y*5.0-z*5.0; let c = Spawn("UTCasing",origin); - c.vel = x*FRandom[Junk](-2,2)+y*FRandom[Junk](3,6)+z*FRandom[Junk](3,5); + c.vel = x*FRandom[Junk](-1.5,1.5)+y*FRandom[Junk](2,4)+z*FRandom[Junk](2,3); c.Scale *= 0.5; } diff --git a/zscript/powerups.zsc b/zscript/powerups.zsc index d6518a8..0180e57 100644 --- a/zscript/powerups.zsc +++ b/zscript/powerups.zsc @@ -78,7 +78,7 @@ Class DamageAmplifier : Powerup override void EndEffect() { Super.EndEffect(); - PrintPickupMessage(true,"Damage Amplifier has worn off."); + if ( EffectTics <= 0 ) PrintPickupMessage(true,"Damage Amplifier has worn off."); } override bool isBlinking() @@ -217,7 +217,7 @@ Class PowerUTInvisibility : PowerInvisibility override void EndEffect() { Super.EndEffect(); - PrintPickupMessage(true,"Invisibility has worn off."); + if ( EffectTics <= 0 ) PrintPickupMessage(true,"Invisibility has worn off."); } } diff --git a/zscript/pulsegun.zsc b/zscript/pulsegun.zsc index 78add62..16db2db 100644 --- a/zscript/pulsegun.zsc +++ b/zscript/pulsegun.zsc @@ -170,7 +170,7 @@ Class PulseBall : Actor +SKYEXPLODE; +FORCEXYBILLBOARD; Scale 0.19; - Speed 29; + Speed 22; Radius 2; Height 2; } diff --git a/zscript/ripper.zsc b/zscript/ripper.zsc index a33dcd2..1ff11a5 100644 --- a/zscript/ripper.zsc +++ b/zscript/ripper.zsc @@ -56,7 +56,7 @@ Class Razor2 : Actor { Radius 2; Height 2; - Speed 27; + Speed 25; DamageFunction (Random[Ripper](20,25)*((DamageType=='Decapitated')?3:1.0)); DamageType 'Shredded'; Obituary "%k ripped a chunk of meat out of %o with the Ripper."; diff --git a/zscript/shockrifle.zsc b/zscript/shockrifle.zsc index 1247e97..e931e46 100644 --- a/zscript/shockrifle.zsc +++ b/zscript/shockrifle.zsc @@ -934,7 +934,7 @@ Class SuperShockBall : Actor Radius 2; Height 2; Scale 0.5; - Speed 25; + Speed 24; PROJECTILE; +FORCEXYBILLBOARD; +SKYEXPLODE; diff --git a/zscript/sniperrifle.zsc b/zscript/sniperrifle.zsc index 34c2185..77c1e5c 100644 --- a/zscript/sniperrifle.zsc +++ b/zscript/sniperrifle.zsc @@ -154,7 +154,7 @@ Class SniperRifle : UTWeapon origin += x*8.0+y*6.0-z*9.0; let c = Spawn("UTCasing",origin); c.scale *= 1.25; - c.vel = x*FRandom[Junk](-2,2)+y*FRandom[Junk](3,6)+z*FRandom[Junk](3,5); + c.vel = x*FRandom[Junk](-1.5,1.5)+y*FRandom[Junk](2,4)+z*FRandom[Junk](2,3); } override String GetObituary( Actor victim, Actor inflictor, Name mod, bool playerattack ) { diff --git a/zscript/translocator.zsc b/zscript/translocator.zsc index 2f61cc8..8b40114 100644 --- a/zscript/translocator.zsc +++ b/zscript/translocator.zsc @@ -121,7 +121,7 @@ Class TranslocatorModule : Actor { Radius 2; Height 2; - Speed 25; + Speed 16; PROJECTILE; -NOGRAVITY; +USEBOUNCESTATE; @@ -133,6 +133,7 @@ Class TranslocatorModule : Actor BounceType "Hexen"; BounceFactor 0.3; WallBounceFactor 0.3; + Gravity 0.35; } override void PostBeginPlay() diff --git a/zscript/utcommon.zsc b/zscript/utcommon.zsc index d69e941..dcba223 100644 --- a/zscript/utcommon.zsc +++ b/zscript/utcommon.zsc @@ -853,7 +853,7 @@ Class UTSpark : Actor +DONTSPLASH; BounceType "Doom"; BounceFactor 0.4; - Gravity 0.5; + Gravity 0.2; Scale 0.05; } override void Tick() @@ -927,7 +927,7 @@ Class UTChip : Actor +INTERPOLATEANGLES; BounceType "Doom"; BounceFactor 0.3; - Gravity 0.7; + Gravity 0.35; Scale 0.2; } override void PostBeginPlay() @@ -1570,7 +1570,7 @@ Class UTMainHandler : StaticEventHandler { if ( (level.GetChecksum() ~== "FBC3B6622A8B74AE06DE01E70007AC33") || (level.GetChecksum() ~== "D8206A3414DA967F2159473B5791139E") ) { - level.ReplaceTextures("-noflat-","DefTex",0); + TexMan.ReplaceTextures("-noflat-","DefTex",0); TextureID skytx = TexMan.CheckForTexture("BlueSky",TexMan.Type_Any); level.ChangeSky(skytx,skytx); } @@ -1580,7 +1580,7 @@ Class UTMainHandler : StaticEventHandler if ( level.GetChecksum() ~== "FBC3B6622A8B74AE06DE01E70007AC33" ) { TextureID deftex = TexMan.CheckForTexture("-noflat-",TexMan.Type_Any); - TextureID skytx = TexMan.CheckForTexture("BlueSky",TexMan.Type_Any); + TextureID skytx = TexMan.CheckForTexture("KGDaySky",TexMan.Type_Any); TextureID baseflor = TexMan.CheckForTexture("rClfFlr0",TexMan.Type_Any); TextureID baseceil = TexMan.CheckForTexture("rClfBas0",TexMan.Type_Any); TextureID basewall = TexMan.CheckForTexture("uAlnWl2b",TexMan.Type_Any); @@ -1589,7 +1589,7 @@ Class UTMainHandler : StaticEventHandler level.ChangeSky(skytx,skytx); for ( int i=0; i 0 ) { vel *= 0.98; - if ( vel.length() < 12 ) vel += vel.unit(); + if ( vel.length() < 6 ) vel += vel.unit()*0.35; } - else if ( vel.length() < 40 ) vel += vel.unit(); + else if ( vel.length() < 20 ) vel += vel.unit()*0.35; } } action void A_Trail()