Rejoice, for buttslams now leave decals.

This commit is contained in:
Mari the Deer 2020-10-24 13:01:43 +02:00
commit 4083321ec5
4 changed files with 23 additions and 19 deletions

View file

@ -271,6 +271,17 @@ decal ImpactMark
y-scale 0.3
}
decal ButtMark
{
pic impcrack
translucent 0.85
shade "00 00 00"
randomflipx
randomflipy
x-scale 0.16
y-scale 0.2
}
decal RipBlast
{
pic ripblast

View file

@ -1,2 +1,2 @@
[default]
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r573 \cu(Sat 24 Oct 01:08:15 CEST 2020)";
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r574 \cu(Sat 24 Oct 13:01:43 CEST 2020)";

View file

@ -267,17 +267,7 @@ Class SWWMHandler : EventHandler
int countem;
if ( testme == locme ) countem = 0;
else countem = locme.ToInt();
if ( countem == 0 )
{
if ( voicetype ~== "default" ) return 0;
// retry with the default voicetype
voicetype = "default";
testme = String.Format("SWWM_SUBS_DEFAULT_N%s",type.MakeUpper());
locme = StringTable.Localize(testme,false);
if ( testme == locme ) countem = 0;
else countem = locme.ToInt();
if ( countem == 0 ) return 0;
}
if ( countem == 0 ) return 0; // voicepack doesn't have this
// check last line so we don't repeat
int last = 0, ent;
for ( int i=0; i<hnd.lastlines.Size(); i++ )

View file

@ -892,19 +892,22 @@ Class Demolitionist : PlayerPawn
// don't bump if we're only grazing it
if ( dir dot wallnorm > -.6 )
continue;
bool buttslam = false;
// BUTTSLAM
if ( dir dot viewdir < -.3 )
{
buttslam = true;
// leave buttmark
A_SprayDecal("ButtMark",172,(cos(angle+90)*2,sin(angle+90)*2,Height*.54),dir);
A_SprayDecal("ButtMark",172,(cos(angle-90)*2,sin(angle-90)*2,Height*.54),dir);
}
if ( raging || swwm_omnibust )
{
// see if we can bust it
let tempme = new("LineTracer"); // gross hack to pass needed data
int dmg = int(15+spd*2.5);
if ( raging ) dmg *= 8;
bool buttslam = false;
// BUTTSLAM
if ( dir dot viewdir < -.3 )
{
dmg *= 3;
buttslam = true;
}
if ( buttslam ) dmg *= 3;
tempme.Results.HitLine = BlockingLine;
tempme.Results.HitType = TRACE_HitWall;
tempme.Results.Side = lside;