Various changes to feel closer to vanilla UT, mainly in terms of projectile gravity and velocity.

Reduced the smoke on the minigun and casings for better performance.
Corrected the number of chunks (was 6, should be 8) fired by the flak cannon.
Reduced flak chunk spread (should be ~5.5 degrees, was double of that) on the weapon and slugs.
Reduced the size of the shock rifle combo shockwave mesh to be closer to vanilla UT.
Misc. tweaks to health item textures.
Reduced the blur in the Redeemer view shader, it was too strong.
Fix expiration messages on powerups appearing on level changes.
Address complaints about how I change Kinsie's test map. Shouldn't be too dark now.
This commit is contained in:
Marisa the Magician 2019-01-24 22:33:09 +01:00
commit 2a9eb0e1b1
19 changed files with 80 additions and 54 deletions

View file

@ -528,8 +528,8 @@ Class BioGel : Actor
Radius 3;
Height 3;
Scale 2;
Speed 18;
Gravity 0.5;
Speed 11;
Gravity 0.25;
PROJECTILE;
-NOGRAVITY;
+SKYEXPLODE;

View file

@ -111,7 +111,7 @@ Class UTRocket : Actor
DamageType 'RocketDeath';
Radius 2;
Height 2;
Speed 20;
Speed 15;
PROJECTILE;
+SKYEXPLODE;
+EXPLODEONWATER;
@ -145,21 +145,21 @@ Class UTRocket : Actor
int numpt = Random[Eightball](15,30);
for ( int i=0; i<numpt; i++ )
{
Vector3 pvel = (FRandom[Eightball](-1,1),FRandom[Eightball](-1,1),FRandom[Eightball](-1,1)).unit()*FRandom[Eightball](1,4);
Vector3 pvel = (FRandom[Eightball](-1,1),FRandom[Eightball](-1,1),FRandom[Eightball](-1,1)).unit()*FRandom[Eightball](1,3);
let s = Spawn("UTSmoke",pos);
s.vel = pvel;
}
numpt = Random[Eightball](10,20);
for ( int i=0; i<numpt; i++ )
{
Vector3 pvel = (FRandom[Eightball](-1,1),FRandom[Eightball](-1,1),FRandom[Eightball](-1,1)).unit()*FRandom[Eightball](2,8);
Vector3 pvel = (FRandom[Eightball](-1,1),FRandom[Eightball](-1,1),FRandom[Eightball](-1,1)).unit()*FRandom[Eightball](2,6);
let s = Spawn("UTSpark",pos);
s.vel = pvel;
}
numpt = Random[Eightball](35,70);
for ( int i=0; i<numpt; i++ )
{
Vector3 pvel = (FRandom[Eightball](-1,1),FRandom[Eightball](-1,1),FRandom[Eightball](-1,1)).unit()*FRandom[Eightball](4,36);
Vector3 pvel = (FRandom[Eightball](-1,1),FRandom[Eightball](-1,1),FRandom[Eightball](-1,1)).unit()*FRandom[Eightball](2,12);
let s = Spawn("UTChip",pos);
s.vel = pvel;
s.scale *= FRandom[Eightball](0.9,2.7);
@ -192,9 +192,9 @@ Class UTRocket : Actor
A_RocketSeek();
}
vel += invoker.Acceleration/TICRATE;
if ( vel.length() > 45. ) vel = Vel.unit()*45.;
if ( vel.length() > 30. ) vel = Vel.unit()*30.;
Vector3 dir = vel.unit();
if ( waterlevel <= 0 ) vel = dir*min(vel.length()+1,32);
if ( waterlevel <= 0 ) vel = dir*min(vel.length()+1,24);
angle = atan2(dir.y,dir.x);
pitch = asin(-dir.z);
for ( int i=0; i<3; i++ )
@ -228,7 +228,8 @@ Class UTGrenade : UTRocket
WallBounceFactor 0.75;
BounceFactor 0.75;
ReactionTime 85;
Speed 20;
Speed 15;
Gravity 0.35;
}
override void PostBeginPlay()
{
@ -309,7 +310,8 @@ Class UTRocketLauncher : UTWeapon
{
LockedTarget = null;
LockedOn = false;
Owner.A_PlaySound("utrl/seeklost",CHAN_WEAPON);
if ( Owner.player.ReadyWeapon == self )
Owner.A_PlaySound("utrl/seeklost",CHAN_WEAPON);
}
if ( LockedTarget ) crosshair = 99;
else crosshair = 0;
@ -368,7 +370,7 @@ Class UTRocketLauncher : UTWeapon
Vector3 dir = (x2+cos(a)*y2*s*0.004+sin(a)*z2*s*0.004).unit();
p = Spawn("UTGrenade",origin+cos(a)*y*s+sin(a)*z*s);
p.vel = x*(vel dot x)*0.4 + dir*p.speed*FRandom[Eightball](1.0,1.2);
p.vel.z += 6;
p.vel.z += 3.5;
p.target = self;
}
}

View file

@ -103,6 +103,7 @@ Class UTCasing : Actor
+USEBOUNCESTATE;
+INTERPOLATEANGLES;
Mass 1;
Gravity 0.35;
BounceType "Hexen";
WallBounceFactor 0.65;
BounceFactor 0.65;
@ -126,7 +127,7 @@ Class UTCasing : Actor
if ( deadtimer > 300 ) A_FadeOut(0.05);
return;
}
heat -= 0.02;
heat -= 0.05;
if ( heat <= 0 ) return;
let s = Spawn("UTSmallSmoke",pos);
s.alpha *= heat;
@ -376,7 +377,7 @@ Class Enforcer : UTWeapon
}
origin += x*8.0+ydir*y*6.0-z*2.0;
let c = Spawn("UTCasing",origin);
c.vel = x*FRandom[Junk](-2,2)+y*ydir*FRandom[Junk](3,6)+z*FRandom[Junk](3,5);
c.vel = x*FRandom[Junk](-1.5,1.5)+y*ydir*FRandom[Junk](2,4)+z*FRandom[Junk](2,3);
}
override String GetObituary( Actor victim, Actor inflictor, Name mod, bool playerattack )

View file

@ -163,7 +163,7 @@ Class FlakChunk : Actor
Obituary "%o was ripped to shreds by %k's Flak Cannon.";
Radius 2;
Height 2;
Speed 50;
Speed 32;
DamageFunction Random[Flak](15,20);
DamageType 'Shredded';
BounceType "Hexen";
@ -243,13 +243,16 @@ Class FlakChunk : Actor
}
else A_SprayDecal("WallCrack",-8);
A_Gravity();
gravity = 0.35;
invoker.rollvel = FRandom[Flak](50,100)*RandomPick[Flak](-1,1)*(vel.length()/speed);
invoker.pitchvel = FRandom[Flak](50,100)*RandomPick[Flak](-1,1)*(vel.length()/speed);
invoker.yawvel = FRandom[Flak](50,100)*RandomPick[Flak](-1,1)*(vel.length()/speed);
vel = (vel.unit()+(FRandom[Flak](-0.2,0.2),FRandom[Flak](-0.2,0.2),FRandom[Flak](-0.2,0.2))).unit()*vel.length();
// TODO chunks in vanilla have a special variation on the standard reflect formula that causes them to bounce differently when hitting a surface head-on
// (0.5 to 0.8 reduction perpendicular to the surface normal, to be specific)
// I have no idea how I'll even implement this reduction reliably
A_PlaySound("flak/bounce",volume:0.3);
A_AlertMonsters();
bBOUNCEAUTOOFFFLOORONLY = true;
if ( vel.length() < 5.0 ) ExplodeMissile();
}
override int DoSpecialDamage( Actor target, int damage, Name damagetype )
@ -386,7 +389,8 @@ Class FlakSlug : Actor
DamageType 'FlakDeath';
Radius 2;
Height 2;
Speed 40;
Gravity 0.35;
Speed 20;
PROJECTILE;
-NOGRAVITY;
+SKYEXPLODE;
@ -398,7 +402,7 @@ Class FlakSlug : Actor
override void PostBeginPlay()
{
Super.PostBeginPlay();
vel.z += 4;
vel.z += 3;
}
override void Tick()
{
@ -423,16 +427,26 @@ Class FlakSlug : Actor
double a, s;
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
Actor p;
Vector3 spawnofs;
if ( BlockingMobj ) spawnofs = level.Vec3Diff(pos,BlockingMobj.Vec3Offset(0,0,BlockingMobj.height/2)).unit()*8;
else if ( BlockingFloor ) spawnofs = BlockingFloor.floorplane.Normal*8;
else if ( BlockingCeiling ) spawnofs = BlockingCeiling.ceilingplane.Normal*8;
else if ( BlockingLine )
{
spawnofs = (-BlockingLine.delta.y,BlockingLine.delta.x,0).unit()*8;
if ( !BlockingLine.sidedef[1] || (CurSector == BlockingLine.frontsector) )
spawnofs *= -1;
}
for ( int i=0; i<5; i++ )
{
p = Spawn("FlakChunk",pos);
p = Spawn("FlakChunk",Vec3Offset(spawnofs.x,spawnofs.y,spawnofs.z));
p.bHITOWNER = true;
a = FRandom[Flak](0,360);
s = FRandom[Flak](0,0.2);
s = FRandom[Flak](0,0.1);
Vector3 dir = (x+y*cos(a)*s+z*sin(a)*s).unit();
p.angle = atan2(dir.y,dir.x);
p.pitch = -asin(dir.z);
p.vel = (cos(p.angle)*cos(p.pitch),sin(p.angle)*cos(p.pitch),-sin(p.pitch))*p.speed*FRandom[Flak](0.5,1.5);
p.vel = (cos(p.angle)*cos(p.pitch),sin(p.angle)*cos(p.pitch),-sin(p.pitch))*(p.speed+FRandom[Flak](-3,3));
p.target = target;
}
int numpt = Random[Flak](8,12);
@ -521,16 +535,25 @@ Class FlakCannon : UTWeapon
A_OverlayFlags(-2,PSPF_RENDERSTYLE|PSPF_FORCESTYLE,true);
A_OverlayRenderstyle(-2,STYLE_Add);
[x, y, z] = dt_Matrix4.GetAxes(BulletSlope(),angle,roll);
Vector3 offsets[8]; // vanilla adds these to each chunk
offsets[0] = (0,0,0);
offsets[1] = -z;
offsets[2] = 2*y+z;
offsets[3] = -y;
offsets[4] = 2*y-z;
offsets[5] = (0,0,0);
offsets[6] = y-z;
offsets[7] = 2*y+z;
Actor p;
for ( int i=0; i<6; i++ )
for ( int i=0; i<8; i++ )
{
p = Spawn("FlakChunk",origin);
p = Spawn("FlakChunk",level.Vec3Offset(origin,offsets[i]));
a = FRandom[Flak](0,360);
s = FRandom[Flak](0,0.2);
s = FRandom[Flak](0,0.1);
Vector3 dir = (x+y*cos(a)*s+z*sin(a)*s).unit();
p.angle = atan2(dir.y,dir.x);
p.pitch = -asin(dir.z);
p.vel = (cos(p.angle)*cos(p.pitch),sin(p.angle)*cos(p.pitch),-sin(p.pitch))*p.speed;
p.vel = (cos(p.angle)*cos(p.pitch),sin(p.angle)*cos(p.pitch),-sin(p.pitch))*(p.speed+FRandom[Flak](-3,3));
p.target = self;
}
int numpt = Random[Flak](20,30);

View file

@ -151,7 +151,7 @@ Class Minigun : UTWeapon
t.pitch = asin(-dir.z);
MinigunTracer(t).dest = d.HitLocation;
}
for ( int i=0; i<4; i++ )
for ( int i=0; i<2; i++ )
{
let s = Spawn("UTViewSmoke",origin);
UTViewSmoke(s).ofs = (10,2,-2);
@ -162,7 +162,7 @@ Class Minigun : UTWeapon
}
origin += x*8.0+y*5.0-z*5.0;
let c = Spawn("UTCasing",origin);
c.vel = x*FRandom[Junk](-2,2)+y*FRandom[Junk](3,6)+z*FRandom[Junk](3,5);
c.vel = x*FRandom[Junk](-1.5,1.5)+y*FRandom[Junk](2,4)+z*FRandom[Junk](2,3);
c.Scale *= 0.5;
}

View file

@ -78,7 +78,7 @@ Class DamageAmplifier : Powerup
override void EndEffect()
{
Super.EndEffect();
PrintPickupMessage(true,"Damage Amplifier has worn off.");
if ( EffectTics <= 0 ) PrintPickupMessage(true,"Damage Amplifier has worn off.");
}
override bool isBlinking()
@ -217,7 +217,7 @@ Class PowerUTInvisibility : PowerInvisibility
override void EndEffect()
{
Super.EndEffect();
PrintPickupMessage(true,"Invisibility has worn off.");
if ( EffectTics <= 0 ) PrintPickupMessage(true,"Invisibility has worn off.");
}
}

View file

@ -170,7 +170,7 @@ Class PulseBall : Actor
+SKYEXPLODE;
+FORCEXYBILLBOARD;
Scale 0.19;
Speed 29;
Speed 22;
Radius 2;
Height 2;
}

View file

@ -56,7 +56,7 @@ Class Razor2 : Actor
{
Radius 2;
Height 2;
Speed 27;
Speed 25;
DamageFunction (Random[Ripper](20,25)*((DamageType=='Decapitated')?3:1.0));
DamageType 'Shredded';
Obituary "%k ripped a chunk of meat out of %o with the Ripper.";

View file

@ -934,7 +934,7 @@ Class SuperShockBall : Actor
Radius 2;
Height 2;
Scale 0.5;
Speed 25;
Speed 24;
PROJECTILE;
+FORCEXYBILLBOARD;
+SKYEXPLODE;

View file

@ -154,7 +154,7 @@ Class SniperRifle : UTWeapon
origin += x*8.0+y*6.0-z*9.0;
let c = Spawn("UTCasing",origin);
c.scale *= 1.25;
c.vel = x*FRandom[Junk](-2,2)+y*FRandom[Junk](3,6)+z*FRandom[Junk](3,5);
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 )
{

View file

@ -121,7 +121,7 @@ Class TranslocatorModule : Actor
{
Radius 2;
Height 2;
Speed 25;
Speed 16;
PROJECTILE;
-NOGRAVITY;
+USEBOUNCESTATE;
@ -133,6 +133,7 @@ Class TranslocatorModule : Actor
BounceType "Hexen";
BounceFactor 0.3;
WallBounceFactor 0.3;
Gravity 0.35;
}
override void PostBeginPlay()

View file

@ -853,7 +853,7 @@ Class UTSpark : Actor
+DONTSPLASH;
BounceType "Doom";
BounceFactor 0.4;
Gravity 0.5;
Gravity 0.2;
Scale 0.05;
}
override void Tick()
@ -927,7 +927,7 @@ Class UTChip : Actor
+INTERPOLATEANGLES;
BounceType "Doom";
BounceFactor 0.3;
Gravity 0.7;
Gravity 0.35;
Scale 0.2;
}
override void PostBeginPlay()
@ -1570,7 +1570,7 @@ Class UTMainHandler : StaticEventHandler
{
if ( (level.GetChecksum() ~== "FBC3B6622A8B74AE06DE01E70007AC33") || (level.GetChecksum() ~== "D8206A3414DA967F2159473B5791139E") )
{
level.ReplaceTextures("-noflat-","DefTex",0);
TexMan.ReplaceTextures("-noflat-","DefTex",0);
TextureID skytx = TexMan.CheckForTexture("BlueSky",TexMan.Type_Any);
level.ChangeSky(skytx,skytx);
}
@ -1580,7 +1580,7 @@ Class UTMainHandler : StaticEventHandler
if ( level.GetChecksum() ~== "FBC3B6622A8B74AE06DE01E70007AC33" )
{
TextureID deftex = TexMan.CheckForTexture("-noflat-",TexMan.Type_Any);
TextureID skytx = TexMan.CheckForTexture("BlueSky",TexMan.Type_Any);
TextureID skytx = TexMan.CheckForTexture("KGDaySky",TexMan.Type_Any);
TextureID baseflor = TexMan.CheckForTexture("rClfFlr0",TexMan.Type_Any);
TextureID baseceil = TexMan.CheckForTexture("rClfBas0",TexMan.Type_Any);
TextureID basewall = TexMan.CheckForTexture("uAlnWl2b",TexMan.Type_Any);
@ -1589,7 +1589,7 @@ Class UTMainHandler : StaticEventHandler
level.ChangeSky(skytx,skytx);
for ( int i=0; i<level.sectors.size(); i++ )
{
level.sectors[i].lightlevel = 0;
level.sectors[i].lightlevel = min(level.sectors[i].lightlevel,64);
level.sectors[i].SetPlaneLight(0,0);
level.sectors[i].SetPlaneLight(1,0);
// open some ceilings

View file

@ -62,6 +62,7 @@ Class UTBloodDrop : Actor
Default
{
Scale 0.24;
Gravity 0.8;
Mass 1;
Radius 2;
Height 2;
@ -119,8 +120,8 @@ Class UTBloodSpurt : Actor
ang = angle+FRandom[Blood](-3,3)*str;
pt = pitch+FRandom[Blood](-3,3)*str;
Vector3 dir = (cos(pt)*cos(ang),cos(pt)*sin(ang),-sin(pt));
d.vel = dir*str*FRandom[Blood](0.8,1.2);
d.vel.z += str*0.8;
d.vel = dir*str*FRandom[Blood](0.4,0.8);
d.vel.z += str*0.5;
d.scale *= str*0.15*FRandom[Blood](0.6,1.4);
}
Destroy();
@ -292,6 +293,7 @@ Class UTGib : Actor
BounceType "Hexen";
BounceFactor 0.8;
WallBounceFactor 0.8;
Gravity 0.6;
+ROLLSPRITE;
+ROLLCENTER;
+INTERPOLATEANGLES;

View file

@ -246,7 +246,7 @@ Class WarShell : Actor
Obituary "%o was vaporized by %k's Redeemer!!";
Radius 2;
Height 2;
Speed 12;
Speed 6;
DamageType 'RedeemerDeath';
DamageFactor 1000;
PROJECTILE;
@ -282,9 +282,9 @@ Class WarShell : Actor
if ( waterlevel > 0 )
{
vel *= 0.98;
if ( vel.length() < 12 ) vel += vel.unit();
if ( vel.length() < 6 ) vel += vel.unit()*0.35;
}
else if ( vel.length() < 40 ) vel += vel.unit();
else if ( vel.length() < 20 ) vel += vel.unit()*0.35;
}
}
action void A_Trail()