Impaler has been implemented. Beta testing begins.
|
|
@ -3,7 +3,7 @@
|
||||||
The Unreal 1 counterpart to Doom Tournament. Adds Unreal 1 weapons and items
|
The Unreal 1 counterpart to Doom Tournament. Adds Unreal 1 weapons and items
|
||||||
(including dummied out stuff and others).
|
(including dummied out stuff and others).
|
||||||
|
|
||||||
This mod requires GZDoom g4.3pre-79-gbcef44051 or later, and runs on top of
|
This mod requires GZDoom g4.3pre-125-g021e548db or later, and runs on top of
|
||||||
Doom Tournament (currently the devel branch is required).
|
Doom Tournament (currently the devel branch is required).
|
||||||
|
|
||||||
## Currently Implemented
|
## Currently Implemented
|
||||||
|
|
@ -38,6 +38,7 @@ Doom Tournament (currently the devel branch is required).
|
||||||
- Stunner (slot 4) (replaces chainsaw)
|
- Stunner (slot 4) (replaces chainsaw)
|
||||||
- Fireblaster (slot 5) (replaces rocket launcher)
|
- Fireblaster (slot 5) (replaces rocket launcher)
|
||||||
- Flamethrower (slot 6) (replaces plasma rifle)
|
- Flamethrower (slot 6) (replaces plasma rifle)
|
||||||
|
- Impaler (slot 7) (replaces plasma rifle)
|
||||||
- Peacemaker (slot 8) (rare spawn in backpacks)
|
- Peacemaker (slot 8) (rare spawn in backpacks)
|
||||||
- Demolisher (slot 9) (replaces bfg9000)
|
- Demolisher (slot 9) (replaces bfg9000)
|
||||||
- Autocannon (slot 0) (replaces bfg9000)
|
- Autocannon (slot 0) (replaces bfg9000)
|
||||||
|
|
@ -73,7 +74,7 @@ Doom Tournament (currently the devel branch is required).
|
||||||
|
|
||||||
## In progress
|
## In progress
|
||||||
|
|
||||||
- Impaler (slot 7) (replaces plasma rifle)
|
- Beta testing
|
||||||
|
|
||||||
## Planned
|
## Planned
|
||||||
|
|
||||||
|
|
|
||||||
29
gldefs.txt
|
|
@ -411,6 +411,35 @@ Object UFireballEmber
|
||||||
Frame "FIRB" { light "UFLAMGLIGHT3" }
|
Frame "FIRB" { light "UFLAMGLIGHT3" }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PointLight IMPALERLIGHT
|
||||||
|
{
|
||||||
|
Color 1.0 0.2 0.8
|
||||||
|
Size 50
|
||||||
|
Attenuate 1
|
||||||
|
}
|
||||||
|
Object ImpalerProjectile
|
||||||
|
{
|
||||||
|
Frame "TPRJA" { light "IMPALERLIGHT" }
|
||||||
|
}
|
||||||
|
|
||||||
|
FlickerLight2 IBOLTLIGHT
|
||||||
|
{
|
||||||
|
Color 0.5 0.1 0.5
|
||||||
|
Size 40
|
||||||
|
SecondarySize 48
|
||||||
|
Interval 0.1
|
||||||
|
Offset 0 0 20
|
||||||
|
Attenuate 1
|
||||||
|
}
|
||||||
|
Object ImpalerBolt
|
||||||
|
{
|
||||||
|
Frame "PBLT" { light "IBOLTLIGHT" }
|
||||||
|
}
|
||||||
|
Object StarterImpalerBolt
|
||||||
|
{
|
||||||
|
Frame "PBLT" { light "IBOLTLIGHT" }
|
||||||
|
}
|
||||||
|
|
||||||
// Shaders / Brightmaps
|
// Shaders / Brightmaps
|
||||||
HardwareShader Texture "graphics/MenuBarr.png"
|
HardwareShader Texture "graphics/MenuBarr.png"
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -21,12 +21,80 @@ Model "ImpalerAmmo2"
|
||||||
FrameIndex IAMO A 0 0
|
FrameIndex IAMO A 0 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Model "ImpalerBurstBolt"
|
||||||
|
{
|
||||||
|
Path "models"
|
||||||
|
Model 0 "PBolt_d.3d"
|
||||||
|
Offset 5.0125 0 0
|
||||||
|
Scale 0.050125 0.1025 0.123
|
||||||
|
AngleOffset 90
|
||||||
|
DONTCULLBACKFACES
|
||||||
|
USEACTORPITCH
|
||||||
|
USEACTORROLL
|
||||||
|
|
||||||
|
Skin 0 "ibolt0.png"
|
||||||
|
FrameIndex PBLT A 0 0
|
||||||
|
Skin 0 "ibolt1.png"
|
||||||
|
FrameIndex PBLT B 0 0
|
||||||
|
Skin 0 "ibolt2.png"
|
||||||
|
FrameIndex PBLT C 0 0
|
||||||
|
Skin 0 "ibolt3.png"
|
||||||
|
FrameIndex PBLT D 0 0
|
||||||
|
Skin 0 "ibolt4.png"
|
||||||
|
FrameIndex PBLT E 0 0
|
||||||
|
}
|
||||||
|
|
||||||
|
Model "ImpalerBolt"
|
||||||
|
{
|
||||||
|
Path "models"
|
||||||
|
Model 0 "PBolt_d.3d"
|
||||||
|
Offset 10.125 0 0
|
||||||
|
Scale 0.10125 0.2025 0.243
|
||||||
|
AngleOffset 90
|
||||||
|
DONTCULLBACKFACES
|
||||||
|
USEACTORPITCH
|
||||||
|
USEACTORROLL
|
||||||
|
|
||||||
|
Skin 0 "ibolt0.png"
|
||||||
|
FrameIndex PBLT A 0 0
|
||||||
|
Skin 0 "ibolt1.png"
|
||||||
|
FrameIndex PBLT B 0 0
|
||||||
|
Skin 0 "ibolt2.png"
|
||||||
|
FrameIndex PBLT C 0 0
|
||||||
|
Skin 0 "ibolt3.png"
|
||||||
|
FrameIndex PBLT D 0 0
|
||||||
|
Skin 0 "ibolt4.png"
|
||||||
|
FrameIndex PBLT E 0 0
|
||||||
|
}
|
||||||
|
|
||||||
|
Model "StarterImpalerBolt"
|
||||||
|
{
|
||||||
|
Path "models"
|
||||||
|
Model 0 "SBolt_d.3d"
|
||||||
|
Offset 10.125 0 0
|
||||||
|
Scale 0.10125 0.2025 0.243
|
||||||
|
AngleOffset 90
|
||||||
|
DONTCULLBACKFACES
|
||||||
|
USEACTORPITCH
|
||||||
|
USEACTORROLL
|
||||||
|
|
||||||
|
Skin 0 "sibolt0.png"
|
||||||
|
FrameIndex PBLT A 0 0
|
||||||
|
Skin 0 "sibolt1.png"
|
||||||
|
FrameIndex PBLT B 0 0
|
||||||
|
Skin 0 "sibolt2.png"
|
||||||
|
FrameIndex PBLT C 0 0
|
||||||
|
Skin 0 "sibolt3.png"
|
||||||
|
FrameIndex PBLT D 0 0
|
||||||
|
Skin 0 "sibolt4.png"
|
||||||
|
FrameIndex PBLT E 0 0
|
||||||
|
}
|
||||||
Model "ImpalerChunk"
|
Model "ImpalerChunk"
|
||||||
{
|
{
|
||||||
Path "models"
|
Path "models"
|
||||||
Model 0 "burstx_d.3d"
|
Model 0 "burstx_d.3d"
|
||||||
Skin 0 "JIBurst1.png"
|
Skin 0 "JIBurst1.png"
|
||||||
Scale 0.2 0.2 0.24
|
Scale 0.4 0.4 0.48
|
||||||
USEACTORPITCH
|
USEACTORPITCH
|
||||||
USEACTORROLL
|
USEACTORROLL
|
||||||
|
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.8 KiB |
|
|
@ -284,6 +284,7 @@ impaler/flesh impflesh
|
||||||
impaler/wall impwall
|
impaler/wall impwall
|
||||||
impaler/altfire impboltl
|
impaler/altfire impboltl
|
||||||
impaler/hit imphit
|
impaler/hit imphit
|
||||||
|
impaler/fly impfly
|
||||||
impaler/beam ele04
|
impaler/beam ele04
|
||||||
|
|
||||||
big/select bigmsel
|
big/select bigmsel
|
||||||
|
|
|
||||||
BIN
sprites/impaler/ICAPA0.png
Normal file
|
After Width: | Height: | Size: 7.8 KiB |
BIN
sprites/impaler/ICAPB0.png
Normal file
|
After Width: | Height: | Size: 7.1 KiB |
BIN
sprites/impaler/ICAPC0.png
Normal file
|
After Width: | Height: | Size: 7.2 KiB |
BIN
sprites/impaler/ICAPD0.png
Normal file
|
After Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
BIN
sprites/impaler/IHITA0.png
Normal file
|
After Width: | Height: | Size: 6.7 KiB |
BIN
sprites/impaler/IHITB0.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
BIN
sprites/impaler/IHITC0.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
BIN
sprites/impaler/IHITD0.png
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
sprites/impaler/ISPKA0.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
|
|
@ -1,10 +1,3 @@
|
||||||
Texture "BLKNESS",64,64
|
|
||||||
{
|
|
||||||
Patch "MFLR8_1",0,0
|
|
||||||
{
|
|
||||||
Blend "#000000",1.0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Sprite "UARMA0",1,1{}
|
Sprite "UARMA0",1,1{}
|
||||||
Sprite "ASBSA0",1,1{}
|
Sprite "ASBSA0",1,1{}
|
||||||
Sprite "TOXSA0",1,1{}
|
Sprite "TOXSA0",1,1{}
|
||||||
|
|
|
||||||
|
|
@ -175,6 +175,8 @@ Class UFireball2 : UFireball
|
||||||
{
|
{
|
||||||
Default
|
Default
|
||||||
{
|
{
|
||||||
|
Radius 8;
|
||||||
|
Height 8;
|
||||||
DamageFunction 50;
|
DamageFunction 50;
|
||||||
Speed 5;
|
Speed 5;
|
||||||
UFireball.SpreadFactor 0.35;
|
UFireball.SpreadFactor 0.35;
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Class ImpalerAmmo : Ammo
|
||||||
{
|
{
|
||||||
Tag "$T_IMPAMMO";
|
Tag "$T_IMPAMMO";
|
||||||
Inventory.Icon "I_Impale";
|
Inventory.Icon "I_Impale";
|
||||||
Inventory.PickupMessage "$T_IMPAMMO";
|
Inventory.PickupMessage "$I_IMPAMMO";
|
||||||
Inventory.Amount 3;
|
Inventory.Amount 3;
|
||||||
Inventory.MaxAmount 15;
|
Inventory.MaxAmount 15;
|
||||||
Ammo.BackpackAmount 3;
|
Ammo.BackpackAmount 3;
|
||||||
|
|
@ -24,13 +24,37 @@ Class ImpalerAmmo2 : ImpalerAmmo
|
||||||
Default
|
Default
|
||||||
{
|
{
|
||||||
Tag "$T_IMPAMMO2";
|
Tag "$T_IMPAMMO2";
|
||||||
Inventory.PickupMessage "$T_IMPAMMO2";
|
Inventory.PickupMessage "$I_IMPAMMO2";
|
||||||
Inventory.Amount 1;
|
Inventory.Amount 1;
|
||||||
Ammo.DropAmount 1;
|
Ammo.DropAmount 1;
|
||||||
+INVENTORY.IGNORESKILL;
|
+INVENTORY.IGNORESKILL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Class ImpalerSpark : PulseSpark
|
||||||
|
{
|
||||||
|
States
|
||||||
|
{
|
||||||
|
Spawn:
|
||||||
|
ISPK A 1 Bright
|
||||||
|
{
|
||||||
|
A_FadeOut(FRandom[Pulse](0.,.15));
|
||||||
|
vel *= .96;
|
||||||
|
}
|
||||||
|
Wait;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Class ViewImpalerSpark : ViewPulseSpark
|
||||||
|
{
|
||||||
|
States
|
||||||
|
{
|
||||||
|
Spawn:
|
||||||
|
ISPK A 1 Bright A_FadeOut(FRandom[Pulse](0.,.15));
|
||||||
|
Wait;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Class ImpalerChunk : StingerChunk
|
Class ImpalerChunk : StingerChunk
|
||||||
{
|
{
|
||||||
override void Tick()
|
override void Tick()
|
||||||
|
|
@ -56,6 +80,444 @@ Class ImpalerBurstLight : PaletteLight
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Class ImpalerBoltTracer : LineTracer
|
||||||
|
{
|
||||||
|
Actor ignoreme;
|
||||||
|
Array<HitListEntry> hitlist;
|
||||||
|
|
||||||
|
override ETraceStatus TraceCallback()
|
||||||
|
{
|
||||||
|
if ( Results.HitType == TRACE_HitActor )
|
||||||
|
{
|
||||||
|
if ( Results.HitActor == ignoreme ) return TRACE_Skip;
|
||||||
|
if ( Results.HitActor.bSHOOTABLE )
|
||||||
|
{
|
||||||
|
let ent = new("HitListEntry");
|
||||||
|
ent.hitactor = Results.HitActor;
|
||||||
|
ent.hitlocation = Results.HitPos;
|
||||||
|
ent.x = Results.HitVector;
|
||||||
|
hitlist.Push(ent);
|
||||||
|
}
|
||||||
|
return TRACE_Skip;
|
||||||
|
}
|
||||||
|
else if ( (Results.HitType == TRACE_HitWall) && (Results.Tier == TIER_Middle) )
|
||||||
|
{
|
||||||
|
if ( !Results.HitLine.sidedef[1] || (Results.HitLine.Flags&(Line.ML_BlockHitscan|Line.ML_BlockEverything)) )
|
||||||
|
return TRACE_Stop;
|
||||||
|
return TRACE_Skip;
|
||||||
|
}
|
||||||
|
return TRACE_Stop;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Class ImpalerBurstBolt : Actor
|
||||||
|
{
|
||||||
|
Vector3 nextpos, nextdir;
|
||||||
|
|
||||||
|
override void Tick()
|
||||||
|
{
|
||||||
|
Super.Tick();
|
||||||
|
frame++;
|
||||||
|
if ( frame >= 5 ) frame = 0;
|
||||||
|
}
|
||||||
|
action void A_Trace()
|
||||||
|
{
|
||||||
|
let t = new("ImpalerBoltTracer");
|
||||||
|
t.hitlist.Clear();
|
||||||
|
Vector3 x, y, z;
|
||||||
|
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||||
|
t.Trace(pos,CurSector,x,11.125,0);
|
||||||
|
for ( int i=0; i<t.hitlist.Size(); i++ )
|
||||||
|
{
|
||||||
|
UTMainHandler.DoKnockback(t.hitlist[i].hitactor,t.hitlist[i].x,6000);
|
||||||
|
t.hitlist[i].hitactor.DamageMobj(self,target,3,'Impaler',DMG_THRUSTLESS);
|
||||||
|
}
|
||||||
|
Vector3 normal = -t.Results.HitVector, dir = t.Results.HitVector;
|
||||||
|
if ( t.Results.HitType == TRACE_HitWall )
|
||||||
|
{
|
||||||
|
normal = (t.Results.HitLine.delta.y,-t.Results.HitLine.delta.x,0).unit();
|
||||||
|
if ( t.Results.Side ) normal *= -1;
|
||||||
|
t.Results.HitLine.RemoteActivate(target,t.Results.Side,SPAC_Impact,t.Results.HitPos);
|
||||||
|
dir -= 2*normal*(dir dot normal);
|
||||||
|
}
|
||||||
|
else if ( t.Results.HitType == TRACE_HitFloor )
|
||||||
|
{
|
||||||
|
if ( t.Results.ffloor ) normal = -t.Results.ffloor.top.Normal;
|
||||||
|
else normal = t.Results.HitSector.floorplane.Normal;
|
||||||
|
dir -= 2*normal*(dir dot normal);
|
||||||
|
}
|
||||||
|
else if ( t.Results.HitType == TRACE_HitCeiling )
|
||||||
|
{
|
||||||
|
if ( t.Results.ffloor ) normal = -t.Results.ffloor.bottom.Normal;
|
||||||
|
else normal = t.Results.HitSector.ceilingplane.Normal;
|
||||||
|
dir -= 2*normal*(dir dot normal);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// why the fuck
|
||||||
|
t.Results.HitPos = level.Vec3Offset(pos,x*10.125);
|
||||||
|
normal *= 0;
|
||||||
|
}
|
||||||
|
double a = FRandom[Impaler](0,360), s = FRandom[Impaler](0.,.8);
|
||||||
|
invoker.nextpos = level.Vec3Offset(t.Results.HitPos,normal);
|
||||||
|
invoker.nextdir = (dir+cos(a)*y*s+sin(a)*z*s).unit();
|
||||||
|
}
|
||||||
|
action void A_Spread()
|
||||||
|
{
|
||||||
|
Vector3 tdir = level.Vec3Diff(pos,invoker.nextpos);
|
||||||
|
double tdist = tdir.length();
|
||||||
|
tdir /= tdist;
|
||||||
|
for ( int i=2; i<tdist; i+=4 )
|
||||||
|
{
|
||||||
|
let s = Spawn("ImpalerSpark",level.Vec3Offset(pos,tdir*i));
|
||||||
|
s.vel = (FRandom[Impaler](-1,1),FRandom[Impaler](-1,1),FRandom[Impaler](-1,1)).unit()*FRandom[Impaler](.2,.8);
|
||||||
|
}
|
||||||
|
if ( special1 > 5 ) return;
|
||||||
|
let b = Spawn("ImpalerBurstBolt",invoker.nextpos);
|
||||||
|
b.angle = atan2(invoker.nextdir.y,invoker.nextdir.x);
|
||||||
|
b.pitch = asin(-invoker.nextdir.z);
|
||||||
|
b.target = target;
|
||||||
|
b.special1 = special1+1;
|
||||||
|
b.frame = frame;
|
||||||
|
}
|
||||||
|
Default
|
||||||
|
{
|
||||||
|
RenderStyle "Add";
|
||||||
|
Obituary "$O_IMPALER1";
|
||||||
|
Radius 0.1;
|
||||||
|
Height 0;
|
||||||
|
+NOGRAVITY;
|
||||||
|
+NOCLIP;
|
||||||
|
+DONTSPLASH;
|
||||||
|
+INTERPOLATEANGLES;
|
||||||
|
+NOTELEPORT;
|
||||||
|
}
|
||||||
|
States
|
||||||
|
{
|
||||||
|
Spawn:
|
||||||
|
PBLT A 1 Bright;
|
||||||
|
PBLT A 1 Bright A_Trace();
|
||||||
|
PBLT # 1 Bright A_Spread();
|
||||||
|
PBLT # 1 Bright A_FadeOut();
|
||||||
|
Wait;
|
||||||
|
Dummy:
|
||||||
|
PBLT ABCDE -1;
|
||||||
|
Stop;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Class ImpalerBoltHit : Actor
|
||||||
|
{
|
||||||
|
Default
|
||||||
|
{
|
||||||
|
RenderStyle "Add";
|
||||||
|
Radius 0.1;
|
||||||
|
Height 0;
|
||||||
|
+NOGRAVITY;
|
||||||
|
+NOCLIP;
|
||||||
|
+DONTSPLASH;
|
||||||
|
+FORCEXYBILLBOARD;
|
||||||
|
+NOTELEPORT;
|
||||||
|
Scale 0.3;
|
||||||
|
}
|
||||||
|
States
|
||||||
|
{
|
||||||
|
Spawn:
|
||||||
|
#### ABCD 1 Bright;
|
||||||
|
Loop;
|
||||||
|
Dummy:
|
||||||
|
IHIT ABCD -1;
|
||||||
|
ICAP ABCD -1;
|
||||||
|
Stop;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Class ImpalerBolt : Actor
|
||||||
|
{
|
||||||
|
const beamsize = 20.25;
|
||||||
|
|
||||||
|
ImpalerBoltTracer t;
|
||||||
|
ImpalerBolt next;
|
||||||
|
StarterImpalerBolt start;
|
||||||
|
Vector3 oldx;
|
||||||
|
Actor weffect;
|
||||||
|
|
||||||
|
override void OnDestroy()
|
||||||
|
{
|
||||||
|
Super.OnDestroy();
|
||||||
|
if ( next ) next.Destroy();
|
||||||
|
if ( weffect ) weffect.Destroy();
|
||||||
|
A_StopSound(CHAN_BODY);
|
||||||
|
}
|
||||||
|
override void PostBeginPlay()
|
||||||
|
{
|
||||||
|
Super.PostBeginPlay();
|
||||||
|
t = new("ImpalerBoltTracer");
|
||||||
|
if ( !(GetClass() is 'StarterImpalerBolt') )
|
||||||
|
A_PlaySound("impaler/beam",CHAN_BODY,.2,true,2.,pitch:.75);
|
||||||
|
}
|
||||||
|
void CheckBeam( Vector3 x )
|
||||||
|
{
|
||||||
|
t.HitList.Clear();
|
||||||
|
if ( bHITOWNER ) t.ignoreme = null;
|
||||||
|
else t.ignoreme = target;
|
||||||
|
t.Trace(pos,cursector,x,beamsize,0);
|
||||||
|
for ( int i=0; i<t.HitList.Size(); i++ )
|
||||||
|
{
|
||||||
|
if ( !(GetAge()%5) )
|
||||||
|
{
|
||||||
|
UTMainHandler.DoKnockback(t.hitlist[i].hitactor,t.hitlist[i].x,500*specialf1**2);
|
||||||
|
t.hitlist[i].hitactor.DamageMobj(self,target,int(2*specialf1**3),'Impaler',DMG_THRUSTLESS);
|
||||||
|
}
|
||||||
|
if ( start.Hitlist.Find(t.HitList[i].HitActor) == start.HitList.Size() )
|
||||||
|
start.Hitlist.Push(t.HitList[i].HitActor);
|
||||||
|
}
|
||||||
|
// seeking
|
||||||
|
double closest = 500;
|
||||||
|
if ( tracer )
|
||||||
|
{
|
||||||
|
double closest = Distance3D(tracer);
|
||||||
|
if ( (closest > 500) || (tracer.Health <= 0) )
|
||||||
|
{
|
||||||
|
tracer = null;
|
||||||
|
closest = 500;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let bt = BlockThingsIterator.Create(self,closest);
|
||||||
|
while ( bt.Next() )
|
||||||
|
{
|
||||||
|
let a = bt.Thing;
|
||||||
|
if ( !a || !a.bSHOOTABLE || !a.bISMONSTER || (a.Health <= 0) || !CheckSight(a) || (start.Hitlist.Find(a) < start.HitList.Size()) ) continue;
|
||||||
|
Vector3 dirto = level.Vec3Diff(pos,a.Vec3Offset(0,0,a.height/2));
|
||||||
|
double dist = dirto.length();
|
||||||
|
dirto /= dist;
|
||||||
|
if ( dirto dot x < .5 ) continue;
|
||||||
|
if ( dist > closest ) continue;
|
||||||
|
tracer = a;
|
||||||
|
closest = dist;
|
||||||
|
}
|
||||||
|
if ( tracer ) special1 = 0;
|
||||||
|
Vector3 normal = -t.Results.HitVector, dir = t.Results.HitVector;
|
||||||
|
if ( t.Results.HitType == TRACE_HitWall )
|
||||||
|
{
|
||||||
|
normal = (t.Results.HitLine.delta.y,-t.Results.HitLine.delta.x,0).unit();
|
||||||
|
if ( t.Results.Side ) normal *= -1;
|
||||||
|
t.Results.HitLine.RemoteActivate(target,t.Results.Side,SPAC_Impact,t.Results.HitPos);
|
||||||
|
dir -= 2*normal*(dir dot normal);
|
||||||
|
}
|
||||||
|
else if ( t.Results.HitType == TRACE_HitFloor )
|
||||||
|
{
|
||||||
|
if ( t.Results.ffloor ) normal = -t.Results.ffloor.top.Normal;
|
||||||
|
else normal = t.Results.HitSector.floorplane.Normal;
|
||||||
|
dir -= 2*normal*(dir dot normal);
|
||||||
|
}
|
||||||
|
else if ( t.Results.HitType == TRACE_HitCeiling )
|
||||||
|
{
|
||||||
|
if ( t.Results.ffloor ) normal = -t.Results.ffloor.bottom.Normal;
|
||||||
|
else normal = t.Results.HitSector.ceilingplane.Normal;
|
||||||
|
dir -= 2*normal*(dir dot normal);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// why the fuck
|
||||||
|
t.Results.HitPos = level.Vec3Offset(pos,x*beamsize);
|
||||||
|
normal *= 0;
|
||||||
|
}
|
||||||
|
if ( t.Results.HitType != TRACE_HitNone )
|
||||||
|
{
|
||||||
|
A_SprayDecal("BoltScorch",beamsize+8);
|
||||||
|
int numpt = Random[Impaler](10,20)*!Random[Impaler](0,2);
|
||||||
|
for ( int i=0; i<numpt; i++ )
|
||||||
|
{
|
||||||
|
Vector3 pvel = (normal+(FRandom[Impaler](-.6,.6),FRandom[Impaler](-.6,.6),FRandom[Impaler](-.6,.6))).unit()*FRandom[Impaler](2,4);
|
||||||
|
let s = Spawn("ImpalerSpark",t.Results.HitPos+normal*4);
|
||||||
|
s.vel = pvel;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Vector3 tdir = level.Vec3Diff(pos,t.Results.HitPos);
|
||||||
|
double tdist = tdir.length();
|
||||||
|
tdir /= tdist;
|
||||||
|
for ( int i=8; i<tdist; i+=16 )
|
||||||
|
{
|
||||||
|
let s = Spawn("ImpalerSpark",level.Vec3Offset(pos,tdir*i));
|
||||||
|
s.alpha *= .5;
|
||||||
|
s.scale *= .4;
|
||||||
|
s.vel = (FRandom[Impaler](-1,1),FRandom[Impaler](-1,1),FRandom[Impaler](-1,1)).unit()*FRandom[Impaler](.2,.8);
|
||||||
|
}
|
||||||
|
if ( (special1 < int(10*specialf1)) && (special2 < int(40*specialf1**.5)) && (start.hitlist.Size() < int(4*specialf1)) )
|
||||||
|
{
|
||||||
|
if ( !next )
|
||||||
|
{
|
||||||
|
next = ImpalerBolt(Spawn("ImpalerBolt",t.Results.HitPos+normal));
|
||||||
|
next.angle = atan2(dir.y,dir.x);
|
||||||
|
next.pitch = asin(-dir.z);
|
||||||
|
next.target = target;
|
||||||
|
next.start = start;
|
||||||
|
next.tracer = tracer;
|
||||||
|
next.special1 = special1+1;
|
||||||
|
next.special2 = special2+1;
|
||||||
|
next.specialf1 = max(1.,specialf1);
|
||||||
|
next.oldx = dir;
|
||||||
|
next.bHITOWNER = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
next.tracer = tracer;
|
||||||
|
next.special1 = special1+1;
|
||||||
|
next.specialf1 = max(1.,specialf1);
|
||||||
|
next.bHITOWNER = true;
|
||||||
|
next.UpdateBeam(self,t.Results.HitPos+normal,dir);
|
||||||
|
}
|
||||||
|
if ( t.Results.HitType != TRACE_HitNone )
|
||||||
|
{
|
||||||
|
if ( !weffect ) weffect = Spawn("ImpalerBoltHit",t.Results.HitPos+normal*4);
|
||||||
|
weffect.SetOrigin(t.Results.HitPos+normal*4,true);
|
||||||
|
weffect.sprite = weffect.GetSpriteIndex('IHIT');
|
||||||
|
|
||||||
|
}
|
||||||
|
else if ( weffect ) weffect.Destroy();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if ( !weffect ) weffect = Spawn("ImpalerBoltHit",t.Results.HitPos+normal*4);
|
||||||
|
if ( t.Results.HitType != TRACE_HitNone ) weffect.sprite = weffect.GetSpriteIndex('IHIT');
|
||||||
|
else weffect.sprite = weffect.GetSpriteIndex('ICAP');
|
||||||
|
weffect.SetOrigin(t.Results.HitPos+normal*4,true);
|
||||||
|
if ( next ) next.Destroy();
|
||||||
|
}
|
||||||
|
void UpdateBeam( ImpalerBolt parent, Vector3 ofs, Vector3 dir )
|
||||||
|
{
|
||||||
|
bRELATIVETOFLOOR = parent.bRELATIVETOFLOOR;
|
||||||
|
frame = parent.frame;
|
||||||
|
SetOrigin(ofs,true);
|
||||||
|
angle = atan2(dir.y,dir.x);
|
||||||
|
pitch = asin(-dir.z);
|
||||||
|
Vector3 x, y, z, dir;
|
||||||
|
double a = FRandom[Impaler](0,360), s = FRandom[Impaler](0.,.1);
|
||||||
|
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||||
|
Vector3 dirto = (0,0,0);
|
||||||
|
double distto = 0.;
|
||||||
|
if ( tracer && (Distance3D(tracer) > 1) )
|
||||||
|
{
|
||||||
|
dirto = level.Vec3Diff(pos,tracer.Vec3Offset(0,0,tracer.height/2));
|
||||||
|
distto = dirto.length();
|
||||||
|
dirto /= distto;
|
||||||
|
distto = 1.-clamp(distto*0.1,0.,.9);
|
||||||
|
}
|
||||||
|
dir = (x+y*cos(a)*s+z*sin(a)*s+dirto*distto).unit();
|
||||||
|
dir = dir*.5+oldx*.5;
|
||||||
|
oldx = dir;
|
||||||
|
A_SetAngle(atan2(dir.y,dir.x));
|
||||||
|
A_SetPitch(asin(-dir.z));
|
||||||
|
CheckBeam(dir);
|
||||||
|
}
|
||||||
|
Default
|
||||||
|
{
|
||||||
|
RenderStyle "Add";
|
||||||
|
Obituary "$O_IMPALER2";
|
||||||
|
Radius 0.1;
|
||||||
|
Height 0;
|
||||||
|
+NOGRAVITY;
|
||||||
|
+NOCLIP;
|
||||||
|
+DONTSPLASH;
|
||||||
|
+INTERPOLATEANGLES;
|
||||||
|
+NOTELEPORT;
|
||||||
|
}
|
||||||
|
States
|
||||||
|
{
|
||||||
|
Spawn:
|
||||||
|
PBLT # -1 Bright;
|
||||||
|
Stop;
|
||||||
|
Dummy:
|
||||||
|
PBLT ABCDE -1;
|
||||||
|
Stop;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Class ImpalerFlare : Actor
|
||||||
|
{
|
||||||
|
Default
|
||||||
|
{
|
||||||
|
RenderStyle "Add";
|
||||||
|
Scale 0.02;
|
||||||
|
Alpha 0.5;
|
||||||
|
Radius 0.1;
|
||||||
|
Height 0;
|
||||||
|
+NOGRAVITY;
|
||||||
|
+NOCLIP;
|
||||||
|
+DONTSPLASH;
|
||||||
|
+INTERPOLATEANGLES;
|
||||||
|
+NOTELEPORT;
|
||||||
|
+FORCEXYBILLBOARD;
|
||||||
|
+ROLLSPRITE;
|
||||||
|
}
|
||||||
|
States
|
||||||
|
{
|
||||||
|
Spawn:
|
||||||
|
IFLA A -1 Bright;
|
||||||
|
Stop;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Class StarterImpalerBolt : ImpalerBolt
|
||||||
|
{
|
||||||
|
Array<Actor> hitlist;
|
||||||
|
Actor flares[2];
|
||||||
|
|
||||||
|
override void PostBeginPlay()
|
||||||
|
{
|
||||||
|
Super.PostBeginPlay();
|
||||||
|
start = self;
|
||||||
|
flares[0] = Spawn("ImpalerFlare",pos);
|
||||||
|
flares[1] = Spawn("ImpalerFlare",pos);
|
||||||
|
oldx = (cos(angle)*cos(pitch),sin(angle)*cos(pitch),-sin(pitch));
|
||||||
|
}
|
||||||
|
override void OnDestroy()
|
||||||
|
{
|
||||||
|
Super.OnDestroy();
|
||||||
|
if ( flares[0] ) flares[0].Destroy();
|
||||||
|
if ( flares[1] ) flares[1].Destroy();
|
||||||
|
}
|
||||||
|
override void Tick()
|
||||||
|
{
|
||||||
|
Super.Tick();
|
||||||
|
frame++;
|
||||||
|
if ( frame > 4 ) frame = 0;
|
||||||
|
if ( isFrozen() ) return;
|
||||||
|
if ( !target )
|
||||||
|
{
|
||||||
|
Destroy();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Vector3 x, y, z, origin;
|
||||||
|
bRELATIVETOFLOOR = (target.pos.z <= target.floorz); // hack, but kinda works
|
||||||
|
if ( target.player )
|
||||||
|
{
|
||||||
|
[x, y, z] = dt_CoordUtil.GetAxes(target.pitch,target.angle,target.roll);
|
||||||
|
origin = target.Vec2OffsetZ(0,0,target.player.viewz)+15*x+2*y-2.5*z;
|
||||||
|
}
|
||||||
|
else origin = target.Vec3Offset(0,0,target.missileheight);
|
||||||
|
SetOrigin(origin,true);
|
||||||
|
if ( !flares[0] ) flares[0] = Spawn("ImpalerFlare",pos);
|
||||||
|
if ( !flares[1] ) flares[1] = Spawn("ImpalerFlare",pos);
|
||||||
|
flares[1].bRELATIVETOFLOOR = flares[0].bRELATIVETOFLOOR = bRELATIVETOFLOOR;
|
||||||
|
flares[0].SetOrigin(pos,true);
|
||||||
|
flares[1].SetOrigin(pos,true);
|
||||||
|
flares[0].roll += 15.;
|
||||||
|
flares[1].roll += 5.;
|
||||||
|
flares[0].A_SetScale(0.01+cos(gametic*8)*0.002);
|
||||||
|
flares[1].A_SetScale(0.02+cos(gametic*8)*0.004);
|
||||||
|
double a = FRandom[Impaler](0,360), s = FRandom[Impaler](0.,.1);
|
||||||
|
[x, y, z] = dt_CoordUtil.GetAxes(target.pitch,target.angle,target.roll);
|
||||||
|
Vector3 dir = (x+cos(a)*y*s+sin(a)*z*s).unit();
|
||||||
|
dir = oldx*.5+dir*.5;
|
||||||
|
oldx = dir;
|
||||||
|
A_SetAngle(atan2(dir.y,dir.x));
|
||||||
|
A_SetPitch(asin(-dir.z));
|
||||||
|
hitlist.Clear();
|
||||||
|
CheckBeam((cos(angle)*cos(pitch),sin(angle)*cos(pitch),-sin(pitch)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Class ImpalerProjectile : Actor
|
Class ImpalerProjectile : Actor
|
||||||
{
|
{
|
||||||
Default
|
Default
|
||||||
|
|
@ -70,20 +532,28 @@ Class ImpalerProjectile : Actor
|
||||||
+EXPLODEONWATER;
|
+EXPLODEONWATER;
|
||||||
+FORCERADIUSDMG;
|
+FORCERADIUSDMG;
|
||||||
+NODAMAGETHRUST;
|
+NODAMAGETHRUST;
|
||||||
|
+INTERPOLATEANGLES;
|
||||||
|
}
|
||||||
|
override void PostBeginPlay()
|
||||||
|
{
|
||||||
|
Super.PostBeginPlay();
|
||||||
|
A_PlaySound("impaler/fly",CHAN_BODY,1.,true,2.);
|
||||||
}
|
}
|
||||||
action void A_ImpalerHit()
|
action void A_ImpalerHit()
|
||||||
{
|
{
|
||||||
|
A_StopSound(CHAN_BODY);
|
||||||
bFORCEXYBILLBOARD = true;
|
bFORCEXYBILLBOARD = true;
|
||||||
scale *= 2.+special1*0.01;
|
scale *= 2.+special1*0.01;
|
||||||
A_AlertMonsters();
|
A_AlertMonsters();
|
||||||
A_SetRenderStyle(1.,STYLE_Add);
|
A_SetRenderStyle(1.,STYLE_Add);
|
||||||
A_NoGravity();
|
A_NoGravity();
|
||||||
A_Explode(90+special1,120+special1/2);
|
A_Explode(50+special1/2,120+special1/5);
|
||||||
UTMainHandler.DoBlast(self,120+special1/2,40000);
|
UTMainHandler.DoBlast(self,120+special1/5,40000);
|
||||||
A_QuakeEx(2,2,2,5,0,250+special1/2,"",QF_RELATIVE|QF_SCALEDOWN,falloff:120+special1/2,rollintensity:0.2);
|
A_QuakeEx(2,2,2,5,0,250+special1/5,"",QF_RELATIVE|QF_SCALEDOWN,falloff:120+special1/2,rollintensity:0.2);
|
||||||
A_PlaySound("impaler/hit",CHAN_VOICE);
|
A_PlaySound("impaler/hit",CHAN_VOICE);
|
||||||
A_SprayDecal("WallCrack",20);
|
A_SprayDecal("ShockMark",20);
|
||||||
Spawn("ImpalerBurstLight",pos);
|
let l = Spawn("ImpalerBurstLight",pos);
|
||||||
|
l.Args[3] += special1/5;
|
||||||
double ang, pt;
|
double ang, pt;
|
||||||
int numpt = Random[Impaler](4,8);
|
int numpt = Random[Impaler](4,8);
|
||||||
for ( int i=0; i<numpt; i++ )
|
for ( int i=0; i<numpt; i++ )
|
||||||
|
|
@ -106,12 +576,77 @@ Class ImpalerProjectile : Actor
|
||||||
c.bBRIGHT = true;
|
c.bBRIGHT = true;
|
||||||
c.alpha *= .5;
|
c.alpha *= .5;
|
||||||
}
|
}
|
||||||
|
numpt = Random[Impaler](8,15);
|
||||||
|
for ( int i=0; i<numpt; i++ )
|
||||||
|
{
|
||||||
|
Vector3 pvel = (FRandom[Impaler](-1,1),FRandom[Impaler](-1,1),FRandom[Impaler](-1,1)).unit()*FRandom[Impaler](1,3);
|
||||||
|
let s = Spawn("UTSmoke",pos);
|
||||||
|
s.vel = pvel;
|
||||||
|
}
|
||||||
|
numpt = Random[Impaler](8,16);
|
||||||
|
for ( int i=0; i<numpt; i++ )
|
||||||
|
{
|
||||||
|
Vector3 pvel = (FRandom[Impaler](-1,1),FRandom[Impaler](-1,1),FRandom[Impaler](-1,1)).unit()*FRandom[Impaler](2,6);
|
||||||
|
let s = Spawn("UTSpark",pos);
|
||||||
|
s.vel = pvel;
|
||||||
|
}
|
||||||
|
numpt = Random[Impaler](20,30);
|
||||||
|
for ( int i=0; i<numpt; i++ )
|
||||||
|
{
|
||||||
|
Vector3 pvel = (FRandom[Impaler](-1,1),FRandom[Impaler](-1,1),FRandom[Impaler](-1,1)).unit()*FRandom[Impaler](2,12);
|
||||||
|
let s = Spawn("UTChip",pos);
|
||||||
|
s.vel = pvel;
|
||||||
|
s.scale *= FRandom[Impaler](0.9,2.7);
|
||||||
|
}
|
||||||
|
numpt = 3+min(20,special1/10);
|
||||||
|
for ( int i=0; i<numpt; i++ )
|
||||||
|
{
|
||||||
|
ang = FRandom[Impaler](0,360);
|
||||||
|
pt = FRandom[Impaler](-90,90);
|
||||||
|
let b = Spawn("ImpalerBurstBolt",Vec3Offset(0,0,height/2));
|
||||||
|
b.angle = ang;
|
||||||
|
b.pitch = pt;
|
||||||
|
b.target = target;
|
||||||
|
b.special1 = Random[Impaler](-3,3);
|
||||||
|
b.special1 -= special1/30;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
Spawn:
|
Spawn:
|
||||||
TPRJ A -1;
|
TPRJ A 1
|
||||||
Stop;
|
{
|
||||||
|
roll += 15.;
|
||||||
|
double ang, pt;
|
||||||
|
int numpt;
|
||||||
|
if ( special1 > 80 )
|
||||||
|
{
|
||||||
|
numpt = special1/90;
|
||||||
|
for ( int i=0; i<numpt; i++ )
|
||||||
|
{
|
||||||
|
ang = FRandom[Impaler](0,360);
|
||||||
|
pt = FRandom[Impaler](-90,90);
|
||||||
|
let c = Spawn("ImpalerSpark",pos);
|
||||||
|
c.vel = vel*0.5+(cos(ang)*cos(pt),sin(ang)*cos(pt),-sin(pt))*FRandom[Impaler](.2,.8)*(special1/90.);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ( special1 > 120 )
|
||||||
|
{
|
||||||
|
numpt = special1/120;
|
||||||
|
for ( int i=0; i<numpt; i++ )
|
||||||
|
{
|
||||||
|
ang = FRandom[Impaler](0,360);
|
||||||
|
pt = FRandom[Impaler](-90,90);
|
||||||
|
let c = Spawn("UTSmoke",pos);
|
||||||
|
c.SetShade(Color(4,1,3)*Random[Impaler](48,63));
|
||||||
|
c.bBRIGHT = true;
|
||||||
|
c.alpha *= min(1.,special1/350.);
|
||||||
|
c.scale *= min(2.,special1/350.);
|
||||||
|
c.vel = vel*0.5+(cos(ang)*cos(pt),sin(ang)*cos(pt),-sin(pt))*FRandom[Impaler](.2,.8)*(special1/120.);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Wait;
|
||||||
Death:
|
Death:
|
||||||
TNT1 A 0 A_ImpalerHit();
|
TNT1 A 0 A_ImpalerHit();
|
||||||
TNT1 A 0 A_Jump(256,"Explo1","Explo2","Explo3");
|
TNT1 A 0 A_Jump(256,"Explo1","Explo2","Explo3");
|
||||||
|
|
@ -158,27 +693,98 @@ Class Impaler : UnrealWeapon
|
||||||
UTMainHandler.DoSwing(self,(FRandom[Impaler](-0.1,-0.2),FRandom[Impaler](-0.1,0.1)),4,-1.5,2,SWING_Spring,2,2);
|
UTMainHandler.DoSwing(self,(FRandom[Impaler](-0.1,-0.2),FRandom[Impaler](-0.1,0.1)),4,-1.5,2,SWING_Spring,2,2);
|
||||||
if ( !Dampener.Active(self) ) A_AlertMonsters();
|
if ( !Dampener.Active(self) ) A_AlertMonsters();
|
||||||
A_QuakeEx(1,1,1,4,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
|
A_QuakeEx(1,1,1,4,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
|
||||||
invoker.HasGem = false;
|
|
||||||
invoker.ClipCount = -1;
|
|
||||||
Vector3 x, y, z;
|
Vector3 x, y, z;
|
||||||
[x, y, z] = dt_Matrix4.GetAxes(pitch,angle,roll);
|
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+4*y-4*z);
|
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+2*y-2.5*z);
|
||||||
Actor p = Spawn("ImpalerProjectile",origin);
|
Actor p = Spawn("ImpalerProjectile",origin);
|
||||||
p.angle = angle;
|
p.angle = angle;
|
||||||
p.pitch = BulletSlope();
|
p.pitch = BulletSlope();
|
||||||
p.roll = FRandom[Impaler](0,360);
|
p.roll = FRandom[Impaler](0,360);
|
||||||
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;
|
||||||
p.target = self;
|
p.target = self;
|
||||||
p.special1 = invoker.clipcount*3;
|
double mult = Amplifier.GetMult(self,100);
|
||||||
|
p.special1 = int(3*invoker.clipcount*mult+120*(mult-1.));
|
||||||
|
int numpt = Random[Impaler](8,16);
|
||||||
|
for ( int i=0; i<numpt; i++ )
|
||||||
|
{
|
||||||
|
let s = Spawn("ViewImpalerSpark",origin);
|
||||||
|
ViewImpalerSpark(s).ofs = (10,2,-2.5);
|
||||||
|
s.target = self;
|
||||||
|
s.scale *= 3.;
|
||||||
|
ViewImpalerSpark(s).vvel += (FRandom[Impaler](0.2,0.8),FRandom[Impaler](-0.5,0.5),FRandom[Impaler](-0.5,0.5));
|
||||||
|
}
|
||||||
|
invoker.HasGem = false;
|
||||||
|
invoker.ClipCount = -1;
|
||||||
}
|
}
|
||||||
action void A_StartBeam()
|
action void A_StartBeam()
|
||||||
{
|
{
|
||||||
|
Vector3 x, y, z, origin;
|
||||||
|
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||||
|
origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),15*x+2*y-2.5*z);
|
||||||
|
invoker.beam = Spawn("StarterImpalerBolt",origin);
|
||||||
|
invoker.beam.angle = angle;
|
||||||
|
invoker.beam.pitch = BulletSlope();
|
||||||
|
invoker.beam.target = self;
|
||||||
|
invoker.beam.specialf1 = Amplifier.GetMult(self,50);
|
||||||
}
|
}
|
||||||
action void A_DrainAmmo()
|
action void A_DrainAmmo()
|
||||||
{
|
{
|
||||||
|
Weapon weap = Weapon(invoker);
|
||||||
|
if ( !weap ) return;
|
||||||
|
if ( !(invoker.special1%15) )
|
||||||
|
{
|
||||||
|
if ( invoker.ClipCount <= 0 ) return;
|
||||||
|
if ( invoker.beam )
|
||||||
|
invoker.beam.specialf1 = Amplifier.GetMult(self,10);
|
||||||
|
invoker.clipcount--;
|
||||||
|
}
|
||||||
|
invoker.FireEffect();
|
||||||
|
UTMainHandler.DoFlash(self,Color(16,255,32,255),3);
|
||||||
|
UTMainHandler.DoSwing(self,(FRandom[Impaler](-1,1),FRandom[Impaler](-1,1)),0.05,0.05,8,SWING_Spring);
|
||||||
|
A_AlertMonsters();
|
||||||
|
Vector3 x, y, z;
|
||||||
|
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||||
|
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),15*x+2*y-2.5*z);
|
||||||
|
int numpt = Random[Impaler](4,7);
|
||||||
|
for ( int i=0; i<numpt; i++ )
|
||||||
|
{
|
||||||
|
let s = Spawn("UTViewSmoke",origin);
|
||||||
|
UTViewSmoke(s).ofs = (15,2,-2.5);
|
||||||
|
s.scale *= 1.8;
|
||||||
|
s.target = self;
|
||||||
|
s.SetShade("602060");
|
||||||
|
s.A_SetRenderStyle(0.4,STYLE_AddShaded);
|
||||||
|
UTViewSmoke(s).vvel += (FRandom[Impaler](0.2,0.6),FRandom[Impaler](-0.2,0.2),FRandom[Impaler](-0.2,0.2));
|
||||||
|
}
|
||||||
|
numpt = Random[Impaler](8,16);
|
||||||
|
for ( int i=0; i<numpt; i++ )
|
||||||
|
{
|
||||||
|
let s = Spawn("ViewImpalerSpark",origin);
|
||||||
|
ViewImpalerSpark(s).ofs = (15,2,-2.5);
|
||||||
|
s.target = self;
|
||||||
|
s.scale *= 3.;
|
||||||
|
ViewImpalerSpark(s).vvel += (FRandom[Impaler](0.2,0.8),FRandom[Impaler](-0.5,0.5),FRandom[Impaler](-0.5,0.5));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
action void A_StopBeam()
|
action void A_StopBeam()
|
||||||
{
|
{
|
||||||
|
A_StopSound(CHAN_WEAPON);
|
||||||
|
if ( invoker.beam ) invoker.beam.Destroy();
|
||||||
|
}
|
||||||
|
override void OwnerDied()
|
||||||
|
{
|
||||||
|
Super.OwnerDied();
|
||||||
|
if ( beam ) beam.Destroy();
|
||||||
|
}
|
||||||
|
override void DetachFromOwner()
|
||||||
|
{
|
||||||
|
if ( beam ) beam.Destroy();
|
||||||
|
Super.DetachFromOwner();
|
||||||
|
}
|
||||||
|
override void OnDestroy()
|
||||||
|
{
|
||||||
|
Super.OnDestroy();
|
||||||
|
if ( beam ) beam.Destroy();
|
||||||
}
|
}
|
||||||
private action bool TryHit( double angle, int dmg )
|
private action bool TryHit( double angle, int dmg )
|
||||||
{
|
{
|
||||||
|
|
@ -255,6 +861,8 @@ Class Impaler : UnrealWeapon
|
||||||
Weapon.AmmoGive 6;
|
Weapon.AmmoGive 6;
|
||||||
UTWeapon.DropAmmo 3;
|
UTWeapon.DropAmmo 3;
|
||||||
Impaler.ClipCount 30;
|
Impaler.ClipCount 30;
|
||||||
|
+WEAPON.AMMO_OPTIONAL;
|
||||||
|
+WEAPON.ALT_AMMO_OPTIONAL;
|
||||||
}
|
}
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
|
@ -318,21 +926,32 @@ Class Impaler : UnrealWeapon
|
||||||
if ( !invoker.HasGem )
|
if ( !invoker.HasGem )
|
||||||
return ResolveState("Melee");
|
return ResolveState("Melee");
|
||||||
A_Overlay(-9999,"Null");
|
A_Overlay(-9999,"Null");
|
||||||
A_Overlay(-3,"GemAltFire");
|
player.SetPSprite(-3,invoker.FindState("GemAltFire"));
|
||||||
A_Overlay(-2,"ZapAltFire");
|
player.SetPSprite(-2,invoker.FindState("ZapAltFire"));
|
||||||
A_PlaySound("impaler/altfire",CHAN_WEAPON,looping:true);
|
|
||||||
return ResolveState(null);
|
return ResolveState(null);
|
||||||
}
|
}
|
||||||
IMPA ABCDEFGH 2;
|
IMPA ABCDEFGH 2;
|
||||||
|
IMPA I 0
|
||||||
|
{
|
||||||
|
A_PlaySound("impaler/altfire",CHAN_WEAPON,looping:true);
|
||||||
|
A_StartBeam();
|
||||||
|
invoker.special1 = 0;
|
||||||
|
}
|
||||||
Goto AltHold;
|
Goto AltHold;
|
||||||
AltHold:
|
AltHold:
|
||||||
IMPA IJKLMNOP 2;
|
IMPA IJKLMNOP 2
|
||||||
Goto AltRelease;
|
{
|
||||||
|
A_DrainAmmo();
|
||||||
|
invoker.special1++;
|
||||||
|
return A_JumpIf((invoker.ClipCount<=0)||!(player.cmd.buttons&BT_ALTATTACK),"AltRelease");
|
||||||
|
}
|
||||||
|
Loop;
|
||||||
AltRelease:
|
AltRelease:
|
||||||
IMPA Q 0
|
IMPA Q 0
|
||||||
{
|
{
|
||||||
A_Overlay(-3,"GemAltRelease");
|
player.SetPSprite(-3,invoker.FindState("GemAltRelease"));
|
||||||
A_Overlay(-2,"ZapAltRelease");
|
player.SetPSprite(-2,invoker.FindState("ZapAltRelease"));
|
||||||
|
A_StopBeam();
|
||||||
A_PlaySound("impaler/gem",CHAN_WEAPON,looping:true);
|
A_PlaySound("impaler/gem",CHAN_WEAPON,looping:true);
|
||||||
}
|
}
|
||||||
IMPA QRSTUVWX 2;
|
IMPA QRSTUVWX 2;
|
||||||
|
|
@ -345,21 +964,21 @@ Class Impaler : UnrealWeapon
|
||||||
if ( invoker.HasGem )
|
if ( invoker.HasGem )
|
||||||
{
|
{
|
||||||
let weap = Weapon(invoker);
|
let weap = Weapon(invoker);
|
||||||
if ( invoker.ClipCount < 0 )
|
if ( (invoker.ClipCount < 0) && (weap.Ammo1.Amount > 0) )
|
||||||
{
|
{
|
||||||
weap.DepleteAmmo(false,true,1);
|
weap.DepleteAmmo(false,true,1);
|
||||||
invoker.ClipCount = invoker.default.ClipCount;
|
invoker.ClipCount = invoker.default.ClipCount;
|
||||||
}
|
}
|
||||||
A_Overlay(-3,"GemUp");
|
A_Overlay(-3,"GemUp");
|
||||||
A_Overlay(-2,"ZapUp");
|
A_Overlay(-2,"ZapUp");
|
||||||
A_OverlayFlags(-2,PSPF_RenderStyle|PSPF_Alpha,true);
|
A_OverlayFlags(-2,PSPF_RenderStyle|PSPF_ForceStyle|PSPF_Alpha|PSPF_ForceAlpha,true);
|
||||||
A_OverlayRenderStyle(-2,STYLE_Add);
|
A_OverlayRenderStyle(-2,STYLE_Add);
|
||||||
A_PlaySound("impaler/gem",CHAN_WEAPON,looping:true);
|
A_PlaySound("impaler/gem",CHAN_WEAPON,looping:true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
A_Overlay(-3,"GemDown");
|
player.SetPSprite(-3,invoker.FindState("GemDown"));
|
||||||
A_Overlay(-2,"ZapDown");
|
player.SetPSprite(-2,invoker.FindState("ZapDown"));
|
||||||
A_PlaySound("impaler/gemdown",CHAN_WEAPON);
|
A_PlaySound("impaler/gemdown",CHAN_WEAPON);
|
||||||
}
|
}
|
||||||
if ( self is 'UTPlayer' ) UTPlayer(self).PlayReloading();
|
if ( self is 'UTPlayer' ) UTPlayer(self).PlayReloading();
|
||||||
|
|
@ -372,8 +991,8 @@ Class Impaler : UnrealWeapon
|
||||||
IMPG A 0
|
IMPG A 0
|
||||||
{
|
{
|
||||||
invoker.HasGem = false;
|
invoker.HasGem = false;
|
||||||
A_Overlay(-3,"GemDown");
|
player.SetPSprite(-3,invoker.FindState("GemDown"));
|
||||||
A_Overlay(-2,"ZapDown");
|
player.SetPSprite(-2,invoker.FindState("ZapDown"));
|
||||||
A_PlaySound("impaler/gemdown",CHAN_WEAPON);
|
A_PlaySound("impaler/gemdown",CHAN_WEAPON);
|
||||||
}
|
}
|
||||||
IMPG ABCDE 2;
|
IMPG ABCDE 2;
|
||||||
|
|
@ -418,12 +1037,5 @@ Class Impaler : UnrealWeapon
|
||||||
ZapAltRelease:
|
ZapAltRelease:
|
||||||
IMZA QRSTUVWX 2 Bright;
|
IMZA QRSTUVWX 2 Bright;
|
||||||
Goto ZapIdle;
|
Goto ZapIdle;
|
||||||
MuzzleFlash:
|
|
||||||
IMFF A 3 Bright
|
|
||||||
{
|
|
||||||
let l = Spawn("ImpalerLight",pos);
|
|
||||||
l.target = self;
|
|
||||||
}
|
|
||||||
Stop;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -213,9 +213,9 @@ Class UFlame : Actor
|
||||||
{
|
{
|
||||||
let s = Spawn("UTSmoke",pos);
|
let s = Spawn("UTSmoke",pos);
|
||||||
s.vel = (FRandom[FlameT](-0.2,0.2),FRandom[FlameT](-0.2,0.2),FRandom[FlameT](-0.2,0.2));
|
s.vel = (FRandom[FlameT](-0.2,0.2),FRandom[FlameT](-0.2,0.2),FRandom[FlameT](-0.2,0.2));
|
||||||
s.vel += vel*0.6;
|
s.vel += vel*0.3;
|
||||||
s.alpha *= alpha*4;
|
s.alpha *= alpha*4;
|
||||||
s.scale = scale*(.5+GetAge()/6.);
|
s.scale *= 0.5+abs(scale.x)*(.5+GetAge()/6.);
|
||||||
Destroy();
|
Destroy();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -223,9 +223,9 @@ Class UFlame : Actor
|
||||||
{
|
{
|
||||||
let s = Spawn("UTSmoke",pos);
|
let s = Spawn("UTSmoke",pos);
|
||||||
s.vel = (FRandom[FlameT](-0.2,0.2),FRandom[FlameT](-0.2,0.2),FRandom[FlameT](-0.2,0.2));
|
s.vel = (FRandom[FlameT](-0.2,0.2),FRandom[FlameT](-0.2,0.2),FRandom[FlameT](-0.2,0.2));
|
||||||
s.vel += vel*0.6;
|
s.vel += vel*0.3;
|
||||||
s.alpha *= alpha*4;
|
s.alpha *= alpha*4;
|
||||||
s.scale = scale*(.5+GetAge()/6.);
|
s.scale *= 0.5+abs(scale.x)*(.5+GetAge()/6.);
|
||||||
}
|
}
|
||||||
if ( bAMBUSH ) return;
|
if ( bAMBUSH ) return;
|
||||||
if ( Random[FlameT](0,int(20*((default.alpha+0.1)-alpha))) ) return;
|
if ( Random[FlameT](0,int(20*((default.alpha+0.1)-alpha))) ) return;
|
||||||
|
|
|
||||||
|
|
@ -277,7 +277,7 @@ Class TarydiumDebuff : Thinker
|
||||||
void BlowUp()
|
void BlowUp()
|
||||||
{
|
{
|
||||||
reentrant = true;
|
reentrant = true;
|
||||||
let b = victim.Spawn("TarydiumExplosion",victim.Vec3Offset(0,0,victim.height/2));
|
let b = victim.Spawn("TarydiumExplosion",victim.Vec3Offset(0,0,victim.default.height/2));
|
||||||
b.target = instigator;
|
b.target = instigator;
|
||||||
b.special1 = amount;
|
b.special1 = amount;
|
||||||
b.scale *= 1.+min(1.5,amount*0.02);
|
b.scale *= 1.+min(1.5,amount*0.02);
|
||||||
|
|
|
||||||
|
|
@ -196,7 +196,7 @@ Class UPlayer : UTPlayer
|
||||||
let dsp = DispersionPistol(FindInventory('DispersionPistol'));
|
let dsp = DispersionPistol(FindInventory('DispersionPistol'));
|
||||||
if ( dsp )
|
if ( dsp )
|
||||||
{
|
{
|
||||||
dsp.Ammo1.MaxAmount = 90;
|
dsp.Ammo1.Amount = dsp.Ammo1.MaxAmount = 90;
|
||||||
if ( (player.ReadyWeapon == dsp) && (player.PendingWeapon == WP_NOCHANGE) )
|
if ( (player.ReadyWeapon == dsp) && (player.PendingWeapon == WP_NOCHANGE) )
|
||||||
dsp.pendingupgrade = 4;
|
dsp.pendingupgrade = 4;
|
||||||
else
|
else
|
||||||
|
|
|
||||||