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:
parent
9ed6c9dea0
commit
aa3fd89bcb
20 changed files with 176 additions and 68 deletions
|
|
@ -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()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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--;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue