diff --git a/modeldef.enforcer b/modeldef.enforcer index 8e766b8..ef988a5 100644 --- a/modeldef.enforcer +++ b/modeldef.enforcer @@ -9,6 +9,21 @@ Model "EClip" FrameIndex ECLP A 0 0 } +Model "EnforcerMag" +{ + Path "models" + Model 0 "UsedMag_d.3d" + Skin 0 "jautot1_.png" + Scale 0.06 0.06 0.072 + ZOffset 1 + USEACTORPITCH + USEACTORROLL + USEROTATIONCENTER + Rotation-Center 0 0 1 + + FrameIndex PCAS A 0 0 +} + Model "UTCasing" { Path "models" @@ -20,7 +35,6 @@ Model "UTCasing" ZOffset 1 USEACTORPITCH USEACTORROLL - DONTCULLBACKFACES USEROTATIONCENTER Rotation-Center 0 0 1 diff --git a/modeldef.flak b/modeldef.flak index 26fb610..3670c4b 100644 --- a/modeldef.flak +++ b/modeldef.flak @@ -182,6 +182,22 @@ Model "FlakChunk" FrameIndex FCH4 L 3 0 } +Model "FlakMag" +{ + Path "models" + Model 0 "UsedFlak_d.3d" + Skin 0 "flak_t_.png" + Scale 0.15 0.3 0.36 + AngleOffset 90 + ZOffset 1 + USEACTORPITCH + USEACTORROLL + USEROTATIONCENTER + Rotation-Center 0 0 1 + + FrameIndex PCAS A 0 0 +} + Model "FlakCannon" { Path "models" diff --git a/modeldef.pulse b/modeldef.pulse index 830f162..9ccc8db 100644 --- a/modeldef.pulse +++ b/modeldef.pulse @@ -55,6 +55,21 @@ Model "StarterBolt" FrameIndex PBLT E 0 0 } +Model "PulseMag" +{ + Path "models" + Model 0 "UsedPulse_d.3d" + Skin 0 "JPulseGun_02.png" + Scale 0.2 0.2 0.24 + ZOffset 2 + USEACTORPITCH + USEACTORROLL + USEROTATIONCENTER + Rotation-Center 0 0 2 + + FrameIndex PCAS A 0 0 +} + Model "PulseGun" { Path "models" diff --git a/models/Flak_t_.png b/models/Flak_t_.png new file mode 100644 index 0000000..f57ee90 Binary files /dev/null and b/models/Flak_t_.png differ diff --git a/models/Jautot1_.png b/models/Jautot1_.png new file mode 100644 index 0000000..2a31b6b Binary files /dev/null and b/models/Jautot1_.png differ diff --git a/models/UsedFlak_a.3d b/models/UsedFlak_a.3d new file mode 100644 index 0000000..ba45f32 Binary files /dev/null and b/models/UsedFlak_a.3d differ diff --git a/models/UsedFlak_d.3d b/models/UsedFlak_d.3d new file mode 100644 index 0000000..6d974b7 Binary files /dev/null and b/models/UsedFlak_d.3d differ diff --git a/models/UsedMag_a.3d b/models/UsedMag_a.3d new file mode 100644 index 0000000..4971d64 Binary files /dev/null and b/models/UsedMag_a.3d differ diff --git a/models/UsedMag_d.3d b/models/UsedMag_d.3d new file mode 100644 index 0000000..ef289b7 Binary files /dev/null and b/models/UsedMag_d.3d differ diff --git a/models/UsedPulse_a.3d b/models/UsedPulse_a.3d new file mode 100644 index 0000000..d9c91d9 Binary files /dev/null and b/models/UsedPulse_a.3d differ diff --git a/models/UsedPulse_d.3d b/models/UsedPulse_d.3d new file mode 100644 index 0000000..39581e6 Binary files /dev/null and b/models/UsedPulse_d.3d differ diff --git a/sndinfo.txt b/sndinfo.txt index 231762c..6e2cdf0 100644 --- a/sndinfo.txt +++ b/sndinfo.txt @@ -166,9 +166,27 @@ $random ut/playerfootstep { ut/playerfootstep1 ut/playerfootstep2 ut/playerfoots ut/bossfootstep bfootstp +// fluid sounds + ut/playerfootstepwet lsplash ut/wetsplash dsplash ut/wetsurface wtrexit1 +ut/underwater uwater1a + +ut/playerfootstepslime dsslime1 +ut/slimesplash goopj1 +ut/slimesurface goope1 +ut/underslime ugoop1 + +ut/playerfootsteplava dslava1 +ut/lavasplash goopj1 +ut/lavasurface goope1 +ut/underlava ulava1 + +ut/playerfootstepnitro lsplash +ut/nitrosplash dsplash +ut/nitrosurface wtrexit1 +ut/undernitro ulnitro1 // everything else @@ -232,8 +250,12 @@ enforcer/select cocking enforcer/shoot e_shot enforcer/reload reload enforcer/click click +enforcer/bounce clipb +$volume enforcer/bounce 0.5 +$attenuation enforcer/bounce 3 bullet/casing shell2 +$attenuation bullet/casing 2 bullet/hit1 impact1 bullet/hit2 impact2 $random bullet/hit { bullet/hit1 bullet/hit2 } @@ -289,6 +311,9 @@ flak/bounce3 hit3 $random flak/bounce { flak/bounce1 flak/bounce2 flak/bounce3 } $limit flak/bounce 64 flak/explode expl04 +flak/sbounce chnkhit1 +$volume flak/sbounce 0.5 +$attenuation flak/sbounce 3 utrl/select selectin utrl/rotate barrelmv diff --git a/sounds/ChnkHit1.ogg b/sounds/ChnkHit1.ogg new file mode 100644 index 0000000..9642dff Binary files /dev/null and b/sounds/ChnkHit1.ogg differ diff --git a/sounds/GoopE1.ogg b/sounds/GoopE1.ogg new file mode 100644 index 0000000..e433d21 Binary files /dev/null and b/sounds/GoopE1.ogg differ diff --git a/sounds/GoopJ1.ogg b/sounds/GoopJ1.ogg new file mode 100644 index 0000000..3f09849 Binary files /dev/null and b/sounds/GoopJ1.ogg differ diff --git a/sounds/clipb.ogg b/sounds/clipb.ogg new file mode 100644 index 0000000..823980a Binary files /dev/null and b/sounds/clipb.ogg differ diff --git a/sounds/dslava1.ogg b/sounds/dslava1.ogg new file mode 100644 index 0000000..2cf61fb Binary files /dev/null and b/sounds/dslava1.ogg differ diff --git a/sounds/dsslime1.ogg b/sounds/dsslime1.ogg new file mode 100644 index 0000000..7a345b5 Binary files /dev/null and b/sounds/dsslime1.ogg differ diff --git a/sounds/uGoop1.ogg b/sounds/uGoop1.ogg new file mode 100644 index 0000000..8c3f109 Binary files /dev/null and b/sounds/uGoop1.ogg differ diff --git a/sounds/uLNitro1.ogg b/sounds/uLNitro1.ogg new file mode 100644 index 0000000..36e3b38 Binary files /dev/null and b/sounds/uLNitro1.ogg differ diff --git a/sounds/uLava1.ogg b/sounds/uLava1.ogg new file mode 100644 index 0000000..9a971d3 Binary files /dev/null and b/sounds/uLava1.ogg differ diff --git a/sounds/uWater1a.ogg b/sounds/uWater1a.ogg new file mode 100644 index 0000000..a72de5c Binary files /dev/null and b/sounds/uWater1a.ogg differ diff --git a/terrain.txt b/terrain.txt new file mode 100644 index 0000000..196f4f7 --- /dev/null +++ b/terrain.txt @@ -0,0 +1,155 @@ +// splish sploshes +splash utwater +{ + smallclass utwatersplish + smallclip 4 + smallsound ut/playerfootstepwet + + baseclass utwatersplash + sound ut/wetsplash +} + +splash utslime +{ + smallclass utslimesplish + smallclip 4 + smallsound ut/playerfootstepslime + + baseclass utslimesplash + sound ut/slimesplash } + +splash utnukage +{ + smallclass utnukagesplish + smallclip 4 + smallsound ut/playerfootstepslime + + baseclass utnukagesplash + sound ut/slimesplash +} + +splash utlava +{ + smallclass utlavasplish + smallclip 4 + smallsound ut/playerfootsteplava + + baseclass utlavasplash + sound ut/lavasplash +} + +splash utnitro +{ + smallclass utnitrosplish + smallclip 4 + smallsound ut/playerfootstepnitro + + baseclass utnitrosplash + sound ut/nitrosplash +} + +splash utblood +{ + smallclass utbloodsplish + smallclip 4 + smallsound ut/playerfootstepwet + + baseclass utbloodsplash + sound ut/wetsplash +} + +terrain utwater +{ + splash utwater + footclip 6 + liquid +} + +terrain utslime +{ + splash utslime + footclip 6 + liquid +} + +terrain utnukage +{ + splash utnukage + footclip 6 + liquid +} + +terrain utlava +{ + splash utlava + footclip 6 + liquid +} + +terrain utnitro +{ + splash utnitro + footclip 6 + liquid +} + +terrain utblood +{ + splash utblood + footclip 6 + liquid +} + +ifdoom +floor BLOOD1 UTBlood +floor BLOOD2 UTBlood +floor BLOOD3 UTBlood +floor FWATER1 UTWater +floor FWATER2 UTWater +floor FWATER3 UTWater +floor FWATER4 UTWater +floor LAVA1 UTLava +floor LAVA2 UTLava +floor LAVA3 UTLava +floor LAVA4 UTLava +floor NUKAGE1 UTNukage +floor NUKAGE2 UTNukage +floor NUKAGE3 UTNukage +floor SLIME01 UTSlime +floor SLIME02 UTSlime +floor SLIME03 UTSlime +floor SLIME04 UTSlime +floor SLIME05 UTSlime +floor SLIME06 UTSlime +floor SLIME07 UTSlime +floor SLIME08 UTSlime +endif + +ifheretic +floor FLTWAWA1 UTWater +floor FLTFLWW1 UTWater +floor FLTLAVA1 UTLava +floor FLATHUH1 UTLava +floor FLTSLUD1 UTSlime +endif + +ifhexen +floor X_005 UTWater +floor X_001 UTLava +floor X_009 UTSlime +endif + +ifstrife +floor F_WATR03 UTWater +floor F_WATR02 UTWater +floor F_WATR01 UTWater +floor F_VWATR3 UTWater +floor F_VWATR2 UTWater +floor P_VWATR1 UTWater +floor F_HWATR3 UTWater +floor F_HWATR2 UTWater +floor F_HWATR1 UTWater +floor F_PWATR3 UTWater +floor F_PWATR2 UTWater +floor F_PWATR1 UTWater +endif diff --git a/zscript/enforcer.zsc b/zscript/enforcer.zsc index ff5ff10..2c2eb57 100644 --- a/zscript/enforcer.zsc +++ b/zscript/enforcer.zsc @@ -167,12 +167,36 @@ Class UTCasing : Actor PCAS A -1 { pitch = 0; + angle = FRandom[Junk](0,360); roll = FRandom[Junk](0,360); } Stop; } } +Class EnforcerMag : UTCasing +{ + Default + { + BounceSound "enforcer/bounce"; + } + override void PostBeginPlay() + { + Super.PostBeginPlay(); + heat = 0.; + } + States + { + Death: + PCAS A -1 + { + pitch = RandomPick[Junk](-90,90); + angle = FRandom[Junk](0,360); + } + Stop; + } +} + Class Enforcer : UTWeapon { int ClipCount, SlaveClipCount; @@ -388,6 +412,8 @@ Class Enforcer : UTWeapon } origin = level.Vec3Offset(origin,x*8+ydir*y*6-z*2); let c = Spawn("UTCasing",origin); + c.angle = angle; + c.pitch = pitch; c.vel = x*FRandom[Junk](-1.5,1.5)+y*ydir*FRandom[Junk](2,4)+z*FRandom[Junk](2,3); } @@ -574,6 +600,13 @@ Class Enforcer : UTWeapon if ( self is 'UTPlayer' ) UTPlayer(self).PlayReloading(); invoker.slavereload = (invoker.slaveactive&&(invoker.slaveclipcount0)?90:-90; + angle = FRandom[Junk](0,360); + } + Stop; + } +} + Class PulseGun : UTWeapon { int clipcount; @@ -778,7 +803,17 @@ Class PulseGun : UTWeapon invoker.clipcount = 0; } PGNR QRSTUVWXYZ 1; - PGR2 ABCD 1; + PGR2 A 1 + { + Vector3 x, y, z, origin; + [x,y,z] = dt_CoordUtil.GetAxes(pitch,angle,roll); + origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),x*4.-y*6.-z*8.); + let c = Spawn("PulseMag",origin); + c.angle = angle; + c.pitch = pitch; + c.vel = vel*.5+x*FRandom[Junk](-.5,.5)+y*FRandom[Junk](-.5,.5)-z*FRandom[Junk](1,2); + } + PGR2 BCD 1; PGR2 E 1 { invoker.clipcount = Min(invoker.default.clipcount,invoker.Ammo1.Amount); diff --git a/zscript/sniperrifle.zsc b/zscript/sniperrifle.zsc index 057f32f..9140dc6 100644 --- a/zscript/sniperrifle.zsc +++ b/zscript/sniperrifle.zsc @@ -171,6 +171,8 @@ Class SniperRifle : UTWeapon origin = level.Vec3Offset(origin,x*8+y*6-z*9); let c = Spawn("UTCasing",origin); c.scale *= 1.25; + c.angle = angle; + c.pitch = pitch; 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/utcommon.zsc b/zscript/utcommon.zsc index 3f3dd06..b428d20 100644 --- a/zscript/utcommon.zsc +++ b/zscript/utcommon.zsc @@ -11,6 +11,7 @@ Class UTPlayer : DoomPlayer int last_fm_tap, last_sm_tap; int last_tap_fm, last_tap_sm; int last_jump_held; + Actor underwatersnd; int tempslide; double ssup; @@ -250,7 +251,7 @@ Class UTPlayer : DoomPlayer if ( lastvelz < -8 ) { double vol = clamp((-lastvelz-8)*0.05,0.01,1.0); - if ( ((waterlevel > 0) || GetFloorTerrain().IsLiquid) && !bOnMobj ) A_PlaySound("ut/wetsplash",CHAN_AUTO,vol); + if ( ((waterlevel > 0) || GetFloorTerrain().IsLiquid) && !bOnMobj ) PlaySplash(vol); else A_PlaySound("*uland",CHAN_AUTO,vol); PlayLanding(); } @@ -265,13 +266,20 @@ Class UTPlayer : DoomPlayer { double vol = abs(vel.xy.length())*0.03; if ( forcefootstep ) vol = clamp(-lastvelz*0.05,0.01,1.0); - if ( (waterlevel > 0) || GetFloorTerrain().IsLiquid && !bOnMobj ) A_PlaySound("ut/playerfootstepwet",CHAN_5,vol); + if ( (waterlevel > 0) || GetFloorTerrain().IsLiquid && !bOnMobj ) PlayWetFootstep(vol); else PlayFootstep(vol); } if ( (waterlevel >= 2) && (lastwaterlevel < 2) ) - A_PlaySound("ut/wetsplash",CHAN_AUTO); + PlaySplash(1.); else if ( (waterlevel < 2) && (lastwaterlevel >= 2) ) - A_PlaySound("ut/wetsurface",CHAN_AUTO); + PlaySurface(); + if ( (waterlevel >= 3) && !underwatersnd ) + { + underwatersnd = Spawn("UTUnderSound",pos); + underwatersnd.target = self; + } + else if ( (waterlevel < 3) && underwatersnd ) + underwatersnd.Destroy(); lastground = player.onground; lastvelz = prevvelz; prevvelz = vel.z; @@ -385,8 +393,17 @@ Class UTPlayer : DoomPlayer else Angle += cmd.yaw*(360./65536.); player.onground = (pos.z <= floorz) || bOnMobj || bMBFBouncer || (player.cheats & CF_NOCLIP2); // slant (aka steep slope) detection - // TODO make it 3d floor aware when the PR makes it in - if ( floorsector.floorplane.normal dot (0,0,1) < (46342./65536.) ) + Vector3 floornormal = floorsector.floorplane.normal; + for ( int i=0; i