diff --git a/sndinfo.txt b/sndinfo.txt index 98159f848..a0717f680 100644 --- a/sndinfo.txt +++ b/sndinfo.txt @@ -552,6 +552,7 @@ misc/teleport sounds/general/teleport.ogg misc/chat sounds/menu/chatsnd.ogg misc/chat2 sounds/menu/chatsnd.ogg misc/sundowner sounds/SUNDOWNER.ogg +misc/clonk sounds/CLONK.ogg misc/underwater sounds/general/uWater1a.ogg misc/underslime sounds/general/uGoop1.ogg diff --git a/sounds/CLONK.ogg b/sounds/CLONK.ogg new file mode 100644 index 000000000..bcfda9e66 Binary files /dev/null and b/sounds/CLONK.ogg differ diff --git a/sounds/spreadgun/spread_ball1.ogg b/sounds/spreadgun/spread_ball1.ogg index 49ed92575..a2e07cea7 100644 Binary files a/sounds/spreadgun/spread_ball1.ogg and b/sounds/spreadgun/spread_ball1.ogg differ diff --git a/sounds/spreadgun/spread_ball2.ogg b/sounds/spreadgun/spread_ball2.ogg index 928d33160..f7acba09b 100644 Binary files a/sounds/spreadgun/spread_ball2.ogg and b/sounds/spreadgun/spread_ball2.ogg differ diff --git a/sounds/spreadgun/spread_ball3.ogg b/sounds/spreadgun/spread_ball3.ogg index e4085aab2..fdb9f7b91 100644 Binary files a/sounds/spreadgun/spread_ball3.ogg and b/sounds/spreadgun/spread_ball3.ogg differ diff --git a/sounds/spreadgun/spread_ballf1.ogg b/sounds/spreadgun/spread_ballf1.ogg index ae2c3f278..9859baa60 100644 Binary files a/sounds/spreadgun/spread_ballf1.ogg and b/sounds/spreadgun/spread_ballf1.ogg differ diff --git a/sounds/spreadgun/spread_ballf2.ogg b/sounds/spreadgun/spread_ballf2.ogg index 2582af613..42cf70676 100644 Binary files a/sounds/spreadgun/spread_ballf2.ogg and b/sounds/spreadgun/spread_ballf2.ogg differ diff --git a/sounds/spreadgun/spread_ballf3.ogg b/sounds/spreadgun/spread_ballf3.ogg index a055fcee3..6d8740a15 100644 Binary files a/sounds/spreadgun/spread_ballf3.ogg and b/sounds/spreadgun/spread_ballf3.ogg differ diff --git a/zscript/swwm_shot.zsc b/zscript/swwm_shot.zsc index 0f4e47003..e66b90346 100644 --- a/zscript/swwm_shot.zsc +++ b/zscript/swwm_shot.zsc @@ -1266,36 +1266,58 @@ Class TheBall : Actor return 1; // check if we should rip or bounce // girthitude - double girth = (victim.radius+victim.height)/2.*max(50,victim.mass); + double girth = (victim.radius+victim.height)/2.*max(50,victim.mass)*(victim.health/double(victim.GetSpawnHealth())); // how hard this damn thing is going to slam double slamforce = vel.length()*350.+heat*120; - SWWMHandler.DoKnockback(victim,vel.unit(),slamforce); - bool bleeds = (victim && !victim.bINVULNERABLE && !victim.bNOBLOOD && victim.bSHOOTABLE); int dmg = int(vel.length()*4.2+heat*80); + bool is_schutt = victim.bSHOOTABLE; + // critical hit! + if ( is_schutt && !Random[Spreadgun](0,9) ) + { + Spawn("SWWMItemFog",pos); + A_StartSound("misc/clonk",CHAN_FOOTSTEP,CHANF_OVERLAP,1.,.2); + victim.A_QuakeEx(8,8,8,8,0,3000,"",QF_RELATIVE|QF_SCALEDOWN,falloff:300,rollIntensity:1.); + victim.A_StartSound("misc/clonk",CHAN_FOOTSTEP,CHANF_OVERLAP,1.,.2); + slamforce *= 4; + dmg *= 4; + vel *= 1.1; + let numpt = Random[Spreadgun](40,50); + for ( int i=0; i 15 ) + A_StartSound("spreadgun/ball",CHAN_VOICE,CHANF_OVERLAP,(vel.length()/30.)**.5); + victim.A_StartSound("spreadgun/ball",CHAN_FOOTSTEP,CHANF_OVERLAP,(vel.length()/30.)**.5); + if ( vel.length() > 15. ) { let s = Spawn("BallImpact",pos); s.angle = atan2(dir.y,dir.x); s.pitch = asin(-dir.z); } } - if ( slamforce > girth ) + // only rip shootables + if ( (slamforce > girth) && is_schutt ) { - vel *= .8; + vel *= .7; return 1; } // force bounce @@ -1379,11 +1401,13 @@ Class TheBall : Actor if ( !BlockingMobj.bINVULNERABLE && !BlockingMobj.bNOBLOOD ) bcefact *= .6; } - vel = bcefact*((vel dot HitNormal)*HitNormal*-1.2+vel); + vel = (vel dot HitNormal)*HitNormal*FRandom[Spreadgun](-1.8,-1.)+vel; + vel += (FRandom[Spreadgun](-.4,.4),FRandom[Spreadgun](-.4,.4),FRandom[Spreadgun](-.4,.4)); + vel *= bcefact; // slam jam if ( !BlockingMobj ) { - A_StartSound("spreadgun/ball",CHAN_VOICE,CHANF_OVERLAP,max(0.,(vel.length()/60.-.1))**.5); + A_StartSound("spreadgun/ball",CHAN_VOICE,CHANF_OVERLAP,max(0.,(vel.length()/30.-.2))**.5); if ( vel.length() > 15 ) { let s = Spawn("BallImpact",pos);