Added first person visual effects to all weapons.

Added "instant rocket" mode to RL, toggleable with reload button.
Various adjustments to offsets and scales.
Fixed a bug where other armors wouldn't absorb damage if at least one of them is depleted.
Reduced armor bonus pickup amount to 1, and made it absorb more damage the more you have, up to a 75% cap at max amount.
Tweaked vibration on the Chainsaw.
More particles for rockets and flak slugs.
Reduced delay for rocket launcher refire.
Fixed Pulse balls having no XY billboarding.
Tweaked Pulse bolt visual effects.
Reduced shake of Shock Rifle and Enhanced Shock Rifle to more bearable levels.
Fixed clipping on the Ripper after offsets were changed.
This commit is contained in:
Marisa the Magician 2018-06-11 18:25:09 +02:00
commit 07915ea7c2
13 changed files with 454 additions and 109 deletions

View file

@ -8,6 +8,7 @@ Class UTArmor : Armor
{
+INVENTORY.AUTOACTIVATE;
+INVENTORY.UNTOSSABLE;
+INVENTORY.KEEPDEPLETED;
}
override void AbsorbDamage( int damage, Name damageType, out int newdamage )
{
@ -21,18 +22,23 @@ Class UTArmor : Armor
damage = newdamage;
}
if ( damage > 0 ) newdamage = ApplyDamageFactors(GetClass(),damageType,damage,damage);
if ( amount <= 0 ) Destroy();
}
}
Class UTArmorBonus : UTArmor replaces ArmorBonus
{
override void AbsorbDamage( int damage, Name damageType, out int newdamage )
{
absorb = Clamp(amount*2,25,75);
Super.AbsorbDamage(damage,damageType,newdamage);
}
Default
{
Tag "Armor Bonus";
+COUNTITEM;
+INVENTORY.ALWAYSPICKUP;
Inventory.Amount 5;
Inventory.Amount 1;
Inventory.MaxAmount 50;
Inventory.InterHubAmount 50;
UTArmor.ArmorAbsorption 25;
@ -98,12 +104,9 @@ Class UTShieldBelt : UTArmor replaces Megasphere
Owner.A_PlaySound("belt/absorb",CHAN_7);
UTMainHandler.DoFlash(Owner,Color(80,255,224,0),5);
}
int oldamt = amount;
Super.AbsorbDamage(damage,damageType,newdamage);
}
override void OnDestroy()
{
Super.OnDestroy();
if ( amount <= 0 && Owner ) PrintPickupMessage(true,"The Shield Belt has depleted.");
if ( (oldamt > 0) && (amount <= 0) ) PrintPickupMessage(true,"The Shield Belt has depleted.");
}
override bool Use( bool pickup )
{

View file

@ -137,6 +137,26 @@ Class UTChainsaw : UTWeapon
A_PlaySound("chainsaw/lower",CHAN_6);
Super.DetachFromOwner();
}
action void A_Vibrate( bool bAlt = false )
{
A_AlertMonsters();
if ( bAlt ) A_QuakeEx(1,1,1,3,0,1,"",QF_RELATIVE,rollIntensity:0.4);
else A_QuakeEx(0,0,0,2,0,1,"",QF_RELATIVE,rollIntensity:0.2);
if ( bAlt || Random[Chainsaw](0,2) ) return;
Vector3 x, y, z;
[x, y, z] = Matrix4.GetAxes(pitch,angle,roll);
Vector3 origin = (pos.x,pos.y,player.viewz)+5.0*x+1.0*y-3.0*z;
for ( int i=0; i<5; i++ )
{
let s = Spawn("UTViewSmoke",origin);
UTViewSmoke(s).ofs = (5,1,-3);
s.scale *= 1.2;
s.alpha *= 0.2;
s.SetShade("202020");
s.target = self;
UTViewSmoke(s).vvel += (0,-0.2,0);
}
}
Default
{
Tag "Chainsaw";
@ -161,26 +181,20 @@ Class UTChainsaw : UTWeapon
Ready:
CSWS ABCDEFGHIJLMNO 1
{
A_Vibrate();
A_WeaponReady(WRF_NOFIRE);
A_AlertMonsters();
A_QuakeEx(1,1,1,2,0,1,"",QF_RELATIVE,rollIntensity:0.1);
}
Idle:
CSWI A 0 A_PlaySound("chainsaw/idle",CHAN_6,looping:true);
CSWI ABCDEFGHIJ 1
{
A_AlertMonsters();
A_Vibrate();
A_WeaponReady();
A_QuakeEx(1,1,1,2,0,1,"",QF_RELATIVE,rollIntensity:0.1);
}
Goto Idle+1;
Fire:
CSWJ A 1 A_PlaySound("chainsaw/fire",CHAN_6,looping:true);
CSWJ BCDEF 1
{
A_AlertMonsters();
A_QuakeEx(1,1,1,2,0,1,"",QF_RELATIVE,rollIntensity:0.1);
}
CSWJ BCDEF 1 A_Vibrate();
Hold:
CSWJ G 1 A_SawHit();
CSWJ H 0 A_Refire(1);
@ -221,25 +235,13 @@ Class UTChainsaw : UTWeapon
CSWJ S 1 A_SawHit();
CSWJ G 0 A_Refire("Hold");
Release:
CSWJ FEDCBA 1
{
A_AlertMonsters();
A_QuakeEx(1,1,1,2,0,1,"",QF_RELATIVE,rollIntensity:0.1);
}
CSWJ FEDCBA 1 A_Vibrate();
Goto Idle;
AltFire:
CSWA A 0 A_PlaySound("chainsaw/fire",CHAN_6);
CSWA ABCDEFG 2
{
A_AlertMonsters();
A_QuakeEx(2,2,2,3,0,1,"",QF_RELATIVE,rollIntensity:0.15);
}
CSWA ABCDEFG 2 A_Vibrate(true);
CSWA H 2 A_SawSwipe();
CSWA IJK 2
{
A_AlertMonsters();
A_QuakeEx(2,2,2,3,0,1,"",QF_RELATIVE,rollIntensity:0.15);
}
CSWA IJK 2 A_Vibrate(true);
CSWA K 0 A_PlaySound("chainsaw/idle",CHAN_6,looping:true);
Goto Ready;
Deselect:

View file

@ -149,12 +149,13 @@ Class UTRocket : Actor
let s = Spawn("UTSpark",pos);
s.vel = pvel;
}
numpt = Random[Eightball](25,50);
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,12);
Vector3 pvel = (FRandom[Eightball](-1,1),FRandom[Eightball](-1,1),FRandom[Eightball](-1,1)).unit()*FRandom[Eightball](4,36);
let s = Spawn("UTChip",pos);
s.vel = pvel;
s.scale *= FRandom[Eightball](0.9,2.7);
}
}
States
@ -239,6 +240,7 @@ Class UTRocketLauncher : UTWeapon
Actor LockedTarget;
TextureID lockontex;
int locktics;
bool bSingleRocket;
override void PostBeginPlay()
{
@ -259,7 +261,7 @@ Class UTRocketLauncher : UTWeapon
{
LockedTarget = null;
LockedOn = false;
Owner.A_PlaySound("utrl/seeklost",CHAN_6);
Owner.A_PlaySound("utrl/seeklost",CHAN_WEAPON);
}
if ( LockedTarget ) crosshair = 99;
else crosshair = 0;
@ -303,7 +305,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+8.0*y-6.0*z;
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+3.0*y-3.0*z;
[x2, y2, z2] = Matrix4.GetAxes(BulletSlope(),angle,roll);
Actor p;
if ( weap.bAltFire )
@ -362,6 +364,15 @@ Class UTRocketLauncher : UTWeapon
if ( invoker.LockedOn ) A_PlaySound("utrl/seeklost",CHAN_6);
invoker.LockedTarget = null;
invoker.LockedOn = false;
for ( int i=0; i<12; i++ )
{
let s = Spawn("UTViewSmoke",origin);
UTViewSmoke(s).ofs = (10,3,-3);
UTViewSmoke(s).vvel = (FRandom[Eightball](0,1.2),FRandom[Eightball](-.4,.4),FRandom[Eightball](-.4,.4));
s.target = self;
s.scale *= 1.8;
s.alpha *= 0.8;
}
}
// lock-on check
@ -385,8 +396,8 @@ Class UTRocketLauncher : UTWeapon
invoker.LockedTarget = a;
}
}
if ( invoker.LockedTarget ) A_PlaySound("utrl/seeklock",CHAN_6);
else if ( invoker.LockedOn ) A_PlaySound("utrl/seeklost",CHAN_6);
if ( invoker.LockedTarget ) A_PlaySound("utrl/seeklock",CHAN_WEAPON);
else if ( invoker.LockedOn ) A_PlaySound("utrl/seeklost",CHAN_WEAPON);
if ( invoker.LockedTarget ) invoker.LockedOn = true;
}
@ -420,12 +431,12 @@ Class UTRocketLauncher : UTWeapon
{
invoker.locktics = 0;
A_CheckReload();
A_WeaponReady();
A_WeaponReady(WRF_ALLOWRELOAD);
}
EBLI A 1
{
A_CheckReload();
A_WeaponReady();
A_WeaponReady(WRF_ALLOWRELOAD);
invoker.locktics++;
if ( invoker.locktics > 42 )
{
@ -434,16 +445,25 @@ Class UTRocketLauncher : UTWeapon
}
}
Wait;
Reload:
EBLI A 5
{
A_PlaySound("utrl/load",CHAN_6,0.3);
if ( invoker.bSingleRocket = !invoker.bSingleRocket ) A_Print("Instant Rocket mode enabled");
else A_Print("Instant Rocket mode disabled");
}
Goto Idle;
Fire:
AltFire:
// one is loaded already
EBLI A 3 A_LoadRocket(false);
EBLI A 1 A_LoadRocket(false);
EBLI A 2 A_JumpIf(!invoker.bAltFire&&invoker.bSingleRocket,"FireOne");
EBLI A 0 A_LoadedRefire(1);
Goto FireOne;
// load two
EBLI A 2;
EBL1 A 0;
EBR1 A 2 A_PlaySound("utrl/rotate",CHAN_WEAPON,0.1);
EBR1 A 2 A_PlaySound("utrl/rotate",CHAN_6,0.1);
EBR1 B 0 A_Refire(1);
Goto FireOne;
EBR1 B 2;
@ -464,7 +484,7 @@ Class UTRocketLauncher : UTWeapon
EBR1 G 2;
EBL2 A 0 A_Refire(1);
Goto FireOne;
EBL2 A 3 A_PlaySound("utrl/load",CHAN_WEAPON);
EBL2 A 3 A_PlaySound("utrl/load",CHAN_6);
EBL2 B 0 A_Refire(1);
Goto FireOne;
EBL2 B 3;
@ -486,7 +506,7 @@ Class UTRocketLauncher : UTWeapon
EBR2 A 0 A_LoadedRefire(1);
Goto FireTwo;
// load three
EBR2 A 2 A_PlaySound("utrl/rotate",CHAN_WEAPON,0.1);
EBR2 A 2 A_PlaySound("utrl/rotate",CHAN_6,0.1);
EBR2 B 0 A_Refire(1);
Goto FireTwo;
EBR2 B 2;
@ -507,7 +527,7 @@ Class UTRocketLauncher : UTWeapon
EBR2 G 2;
EBL3 A 0 A_Refire(1);
Goto FireTwo;
EBL3 A 3 A_PlaySound("utrl/load",CHAN_WEAPON);
EBL3 A 3 A_PlaySound("utrl/load",CHAN_6);
EBL3 B 0 A_Refire(1);
Goto FireTwo;
EBL3 B 3;
@ -529,7 +549,7 @@ Class UTRocketLauncher : UTWeapon
EBR3 A 0 A_LoadedRefire(1);
Goto FireThree;
// load four
EBR3 A 2 A_PlaySound("utrl/rotate",CHAN_WEAPON,0.1);
EBR3 A 2 A_PlaySound("utrl/rotate",CHAN_6,0.1);
EBR3 B 0 A_Refire(1);
Goto FireThree;
EBR3 B 2;
@ -550,7 +570,7 @@ Class UTRocketLauncher : UTWeapon
EBR3 G 2;
EBL4 A 0 A_Refire(1);
Goto FireThree;
EBL4 A 3 A_PlaySound("utrl/load",CHAN_WEAPON);
EBL4 A 3 A_PlaySound("utrl/load",CHAN_6);
EBL4 B 0 A_Refire(1);
Goto FireThree;
EBL4 B 3;
@ -572,7 +592,7 @@ Class UTRocketLauncher : UTWeapon
EBR4 A 0 A_LoadedRefire(1);
Goto FireFour;
// load five
EBR4 A 2 A_PlaySound("utrl/rotate",CHAN_WEAPON,0.1);
EBR4 A 2 A_PlaySound("utrl/rotate",CHAN_6,0.1);
EBR4 B 0 A_Refire(1);
Goto FireFour;
EBR4 B 2;
@ -593,7 +613,7 @@ Class UTRocketLauncher : UTWeapon
EBR4 G 2;
EBL5 A 0 A_Refire(1);
Goto FireFour;
EBL5 A 3 A_PlaySound("utrl/load",CHAN_WEAPON);
EBL5 A 3 A_PlaySound("utrl/load",CHAN_6);
EBL5 B 0 A_Refire(1);
Goto FireFour;
EBL5 B 3;
@ -615,7 +635,7 @@ Class UTRocketLauncher : UTWeapon
EBR5 A 0 A_LoadedRefire(1);
Goto FireFive;
// load six
EBR5 A 2 A_PlaySound("utrl/rotate",CHAN_WEAPON,0.1);
EBR5 A 2 A_PlaySound("utrl/rotate",CHAN_6,0.1);
EBR5 B 0 A_Refire(1);
Goto FireFive;
EBR5 B 2;
@ -636,7 +656,7 @@ Class UTRocketLauncher : UTWeapon
EBR5 G 2;
EBL6 A 0 A_Refire(1);
Goto FireFive;
EBL6 A 3 A_PlaySound("utrl/load",CHAN_WEAPON);
EBL6 A 3 A_PlaySound("utrl/load",CHAN_6);
EBL6 B 0 A_Refire(1);
Goto FireFive;
EBL6 B 3;
@ -657,43 +677,49 @@ Class UTRocketLauncher : UTWeapon
EBF1 A 0 A_FireRockets(1);
EBF1 ABCDEFGH 2;
EBL1 A 0 A_CheckReload();
EBL1 ABCDEFG 2;
EBLI A 8;
EBL1 A 2 A_PlaySound("utrl/load",CHAN_6);
EBL1 BCDEFG 2;
EBLI A 0;
Goto Idle;
FireTwo:
EBF2 A 0 A_FireRockets(2);
EBF2 ABCDEFGHIJK 2;
EBL1 A 0 A_CheckReload();
EBL1 ABCDEFG 2;
EBLI A 8;
EBL1 A 2 A_PlaySound("utrl/load",CHAN_6);
EBL1 BCDEFG 2;
EBLI A 0;
Goto Idle;
FireThree:
EBF3 A 0 A_FireRockets(3);
EBF3 ABCDEFGHIJ 2;
EBL1 A 0 A_CheckReload();
EBL1 ABCDEFG 2;
EBLI A 8;
EBL1 A 2 A_PlaySound("utrl/load",CHAN_6);
EBL1 BCDEFG 2;
EBLI A 0;
Goto Idle;
FireFour:
EBF4 A 0 A_FireRockets(4);
EBF4 ABCDEFGHIJK 2;
EBL1 A 0 A_CheckReload();
EBL1 ABCDEFG 2;
EBLI A 8;
EBL1 A 2 A_PlaySound("utrl/load",CHAN_6);
EBL1 BCDEFG 2;
EBLI A 0;
Goto Idle;
FireFive:
EBF5 A 0 A_FireRockets(5);
EBF5 ABCDEFGHIJKLM 2;
EBL1 A 0 A_CheckReload();
EBL1 ABCDEFG 2;
EBLI A 8;
EBL1 A 2 A_PlaySound("utrl/load",CHAN_6);
EBL1 BCDEFG 2;
EBLI A 0;
Goto Idle;
FireSix:
EBF6 A 0 A_FireRockets(6);
EBF6 ABCDEFGHIJKLMNOP 2;
EBL1 A 0 A_CheckReload();
EBL1 ABCDEFG 2;
EBLI A 8;
EBL1 A 2 A_PlaySound("utrl/load",CHAN_6);
EBL1 BCDEFG 2;
EBLI A 0;
Goto Idle;
Deselect:
EBLD ABCDEFGHIJK 1;

View file

@ -150,7 +150,7 @@ Class FlakChunk : Actor
+BOUNCEAUTOOFFFLOORONLY;
+CANBOUNCEWATER;
+SKYEXPLODE;
Scale 0.5;
Scale 0.3;
}
override bool CanCollideWith( Actor other, bool passive )
{
@ -163,7 +163,7 @@ Class FlakChunk : Actor
lifespeed = FRandom[Flak](0.004,0.008);
trail = ChunkTrail(Spawn("ChunkTrail",pos));
trail.target = self;
trail.speed = 2;
trail.speed = 1.2;
rollvel = FRandom[Flak](50,100)*RandomPick[Flak](-1,1);
pitchvel = FRandom[Flak](50,100)*RandomPick[Flak](-1,1);
yawvel = FRandom[Flak](50,100)*RandomPick[Flak](-1,1);
@ -415,12 +415,13 @@ Class FlakSlug : Actor
let s = Spawn("UTSpark",pos);
s.vel = pvel;
}
numpt = Random[Flak](20,40);
numpt = Random[Flak](40,80);
for ( int i=0; i<numpt; i++ )
{
Vector3 pvel = (FRandom[Flak](-1,1),FRandom[Flak](-1,1),FRandom[Flak](-1,1)).unit()*FRandom[Flak](2,8);
Vector3 pvel = (FRandom[Flak](-1,1),FRandom[Flak](-1,1),FRandom[Flak](-1,1)).unit()*FRandom[Flak](6,16);
let s = Spawn("UTChip",pos);
s.vel = pvel;
s.scale *= FRandom[Flak](0.9,1.8);
}
}
States
@ -507,10 +508,19 @@ Class FlakCannon : UTWeapon
int numpt = Random[Flak](20,30);
for ( int i=0; i<numpt; i++ )
{
Vector3 pvel = (x+(FRandom[Flak](-.8,.8),FRandom[Flak](-.8,.8),FRandom[Flak](-.8,.8))).unit()*FRandom[Flak](8,32);
let s = Spawn("UTSpark",origin);
s.vel = pvel;
s.alpha *= 0.2;
let s = Spawn("UTViewSpark",origin);
UTViewSpark(s).ofs = (10,2,-3);
UTViewSpark(s).vvel = (FRandom[Flak](3,12),FRandom[Flak](-4,4),FRandom[Flak](-4,4));
s.target = self;
}
for ( int i=0; i<12; i++ )
{
let s = Spawn("UTViewSmoke",origin);
UTViewSmoke(s).ofs = (10,2,-3);
UTViewSmoke(s).vvel = (FRandom[Flak](0,1.2),FRandom[Flak](-.4,.4),FRandom[Flak](-.4,.4));
s.target = self;
s.scale *= 2.4;
s.alpha *= 0.5;
}
}
action void A_FireSlug()
@ -539,10 +549,19 @@ Class FlakCannon : UTWeapon
int numpt = Random[Flak](10,15);
for ( int i=0; i<numpt; i++ )
{
Vector3 pvel = (x+(FRandom[Flak](-.8,.8),FRandom[Flak](-.8,.8),FRandom[Flak](-.8,.8))).unit()*FRandom[Flak](8,32);
let s = Spawn("UTSpark",origin);
s.vel = pvel;
s.alpha *= 0.2;
let s = Spawn("UTViewSpark",origin);
UTViewSpark(s).ofs = (10,2,-3);
UTViewSpark(s).vvel = (FRandom[Flak](3,12),FRandom[Flak](-4,4),FRandom[Flak](-4,4));
s.target = self;
}
for ( int i=0; i<16; i++ )
{
let s = Spawn("UTViewSmoke",origin);
UTViewSmoke(s).ofs = (10,2,-3);
UTViewSmoke(s).vvel = (FRandom[Flak](0,1.2),FRandom[Flak](-.8,.8),FRandom[Flak](-.8,.8));
s.target = self;
s.scale *= 2.4;
s.alpha *= 0.5;
}
}

View file

@ -68,6 +68,7 @@ Class MinigunTracer : Actor
override void Tick()
{
Super.Tick();
if ( level.frozen || globalfreeze ) return;
Vector3 dir = level.Vec3Diff(pos,dest);
if ( dir.length() < 160 )
{
@ -106,14 +107,14 @@ Class Minigun : UTWeapon
invoker.FireEffect();
UTMainHandler.DoFlash(self,Color(32,255,255,0),1);
A_AlertMonsters();
if ( alt ) A_QuakeEx(3,3,3,3,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.12);
else A_QuakeEx(2,2,2,5,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.08);
if ( alt ) A_QuakeEx(2,2,2,8,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.12);
else A_QuakeEx(1,1,1,8,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.08);
let l = Spawn("MinigunLight",pos);
l.target = self;
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*4.0;
Vector3 origin = pos+(0,0,player.viewheight)+10.0*x+y*2.0-z*2.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();
@ -159,6 +160,14 @@ Class Minigun : UTWeapon
t.pitch = asin(-dir.z);
MinigunTracer(t).dest = d.HitLocation;
}
for ( int i=0; i<8; i++ )
{
let s = Spawn("UTViewSmoke",origin);
UTViewSmoke(s).ofs = (10,2,-2);
s.scale *= 1.5;
UTViewSmoke(s).vvel += (FRandom[Minigun](0.2,0.8),FRandom[Minigun](-0.3,0.3),FRandom[Minigun](-0.3,0.3));
s.target = self;
}
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);

View file

@ -84,6 +84,46 @@ Class PulseSpark : Actor
}
}
Class ViewPulseSpark : PulseSpark
{
Vector3 ofs, vvel;
override void PostBeginPlay()
{
Actor.PostBeginPlay();
scale *= FRandom[Puff](0.4,0.9);
alpha *= FRandom[Puff](0.5,2.0);
roll = FRandom[Pulse](0,360);
}
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.9;
scale *= 0.8;
if ( scale.x <= 0.01 ) Destroy();
}
States
{
Spawn:
PSPK A 1 Bright A_FadeOut(FRandom[Pulse](0.0,0.15));
Wait;
}
}
Class PulseBallLight : DynamicLight
{
double pulseofs;
@ -146,6 +186,7 @@ Class PulseBall : Actor
PROJECTILE;
+EXPLODEONWATER;
+SKYEXPLODE;
+FORCEXYBILLBOARD;
Scale 0.19;
Speed 29;
Radius 2;
@ -239,6 +280,24 @@ Class PulseBoltTracer : LineTracer
Class PulseBoltCap : Actor
{
override void OnDestroy()
{
Super.OnDestroy();
if ( tracer ) tracer.Destroy();
}
override void Tick()
{
Super.Tick();
if ( bAMBUSH ) return;
if ( !tracer )
{
tracer = Spawn(GetClass(),pos);
tracer.bAMBUSH = true;
}
tracer.SetOrigin(pos,true);
}
Default
{
RenderStyle "Add";
@ -260,6 +319,23 @@ Class PulseBoltCap : Actor
Class PulseBoltHit : Actor
{
override void OnDestroy()
{
Super.OnDestroy();
if ( tracer ) tracer.Destroy();
}
override void Tick()
{
Super.Tick();
if ( bAMBUSH ) return;
if ( !tracer )
{
tracer = Spawn(GetClass(),pos);
tracer.bAMBUSH = true;
}
}
Default
{
RenderStyle "Add";
@ -332,11 +408,19 @@ Class PulseBolt : Actor
accdamage = 0;
}
}
if ( t.Results.HitType == TRACE_HitWall ) t.Results.HitLine.RemoteActivate(tracer,t.Results.Side,SPAC_Impact,t.Results.HitPos);
Vector3 norm = -x;
if ( t.Results.HitType == TRACE_HitWall )
{
norm = (t.Results.HitLine.delta.y,-t.Results.HitLine.delta.x,0).unit();
if ( t.Results.Side ) norm *= -1;
t.Results.HitLine.RemoteActivate(tracer,t.Results.Side,SPAC_Impact,t.Results.HitPos);
}
else if ( t.Results.HitType == TRACE_HitFloor ) norm = t.Results.HitSector.floorplane.Normal;
else if ( t.Results.HitType == TRACE_HitCeiling ) norm = t.Results.HitSector.ceilingplane.Normal;
int numpt = Random[Pulse](10,20)*!Random[Pulse](0,2);
for ( int i=0; i<numpt; i++ )
{
Vector3 pvel = ((FRandom[Pulse](-.4,.5),FRandom[Pulse](-.4,.4),FRandom[Pulse](-.4,.4))-x).unit()*FRandom[Pulse](2,4);
Vector3 pvel = (norm+(FRandom[Pulse](-.6,.6),FRandom[Pulse](-.6,.6),FRandom[Pulse](-.6,.6))).unit()*FRandom[Pulse](2,4);
let s = Spawn("PulseSpark",t.Results.HitPos-t.Results.HitVector*4);
s.vel = pvel;
}
@ -346,7 +430,11 @@ Class PulseBolt : Actor
weffect = null;
}
if ( !weffect ) weffect = Spawn("PulseBoltHit",t.Results.HitPos-t.Results.HitVector*4);
else weffect.SetOrigin(t.Results.HitPos-t.Results.HitVector*4,true);
else
{
weffect.SetOrigin(t.Results.HitPos-t.Results.HitVector*4,true);
if ( weffect.tracer ) weffect.tracer.SetOrigin(t.Results.HitPos-t.Results.HitVector*4,true);
}
A_SprayDecal("BoltScorch",beamsize+8);
if ( next )
{
@ -367,7 +455,7 @@ Class PulseBolt : Actor
int numpt = Random[Pulse](5,10)*!Random[Pulse](0,5);
for ( int i=0; i<numpt; i++ )
{
Vector3 pvel = (t.Results.HitVector+(FRandom[Pulse](-.5,.5),FRandom[Pulse](-.5,.5),FRandom[Pulse](-.5,.5))).unit()*FRandom[Pulse](2,4);
Vector3 pvel = (t.Results.HitVector+(FRandom[Pulse](-.6,.6),FRandom[Pulse](-.6,.6),FRandom[Pulse](-.6,.6))).unit()*FRandom[Pulse](2,4);
let s = Spawn("PulseSpark",t.Results.HitPos);
s.vel = pvel;
}
@ -377,7 +465,11 @@ Class PulseBolt : Actor
weffect = null;
}
if ( !weffect ) weffect = Spawn("PulseBoltCap",t.Results.HitPos);
else weffect.SetOrigin(t.Results.HitPos,true);
else
{
weffect.SetOrigin(t.Results.HitPos,true);
if ( weffect.tracer ) weffect.tracer.SetOrigin(t.Results.HitPos,true);
}
}
else
{
@ -489,12 +581,23 @@ Class PulseGun : UTWeapon
Vector3 x, y, z;
[x, y, z] = Matrix4.GetAxes(pitch,angle,roll);
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<4; i++ )
{
let s = Spawn("UTViewSmoke",origin);
UTViewSmoke(s).ofs = (10,4.1,-2.7);
s.scale *= 1.8;
s.target = self;
s.SetShade("206010");
s.A_SetRenderStyle(0.4,STYLE_AddShaded);
UTViewSmoke(s).vvel += (FRandom[Pulse](0.2,0.6),FRandom[Pulse](-0.2,0.2),FRandom[Pulse](-0.2,0.2));
}
int numpt = Random[Pulse](8,16);
for ( int i=0; i<numpt; i++ )
{
Vector3 pvel = (x+(FRandom[Pulse](-.5,.5),FRandom[Pulse](-.5,.5),FRandom[Pulse](-.5,.5))).unit()*FRandom[Pulse](2,4);
let s = Spawn("PulseSpark",origin);
s.vel = pvel;
let s = Spawn("ViewPulseSpark",origin);
ViewPulseSpark(s).ofs = (10,4.1,-2.7);
s.target = self;
ViewPulseSpark(s).vvel += (FRandom[Pulse](0.2,0.8),FRandom[Pulse](-0.5,0.5),FRandom[Pulse](-0.5,0.5));
}
}
action void A_PulseRefire( statelabel flash = null, bool noreload = false )
@ -542,7 +645,7 @@ Class PulseGun : UTWeapon
Vector3 x, y, z;
double a;
[x, y, z] = Matrix4.GetAxes(pitch,angle,roll);
Vector3 origin = Vec2OffsetZ(0,0,player.viewz)+10.0*x+4.0*y-1.5*z;
Vector3 origin = Vec2OffsetZ(0,0,player.viewz)+10.0*x+3.0*y-1.8*z;
origin += y*cos(invoker.sangle)*2.0+z*sin(invoker.sangle)*2.0;
invoker.sangle += 100;
Actor p = Spawn("PulseBall",origin);
@ -550,12 +653,23 @@ Class PulseGun : 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;
int numpt = Random[Pulse](2,5);
for ( int i=0; i<8; i++ )
{
let s = Spawn("UTViewSmoke",origin);
UTViewSmoke(s).ofs = (10,3.0,-1.8);
s.scale *= 1.8;
s.target = self;
s.SetShade("206010");
s.A_SetRenderStyle(0.4,STYLE_AddShaded);
UTViewSmoke(s).vvel += (FRandom[Pulse](0.4,0.8),FRandom[Pulse](-0.2,0.2),FRandom[Pulse](-0.2,0.2));
}
int numpt = Random[Pulse](8,16);
for ( int i=0; i<numpt; i++ )
{
Vector3 pvel = (x+(FRandom[Pulse](-.5,.5),FRandom[Pulse](-.5,.5),FRandom[Pulse](-.5,.5))).unit()*FRandom[Pulse](2,4);
let s = Spawn("PulseSpark",origin);
s.vel = pvel;
let s = Spawn("ViewPulseSpark",origin);
ViewPulseSpark(s).ofs = (10,3.0,-1.8);
s.target = self;
ViewPulseSpark(s).vvel += (FRandom[Pulse](0.4,1.6),FRandom[Pulse](-1.2,1.2),FRandom[Pulse](-1.2,1.2));
}
}
action void A_StartBeam()

View file

@ -271,10 +271,10 @@ Class Ripper2 : UTWeapon
UTMainHandler.DoFlash(self,Color(8,0,255,255),1);
A_AlertMonsters();
if ( alt ) A_QuakeEx(3,3,3,8,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
else A_QuakeEx(2,2,2,5,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.08);
else A_QuakeEx(1,1,1,5,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.08);
Vector3 x, y, z;
[x, y, z] = Matrix4.GetAxes(pitch,angle,roll);
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+8.0*y-7.0*z;
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+6.0*y-4.0*z;
Actor p;
if ( alt ) p = Spawn("Razor2Alt",origin);
else p = Spawn("Razor2",origin);

View file

@ -916,6 +916,46 @@ Class SuperShockBall : Actor
}
}
Class ViewShockSpark : ShockSpark
{
Vector3 ofs, vvel;
override void PostBeginPlay()
{
Actor.PostBeginPlay();
scale *= FRandom[Puff](0.4,0.9);
alpha *= FRandom[Puff](0.5,2.0);
roll = FRandom[ASMD](0,360);
}
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.9;
scale *= 0.8;
if ( scale.x <= 0.01 ) Destroy();
}
States
{
Spawn:
ASMK A 1 Bright A_FadeOut(FRandom[ASMD](0.0,0.1));
Wait;
}
}
Class ShockRifle : UTWeapon
{
action void A_ShockFire()
@ -928,14 +968,32 @@ Class ShockRifle : UTWeapon
invoker.FireEffect();
UTMainHandler.DoFlash(self,Color(128,128,0,255),1);
A_AlertMonsters();
A_QuakeEx(3,3,3,4,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
A_QuakeEx(2,2,2,4,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
Vector3 x, y, z;
[x, y, z] = Matrix4.GetAxes(pitch,angle,roll);
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+3.0*y-4.0*z;
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+2.0*y-1.5*z;
Actor p = Spawn("ShockBeam",origin);
p.angle = angle;
p.pitch = BulletSlope();
p.target = self;
for ( int i=0; i<12; i++ )
{
let s = Spawn("UTViewSmoke",origin);
UTViewSmoke(s).ofs = (10,2,-1.5);
s.scale *= 1.8;
s.target = self;
s.SetShade("C080FF");
s.A_SetRenderStyle(0.4,STYLE_AddShaded);
UTViewSmoke(s).vvel += (FRandom[ASMD](0.2,0.6),FRandom[ASMD](-0.2,0.2),FRandom[ASMD](-0.2,0.2));
}
int numpt = Random[ASMD](20,40);
for ( int i=0; i<numpt; i++ )
{
let s = Spawn("ViewShockSpark",origin);
ViewShockSpark(s).ofs = (10,2,-1.5);
s.target = self;
ViewShockSpark(s).vvel += (FRandom[ASMD](0.5,2.0),FRandom[ASMD](-1.5,1.5),FRandom[ASMD](-1.5,1.5));
}
}
action void A_ShockAlt()
{
@ -947,15 +1005,33 @@ Class ShockRifle : UTWeapon
invoker.FireEffect();
UTMainHandler.DoFlash(self,Color(128,128,0,255),1);
A_AlertMonsters();
A_QuakeEx(3,3,3,8,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
A_QuakeEx(2,2,2,8,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
Vector3 x, y, z;
[x, y, z] = Matrix4.GetAxes(pitch,angle,roll);
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+3.0*y-4.0*z;
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+2.0*y-1.5*z;
Actor p = Spawn("ShockBall",origin);
p.angle = angle;
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,2,-1.5);
s.scale *= 2.2;
s.target = self;
s.SetShade("C080FF");
s.A_SetRenderStyle(0.4,STYLE_AddShaded);
UTViewSmoke(s).vvel += (FRandom[ASMD](0.4,1.2),FRandom[ASMD](-0.4,0.4),FRandom[ASMD](-0.4,0.4));
}
int numpt = Random[ASMD](20,40);
for ( int i=0; i<numpt; i++ )
{
let s = Spawn("ViewShockSpark",origin);
ViewShockSpark(s).ofs = (10,2,-1.5);
s.target = self;
ViewShockSpark(s).vvel += (FRandom[ASMD](0.5,2.0),FRandom[ASMD](-1.5,1.5),FRandom[ASMD](-1.5,1.5));
}
}
Default
@ -1025,6 +1101,17 @@ Class EnhancedShockAmmo : Ammo
}
}
Class ViewSuperShockSpark : ViewShockSpark
{
States
{
Spawn:
SSMK A 1 Bright A_FadeOut(FRandom[ASMD](0.0,0.1));
Wait;
}
}
Class EnhancedShockRifle : UTWeapon replaces InvulnerabilitySphere
{
int ticcnt;
@ -1048,14 +1135,32 @@ Class EnhancedShockRifle : UTWeapon replaces InvulnerabilitySphere
invoker.FireEffect();
UTMainHandler.DoFlash(self,Color(128,255,128,0),1);
A_AlertMonsters();
A_QuakeEx(8,8,8,12,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.25);
A_QuakeEx(3,3,3,4,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.15);
Vector3 x, y, z;
[x, y, z] = Matrix4.GetAxes(pitch,angle,roll);
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+3.0*y-4.0*z;
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+2.0*y-1.5*z;
Actor p = Spawn("SuperShockBeam",origin);
p.angle = angle;
p.pitch = BulletSlope();
p.target = self;
for ( int i=0; i<12; i++ )
{
let s = Spawn("UTViewSmoke",origin);
UTViewSmoke(s).ofs = (10,2,-1.5);
s.scale *= 1.8;
s.target = self;
s.SetShade("FFC040");
s.A_SetRenderStyle(0.4,STYLE_AddShaded);
UTViewSmoke(s).vvel += (FRandom[ASMD](0.2,0.6),FRandom[ASMD](-0.2,0.2),FRandom[ASMD](-0.2,0.2));
}
int numpt = Random[ASMD](20,40);
for ( int i=0; i<numpt; i++ )
{
let s = Spawn("ViewSuperShockSpark",origin);
ViewShockSpark(s).ofs = (10,2,-1.5);
s.target = self;
ViewShockSpark(s).vvel += (FRandom[ASMD](0.5,2.0),FRandom[ASMD](-1.5,1.5),FRandom[ASMD](-1.5,1.5));
}
}
action void A_SShockAlt()
{
@ -1067,15 +1172,33 @@ Class EnhancedShockRifle : UTWeapon replaces InvulnerabilitySphere
invoker.FireEffect();
UTMainHandler.DoFlash(self,Color(128,255,128,0),1);
A_AlertMonsters();
A_QuakeEx(8,8,8,16,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.25);
A_QuakeEx(3,3,3,4,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.15);
Vector3 x, y, z;
[x, y, z] = Matrix4.GetAxes(pitch,angle,roll);
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+3.0*y-4.0*z;
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x+2.0*y-1.5*z;
Actor p = Spawn("SuperShockBall",origin);
p.angle = angle;
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,2,-1.5);
s.scale *= 2.2;
s.target = self;
s.SetShade("FFC040");
s.A_SetRenderStyle(0.4,STYLE_AddShaded);
UTViewSmoke(s).vvel += (FRandom[ASMD](0.4,1.2),FRandom[ASMD](-0.4,0.4),FRandom[ASMD](-0.4,0.4));
}
int numpt = Random[ASMD](20,40);
for ( int i=0; i<numpt; i++ )
{
let s = Spawn("ViewSuperShockSpark",origin);
ViewShockSpark(s).ofs = (10,2,-1.5);
s.target = self;
ViewShockSpark(s).vvel += (FRandom[ASMD](0.5,2.0),FRandom[ASMD](-1.5,1.5),FRandom[ASMD](-1.5,1.5));
}
}
override bool CheckAmmo( int fireMode, bool autoSwitch, bool requireAmmo, int ammocount )
{

View file

@ -120,6 +120,15 @@ Class SniperRifle : UTWeapon
p.pitch = asin(-hitnormal.z);
if ( d.HitLine ) d.HitLine.RemoteActivate(self,d.LineSide,SPAC_Impact,d.HitLocation);
}
for ( int i=0; i<24; i++ )
{
let s = Spawn("UTStaticViewSmoke",origin);
UTViewSmoke(s).ofs = (10,1,-1);
UTViewSmoke(s).vvel += (FRandom[Sniper](-0.05,0.15),FRandom[Sniper](-0.4,0.4),FRandom[Sniper](-0.1,0.1));
s.target = self;
s.scale *= 1.8;
s.alpha *= 0.3;
}
origin += x*8.0+y*6.0-z*9.0;
let c = Spawn("UTCasing",origin);
c.scale *= 1.25;

View file

@ -390,6 +390,37 @@ Class UTSpark : Actor
}
}
Class UTViewSpark : UTSpark
{
Default
{
+NOCLIP;
-MISSILE;
BounceType "None";
}
Vector3 ofs, vvel;
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.z -= 0.1;
scale *= 0.8;
if ( (scale.x <= 0.01) || (waterlevel > 0) ) Destroy();
}
}
Class UTChip : Actor
{
int deadtimer;
@ -635,6 +666,16 @@ Class UTViewSmoke : UTSmoke
}
}
Class UTStaticViewSmoke : UTViewSmoke
{
override void PostBeginPlay()
{
Actor.PostBeginPlay();
scale *= FRandom[Puff](0.1,0.3);
alpha *= FRandom[Puff](0.5,1.5);
}
}
Class UTRedSkull : RedSkull replaces RedSkull
{
Default