Stuff from master.

This commit is contained in:
Mari the Deer 2021-10-11 18:31:47 +02:00
commit 1ab745f6a7
7 changed files with 36 additions and 18 deletions

View file

@ -1,3 +1,3 @@
[default]
SWWM_MODVER="\chSWWM \czGZ\c- \cw1.2pre r24 \cu(Sun 10 Oct 19:29:37 CEST 2021)\c-";
SWWM_SHORTVER="\cw1.2pre r24 \cu(2021-10-10 19:29:37)\c-";
SWWM_MODVER="\chSWWM \czGZ\c- \cw1.2pre r25 \cu(Mon 11 Oct 18:31:47 CEST 2021)\c-";
SWWM_SHORTVER="\cw1.2pre r25 \cu(2021-10-11 18:31:47)\c-";

View file

@ -568,7 +568,7 @@ extend Class SWWMHandler
}
}
// only replace vanilla blood if no other gore mod is doing it
if ( (e.Replacee == "Blood") && (!e.Replacement || e.Replacement == "Blood") && swwm_blood ) e.Replacement = "mkBlood";
if ( (((e.Replacee == "Blood") && (!e.Replacement || e.Replacement == "Blood")) || (bludtypes.Find(e.Replacee.GetClassName()) < bludtypes.Size())) && swwm_blood ) e.Replacement = "mkBlood";
else if ( e.Replacee is 'ItemFog' ) e.Replacement = 'SWWMItemFog';
else if ( e.Replacee is 'TeleportFog' ) e.Replacement = 'SWWMTeleportFog';
else if ( (e.Replacee is 'CommanderKeen') && (!e.Replacement || (e.Replacement == 'CommanderKeen')) )

View file

@ -24,6 +24,7 @@ Class SWWMHandler : EventHandler
// for checkreplacement
bool hasdrlamonsters;
int iskdizd;
Array<String> bludtypes;
// profiling data
bool profiling;
@ -52,6 +53,22 @@ Class SWWMHandler : EventHandler
}
if ( LevelInfo.MapExists("Z1M1") && (LevelInfo.MapChecksum("Z1M1") ~== "2B7744234ED2C162AD08A3255E979F65") )
iskdizd = true;
// read bludtype files if they can be found
for ( int lmp = Wads.FindLump("BLUDTYPE"); lmp != -1; lmp = Wads.FindLump("BLUDTYPE",lmp+1) )
{
String dat = Wads.ReadLump(lmp);
Array<String> list;
// fucking Windows
dat.Replace("\r","");
list.Clear();
dat.Split(list,"\n");
for ( int i=0; i<list.Size(); i++ )
{
if ( (list[i].Length() == 0) || (list[i].Left(2) == "//") || (list[i].Left(1) == "") )
continue;
bludtypes.Push(list[i]);
}
}
}
override void WorldTick()

View file

@ -546,7 +546,7 @@ Class Wallbuster : SWWMWeapon
for ( int j=0; j<(8-howmany/5); j++ )
{
a = FRandom[Wallbuster](0,360);
s = FRandom[Wallbuster](0,.3);
s = FRandom[Wallbuster](0,.15);
let b = Spawn("SaltBeam",level.Vec3Offset(origin,y*cos(a)*s+z*sin(a)*s));
b.target = self;
b.angle = atan2(x2.y,x2.x);
@ -576,7 +576,7 @@ Class Wallbuster : SWWMWeapon
case 3:
// lead ball
a = FRandom[Wallbuster](0,360);
s = FRandom[Wallbuster](0,.006);
s = FRandom[Wallbuster](0,.005);
dir = (x2+y2*cos(a)*s+z2*sin(a)*s).unit();
let p = Spawn("TheBall",origin);
p.target = self;
@ -612,7 +612,7 @@ Class Wallbuster : SWWMWeapon
for ( int j=0; j<numshot; j++ )
{
a = FRandom[Wallbuster](0,360);
s = FRandom[Wallbuster](0,.1);
s = FRandom[Wallbuster](0,.06);
dir = (x2+y2*cos(a)*s+z2*sin(a)*s).unit();
st.hitlist.Clear();
st.shootthroughlist.Clear();

View file

@ -119,17 +119,17 @@ Class Eviscerator : SWWMWeapon
[x2, y2, z2] = swwm_CoordUtil.GetAxes(BulletSlope(),angle,roll);
origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+4*y-5*z);
int trail = CVar.GetCVar('swwm_funtrails',player).GetInt();
for ( int i=0; i<20; i++ )
for ( int i=0; i<25; i++ )
{
a = FRandom[Eviscerator](0,360);
s = FRandom[Eviscerator](0,invoker.extended?.06:.3);
s = FRandom[Eviscerator](0,invoker.extended?.03:.2);
dir = (x2+y2*cos(a)*s+z2*sin(a)*s).unit();
let p = EvisceratorChunk(Spawn("EvisceratorChunk",origin));
p.target = self;
p.angle = atan2(dir.y,dir.x);
p.pitch = asin(-dir.z);
p.vel = dir*p.speed*FRandom[Eviscerator](.9,1.1);
if ( invoker.extended ) p.vel *= 1.4;
if ( invoker.extended ) p.vel *= 1.5;
if ( trail < 8 ) p.trailcolor = max(0,trail);
else if ( trail == 8 ) p.trailcolor = (i%6)+2;
else if ( trail == 9 )
@ -195,7 +195,7 @@ Class Eviscerator : SWWMWeapon
p.target = self;
p.angle = atan2(dir.y,dir.x);
p.pitch = asin(-dir.z);
p.vel = dir*p.speed*(invoker.extended?1.6:.8);
p.vel = dir*p.speed*(invoker.extended?1.75:.75);
for ( int i=0; i<6; i++ )
{
let s = Spawn("SWWMSmoke",origin);

View file

@ -148,7 +148,7 @@ Class EvisceratorChunk : Actor
Radius 2;
Height 4;
Speed 50;
DamageFunction int(clamp((vel.length()-8)*.2+max(0,1.-lifetime)*2.,0,15));
DamageFunction int(clamp((vel.length()-10)*.1,0,15)+(max(0,1-lifetime)**5)*10);
DamageType 'shot';
BounceFactor 1.0;
WallBounceFactor 1.0;
@ -175,7 +175,7 @@ Class EvisceratorChunk : Actor
let t = Spawn("EvisceratorChunkGlow",pos);
t.target = self;
lifetime = 0;
lifespeed = FRandom[Eviscerator](0.01,0.02);
lifespeed = FRandom[Eviscerator](0.01,0.02)*clamp((vel.length()/75.)**2,1.,2.);
anglevel = FRandom[Eviscerator](50,100)*RandomPick[Eviscerator](-1,1);
pitchvel = FRandom[Eviscerator](50,100)*RandomPick[Eviscerator](-1,1);
rollvel = FRandom[Eviscerator](50,100)*RandomPick[Eviscerator](-1,1);
@ -281,7 +281,8 @@ Class EvisceratorChunk : Actor
vel = oldvel;
// re-do the bounce with our formula
Vector3 RealHitNormal = HitNormal;
HitNormal = (HitNormal+(FRandom[Eviscerator](-.1,.1),FRandom[Eviscerator](-.1,.1),FRandom[Eviscerator](-.1,.1))).unit();
double dfact = clamp((oldvel.length()/75.)**2.,.02,.6);
HitNormal = (HitNormal+(FRandom[Eviscerator](-dfact,dfact),FRandom[Eviscerator](-dfact,dfact),FRandom[Eviscerator](-dfact,dfact))).unit();
if ( (HitNormal dot RealHitNormal) < 0 ) HitNormal *= -.5;
vel = FRandom[Eviscerator](.8,.95)*((vel dot HitNormal)*HitNormal*(FRandom[Eviscerator](-1.8,-1.))+vel);
bHITOWNER = true;
@ -454,7 +455,7 @@ Class EvisceratorProj : Actor
Radius 2;
Height 4;
Gravity 0.35;
Speed 50;
Speed 60;
PROJECTILE;
-NOGRAVITY;
+EXPLODEONWATER;
@ -504,7 +505,7 @@ Class EvisceratorProj : Actor
}
int trail = 0;
if ( target && target.player ) trail = CVar.GetCVar('swwm_funtrails',target.player).GetInt();
for ( int i=0; i<20; i++ )
for ( int i=0; i<25; i++ )
{
p = EvisceratorChunk(Spawn("EvisceratorChunk",level.Vec3Offset(pos,spawnofs)));
p.bHITOWNER = true;

View file

@ -483,7 +483,7 @@ Class Spreadgun : SWWMWeapon
for ( int j=0; j<8; j++ )
{
a = FRandom[Spreadgun](0,360);
s = FRandom[Spreadgun](0,.8);
s = FRandom[Spreadgun](0,.3);
let b = Spawn("SaltBeam",level.Vec3Offset(origin,y*cos(a)*s+z*sin(a)*s));
b.target = self;
b.angle = atan2(x2.y,x2.x);
@ -511,7 +511,7 @@ Class Spreadgun : SWWMWeapon
for ( int j=0; j<50; j++ )
{
a = FRandom[Spreadgun](0,360);
s = FRandom[Spreadgun](0,.2);
s = FRandom[Spreadgun](0,.1);
dir = (x2+y2*cos(a)*s+z2*sin(a)*s).unit();
let p = Spawn("CorrosiveFlechette",origin);
p.target = self;
@ -626,7 +626,7 @@ Class Spreadgun : SWWMWeapon
for ( int j=0; j<20; j++ )
{
a = FRandom[Spreadgun](0,360);
s = FRandom[Spreadgun](0,.22);
s = FRandom[Spreadgun](0,.12);
dir = (x2+y2*cos(a)*s+z2*sin(a)*s).unit();
st.hitlist.Clear();
st.shootthroughlist.Clear();