Changed up all the model offsets again due to complaints about inconsistency with UT.

Added view-space effects to Enforcer and Biorifle, others will follow soon.
Added smoke particles to spent casings.
Added green smoke particles to biorifle sludge explosions.
Touched up how rockets and grenades are fired.
Fixed a VM abort when the game is loaded while there's a Redeemer blast active.
This commit is contained in:
Marisa the Magician 2018-06-09 14:15:50 +02:00
commit aa3fd89bcb
20 changed files with 176 additions and 68 deletions

View file

@ -49,12 +49,15 @@ This mod requires GZDoom 3.4.0 or later.
- Make biorifle sludge follow ceiling and wall movement (this might be hard)
- Add some more effects
- Additional particle effects on explosions
- Smoke on spent casings
- Smoke on spent casings [DONE]
- View-space particles for weapon fire [WIP]
- Visual recoil affecting aim (time to recycle SM's A_Swing once again)
- Additional model optimization and cleanup
- Trim out unused animations (this one is going to be very time-consuming)
- Unify some texture groups (umodel does some weird thing where it separates
unlit polys into a new group, even when they're not supposed to be)
unlit polys into a new group, even when they're not supposed to be, this
can be seen in the shock rifle hud model) (unlit polys are kind of
unnecessary in gzdoom since there's brightmaps)
- Trim out garbage triangles (e.g.: an extra triangle in the biorifle that
has no reason to exist (can be seen when using invisibility, looks
completely out of place there)

View file

@ -74,10 +74,10 @@ Model "UTRocketLauncher"
SurfaceSkin 0 2 "Eight_t3.png"
SurfaceSkin 0 3 "Eight_t4.png"
SurfaceSkin 0 4 "miniammoledbase.png"
Scale -0.24 0.12 0.24
Offset 2.0 -12.0 -10.5
AngleOffset 90
RollOffset -3
Scale -0.2 0.22 0.2
Offset 3.4 -9.2 -8.5
AngleOffset 94
RollOffset -2
// Select
FrameIndex EBLS A 0 0

View file

@ -72,22 +72,22 @@ Model "Enforcer"
AngleOffset 90
PitchOffset 90
Scale 0.04 0.04 0.04
Offset 10.4 -25.0 -2.9
Offset 12.4 -30.0 -2.9
FrameIndex EMUZ A 3 0
Scale 0.04 0.04 0.04
Offset 1.9 -25.0 -9.3
Offset 2.4 -30.0 -10.9
FrameIndex EMUZ B 3 0
Scale 0.04 0.04 0.04
Offset -10.4 -25.0 -2.9
Offset -12.4 -30.0 -2.9
FrameIndex EMUZ C 3 0
Scale 0.04 0.04 0.04
Offset -1.9 -25.0 -9.3
Offset -2.4 -30.0 -10.9
FrameIndex EMUZ D 3 0
}
@ -101,7 +101,7 @@ Model "Enforcer"
SurfaceSkin 0 2 "Jtutot3.png"
SurfaceSkin 0 3 "Jtutot4.png"
Scale 0.14 -0.08 0.12
Offset 8.6 -12.8 -13.5
Offset 8.6 -14.8 -13.5
AngleOffset 90
// Fire
@ -248,7 +248,7 @@ Model "Enforcer"
SurfaceSkin 2 2 "Jtutot3.png"
SurfaceSkin 2 3 "Jtutot4.png"
Scale 0.14 -0.08 0.12
Offset -8.8 -12.8 -13.5
Offset -8.8 -14.8 -13.5
AngleOffset 90
// Fire

View file

@ -205,7 +205,7 @@ Model "FlakCannon"
AngleOffset 90
PitchOffset 90
Scale 0.08 0.08 0.08
Offset 7.4 -25.0 -8.5
Offset 8.0 -25.0 -8.5
FrameIndex FMUZ A 2 0
}
@ -223,7 +223,7 @@ Model "FlakCannon"
PitchOffset 180
RollOffset 178
Scale 0.28 -0.14 0.28
Offset 8.6 -10.4 -13.8
Offset 9.4 -10.3 -12.9
// select
FrameIndex FLKS A 0 0

View file

@ -251,10 +251,10 @@ Model "BioRifle"
SurfaceSkin 0 1 "JBRifle22.png"
SurfaceSkin 0 2 "JBRifle23.png"
SurfaceSkin 0 3 "JBRifle24.png"
AngleOffset 94.21875
RollOffset 8.4375
Scale 0.125 -0.06 0.125
Offset 10.1 -17.8 -9.8
AngleOffset 90
RollOffset 10
Scale 0.12 -0.08 0.12
Offset 9.8 -19.8 -10.8
// select
FrameIndex BIOS A 0 0

View file

@ -23,10 +23,10 @@ Model "ImpactHammer"
SurfaceSkin 0 1 "JImpactHammer2.png"
SurfaceSkin 0 2 "JImpactHammer3.png"
SurfaceSkin 0 3 "JImpactHammer4.png"
AngleOffset 90
RollOffset -85
AngleOffset 93
RollOffset -81
Scale 0.1 -0.05 0.1
Offset 4.8 -11.8 -6.7
Offset 6.2 -14.9 -7.2
// select
FrameIndex IMPS A 0 0

View file

@ -44,7 +44,7 @@ Model "Minigun"
Path "models"
Model 2 "Flat_d.3d"
Scale 0.08 0.08 0.08
Offset 5.0 -32.0 -8.0
Offset 6.3 -40.0 -8.2
AngleOffset 90
PitchOffset 90
@ -77,8 +77,8 @@ Model "Minigun"
SurfaceSkin 0 2 "Mini_t3.png"
SurfaceSkin 0 3 "Mini_t4.png"
SurfaceSkin 0 4 "miniammoledbase.png"
Scale 0.12 -0.06 0.12
Offset 0.0 -15.5 -12.8
Scale 0.12 -0.08 0.12
Offset 1.8 -19.9 -13.8
AngleOffset 90
// Select

View file

@ -78,7 +78,7 @@ Model "PulseGun"
AngleOffset 90
PitchOffset 90
Scale 0.08 0.08 0.08
Offset 8.5 -25.0 -3.5
Offset 8.0 -25.0 -5.5
FrameIndex PMUZ A 2 0
}
@ -91,8 +91,8 @@ Model "PulseGun"
SurfaceSkin 0 1 "JPulseGun_02.png"
SurfaceSkin 0 2 "JPulseGun_03.png"
AngleOffset 90
Scale 0.26 -0.195 0.26
Offset 0.0 -7.5 -7.0
Scale 0.26 -0.28 0.28
Offset 0.0 -7.5 -10.4
// Select
FrameIndex PGNS A 0 2

View file

@ -43,7 +43,7 @@ Model "SniperRifle"
AngleOffset 90
PitchOffset 90
Scale 0.12 0.12 0.12
Offset 6.0 -40.0 -6.0
Offset 6.0 -50.0 -4.8
FrameIndex SMUZ A 2 0
}
@ -57,9 +57,10 @@ Model "SniperRifle"
SurfaceSkin 0 2 "Rifle2c.png"
SurfaceSkin 0 3 "Rifle2d.png"
Scale 0.32 -0.16 0.32
Offset 7.5 -23.0 -7.0
AngleOffset 90
PitchOffset -5 // doesn't look right otherwise
Offset 7.1 -23.9 -6.8
AngleOffset 92
RollOffset 2
PitchOffset -5
// Select
FrameIndex SRFS A 0 0

View file

@ -77,9 +77,10 @@ Model "Ripper2"
SurfaceSkin 0 2 "JRazor4.png"
SurfaceSkin 0 3 "JRazor5.png"
SurfaceSkin 0 4 "JRazor3.png"
Scale 0.16 -0.08 0.16
Offset 6.4 -9.8 -8.4
AngleOffset 90
Scale 0.16 -0.1 0.16
Offset 5.2 -9.6 -7.6
AngleOffset 88
RollOffset 2
// Select
FrameIndex RZRS A 0 0

View file

@ -158,8 +158,9 @@ Model "ShockRifle"
SurfaceSkin 0 3 "asmd_t3.png"
SurfaceSkin 0 4 "asmd_t4.png"
AngleOffset 90
RollOffset 3 // subtly hide an ugly looking part of the model
Scale 0.15 -0.12 0.15
Offset 3.9 -17.6 -6.1
Offset 5.1 -18.4 -5.2
// select
FrameIndex ASMS A 0 0
@ -245,8 +246,9 @@ Model "EnhancedShockRifle"
SurfaceSkin 0 3 "sasmd_t3.png"
SurfaceSkin 0 4 "sasmd_t4.png"
AngleOffset 90
RollOffset 3 // subtly hide an ugly looking part of the model
Scale 0.15 -0.12 0.15
Offset 3.9 -17.6 -6.1
Offset 5.1 -18.4 -5.2
// select
FrameIndex ASMS A 0 0

View file

@ -37,11 +37,11 @@ Model "Translocator"
SurfaceSkin 0 1 "tloc2.png"
SurfaceSkin 0 2 "tloc3.png"
SurfaceSkin 0 3 "tloc4.png"
Scale 0.11 -0.055 0.11
Offset -19.8 -22.8 -31.2
Scale 0.11 -0.055 0.1
Offset -17.4 -20.8 -30.2
AngleOffset -95
PitchOffset 5
RollOffset -5
RollOffset -12
// select
FrameIndex TLCS A 0 18

View file

@ -72,11 +72,13 @@ Model "WarheadLauncher"
SurfaceSkin 0 1 "jwarhead2.png"
SurfaceSkin 0 2 "jwarhead3.png"
SurfaceSkin 0 3 "jwarhead4.png"
Scale 0.2 -0.1 0.2
AngleOffset 90
PitchOffset 35.0
RollOffset -85.0
Offset 5.8 -13.6 -5.2
Scale 0.2 -0.18 0.2
AngleOffset 89
PitchOffset 30
RollOffset -82
Offset 4.4 -18.1 -4.8
// Offsets and rotations are still not like in UT because really, I can't get over that damn hole in the right tube
// I should patch that up someday when I write the .3d editor
// select
FrameIndex WARS A 0 0

View file

@ -180,6 +180,7 @@ Class BioGel : Actor
Line atline;
int atside;
int rollvel, pitchvel, yawvel;
Vector3 normal;
override void PostBeginPlay()
{
@ -250,7 +251,6 @@ Class BioGel : Actor
SetStateLabel("XDeath");
return;
}
Vector3 normal = (0,0,0);
FLineTraceData d;
A_SetSize(0.1,0);
if ( BlockingLine )
@ -310,7 +310,7 @@ Class BioGel : Actor
}
action void A_DropDrip()
{
let d = Spawn("BioSplash",pos+cursector.ceilingplane.Normal*2*scale.x);
let d = Spawn("BioSplash",pos+invoker.normal*2*scale.x);
d.target = target;
d.angle = angle;
d.pitch = pitch;
@ -338,6 +338,17 @@ Class BioGel : Actor
let s = Spawn("BioSpark",pos);
s.vel = pvel;
}
numpt = Min(100,Scale.x*10)+Random[GES](-4,4);
for ( int i=0; i<numpt; i++ )
{
Vector3 pvel = (FRandom[GES](-1,1),FRandom[GES](-1,1),FRandom[GES](-1,1)).unit()*FRandom[GES](1.2,2.4);
let s = Spawn("UTSmoke",pos+invoker.normal*4);
s.vel = pvel;
s.scale *= 2;
s.A_SetRenderStyle(0.5,STYLE_AddShaded);
if ( Random[GES](0,1) ) s.SetShade("40FF60");
else s.SetShade("60FF40");
}
Scale *= 0.5;
}
Default
@ -486,6 +497,17 @@ Class BioRifle : UTWeapon
p.pitch = BulletSlope();
p.vel = (cos(p.angle)*cos(p.pitch),sin(p.angle)*cos(p.pitch),-sin(p.pitch))*p.speed;
p.target = self;
for ( int i=0; i<12; i++ )
{
let s = Spawn("UTViewSmoke",origin);
UTViewSmoke(s).ofs = (10,4,-3);
s.scale *= 2.0;
s.target = self;
if ( Random[GES](0,1) ) s.SetShade("40FF60");
else s.SetShade("60FF40");
s.A_SetRenderStyle(0.5,STYLE_AddShaded);
UTViewSmoke(s).vvel += (FRandom[GES](0.8,1.6),FRandom[GES](-0.5,0.5),FRandom[GES](-0.5,0.5));
}
}
action void A_BeginCharge()
{

View file

@ -302,7 +302,7 @@ Class UTRocketLauncher : UTWeapon
Vector3 x, y, z, x2, y2, z2;
double a, s;
[x, y, z] = Matrix4.GetAxes(pitch,angle,roll);
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+6.0*y-6.0*z;
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+8.0*y-6.0*z;
[x2, y2, z2] = Matrix4.GetAxes(BulletSlope(),angle,roll);
Actor p;
if ( weap.bAltFire )
@ -311,9 +311,9 @@ Class UTRocketLauncher : UTWeapon
for ( int i=0; i<num; i++ )
{
a = FRandom[Eightball](0,360);
s = FRandom[Eightball](0,0.06*(num-1));
Vector3 dir = (x2+cos(a)*y2*s+sin(a)*z2*s).unit();
p = Spawn("UTGrenade",origin);
s = FRandom[Eightball](0,(num>1)?12:0);
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.target = self;
@ -332,11 +332,11 @@ Class UTRocketLauncher : UTWeapon
// rockets ("tight wad" as UT calls it)
double step = 360/num;
a = 90;
s = num?1.2:0.0;
s = (num>1)?6:0;
for ( int i=0; i<num; i++ )
{
p = Spawn("UTRocket",origin+cos(a)*y*s+sin(a)*z*s);
p.vel = (x2+cos(a)*y2*s*0.02+sin(a)*z2*s*0.02).unit()*p.speed;
p.vel = x2*p.speed;
p.target = self;
p.tracer = invoker.LockedTarget;
a += step;
@ -345,7 +345,7 @@ Class UTRocketLauncher : UTWeapon
else
{
// rockets (wide spread)
double range = 2.5*(num-1);
double range = 3.6*(num-1);
double step = range/(num-1);
s = -range*0.5;
for ( int i=0; i<num; i++ )
@ -655,32 +655,44 @@ Class UTRocketLauncher : UTWeapon
FireOne:
EBF1 A 0 A_FireRockets(1);
EBF1 ABCDEFGH 2;
EBLI A 10;
EBL1 A 0 A_CheckReload();
EBL1 ABCDEFG 2;
EBLI A 8;
Goto Idle;
FireTwo:
EBF2 A 0 A_FireRockets(2);
EBF2 ABCDEFGHIJK 2;
EBLI A 10;
EBL1 A 0 A_CheckReload();
EBL1 ABCDEFG 2;
EBLI A 8;
Goto Idle;
FireThree:
EBF3 A 0 A_FireRockets(3);
EBF3 ABCDEFGHIJ 2;
EBLI A 10;
EBL1 A 0 A_CheckReload();
EBL1 ABCDEFG 2;
EBLI A 8;
Goto Idle;
FireFour:
EBF4 A 0 A_FireRockets(4);
EBF4 ABCDEFGHIJK 2;
EBLI A 10;
EBL1 A 0 A_CheckReload();
EBL1 ABCDEFG 2;
EBLI A 8;
Goto Idle;
FireFive:
EBF5 A 0 A_FireRockets(5);
EBF5 ABCDEFGHIJKLM 2;
EBLI A 10;
EBL1 A 0 A_CheckReload();
EBL1 ABCDEFG 2;
EBLI A 8;
Goto Idle;
FireSix:
EBF6 A 0 A_FireRockets(6);
EBF6 ABCDEFGHIJKLMNOP 2;
EBLI A 10;
EBL1 A 0 A_CheckReload();
EBL1 ABCDEFG 2;
EBLI A 8;
Goto Idle;
Deselect:
EBLD ABCDEFGHIJK 1;

View file

@ -90,6 +90,7 @@ Class UTCasing : Actor
{
int deadtimer;
double pitchvel, anglevel;
double heat;
Default
{
@ -110,16 +111,22 @@ Class UTCasing : Actor
deadtimer = 0;
pitchvel = FRandom[Junk](10,30)*RandomPick[Junk](-1,1);
anglevel = FRandom[Junk](10,30)*RandomPick[Junk](-1,1);
heat = 1.0;
}
override void Tick()
{
Super.Tick();
if ( level.frozen || globalfreeze ) return;
if ( InStateSequence(CurState,ResolveState("Death")) )
{
deadtimer++;
if ( deadtimer > 300 ) A_FadeOut(0.05);
return;
}
heat -= 0.02;
if ( heat <= 0 ) return;
let s = Spawn("UTSmallSmoke",pos);
s.alpha *= heat;
}
States
{
@ -296,8 +303,8 @@ Class Enforcer : UTWeapon replaces Pistol
[x, y, z] = Matrix4.GetAxes(pitch,angle,roll);
Vector3 origin = pos+(0,0,player.viewheight)+10.0*x;
int ydir = slave?-1:1;
if ( alt ) origin = origin-z*9.0+ydir*y*1.0;
else origin = origin-z*2.0+ydir*y*6.0;
if ( alt ) origin = origin-z*3.0+ydir*y*1.0;
else origin = origin-z*1.0+ydir*y*4.0;
double a = FRandom[Enforcer](0,360), s = FRandom[Enforcer](0,alt?0.08:0.004);
[x2, y2, z2] = Matrix4.GetAxes(BulletSlope(),angle,roll);
Vector3 dir = (x2+y2*cos(a)*s+z2*sin(a)*s).unit();
@ -334,6 +341,13 @@ Class Enforcer : UTWeapon replaces Pistol
p.pitch = asin(-hitnormal.z);
if ( d.HitLine ) d.HitLine.RemoteActivate(self,d.LineSide,SPAC_Impact,d.HitLocation);
}
for ( int i=0; i<8; i++ )
{
let s = Spawn("UTViewSmoke",origin);
if ( alt ) UTViewSmoke(s).ofs = (10,ydir,-3);
else UTViewSmoke(s).ofs = (10,4*ydir,-1);
s.target = self;
}
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);

View file

@ -114,7 +114,7 @@ Class Minigun : UTWeapon
if ( !alt ) MinigunLight(l).cnt--;
Vector3 x, y, z, x2, y2, z2;
[x, y, z] = Matrix4.GetAxes(pitch,angle,roll);
Vector3 origin = pos+(0,0,player.viewheight)+10.0*x+y*4.0-z*6.0;
Vector3 origin = pos+(0,0,player.viewheight)+10.0*x+y*4.0-z*4.0;
double a = FRandom[Minigun](0,360), s = FRandom[Minigun](0,alt?0.05:0.02);
[x2, y2, z2] = Matrix4.GetAxes(BulletSlope(),angle,roll);
Vector3 dir = (x2+y2*cos(a)*s+z2*sin(a)*s).unit();
@ -160,7 +160,7 @@ Class Minigun : UTWeapon
t.pitch = asin(-dir.z);
MinigunTracer(t).dest = d.HitLocation;
}
origin += x*8.0+y*4.0-z*2.0;
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.Scale *= 0.5;

View file

@ -442,7 +442,7 @@ Class StarterBolt : PulseBolt
if ( target.player )
{
[x, y, z] = Matrix4.GetAxes(target.pitch,target.angle,target.roll);
origin = target.Vec2OffsetZ(0,0,target.player.viewz)+5.0*x+3.0*y-1.0*z;
origin = target.Vec2OffsetZ(0,0,target.player.viewz)+10.0*x+4.1*y-2.7*z;
}
else origin = target.Vec3Offset(0,0,target.missileheight);
SetOrigin(origin,true);
@ -488,7 +488,7 @@ Class PulseGun : UTWeapon
A_AlertMonsters();
Vector3 x, y, z;
[x, y, z] = Matrix4.GetAxes(pitch,angle,roll);
Vector3 origin = Vec2OffsetZ(0,0,player.viewz)+10.0*x+4.5*y-1.9*z;
Vector3 origin = Vec2OffsetZ(0,0,player.viewz)+10.0*x+4.1*y-2.7*z;
int numpt = Random[Pulse](2,5);
for ( int i=0; i<numpt; i++ )
{
@ -549,7 +549,7 @@ Class PulseGun : UTWeapon
A_PlaySound("pulse/bolt",CHAN_WEAPON,1.0,true);
Vector3 x, y, z, origin;
[x, y, z] = Matrix4.GetAxes(pitch,angle,roll);
origin = Vec2OffsetZ(0,0,player.viewz)+5.0*x+3.0*y-1.0*z;
origin = Vec2OffsetZ(0,0,player.viewz)+10.0*x+4.1*y-2.7*z;
invoker.beam = Spawn("StarterBolt",origin);
invoker.beam.angle = angle;
invoker.beam.pitch = BulletSlope();

View file

@ -583,6 +583,57 @@ Class UTSmoke : Actor
}
}
Class UTSmallSmoke : UTSmoke
{
override void PostBeginPlay()
{
Actor.PostBeginPlay();
double ang, pt;
scale *= FRandom[Puff](0.1,0.3);
alpha *= FRandom[Puff](0.5,1.5);
ang = FRandom[Puff](0,360);
pt = FRandom[Puff](-90,90);
vel += (cos(pt)*cos(ang),cos(pt)*sin(ang),-sin(pt))*FRandom[Puff](0.04,0.16);
}
}
Class UTViewSmoke : UTSmoke
{
Vector3 ofs, vvel;
override void PostBeginPlay()
{
Actor.PostBeginPlay();
double ang, pt;
scale *= FRandom[Puff](0.1,0.3);
alpha *= FRandom[Puff](0.5,1.5);
ang = FRandom[Puff](0,360);
pt = FRandom[Puff](-90,90);
vvel += (cos(pt)*cos(ang),cos(pt)*sin(ang),-sin(pt))*FRandom[Puff](0.04,0.16);
}
override void Tick()
{
Actor.Tick();
if ( !target || !target.player )
{
Destroy();
return;
}
Vector3 x, y, z;
[x, y, z] = Matrix4.GetAxes(target.pitch,target.angle,target.roll);
Vector3 origin = x*ofs.x+y*ofs.y+z*ofs.z+(0,0,target.player.viewz);
SetOrigin(target.Vec2OffsetZ(origin.x,origin.y,origin.z),true);
bInvisible = (players[consoleplayer].camera != target);
if ( level.frozen || globalfreeze ) return;
ofs += vvel;
vvel *= 0.96;
vvel.z += 0.01;
A_FadeOut(1/32.);
if ( waterlevel > 0 ) Destroy();
}
}
Class UTRedSkull : RedSkull replaces RedSkull
{
Default

View file

@ -25,7 +25,7 @@ Class ShockWave : Actor
double shocksize, olddmgradius;
double lifespan;
int icount;
ThinkerIterator t;
transient ThinkerIterator t;
Default
{
Obituary "%o was vaporized by %k's Redeemer!!";
@ -43,13 +43,13 @@ Class ShockWave : Actor
lifespan = ReactionTime;
A_PlaySound("warhead/explode",CHAN_VOICE,attenuation:ATTN_NONE);
A_QuakeEx(9,9,9,100,0,12000,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.5);
t = ThinkerIterator.Create("Actor");
}
override void Tick()
{
Super.Tick();
if ( globalfreeze || level.frozen ) return;
if ( alpha <= 0 ) return;
if ( !t ) t = ThinkerIterator.Create("Actor");
icount++;
if ( icount == 4 ) Spawn("WarheadSubExplosion",pos);
lifespan--;