diff --git a/Readme.md b/Readme.md index 47e20c7..9b23821 100644 --- a/Readme.md +++ b/Readme.md @@ -41,17 +41,13 @@ This mod requires GZDoom 3.4.0 or later. - Minigun (slot 7) - Sniper Rifle (slot 0) - Rocket Launcher (slot 9) + - "Instant Rocket" mode toggleable with reload - Scaling/Customization options for the HUD ## In progress - General polishing and bugfixing - Add some more effects - - Additional particle effects on explosions - - Smoke on spent casings [DONE] - - View-space particles for weapon fire [WIP] - - Done: Enforcer, Biorifle - - Remaining: Shock Rifle, Pulsegun, Minigun, Flak Cannon, Rocket Launcher, Sniper rifle, Chainsaw - Visual recoil affecting aim (time to recycle SM's A_Swing once again) - Lava/Slime footstep sounds? - Additional model optimization and cleanup @@ -69,6 +65,7 @@ This mod requires GZDoom 3.4.0 or later. - Add ammo counters to Pulsegun, Minigun, Flak Cannon and Rocket Launcher once scripted textures are implemented. + - Add player models + weapon attachment support when that is also added in. ## Known bugs @@ -76,4 +73,5 @@ This mod requires GZDoom 3.4.0 or later. enforcer is reloading. No idea what causes this (Could be bobbing-related) - Pulse gun beams behave oddly when the player is moving or looking up and down. This might just be a rendering interpolation glitch, as usual - - Translocator allows telefragging of other players in coop. + - Translocator allows telefragging of other players in coop + - Biorifle sludge doesn't handle 3d floors (especially sloped ones) properly diff --git a/modeldef.minigun b/modeldef.minigun index eec64ee..17fa83c 100644 --- a/modeldef.minigun +++ b/modeldef.minigun @@ -16,6 +16,7 @@ Model "MinigunTracer" Model 0 "MiniTrace_d.3d" Skin 0 "JUT_Tracer_01.png" Scale 0.6 0.2 0.24 + Offset 60 0 0 USEACTORPITCH USEACTORROLL DONTCULLBACKFACES diff --git a/modeldef.ripper b/modeldef.ripper index 49a7aae..a6419bb 100644 --- a/modeldef.ripper +++ b/modeldef.ripper @@ -77,8 +77,8 @@ Model "Ripper2" SurfaceSkin 0 2 "JRazor4.png" SurfaceSkin 0 3 "JRazor5.png" SurfaceSkin 0 4 "JRazor3.png" - Scale 0.16 -0.1 0.16 - Offset 5.2 -9.6 -7.6 + Scale 0.32 -0.2 0.32 + Offset 10.4 -19.2 -15.2 AngleOffset 88 RollOffset 2 diff --git a/zscript/armoritems.zsc b/zscript/armoritems.zsc index 5b48928..29d12da 100644 --- a/zscript/armoritems.zsc +++ b/zscript/armoritems.zsc @@ -8,6 +8,7 @@ Class UTArmor : Armor { +INVENTORY.AUTOACTIVATE; +INVENTORY.UNTOSSABLE; + +INVENTORY.KEEPDEPLETED; } override void AbsorbDamage( int damage, Name damageType, out int newdamage ) { @@ -21,18 +22,23 @@ Class UTArmor : Armor damage = newdamage; } if ( damage > 0 ) newdamage = ApplyDamageFactors(GetClass(),damageType,damage,damage); - if ( amount <= 0 ) Destroy(); } } Class UTArmorBonus : UTArmor replaces ArmorBonus { + override void AbsorbDamage( int damage, Name damageType, out int newdamage ) + { + absorb = Clamp(amount*2,25,75); + Super.AbsorbDamage(damage,damageType,newdamage); + } + Default { Tag "Armor Bonus"; +COUNTITEM; +INVENTORY.ALWAYSPICKUP; - Inventory.Amount 5; + Inventory.Amount 1; Inventory.MaxAmount 50; Inventory.InterHubAmount 50; UTArmor.ArmorAbsorption 25; @@ -98,12 +104,9 @@ Class UTShieldBelt : UTArmor replaces Megasphere Owner.A_PlaySound("belt/absorb",CHAN_7); UTMainHandler.DoFlash(Owner,Color(80,255,224,0),5); } + int oldamt = amount; Super.AbsorbDamage(damage,damageType,newdamage); - } - override void OnDestroy() - { - Super.OnDestroy(); - if ( amount <= 0 && Owner ) PrintPickupMessage(true,"The Shield Belt has depleted."); + if ( (oldamt > 0) && (amount <= 0) ) PrintPickupMessage(true,"The Shield Belt has depleted."); } override bool Use( bool pickup ) { diff --git a/zscript/chainsaw.zsc b/zscript/chainsaw.zsc index 7a45b18..0e02c55 100644 --- a/zscript/chainsaw.zsc +++ b/zscript/chainsaw.zsc @@ -137,6 +137,26 @@ Class UTChainsaw : UTWeapon A_PlaySound("chainsaw/lower",CHAN_6); Super.DetachFromOwner(); } + action void A_Vibrate( bool bAlt = false ) + { + A_AlertMonsters(); + if ( bAlt ) A_QuakeEx(1,1,1,3,0,1,"",QF_RELATIVE,rollIntensity:0.4); + else A_QuakeEx(0,0,0,2,0,1,"",QF_RELATIVE,rollIntensity:0.2); + if ( bAlt || Random[Chainsaw](0,2) ) return; + Vector3 x, y, z; + [x, y, z] = Matrix4.GetAxes(pitch,angle,roll); + Vector3 origin = (pos.x,pos.y,player.viewz)+5.0*x+1.0*y-3.0*z; + for ( int i=0; i<5; i++ ) + { + let s = Spawn("UTViewSmoke",origin); + UTViewSmoke(s).ofs = (5,1,-3); + s.scale *= 1.2; + s.alpha *= 0.2; + s.SetShade("202020"); + s.target = self; + UTViewSmoke(s).vvel += (0,-0.2,0); + } + } Default { Tag "Chainsaw"; @@ -161,26 +181,20 @@ Class UTChainsaw : UTWeapon Ready: CSWS ABCDEFGHIJLMNO 1 { + A_Vibrate(); A_WeaponReady(WRF_NOFIRE); - A_AlertMonsters(); - A_QuakeEx(1,1,1,2,0,1,"",QF_RELATIVE,rollIntensity:0.1); } Idle: CSWI A 0 A_PlaySound("chainsaw/idle",CHAN_6,looping:true); CSWI ABCDEFGHIJ 1 { - A_AlertMonsters(); + A_Vibrate(); A_WeaponReady(); - A_QuakeEx(1,1,1,2,0,1,"",QF_RELATIVE,rollIntensity:0.1); } Goto Idle+1; Fire: CSWJ A 1 A_PlaySound("chainsaw/fire",CHAN_6,looping:true); - CSWJ BCDEF 1 - { - A_AlertMonsters(); - A_QuakeEx(1,1,1,2,0,1,"",QF_RELATIVE,rollIntensity:0.1); - } + CSWJ BCDEF 1 A_Vibrate(); Hold: CSWJ G 1 A_SawHit(); CSWJ H 0 A_Refire(1); @@ -221,25 +235,13 @@ Class UTChainsaw : UTWeapon CSWJ S 1 A_SawHit(); CSWJ G 0 A_Refire("Hold"); Release: - CSWJ FEDCBA 1 - { - A_AlertMonsters(); - A_QuakeEx(1,1,1,2,0,1,"",QF_RELATIVE,rollIntensity:0.1); - } + CSWJ FEDCBA 1 A_Vibrate(); Goto Idle; AltFire: CSWA A 0 A_PlaySound("chainsaw/fire",CHAN_6); - CSWA ABCDEFG 2 - { - A_AlertMonsters(); - A_QuakeEx(2,2,2,3,0,1,"",QF_RELATIVE,rollIntensity:0.15); - } + CSWA ABCDEFG 2 A_Vibrate(true); CSWA H 2 A_SawSwipe(); - CSWA IJK 2 - { - A_AlertMonsters(); - A_QuakeEx(2,2,2,3,0,1,"",QF_RELATIVE,rollIntensity:0.15); - } + CSWA IJK 2 A_Vibrate(true); CSWA K 0 A_PlaySound("chainsaw/idle",CHAN_6,looping:true); Goto Ready; Deselect: diff --git a/zscript/eightball.zsc b/zscript/eightball.zsc index 2620dbe..a36a351 100644 --- a/zscript/eightball.zsc +++ b/zscript/eightball.zsc @@ -149,12 +149,13 @@ Class UTRocket : Actor let s = Spawn("UTSpark",pos); s.vel = pvel; } - numpt = Random[Eightball](25,50); + numpt = Random[Eightball](35,70); for ( int i=0; i 42 ) { @@ -434,16 +445,25 @@ Class UTRocketLauncher : UTWeapon } } Wait; + Reload: + EBLI A 5 + { + A_PlaySound("utrl/load",CHAN_6,0.3); + if ( invoker.bSingleRocket = !invoker.bSingleRocket ) A_Print("Instant Rocket mode enabled"); + else A_Print("Instant Rocket mode disabled"); + } + Goto Idle; Fire: AltFire: // one is loaded already - EBLI A 3 A_LoadRocket(false); + EBLI A 1 A_LoadRocket(false); + EBLI A 2 A_JumpIf(!invoker.bAltFire&&invoker.bSingleRocket,"FireOne"); EBLI A 0 A_LoadedRefire(1); Goto FireOne; // load two EBLI A 2; EBL1 A 0; - EBR1 A 2 A_PlaySound("utrl/rotate",CHAN_WEAPON,0.1); + EBR1 A 2 A_PlaySound("utrl/rotate",CHAN_6,0.1); EBR1 B 0 A_Refire(1); Goto FireOne; EBR1 B 2; @@ -464,7 +484,7 @@ Class UTRocketLauncher : UTWeapon EBR1 G 2; EBL2 A 0 A_Refire(1); Goto FireOne; - EBL2 A 3 A_PlaySound("utrl/load",CHAN_WEAPON); + EBL2 A 3 A_PlaySound("utrl/load",CHAN_6); EBL2 B 0 A_Refire(1); Goto FireOne; EBL2 B 3; @@ -486,7 +506,7 @@ Class UTRocketLauncher : UTWeapon EBR2 A 0 A_LoadedRefire(1); Goto FireTwo; // load three - EBR2 A 2 A_PlaySound("utrl/rotate",CHAN_WEAPON,0.1); + EBR2 A 2 A_PlaySound("utrl/rotate",CHAN_6,0.1); EBR2 B 0 A_Refire(1); Goto FireTwo; EBR2 B 2; @@ -507,7 +527,7 @@ Class UTRocketLauncher : UTWeapon EBR2 G 2; EBL3 A 0 A_Refire(1); Goto FireTwo; - EBL3 A 3 A_PlaySound("utrl/load",CHAN_WEAPON); + EBL3 A 3 A_PlaySound("utrl/load",CHAN_6); EBL3 B 0 A_Refire(1); Goto FireTwo; EBL3 B 3; @@ -529,7 +549,7 @@ Class UTRocketLauncher : UTWeapon EBR3 A 0 A_LoadedRefire(1); Goto FireThree; // load four - EBR3 A 2 A_PlaySound("utrl/rotate",CHAN_WEAPON,0.1); + EBR3 A 2 A_PlaySound("utrl/rotate",CHAN_6,0.1); EBR3 B 0 A_Refire(1); Goto FireThree; EBR3 B 2; @@ -550,7 +570,7 @@ Class UTRocketLauncher : UTWeapon EBR3 G 2; EBL4 A 0 A_Refire(1); Goto FireThree; - EBL4 A 3 A_PlaySound("utrl/load",CHAN_WEAPON); + EBL4 A 3 A_PlaySound("utrl/load",CHAN_6); EBL4 B 0 A_Refire(1); Goto FireThree; EBL4 B 3; @@ -572,7 +592,7 @@ Class UTRocketLauncher : UTWeapon EBR4 A 0 A_LoadedRefire(1); Goto FireFour; // load five - EBR4 A 2 A_PlaySound("utrl/rotate",CHAN_WEAPON,0.1); + EBR4 A 2 A_PlaySound("utrl/rotate",CHAN_6,0.1); EBR4 B 0 A_Refire(1); Goto FireFour; EBR4 B 2; @@ -593,7 +613,7 @@ Class UTRocketLauncher : UTWeapon EBR4 G 2; EBL5 A 0 A_Refire(1); Goto FireFour; - EBL5 A 3 A_PlaySound("utrl/load",CHAN_WEAPON); + EBL5 A 3 A_PlaySound("utrl/load",CHAN_6); EBL5 B 0 A_Refire(1); Goto FireFour; EBL5 B 3; @@ -615,7 +635,7 @@ Class UTRocketLauncher : UTWeapon EBR5 A 0 A_LoadedRefire(1); Goto FireFive; // load six - EBR5 A 2 A_PlaySound("utrl/rotate",CHAN_WEAPON,0.1); + EBR5 A 2 A_PlaySound("utrl/rotate",CHAN_6,0.1); EBR5 B 0 A_Refire(1); Goto FireFive; EBR5 B 2; @@ -636,7 +656,7 @@ Class UTRocketLauncher : UTWeapon EBR5 G 2; EBL6 A 0 A_Refire(1); Goto FireFive; - EBL6 A 3 A_PlaySound("utrl/load",CHAN_WEAPON); + EBL6 A 3 A_PlaySound("utrl/load",CHAN_6); EBL6 B 0 A_Refire(1); Goto FireFive; EBL6 B 3; @@ -657,43 +677,49 @@ Class UTRocketLauncher : UTWeapon EBF1 A 0 A_FireRockets(1); EBF1 ABCDEFGH 2; EBL1 A 0 A_CheckReload(); - EBL1 ABCDEFG 2; - EBLI A 8; + EBL1 A 2 A_PlaySound("utrl/load",CHAN_6); + EBL1 BCDEFG 2; + EBLI A 0; Goto Idle; FireTwo: EBF2 A 0 A_FireRockets(2); EBF2 ABCDEFGHIJK 2; EBL1 A 0 A_CheckReload(); - EBL1 ABCDEFG 2; - EBLI A 8; + EBL1 A 2 A_PlaySound("utrl/load",CHAN_6); + EBL1 BCDEFG 2; + EBLI A 0; Goto Idle; FireThree: EBF3 A 0 A_FireRockets(3); EBF3 ABCDEFGHIJ 2; EBL1 A 0 A_CheckReload(); - EBL1 ABCDEFG 2; - EBLI A 8; + EBL1 A 2 A_PlaySound("utrl/load",CHAN_6); + EBL1 BCDEFG 2; + EBLI A 0; Goto Idle; FireFour: EBF4 A 0 A_FireRockets(4); EBF4 ABCDEFGHIJK 2; EBL1 A 0 A_CheckReload(); - EBL1 ABCDEFG 2; - EBLI A 8; + EBL1 A 2 A_PlaySound("utrl/load",CHAN_6); + EBL1 BCDEFG 2; + EBLI A 0; Goto Idle; FireFive: EBF5 A 0 A_FireRockets(5); EBF5 ABCDEFGHIJKLM 2; EBL1 A 0 A_CheckReload(); - EBL1 ABCDEFG 2; - EBLI A 8; + EBL1 A 2 A_PlaySound("utrl/load",CHAN_6); + EBL1 BCDEFG 2; + EBLI A 0; Goto Idle; FireSix: EBF6 A 0 A_FireRockets(6); EBF6 ABCDEFGHIJKLMNOP 2; EBL1 A 0 A_CheckReload(); - EBL1 ABCDEFG 2; - EBLI A 8; + EBL1 A 2 A_PlaySound("utrl/load",CHAN_6); + EBL1 BCDEFG 2; + EBLI A 0; Goto Idle; Deselect: EBLD ABCDEFGHIJK 1; diff --git a/zscript/flakcannon.zsc b/zscript/flakcannon.zsc index 2f917d1..8e0723b 100644 --- a/zscript/flakcannon.zsc +++ b/zscript/flakcannon.zsc @@ -150,7 +150,7 @@ Class FlakChunk : Actor +BOUNCEAUTOOFFFLOORONLY; +CANBOUNCEWATER; +SKYEXPLODE; - Scale 0.5; + Scale 0.3; } override bool CanCollideWith( Actor other, bool passive ) { @@ -163,7 +163,7 @@ Class FlakChunk : Actor lifespeed = FRandom[Flak](0.004,0.008); trail = ChunkTrail(Spawn("ChunkTrail",pos)); trail.target = self; - trail.speed = 2; + trail.speed = 1.2; rollvel = FRandom[Flak](50,100)*RandomPick[Flak](-1,1); pitchvel = FRandom[Flak](50,100)*RandomPick[Flak](-1,1); yawvel = FRandom[Flak](50,100)*RandomPick[Flak](-1,1); @@ -415,12 +415,13 @@ Class FlakSlug : Actor let s = Spawn("UTSpark",pos); s.vel = pvel; } - numpt = Random[Flak](20,40); + numpt = Random[Flak](40,80); for ( int i=0; i 0) ) Destroy(); + } +} + Class UTChip : Actor { int deadtimer; @@ -635,6 +666,16 @@ Class UTViewSmoke : UTSmoke } } +Class UTStaticViewSmoke : UTViewSmoke +{ + override void PostBeginPlay() + { + Actor.PostBeginPlay(); + scale *= FRandom[Puff](0.1,0.3); + alpha *= FRandom[Puff](0.5,1.5); + } +} + Class UTRedSkull : RedSkull replaces RedSkull { Default