Additional gore tweaks.

This commit is contained in:
Mari the Deer 2021-08-10 23:41:54 +02:00
commit ab1f8ac125
3 changed files with 49 additions and 18 deletions

View file

@ -32,6 +32,10 @@ Class mkBlood : Actor
for ( double j=1.; j>=.5; j-=.125 )
A_SpawnParticle(b.fillcolor,0,int(12*sstr),2.*str*FRandom[Blood](.6,1.4)*j,0,0,0,0,ndir.x*j,ndir.y*j,ndir.z*j,0,0,-.25,.75,-1,-.02*sstr*j);
}
let s = Spawn("mkBloodSmoke",pos);
s.SetShade(b.fillcolor);
s.scale *= .4*str;
s.special1 += str-1;
}
override void Tick()
{
@ -416,6 +420,7 @@ Class mkBloodSmoke : Actor
+NOINTERACTION;
+NOTELEPORT;
+FORCEXYBILLBOARD;
+ROLLSPRITE;
Scale .5;
Alpha .35;
RenderStyle "Shaded";
@ -425,16 +430,18 @@ Class mkBloodSmoke : Actor
int jumps = Random[Blood](0,19);
state dest = ResolveState("Spawn");
SetState(dest+jumps);
roll = FRandom[Blood](0,360);
}
override void Tick()
{
if ( isFrozen() ) return;
SetOrigin(level.Vec3Offset(pos,vel),true);
Vector3 newp = level.Vec3Offset(pos,vel);
if ( level.IsPointInLevel(newp) ) SetOrigin(newp,true);
UpdateWaterLevel();
if ( waterlevel > 0 ) A_FadeOut();
A_FadeOut(.03);
A_SetScale(scale.x*1.02);
vel *= .98;
A_FadeOut(.04/max(1.,special1));
A_SetScale(scale.x*(1.+.04/max(1.,special1)));
vel *= 1.-.04/max(1.,special1);
if ( tics > 0 ) tics--;
while ( !tics )
{
@ -445,8 +452,8 @@ Class mkBloodSmoke : Actor
States
{
Spawn:
BSMK ABCDEFGHIJKLMNOPQRST 2;
Loop;
BSMK ABCDEFGHIJKLMNOPQRST -1;
Stop;
}
}
@ -478,10 +485,10 @@ Class mkFlyingGib : Actor
double ang = FRandom[Gibs](0,360);
double pt = FRandom[Gibs](-60,20);
Vector3 dir = (cos(pt)*cos(ang),cos(pt)*sin(ang),sin(-pt));
vel += dir*FRandom[Gibs](5.,15.);
vel += dir*FRandom[Gibs](4.,8.);
if ( master )
{
vel += master.vel*1.5;
vel += master.vel;
CopyBloodColor(master);
}
rollvel = FRandom[Gibs](10,50)*RandomPick[Gibs](-1,1)*clamp(vel.length()/10.,.25,4.);
@ -532,6 +539,7 @@ Class mkFlyingGib : Actor
{
let s = Spawn("mkBloodSmoke",pos);
s.SetShade(shadecol);
s.special1 += Random[Gibs](1,2);
}
}
@ -543,6 +551,15 @@ Class mkFlyingGib : Actor
action void A_Bleed()
{
if ( vel.length() < .5 ) ExplodeMissile(null,null);
else
{
Vector3 dir = vel;
double spd = dir.length();
dir /= spd;
dir = (dir+(FRandom[Blood](-.3,.3),FRandom[Blood](-.3,.3),FRandom[Blood](-.3,.3))).unit();
vel = dir*spd;
}
invoker.rollvel = FRandom[Gibs](10,50)*RandomPick[Gibs](-1,1)*clamp(vel.length()/10.,.25,4.);
if ( invoker.lastbleed > level.maptime ) return;
invoker.lastbleed = level.maptime+5;
@ -568,7 +585,7 @@ Class mkFlyingGib : Actor
Radius 4;
Height 4;
Mass 10;
Scale .65;
Scale .75;
Gravity .5;
BounceType "Doom";
BounceFactor .2;
@ -576,7 +593,8 @@ Class mkFlyingGib : Actor
+DROPOFF;
+NOBLOCKMAP;
+USEBOUNCESTATE;
+BOUNCEONCEILINGS;
+CANBOUNCEWATER;
-BOUNCEAUTOOFF;
+MOVEWITHSECTOR;
+THRUACTORS;
+NOTELEPORT;
@ -619,6 +637,7 @@ Class mkGibber : Actor
int gibcount, gibsize;
int delay;
color shadecol;
Class<Actor> gibtype; // allow custom gib types (will be used for monster pack)
virtual void BurstGibs()
{
@ -626,25 +645,35 @@ Class mkGibber : Actor
double ang, pt;
Vector3 dir;
bool dummy;
for ( int i=0; i<2*gibsize; i++ )
for ( int i=0; i<gibsize; i++ )
{
a = Spawn("mkBloodSmoke2",pos+(FRandom[Gibs](-.8,.8)*radius,FRandom[Gibs](-.8,.8)*radius,FRandom[Gibs](0.,.9)*height));
ang = FRandom[Gibs](0,360);
pt = FRandom[Gibs](-90,90);
dir = (cos(pt)*cos(ang),cos(pt)*sin(ang),sin(-pt));
a.vel = dir*FRandom[Gibs](.2,.8);
a.vel += vel*.02;
a.vel = vel*.1;
if ( a.vel.length() > 2. ) a.vel = a.vel.unit()*2.;
a.vel += dir*FRandom[Gibs](.2,.8);
a.SetShade(shadecol);
a.special1 += Random[Gibs](1,3);
}
for ( int i=0; i<gibsize; i++ )
{
[dummy, a] = A_SpawnItemEx("mkFlyingGib",FRandom[Gibs](-.5,.5)*radius,FRandom[Gibs](-.5,.5)*radius,FRandom[Gibs](.1,.9)*height,flags:SXF_ABSOLUTEANGLE|SXF_USEBLOODCOLOR);
[dummy, a] = A_SpawnItemEx(gibtype?gibtype:"mkFlyingGib",FRandom[Gibs](-.5,.5)*radius,FRandom[Gibs](-.5,.5)*radius,FRandom[Gibs](.1,.9)*height,flags:SXF_ABSOLUTEANGLE|SXF_USEBLOODCOLOR);
a.translation = translation;
a.CopyBloodColor(self);
a.scale *= scale.x;
a.master = gibbed;
if ( special1 )
{
ang = FRandom[Gibs](0,360);
pt = FRandom[Gibs](-90,90);
dir = (cos(pt)*cos(ang),cos(pt)*sin(ang),sin(-pt));
a.vel += dir*FRandom[Gibs](4.,8.);
a.vel.z += 16.;
}
}
for ( int i=0; i<2*gibsize; i++ )
for ( int i=0; i<gibsize; i++ )
{
[dummy, a] = A_SpawnItemEx("mkBloodDrop",FRandom[Gibs](-.8,.8)*radius,FRandom[Gibs](-.8,.8)*radius,FRandom[Gibs](0.,.9)*height,flags:SXF_ABSOLUTEANGLE|SXF_USEBLOODCOLOR);
ang = FRandom[Gibs](0,360);
@ -661,7 +690,7 @@ Class mkGibber : Actor
override void PostBeginPlay()
{
gibsize = int(min(max(radius,height)/15,6));
gibsize = int(min(max(radius,height)/8,12));
reactiontime = int(min(max(radius,height)/10,8));
if ( gibbed && gibbed.bloodcolor ) shadecol = Color(gibbed.bloodcolor.r/2,gibbed.bloodcolor.g/2,gibbed.bloodcolor.b/2);
else shadecol = Color(80,0,0);