diff --git a/Readme.md b/Readme.md index 530f2e6..6df7f86 100644 --- a/Readme.md +++ b/Readme.md @@ -49,12 +49,15 @@ This mod requires GZDoom 3.4.0 or later. - Make biorifle sludge follow ceiling and wall movement (this might be hard) - Add some more effects - Additional particle effects on explosions - - Smoke on spent casings + - Smoke on spent casings [DONE] + - View-space particles for weapon fire [WIP] - Visual recoil affecting aim (time to recycle SM's A_Swing once again) - Additional model optimization and cleanup - Trim out unused animations (this one is going to be very time-consuming) - Unify some texture groups (umodel does some weird thing where it separates - unlit polys into a new group, even when they're not supposed to be) + unlit polys into a new group, even when they're not supposed to be, this + can be seen in the shock rifle hud model) (unlit polys are kind of + unnecessary in gzdoom since there's brightmaps) - Trim out garbage triangles (e.g.: an extra triangle in the biorifle that has no reason to exist (can be seen when using invisibility, looks completely out of place there) diff --git a/modeldef.eightball b/modeldef.eightball index f07c614..234385a 100644 --- a/modeldef.eightball +++ b/modeldef.eightball @@ -74,10 +74,10 @@ Model "UTRocketLauncher" SurfaceSkin 0 2 "Eight_t3.png" SurfaceSkin 0 3 "Eight_t4.png" SurfaceSkin 0 4 "miniammoledbase.png" - Scale -0.24 0.12 0.24 - Offset 2.0 -12.0 -10.5 - AngleOffset 90 - RollOffset -3 + Scale -0.2 0.22 0.2 + Offset 3.4 -9.2 -8.5 + AngleOffset 94 + RollOffset -2 // Select FrameIndex EBLS A 0 0 diff --git a/modeldef.enforcer b/modeldef.enforcer index fa2d7a9..4164b1d 100644 --- a/modeldef.enforcer +++ b/modeldef.enforcer @@ -72,22 +72,22 @@ Model "Enforcer" AngleOffset 90 PitchOffset 90 Scale 0.04 0.04 0.04 - Offset 10.4 -25.0 -2.9 + Offset 12.4 -30.0 -2.9 FrameIndex EMUZ A 3 0 Scale 0.04 0.04 0.04 - Offset 1.9 -25.0 -9.3 + Offset 2.4 -30.0 -10.9 FrameIndex EMUZ B 3 0 Scale 0.04 0.04 0.04 - Offset -10.4 -25.0 -2.9 + Offset -12.4 -30.0 -2.9 FrameIndex EMUZ C 3 0 Scale 0.04 0.04 0.04 - Offset -1.9 -25.0 -9.3 + Offset -2.4 -30.0 -10.9 FrameIndex EMUZ D 3 0 } @@ -101,7 +101,7 @@ Model "Enforcer" SurfaceSkin 0 2 "Jtutot3.png" SurfaceSkin 0 3 "Jtutot4.png" Scale 0.14 -0.08 0.12 - Offset 8.6 -12.8 -13.5 + Offset 8.6 -14.8 -13.5 AngleOffset 90 // Fire @@ -248,7 +248,7 @@ Model "Enforcer" SurfaceSkin 2 2 "Jtutot3.png" SurfaceSkin 2 3 "Jtutot4.png" Scale 0.14 -0.08 0.12 - Offset -8.8 -12.8 -13.5 + Offset -8.8 -14.8 -13.5 AngleOffset 90 // Fire diff --git a/modeldef.flak b/modeldef.flak index ff17429..2cd675d 100644 --- a/modeldef.flak +++ b/modeldef.flak @@ -205,7 +205,7 @@ Model "FlakCannon" AngleOffset 90 PitchOffset 90 Scale 0.08 0.08 0.08 - Offset 7.4 -25.0 -8.5 + Offset 8.0 -25.0 -8.5 FrameIndex FMUZ A 2 0 } @@ -223,7 +223,7 @@ Model "FlakCannon" PitchOffset 180 RollOffset 178 Scale 0.28 -0.14 0.28 - Offset 8.6 -10.4 -13.8 + Offset 9.4 -10.3 -12.9 // select FrameIndex FLKS A 0 0 diff --git a/modeldef.ges b/modeldef.ges index 4223f5d..70af1f1 100644 --- a/modeldef.ges +++ b/modeldef.ges @@ -251,10 +251,10 @@ Model "BioRifle" SurfaceSkin 0 1 "JBRifle22.png" SurfaceSkin 0 2 "JBRifle23.png" SurfaceSkin 0 3 "JBRifle24.png" - AngleOffset 94.21875 - RollOffset 8.4375 - Scale 0.125 -0.06 0.125 - Offset 10.1 -17.8 -9.8 + AngleOffset 90 + RollOffset 10 + Scale 0.12 -0.08 0.12 + Offset 9.8 -19.8 -10.8 // select FrameIndex BIOS A 0 0 diff --git a/modeldef.impact b/modeldef.impact index d0c67a8..5c19503 100644 --- a/modeldef.impact +++ b/modeldef.impact @@ -23,10 +23,10 @@ Model "ImpactHammer" SurfaceSkin 0 1 "JImpactHammer2.png" SurfaceSkin 0 2 "JImpactHammer3.png" SurfaceSkin 0 3 "JImpactHammer4.png" - AngleOffset 90 - RollOffset -85 + AngleOffset 93 + RollOffset -81 Scale 0.1 -0.05 0.1 - Offset 4.8 -11.8 -6.7 + Offset 6.2 -14.9 -7.2 // select FrameIndex IMPS A 0 0 diff --git a/modeldef.minigun b/modeldef.minigun index ab51339..eec64ee 100644 --- a/modeldef.minigun +++ b/modeldef.minigun @@ -44,7 +44,7 @@ Model "Minigun" Path "models" Model 2 "Flat_d.3d" Scale 0.08 0.08 0.08 - Offset 5.0 -32.0 -8.0 + Offset 6.3 -40.0 -8.2 AngleOffset 90 PitchOffset 90 @@ -77,8 +77,8 @@ Model "Minigun" SurfaceSkin 0 2 "Mini_t3.png" SurfaceSkin 0 3 "Mini_t4.png" SurfaceSkin 0 4 "miniammoledbase.png" - Scale 0.12 -0.06 0.12 - Offset 0.0 -15.5 -12.8 + Scale 0.12 -0.08 0.12 + Offset 1.8 -19.9 -13.8 AngleOffset 90 // Select diff --git a/modeldef.pulse b/modeldef.pulse index c8e14df..d8c0ff0 100644 --- a/modeldef.pulse +++ b/modeldef.pulse @@ -78,7 +78,7 @@ Model "PulseGun" AngleOffset 90 PitchOffset 90 Scale 0.08 0.08 0.08 - Offset 8.5 -25.0 -3.5 + Offset 8.0 -25.0 -5.5 FrameIndex PMUZ A 2 0 } @@ -91,8 +91,8 @@ Model "PulseGun" SurfaceSkin 0 1 "JPulseGun_02.png" SurfaceSkin 0 2 "JPulseGun_03.png" AngleOffset 90 - Scale 0.26 -0.195 0.26 - Offset 0.0 -7.5 -7.0 + Scale 0.26 -0.28 0.28 + Offset 0.0 -7.5 -10.4 // Select FrameIndex PGNS A 0 2 diff --git a/modeldef.rifle b/modeldef.rifle index 1cc3e08..1eb964d 100644 --- a/modeldef.rifle +++ b/modeldef.rifle @@ -43,7 +43,7 @@ Model "SniperRifle" AngleOffset 90 PitchOffset 90 Scale 0.12 0.12 0.12 - Offset 6.0 -40.0 -6.0 + Offset 6.0 -50.0 -4.8 FrameIndex SMUZ A 2 0 } @@ -57,9 +57,10 @@ Model "SniperRifle" SurfaceSkin 0 2 "Rifle2c.png" SurfaceSkin 0 3 "Rifle2d.png" Scale 0.32 -0.16 0.32 - Offset 7.5 -23.0 -7.0 - AngleOffset 90 - PitchOffset -5 // doesn't look right otherwise + Offset 7.1 -23.9 -6.8 + AngleOffset 92 + RollOffset 2 + PitchOffset -5 // Select FrameIndex SRFS A 0 0 diff --git a/modeldef.ripper b/modeldef.ripper index 601bad3..49a7aae 100644 --- a/modeldef.ripper +++ b/modeldef.ripper @@ -77,9 +77,10 @@ Model "Ripper2" SurfaceSkin 0 2 "JRazor4.png" SurfaceSkin 0 3 "JRazor5.png" SurfaceSkin 0 4 "JRazor3.png" - Scale 0.16 -0.08 0.16 - Offset 6.4 -9.8 -8.4 - AngleOffset 90 + Scale 0.16 -0.1 0.16 + Offset 5.2 -9.6 -7.6 + AngleOffset 88 + RollOffset 2 // Select FrameIndex RZRS A 0 0 diff --git a/modeldef.shock b/modeldef.shock index 821d553..764ed80 100644 --- a/modeldef.shock +++ b/modeldef.shock @@ -158,8 +158,9 @@ Model "ShockRifle" SurfaceSkin 0 3 "asmd_t3.png" SurfaceSkin 0 4 "asmd_t4.png" AngleOffset 90 + RollOffset 3 // subtly hide an ugly looking part of the model Scale 0.15 -0.12 0.15 - Offset 3.9 -17.6 -6.1 + Offset 5.1 -18.4 -5.2 // select FrameIndex ASMS A 0 0 @@ -245,8 +246,9 @@ Model "EnhancedShockRifle" SurfaceSkin 0 3 "sasmd_t3.png" SurfaceSkin 0 4 "sasmd_t4.png" AngleOffset 90 + RollOffset 3 // subtly hide an ugly looking part of the model Scale 0.15 -0.12 0.15 - Offset 3.9 -17.6 -6.1 + Offset 5.1 -18.4 -5.2 // select FrameIndex ASMS A 0 0 diff --git a/modeldef.transloc b/modeldef.transloc index a4f09d6..7200af8 100644 --- a/modeldef.transloc +++ b/modeldef.transloc @@ -37,11 +37,11 @@ Model "Translocator" SurfaceSkin 0 1 "tloc2.png" SurfaceSkin 0 2 "tloc3.png" SurfaceSkin 0 3 "tloc4.png" - Scale 0.11 -0.055 0.11 - Offset -19.8 -22.8 -31.2 + Scale 0.11 -0.055 0.1 + Offset -17.4 -20.8 -30.2 AngleOffset -95 PitchOffset 5 - RollOffset -5 + RollOffset -12 // select FrameIndex TLCS A 0 18 diff --git a/modeldef.warhead b/modeldef.warhead index 7f5e670..903226a 100644 --- a/modeldef.warhead +++ b/modeldef.warhead @@ -72,11 +72,13 @@ Model "WarheadLauncher" SurfaceSkin 0 1 "jwarhead2.png" SurfaceSkin 0 2 "jwarhead3.png" SurfaceSkin 0 3 "jwarhead4.png" - Scale 0.2 -0.1 0.2 - AngleOffset 90 - PitchOffset 35.0 - RollOffset -85.0 - Offset 5.8 -13.6 -5.2 + Scale 0.2 -0.18 0.2 + AngleOffset 89 + PitchOffset 30 + RollOffset -82 + Offset 4.4 -18.1 -4.8 + // Offsets and rotations are still not like in UT because really, I can't get over that damn hole in the right tube + // I should patch that up someday when I write the .3d editor // select FrameIndex WARS A 0 0 diff --git a/zscript/biorifle.zsc b/zscript/biorifle.zsc index 0e6b593..97114bc 100644 --- a/zscript/biorifle.zsc +++ b/zscript/biorifle.zsc @@ -180,6 +180,7 @@ Class BioGel : Actor Line atline; int atside; int rollvel, pitchvel, yawvel; + Vector3 normal; override void PostBeginPlay() { @@ -250,7 +251,6 @@ Class BioGel : Actor SetStateLabel("XDeath"); return; } - Vector3 normal = (0,0,0); FLineTraceData d; A_SetSize(0.1,0); if ( BlockingLine ) @@ -310,7 +310,7 @@ Class BioGel : Actor } action void A_DropDrip() { - let d = Spawn("BioSplash",pos+cursector.ceilingplane.Normal*2*scale.x); + let d = Spawn("BioSplash",pos+invoker.normal*2*scale.x); d.target = target; d.angle = angle; d.pitch = pitch; @@ -338,6 +338,17 @@ Class BioGel : Actor let s = Spawn("BioSpark",pos); s.vel = pvel; } + numpt = Min(100,Scale.x*10)+Random[GES](-4,4); + for ( int i=0; i1)?12:0); + 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.target = self; @@ -332,11 +332,11 @@ Class UTRocketLauncher : UTWeapon // rockets ("tight wad" as UT calls it) double step = 360/num; a = 90; - s = num?1.2:0.0; + s = (num>1)?6:0; for ( int i=0; i 300 ) A_FadeOut(0.05); return; } + heat -= 0.02; + if ( heat <= 0 ) return; + let s = Spawn("UTSmallSmoke",pos); + s.alpha *= heat; } States { @@ -296,8 +303,8 @@ Class Enforcer : UTWeapon replaces Pistol [x, y, z] = Matrix4.GetAxes(pitch,angle,roll); Vector3 origin = pos+(0,0,player.viewheight)+10.0*x; int ydir = slave?-1:1; - if ( alt ) origin = origin-z*9.0+ydir*y*1.0; - else origin = origin-z*2.0+ydir*y*6.0; + if ( alt ) origin = origin-z*3.0+ydir*y*1.0; + else origin = origin-z*1.0+ydir*y*4.0; double a = FRandom[Enforcer](0,360), s = FRandom[Enforcer](0,alt?0.08:0.004); [x2, y2, z2] = Matrix4.GetAxes(BulletSlope(),angle,roll); Vector3 dir = (x2+y2*cos(a)*s+z2*sin(a)*s).unit(); @@ -334,6 +341,13 @@ Class Enforcer : UTWeapon replaces Pistol p.pitch = asin(-hitnormal.z); if ( d.HitLine ) d.HitLine.RemoteActivate(self,d.LineSide,SPAC_Impact,d.HitLocation); } + for ( int i=0; i<8; i++ ) + { + let s = Spawn("UTViewSmoke",origin); + if ( alt ) UTViewSmoke(s).ofs = (10,ydir,-3); + else UTViewSmoke(s).ofs = (10,4*ydir,-1); + s.target = self; + } 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); diff --git a/zscript/minigun.zsc b/zscript/minigun.zsc index 208c750..8e3b987 100644 --- a/zscript/minigun.zsc +++ b/zscript/minigun.zsc @@ -114,7 +114,7 @@ Class Minigun : UTWeapon if ( !alt ) MinigunLight(l).cnt--; Vector3 x, y, z, x2, y2, z2; [x, y, z] = Matrix4.GetAxes(pitch,angle,roll); - Vector3 origin = pos+(0,0,player.viewheight)+10.0*x+y*4.0-z*6.0; + Vector3 origin = pos+(0,0,player.viewheight)+10.0*x+y*4.0-z*4.0; double a = FRandom[Minigun](0,360), s = FRandom[Minigun](0,alt?0.05:0.02); [x2, y2, z2] = Matrix4.GetAxes(BulletSlope(),angle,roll); Vector3 dir = (x2+y2*cos(a)*s+z2*sin(a)*s).unit(); @@ -160,7 +160,7 @@ Class Minigun : UTWeapon t.pitch = asin(-dir.z); MinigunTracer(t).dest = d.HitLocation; } - origin += x*8.0+y*4.0-z*2.0; + 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.Scale *= 0.5; diff --git a/zscript/pulsegun.zsc b/zscript/pulsegun.zsc index 0867cf1..778d99e 100644 --- a/zscript/pulsegun.zsc +++ b/zscript/pulsegun.zsc @@ -442,7 +442,7 @@ Class StarterBolt : PulseBolt if ( target.player ) { [x, y, z] = Matrix4.GetAxes(target.pitch,target.angle,target.roll); - origin = target.Vec2OffsetZ(0,0,target.player.viewz)+5.0*x+3.0*y-1.0*z; + origin = target.Vec2OffsetZ(0,0,target.player.viewz)+10.0*x+4.1*y-2.7*z; } else origin = target.Vec3Offset(0,0,target.missileheight); SetOrigin(origin,true); @@ -488,7 +488,7 @@ Class PulseGun : UTWeapon A_AlertMonsters(); Vector3 x, y, z; [x, y, z] = Matrix4.GetAxes(pitch,angle,roll); - Vector3 origin = Vec2OffsetZ(0,0,player.viewz)+10.0*x+4.5*y-1.9*z; + Vector3 origin = Vec2OffsetZ(0,0,player.viewz)+10.0*x+4.1*y-2.7*z; int numpt = Random[Pulse](2,5); for ( int i=0; i 0 ) Destroy(); + } +} + Class UTRedSkull : RedSkull replaces RedSkull { Default diff --git a/zscript/warheadlauncher.zsc b/zscript/warheadlauncher.zsc index 6a058cb..fbe3e22 100644 --- a/zscript/warheadlauncher.zsc +++ b/zscript/warheadlauncher.zsc @@ -25,7 +25,7 @@ Class ShockWave : Actor double shocksize, olddmgradius; double lifespan; int icount; - ThinkerIterator t; + transient ThinkerIterator t; Default { Obituary "%o was vaporized by %k's Redeemer!!"; @@ -43,13 +43,13 @@ Class ShockWave : Actor lifespan = ReactionTime; A_PlaySound("warhead/explode",CHAN_VOICE,attenuation:ATTN_NONE); A_QuakeEx(9,9,9,100,0,12000,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.5); - t = ThinkerIterator.Create("Actor"); } override void Tick() { Super.Tick(); if ( globalfreeze || level.frozen ) return; if ( alpha <= 0 ) return; + if ( !t ) t = ThinkerIterator.Create("Actor"); icount++; if ( icount == 4 ) Spawn("WarheadSubExplosion",pos); lifespan--;