Translocator implemented. Tweaked some little things about the HUD, too.
This commit is contained in:
parent
217dbd0fda
commit
a14e43481b
9 changed files with 619 additions and 6 deletions
|
|
@ -1,3 +1,18 @@
|
||||||
|
Model "TranslocatorModule"
|
||||||
|
{
|
||||||
|
Path "models"
|
||||||
|
Model 0 "Module_d.3d"
|
||||||
|
Skin 0 "tloc2_.png"
|
||||||
|
Scale -0.0672 0.056 0.056
|
||||||
|
PitchOffset 90
|
||||||
|
ZOffset 6
|
||||||
|
USEACTORPITCH
|
||||||
|
|
||||||
|
FrameIndex TMOD A 0 0
|
||||||
|
FrameIndex TMOD B 0 1
|
||||||
|
FrameIndex TMOD C 0 2
|
||||||
|
}
|
||||||
|
|
||||||
Model "Translocator"
|
Model "Translocator"
|
||||||
{
|
{
|
||||||
Path "models"
|
Path "models"
|
||||||
|
|
@ -25,3 +40,107 @@ Model "Translocator"
|
||||||
|
|
||||||
FrameIndex TLCP B 1 0
|
FrameIndex TLCP B 1 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Model "Translocator"
|
||||||
|
{
|
||||||
|
Path "models"
|
||||||
|
Model 0 "Transloc_d.3d"
|
||||||
|
SurfaceSkin 0 0 "tloc1.png"
|
||||||
|
SurfaceSkin 0 1 "tloc2.png"
|
||||||
|
SurfaceSkin 0 2 "tloc3.png"
|
||||||
|
SurfaceSkin 0 3 "tloc4.png"
|
||||||
|
Scale 0.11 0.055 0.11
|
||||||
|
Offset -17.8 -22.8 -33.2
|
||||||
|
PitchOffset 87
|
||||||
|
RollOffset 5
|
||||||
|
AngleOffset 183
|
||||||
|
|
||||||
|
// select
|
||||||
|
FrameIndex TLCS A 0 18
|
||||||
|
FrameIndex TLCS B 0 19
|
||||||
|
FrameIndex TLCS C 0 20
|
||||||
|
FrameIndex TLCS D 0 21
|
||||||
|
FrameIndex TLCS E 0 22
|
||||||
|
FrameIndex TLCS F 0 23
|
||||||
|
FrameIndex TLCS G 0 24
|
||||||
|
FrameIndex TLCS H 0 25
|
||||||
|
FrameIndex TLCS I 0 26
|
||||||
|
FrameIndex TLCS J 0 27
|
||||||
|
FrameIndex TLCS K 0 28
|
||||||
|
FrameIndex TLCS L 0 29
|
||||||
|
// throw
|
||||||
|
FrameIndex TLCF A 0 32
|
||||||
|
FrameIndex TLCF B 0 33
|
||||||
|
FrameIndex TLCF C 0 34
|
||||||
|
FrameIndex TLCF D 0 35
|
||||||
|
FrameIndex TLCF E 0 36
|
||||||
|
FrameIndex TLCF F 0 37
|
||||||
|
FrameIndex TLCF G 0 38
|
||||||
|
FrameIndex TLCF H 0 39
|
||||||
|
FrameIndex TLCF I 0 40
|
||||||
|
FrameIndex TLCF J 0 41
|
||||||
|
FrameIndex TLCF K 0 42
|
||||||
|
FrameIndex TLCF L 0 43
|
||||||
|
FrameIndex TLCF M 0 44
|
||||||
|
FrameIndex TLCF N 0 45
|
||||||
|
// pre reset
|
||||||
|
FrameIndex TLCF O 0 46
|
||||||
|
FrameIndex TLCF P 0 47
|
||||||
|
FrameIndex TLCF Q 0 48
|
||||||
|
FrameIndex TLCF R 0 49
|
||||||
|
FrameIndex TLCF S 0 50
|
||||||
|
// idle
|
||||||
|
FrameIndex TLCI A 0 51
|
||||||
|
FrameIndex TLCI B 0 52
|
||||||
|
// down
|
||||||
|
FrameIndex TLCD A 0 66
|
||||||
|
FrameIndex TLCD B 0 67
|
||||||
|
FrameIndex TLCD C 0 68
|
||||||
|
FrameIndex TLCD D 0 69
|
||||||
|
FrameIndex TLCD E 0 70
|
||||||
|
FrameIndex TLCD F 0 71
|
||||||
|
FrameIndex TLCD G 0 72
|
||||||
|
// thrown frame
|
||||||
|
FrameIndex TLCT A 0 52
|
||||||
|
// thrown
|
||||||
|
FrameIndex TLCT B 0 53
|
||||||
|
FrameIndex TLCT C 0 54
|
||||||
|
FrameIndex TLCT D 0 55
|
||||||
|
FrameIndex TLCT E 0 56
|
||||||
|
FrameIndex TLCT F 0 57
|
||||||
|
FrameIndex TLCT G 0 58
|
||||||
|
FrameIndex TLCT H 0 59
|
||||||
|
FrameIndex TLCT I 0 60
|
||||||
|
FrameIndex TLCT J 0 61
|
||||||
|
FrameIndex TLCT K 0 62
|
||||||
|
FrameIndex TLCT L 0 63
|
||||||
|
FrameIndex TLCT M 0 64
|
||||||
|
// down 2
|
||||||
|
FrameIndex TLD2 A 0 77
|
||||||
|
FrameIndex TLD2 B 0 78
|
||||||
|
FrameIndex TLD2 C 0 79
|
||||||
|
FrameIndex TLD2 D 0 80
|
||||||
|
FrameIndex TLD2 E 0 81
|
||||||
|
FrameIndex TLD2 F 0 82
|
||||||
|
FrameIndex TLD2 G 0 83
|
||||||
|
// idle 2
|
||||||
|
FrameIndex TLI2 A 0 88
|
||||||
|
FrameIndex TLI2 B 0 89
|
||||||
|
FrameIndex TLI2 C 0 90
|
||||||
|
FrameIndex TLI2 D 0 91
|
||||||
|
FrameIndex TLI2 E 0 92
|
||||||
|
FrameIndex TLI2 F 0 93
|
||||||
|
FrameIndex TLI2 G 0 94
|
||||||
|
FrameIndex TLI2 H 0 95
|
||||||
|
FrameIndex TLI2 I 0 96
|
||||||
|
FrameIndex TLI2 J 0 97
|
||||||
|
FrameIndex TLI2 K 0 98
|
||||||
|
FrameIndex TLI2 L 0 99
|
||||||
|
FrameIndex TLI2 M 0 100
|
||||||
|
FrameIndex TLI2 N 0 101
|
||||||
|
FrameIndex TLI2 O 0 102
|
||||||
|
FrameIndex TLI2 P 0 103
|
||||||
|
FrameIndex TLI2 Q 0 104
|
||||||
|
FrameIndex TLI2 R 0 105
|
||||||
|
FrameIndex TLI2 S 0 106
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,10 +32,10 @@ Currently implemented:
|
||||||
- UT HUD
|
- UT HUD
|
||||||
- Impact Hammer (slot 1)
|
- Impact Hammer (slot 1)
|
||||||
- Chainsaw (slot 1)
|
- Chainsaw (slot 1)
|
||||||
|
- Translocator (slot 1)
|
||||||
|
|
||||||
In progress:
|
In progress:
|
||||||
|
|
||||||
- Translocator (slot 1)
|
|
||||||
- Enforcer (slot 2)
|
- Enforcer (slot 2)
|
||||||
- Dual Enforcers (slot 2)
|
- Dual Enforcers (slot 2)
|
||||||
- Ripper (slot 6)
|
- Ripper (slot 6)
|
||||||
|
|
|
||||||
|
|
@ -133,6 +133,12 @@ chainsaw/idle chainidl
|
||||||
chainsaw/lower chainpdn
|
chainsaw/lower chainpdn
|
||||||
chainsaw/fire sawhit
|
chainsaw/fire sawhit
|
||||||
|
|
||||||
|
transloc/throw throwtgt
|
||||||
|
transloc/return rtarget
|
||||||
|
transloc/spark tdisrupt
|
||||||
|
transloc/bounce hit1
|
||||||
|
transloc/hum targeth
|
||||||
|
|
||||||
ges/hit gelhit
|
ges/hit gelhit
|
||||||
ges/select gelselec
|
ges/select gelselec
|
||||||
ges/fire gelshot
|
ges/fire gelshot
|
||||||
|
|
|
||||||
BIN
sounds/RTarget.wav
Normal file
BIN
sounds/RTarget.wav
Normal file
Binary file not shown.
BIN
sprites/TGLOA0.png
Normal file
BIN
sprites/TGLOA0.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3 KiB |
|
|
@ -1,2 +1,84 @@
|
||||||
Sprite "TLCPA0",1,1{}
|
Sprite "TLCPA0",1,1{}
|
||||||
Sprite "TLCPB0",1,1{}
|
Sprite "TLCPB0",1,1{}
|
||||||
|
Sprite "TLCSA0",1,1{}
|
||||||
|
Sprite "TLCSB0",1,1{}
|
||||||
|
Sprite "TLCSC0",1,1{}
|
||||||
|
Sprite "TLCSD0",1,1{}
|
||||||
|
Sprite "TLCSE0",1,1{}
|
||||||
|
Sprite "TLCSF0",1,1{}
|
||||||
|
Sprite "TLCSG0",1,1{}
|
||||||
|
Sprite "TLCSH0",1,1{}
|
||||||
|
Sprite "TLCSI0",1,1{}
|
||||||
|
Sprite "TLCSJ0",1,1{}
|
||||||
|
Sprite "TLCSK0",1,1{}
|
||||||
|
Sprite "TLCSL0",1,1{}
|
||||||
|
Sprite "TLCFA0",1,1{}
|
||||||
|
Sprite "TLCFB0",1,1{}
|
||||||
|
Sprite "TLCFC0",1,1{}
|
||||||
|
Sprite "TLCFD0",1,1{}
|
||||||
|
Sprite "TLCFE0",1,1{}
|
||||||
|
Sprite "TLCFF0",1,1{}
|
||||||
|
Sprite "TLCFG0",1,1{}
|
||||||
|
Sprite "TLCFH0",1,1{}
|
||||||
|
Sprite "TLCFI0",1,1{}
|
||||||
|
Sprite "TLCFJ0",1,1{}
|
||||||
|
Sprite "TLCFK0",1,1{}
|
||||||
|
Sprite "TLCFL0",1,1{}
|
||||||
|
Sprite "TLCFM0",1,1{}
|
||||||
|
Sprite "TLCFN0",1,1{}
|
||||||
|
Sprite "TLCFO0",1,1{}
|
||||||
|
Sprite "TLCFP0",1,1{}
|
||||||
|
Sprite "TLCFQ0",1,1{}
|
||||||
|
Sprite "TLCFR0",1,1{}
|
||||||
|
Sprite "TLCFS0",1,1{}
|
||||||
|
Sprite "TLCIA0",1,1{}
|
||||||
|
Sprite "TLCIB0",1,1{}
|
||||||
|
Sprite "TLCDA0",1,1{}
|
||||||
|
Sprite "TLCDB0",1,1{}
|
||||||
|
Sprite "TLCDC0",1,1{}
|
||||||
|
Sprite "TLCDD0",1,1{}
|
||||||
|
Sprite "TLCDE0",1,1{}
|
||||||
|
Sprite "TLCDF0",1,1{}
|
||||||
|
Sprite "TLCDG0",1,1{}
|
||||||
|
Sprite "TLCTA0",1,1{}
|
||||||
|
Sprite "TLCTB0",1,1{}
|
||||||
|
Sprite "TLCTC0",1,1{}
|
||||||
|
Sprite "TLCTD0",1,1{}
|
||||||
|
Sprite "TLCTE0",1,1{}
|
||||||
|
Sprite "TLCTF0",1,1{}
|
||||||
|
Sprite "TLCTG0",1,1{}
|
||||||
|
Sprite "TLCTH0",1,1{}
|
||||||
|
Sprite "TLCTI0",1,1{}
|
||||||
|
Sprite "TLCTJ0",1,1{}
|
||||||
|
Sprite "TLCTK0",1,1{}
|
||||||
|
Sprite "TLCTL0",1,1{}
|
||||||
|
Sprite "TLCTM0",1,1{}
|
||||||
|
Sprite "TLD2A0",1,1{}
|
||||||
|
Sprite "TLD2B0",1,1{}
|
||||||
|
Sprite "TLD2C0",1,1{}
|
||||||
|
Sprite "TLD2D0",1,1{}
|
||||||
|
Sprite "TLD2E0",1,1{}
|
||||||
|
Sprite "TLD2F0",1,1{}
|
||||||
|
Sprite "TLD2G0",1,1{}
|
||||||
|
Sprite "TLI2A0",1,1{}
|
||||||
|
Sprite "TLI2B0",1,1{}
|
||||||
|
Sprite "TLI2C0",1,1{}
|
||||||
|
Sprite "TLI2D0",1,1{}
|
||||||
|
Sprite "TLI2E0",1,1{}
|
||||||
|
Sprite "TLI2F0",1,1{}
|
||||||
|
Sprite "TLI2G0",1,1{}
|
||||||
|
Sprite "TLI2H0",1,1{}
|
||||||
|
Sprite "TLI2I0",1,1{}
|
||||||
|
Sprite "TLI2J0",1,1{}
|
||||||
|
Sprite "TLI2K0",1,1{}
|
||||||
|
Sprite "TLI2L0",1,1{}
|
||||||
|
Sprite "TLI2M0",1,1{}
|
||||||
|
Sprite "TLI2N0",1,1{}
|
||||||
|
Sprite "TLI2O0",1,1{}
|
||||||
|
Sprite "TLI2P0",1,1{}
|
||||||
|
Sprite "TLI2Q0",1,1{}
|
||||||
|
Sprite "TLI2R0",1,1{}
|
||||||
|
Sprite "TLI2S0",1,1{}
|
||||||
|
Sprite "TMODA0",1,1{}
|
||||||
|
Sprite "TMODB0",1,1{}
|
||||||
|
Sprite "TMODC0",1,1{}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,353 @@
|
||||||
|
Class ModuleHitbox : Actor
|
||||||
|
{
|
||||||
|
Default
|
||||||
|
{
|
||||||
|
Radius 10;
|
||||||
|
Height 4;
|
||||||
|
+SHOOTABLE;
|
||||||
|
+NOGRAVITY;
|
||||||
|
+NOCLIP;
|
||||||
|
+DONTSPLASH;
|
||||||
|
+NOBLOOD;
|
||||||
|
}
|
||||||
|
override int DamageMobj( Actor inflictor, Actor source, int damage, Name mod, int flags, double angle )
|
||||||
|
{
|
||||||
|
if ( target )
|
||||||
|
{
|
||||||
|
if ( inflictor ) target.vel += level.Vec3Diff(inflictor.pos,pos).unit()*damage*0.2;
|
||||||
|
else if ( source ) target.vel += level.Vec3Diff(source.pos,pos).unit()*damage*0.2;
|
||||||
|
target.vel.z = 5;
|
||||||
|
}
|
||||||
|
if ( !target || (target.target && ((target.target == source) || target.target.isTeammate(source))) ) return 0;
|
||||||
|
target.bAMBUSH = true;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
override void Tick()
|
||||||
|
{
|
||||||
|
Super.Tick();
|
||||||
|
if ( !target )
|
||||||
|
{
|
||||||
|
Destroy();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
SetOrigin(target.pos-(0,0,height*0.5),true);
|
||||||
|
if ( target.bMISSILE ) return;
|
||||||
|
let bi = BlockThingsIterator.Create(self,32);
|
||||||
|
while ( bi.Next() )
|
||||||
|
{
|
||||||
|
if ( !bi.Thing || (bi.Thing != target.target) ) continue;
|
||||||
|
if ( (Distance2D(bi.Thing)-bi.Thing.radius <= radius) && ((bi.Thing.pos.z <= pos.z+height) && (bi.Thing.pos.z+bi.Thing.height >= pos.z-height)) )
|
||||||
|
{
|
||||||
|
A_PlaySound("misc/i_pkup");
|
||||||
|
target.Destroy();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
States
|
||||||
|
{
|
||||||
|
Spawn:
|
||||||
|
TNT1 A 10 A_AlertMonsters(0,AMF_TARGETEMITTER);
|
||||||
|
Wait;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Class TranslocatorGlowLight : DynamicLight
|
||||||
|
{
|
||||||
|
Default
|
||||||
|
{
|
||||||
|
DynamicLight.Type "Point";
|
||||||
|
Args 255,255,255,40;
|
||||||
|
}
|
||||||
|
override void Tick()
|
||||||
|
{
|
||||||
|
Super.Tick();
|
||||||
|
if ( !target )
|
||||||
|
{
|
||||||
|
Destroy();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
SetOrigin(target.pos,true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Class TranslocatorGlow : Actor
|
||||||
|
{
|
||||||
|
override void PostBeginPlay()
|
||||||
|
{
|
||||||
|
Super.PostBeginPlay();
|
||||||
|
let l = Spawn("TranslocatorGlowLight",pos);
|
||||||
|
l.target = self;
|
||||||
|
l.args[0] = fillcolor.r;
|
||||||
|
l.args[1] = fillcolor.g;
|
||||||
|
l.args[2] = fillcolor.b;
|
||||||
|
}
|
||||||
|
override void Tick()
|
||||||
|
{
|
||||||
|
Super.Tick();
|
||||||
|
if ( !target )
|
||||||
|
{
|
||||||
|
Destroy();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
SetOrigin(target.Vec3Offset(0,0,10),true);
|
||||||
|
}
|
||||||
|
Default
|
||||||
|
{
|
||||||
|
Radius 0.1;
|
||||||
|
Height 0;
|
||||||
|
+NOCLIP;
|
||||||
|
+NOGRAVITY;
|
||||||
|
+DONTSPLASH;
|
||||||
|
+FORCEXYBILLBOARD;
|
||||||
|
RenderStyle "AddShaded";
|
||||||
|
StencilColor "FFFFFF";
|
||||||
|
Scale 0.5;
|
||||||
|
}
|
||||||
|
States
|
||||||
|
{
|
||||||
|
Spawn:
|
||||||
|
TGLO A -1 Bright;
|
||||||
|
Stop;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Class TranslocatorModule : Actor
|
||||||
|
{
|
||||||
|
Actor b;
|
||||||
|
|
||||||
|
Default
|
||||||
|
{
|
||||||
|
Radius 2;
|
||||||
|
Height 2;
|
||||||
|
Speed 20;
|
||||||
|
PROJECTILE;
|
||||||
|
-NOGRAVITY;
|
||||||
|
+USEBOUNCESTATE;
|
||||||
|
+SKYEXPLODE;
|
||||||
|
+HITTRACER;
|
||||||
|
BounceType "Doom";
|
||||||
|
BounceFactor 0.5;
|
||||||
|
WallBounceFactor 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
override void PostBeginPlay()
|
||||||
|
{
|
||||||
|
Super.PostBeginPlay();
|
||||||
|
if ( !target )
|
||||||
|
{
|
||||||
|
Destroy();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
b = Spawn("ModuleHitbox",pos);
|
||||||
|
b.target = self;
|
||||||
|
A_PlaySound("transloc/hum",CHAN_VOICE,0.5,true,2.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
override bool CanCollideWith( Actor other, bool passive )
|
||||||
|
{
|
||||||
|
return (other != tracer);
|
||||||
|
}
|
||||||
|
|
||||||
|
action void A_LightUp()
|
||||||
|
{
|
||||||
|
let l = Spawn("TranslocatorGlow",Vec3Offset(0,0,10));
|
||||||
|
l.target = self;
|
||||||
|
if ( !target || !target.player ) return;
|
||||||
|
Color gcol;
|
||||||
|
if ( deathmatch && (target.player.GetTeam() < teams.size()) ) gcol = teams[target.player.GetTeam()].mName;
|
||||||
|
else gcol = target.player.GetColor();
|
||||||
|
// maximize brightness
|
||||||
|
if ( (gcol.r+gcol.g+gcol.b) <= 0 ) gcol = "White";
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int maxcomp = max(gcol.r,max(gcol.g,gcol.b));
|
||||||
|
int newr = int(gcol.r*(255./maxcomp));
|
||||||
|
int newg = int(gcol.g*(255./maxcomp));
|
||||||
|
int newb = int(gcol.b*(255./maxcomp));
|
||||||
|
gcol = Color(newr,newg,newb);
|
||||||
|
}
|
||||||
|
l.SetShade(gcol);
|
||||||
|
}
|
||||||
|
|
||||||
|
override void Tick()
|
||||||
|
{
|
||||||
|
Super.Tick();
|
||||||
|
if ( bAMBUSH && !Random[Transloc](0,40) )
|
||||||
|
{
|
||||||
|
A_PlaySound("transloc/spark");
|
||||||
|
int numpt = Random[Transloc](20,40);
|
||||||
|
for ( int i=0; i<numpt; i++ )
|
||||||
|
{
|
||||||
|
Vector3 pvel = (FRandom[Transloc](-1,1),FRandom[Transloc](-1,1),FRandom[Transloc](-1,1)).unit()*FRandom[Transloc](0.1,1.2);
|
||||||
|
let s = Spawn("UTSmoke",pos);
|
||||||
|
s.vel = pvel;
|
||||||
|
s.SetShade(Color(1,1,1)*Random[Transloc](128,192));
|
||||||
|
}
|
||||||
|
numpt = Random[Transloc](4,12);
|
||||||
|
for ( int i=0; i<numpt; i++ )
|
||||||
|
{
|
||||||
|
Vector3 pvel = (FRandom[Transloc](-1,1),FRandom[Transloc](-1,1),FRandom[Transloc](-1,1)).unit()*FRandom[Transloc](2,8);
|
||||||
|
let s = Spawn("UTSpark",pos);
|
||||||
|
s.vel = pvel;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
States
|
||||||
|
{
|
||||||
|
Spawn:
|
||||||
|
TMOD A 1;
|
||||||
|
Wait;
|
||||||
|
Bounce:
|
||||||
|
TMOD A 0
|
||||||
|
{
|
||||||
|
A_SetPitch(0);
|
||||||
|
A_PlaySound("transloc/bounce");
|
||||||
|
}
|
||||||
|
Goto Spawn;
|
||||||
|
Death:
|
||||||
|
TMOD A 0
|
||||||
|
{
|
||||||
|
A_SetPitch(0);
|
||||||
|
if ( tracer )
|
||||||
|
{
|
||||||
|
SetOrigin(tracer.Vec2OffsetZ(0,0,pos.z),false);
|
||||||
|
vel.xy *= 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
TMOD A 12;
|
||||||
|
TMOD B 8;
|
||||||
|
TMOD C -1 A_LightUp();
|
||||||
|
Stop;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Class TranslocatorAfterimage : Actor
|
||||||
|
{
|
||||||
|
Vector3 spreaddir;
|
||||||
|
Default
|
||||||
|
{
|
||||||
|
RenderStyle "AddStencil";
|
||||||
|
StencilColor "FF0000";
|
||||||
|
+NOCLIP;
|
||||||
|
+NOGRAVITY;
|
||||||
|
+DONTSPLASH;
|
||||||
|
+NOTELEPORT;
|
||||||
|
Radius 0.1;
|
||||||
|
Height 0;
|
||||||
|
Speed 1;
|
||||||
|
Alpha 0.1;
|
||||||
|
}
|
||||||
|
override void PostBeginPlay()
|
||||||
|
{
|
||||||
|
Super.PostBeginPlay();
|
||||||
|
if ( !target )
|
||||||
|
{
|
||||||
|
Destroy();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
scale = target.scale;
|
||||||
|
angle = target.angle;
|
||||||
|
pitch = target.pitch;
|
||||||
|
roll = target.roll;
|
||||||
|
sprite = target.sprite;
|
||||||
|
frame = target.frame;
|
||||||
|
vel = (FRandom[Transloc](-.5,.5),FRandom[Transloc](-.5,.5),FRandom[Transloc](-.5,.5));
|
||||||
|
}
|
||||||
|
action void A_Spread()
|
||||||
|
{
|
||||||
|
vel += invoker.spreaddir*speed;
|
||||||
|
A_FadeOut(0.003);
|
||||||
|
}
|
||||||
|
States
|
||||||
|
{
|
||||||
|
Spawn:
|
||||||
|
#### # 10 A_SetTics(Random[Transloc](20,50));
|
||||||
|
#### # 1 A_Spread();
|
||||||
|
Wait;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Class Translocator : UTWeapon
|
Class Translocator : UTWeapon
|
||||||
{
|
{
|
||||||
|
Actor module;
|
||||||
|
|
||||||
|
action void A_ThrowModule()
|
||||||
|
{
|
||||||
|
Weapon weap = Weapon(invoker);
|
||||||
|
if ( !weap ) return;
|
||||||
|
A_PlaySound("transloc/throw",CHAN_WEAPON);
|
||||||
|
invoker.FireEffect();
|
||||||
|
A_AlertMonsters();
|
||||||
|
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-12.0*z;
|
||||||
|
let p = Spawn("TranslocatorModule",origin);
|
||||||
|
p.target = self;
|
||||||
|
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.vel.z += 5;
|
||||||
|
invoker.module = p;
|
||||||
|
}
|
||||||
|
|
||||||
|
action void A_ReturnModule()
|
||||||
|
{
|
||||||
|
Weapon weap = Weapon(invoker);
|
||||||
|
if ( !weap ) return;
|
||||||
|
A_PlaySound("transloc/return",CHAN_WEAPON);
|
||||||
|
invoker.FireEffect();
|
||||||
|
A_AlertMonsters();
|
||||||
|
if ( invoker.module && invoker.module.bAMBUSH )
|
||||||
|
{
|
||||||
|
UTMainHandler.DoFlash(self,Color(255,255,255,255),50);
|
||||||
|
A_PlaySound("transloc/spark",CHAN_WEAPON);
|
||||||
|
DamageMobj(invoker,self,int.max,'Telefrag',DMG_THRUSTLESS);
|
||||||
|
}
|
||||||
|
if ( invoker.module ) invoker.module.Destroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
action void A_Translocate()
|
||||||
|
{
|
||||||
|
Weapon weap = Weapon(invoker);
|
||||||
|
if ( !weap ) return;
|
||||||
|
if ( !invoker.module )
|
||||||
|
{
|
||||||
|
invoker.FireEffect();
|
||||||
|
A_AlertMonsters();
|
||||||
|
A_PlaySound("transloc/return",CHAN_WEAPON);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// check if there's enough space
|
||||||
|
Vector3 oldpos = pos, newpos = invoker.module.pos;
|
||||||
|
bool bBroken = invoker.module.bAMBUSH;
|
||||||
|
invoker.module.Destroy();
|
||||||
|
invoker.FireEffect();
|
||||||
|
A_AlertMonsters();
|
||||||
|
if ( Warp(self,newpos.x,newpos.y,newpos.z,flags:WARPF_ABSOLUTEPOSITION|WARPF_TESTONLY) && TeleportMove(newpos,true) )
|
||||||
|
{
|
||||||
|
SpawnTeleportFog(oldpos,true,false);
|
||||||
|
Vector3 diff = level.Vec3Diff(oldpos,newpos);
|
||||||
|
for ( int i=0; i<40; i++ )
|
||||||
|
{
|
||||||
|
let a = Spawn("TranslocatorAfterimage",oldpos);
|
||||||
|
a.target = self;
|
||||||
|
TranslocatorAfterimage(a).spreaddir = diff.unit();
|
||||||
|
a.speed = (diff.length()/400)**0.5;
|
||||||
|
}
|
||||||
|
SpawnTeleportFog(newpos,false,false);
|
||||||
|
player.fov = min(175,player.desiredfov+60);
|
||||||
|
}
|
||||||
|
else A_PlaySound("transloc/return",CHAN_WEAPON);
|
||||||
|
if ( bBroken )
|
||||||
|
{
|
||||||
|
UTMainHandler.DoFlash(self,Color(255,255,255,255),50);
|
||||||
|
A_PlaySound("transloc/spark",CHAN_WEAPON);
|
||||||
|
DamageMobj(invoker,self,int.max,'Telefrag',DMG_THRUSTLESS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Default
|
Default
|
||||||
{
|
{
|
||||||
Tag "Translocator";
|
Tag "Translocator";
|
||||||
|
|
@ -15,5 +363,56 @@ Class Translocator : UTWeapon
|
||||||
Stop;
|
Stop;
|
||||||
TLCP B -1;
|
TLCP B -1;
|
||||||
Stop;
|
Stop;
|
||||||
|
Select:
|
||||||
|
TLCS A 1 A_Raise(int.max);
|
||||||
|
Wait;
|
||||||
|
Ready:
|
||||||
|
TLCS A 0 A_JumpIf(invoker.module,"Ready2");
|
||||||
|
TLCS ABCDEFGHIJKL 1;
|
||||||
|
TLCS L 0 A_JumpIf(invoker.module,"Idle");
|
||||||
|
Goto Idle2;
|
||||||
|
Ready2:
|
||||||
|
TLD2 GFEDCBA 2;
|
||||||
|
Idle:
|
||||||
|
TLCI A 0 A_Overlay(-9999,"Dummy"); // little hackeroo to make this more responsive
|
||||||
|
TLCI AB 25 A_JumpIf(!invoker.module,"PickedUp");
|
||||||
|
Goto Idle+1;
|
||||||
|
Dummy:
|
||||||
|
TNT1 A 2
|
||||||
|
{
|
||||||
|
A_WeaponReady();
|
||||||
|
return A_JumpIf(!invoker.module,"Null");
|
||||||
|
}
|
||||||
|
Wait;
|
||||||
|
Idle2:
|
||||||
|
TLI2 ABCDEFGHIJKLMNOPQRS 2 A_WeaponReady(WRF_NOSECONDARY);
|
||||||
|
Loop;
|
||||||
|
PickedUp:
|
||||||
|
TLCI A 5;
|
||||||
|
TLI2 A 0;
|
||||||
|
Goto Idle2;
|
||||||
|
Fire:
|
||||||
|
TLCF A 0 A_JumpIf(invoker.module,"Return");
|
||||||
|
TLCF A 0 A_ThrowModule();
|
||||||
|
TLCF ABCDEFGH 1;
|
||||||
|
TLCF IJKLMNOPQRS 1 A_WeaponReady();
|
||||||
|
Goto Idle;
|
||||||
|
Return:
|
||||||
|
TLCF A 0 A_ReturnModule();
|
||||||
|
TLCF ABCDEFGH 1;
|
||||||
|
Goto Idle2;
|
||||||
|
AltFire:
|
||||||
|
TLCT A 0 A_Translocate();
|
||||||
|
TLCT ABCDEFGHIJKLM 1;
|
||||||
|
Goto Idle2;
|
||||||
|
Deselect:
|
||||||
|
TLCD A 0 A_JumpIf(invoker.module,"Deselect2");
|
||||||
|
TLCD ABCDEFG 2;
|
||||||
|
TLCD G 1 A_Lower(int.max);
|
||||||
|
Wait;
|
||||||
|
Deselect2:
|
||||||
|
TLD2 ABCDEFG 2;
|
||||||
|
TLD2 G 1 A_Lower(int.max);
|
||||||
|
Wait;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -690,6 +690,11 @@ Class UTMainHandler : StaticEventHandler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override void WorldThingSpawned( WorldEvent e )
|
||||||
|
{
|
||||||
|
if ( e.Thing.bBOSS ) e.Thing.bNOTELEFRAG = true;
|
||||||
|
}
|
||||||
|
|
||||||
ui void StartMenu()
|
ui void StartMenu()
|
||||||
{
|
{
|
||||||
if ( gamestate != GS_TITLELEVEL ) return;
|
if ( gamestate != GS_TITLELEVEL ) return;
|
||||||
|
|
|
||||||
|
|
@ -179,13 +179,12 @@ Class UTHud : BaseStatusBar
|
||||||
Screen.DrawTexture(tx,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_Alpha,alpha);
|
Screen.DrawTexture(tx,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_Alpha,alpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool UTDrawWeaponIcon( Weapon w, bool use, bool pending, double sx = 1.0 )
|
private bool UTDrawWeaponIcon( Weapon w, bool use, double sx = 1.0 )
|
||||||
{
|
{
|
||||||
for ( int i=0; i<14; i++ )
|
for ( int i=0; i<14; i++ )
|
||||||
{
|
{
|
||||||
if ( !(w is IconClasses[i]) ) continue;
|
if ( !(w is IconClasses[i]) ) continue;
|
||||||
if ( use ) UTDrawTintedTex(Uses[i],sx);
|
if ( use ) UTDrawTintedTex(Uses[i],sx);
|
||||||
else if ( pending ) UTDrawTintedTex(Icons[i],sx);
|
|
||||||
else UTDrawTintedTex(Icons[i],sx,tintcolor/2);
|
else UTDrawTintedTex(Icons[i],sx,tintcolor/2);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -317,7 +316,7 @@ Class UTHud : BaseStatusBar
|
||||||
int slot = cw.SlotNumber?(cw.SlotNumber-1):9;
|
int slot = cw.SlotNumber?(cw.SlotNumber-1):9;
|
||||||
CurX = BaseX+slot*WeaponOffset;
|
CurX = BaseX+slot*WeaponOffset;
|
||||||
CurY = BaseY;
|
CurY = BaseY;
|
||||||
UTDrawWeaponIcon(cw,true,false,0.8);
|
UTDrawWeaponIcon(cw,true,0.8);
|
||||||
CurX = BaseX+slot*WeaponOffset;
|
CurX = BaseX+slot*WeaponOffset;
|
||||||
CurY = BaseY;
|
CurY = BaseY;
|
||||||
UTDrawPlainTex(WeaponBox,0.8);
|
UTDrawPlainTex(WeaponBox,0.8);
|
||||||
|
|
@ -329,6 +328,9 @@ Class UTHud : BaseStatusBar
|
||||||
CurY = BaseY-32*WeapScale;
|
CurY = BaseY-32*WeapScale;
|
||||||
DrawColor = GoldColor;
|
DrawColor = GoldColor;
|
||||||
UTDrawColorTex(Flash,0.8);
|
UTDrawColorTex(Flash,0.8);
|
||||||
|
CurX = BaseX+slot*WeaponOffset;
|
||||||
|
CurY = BaseY;
|
||||||
|
UTDrawWeaponIcon(pw,true,0.8);
|
||||||
}
|
}
|
||||||
Weapon wslots[10];
|
Weapon wslots[10];
|
||||||
for ( Inventory i = CPlayer.mo.Inv; i; i=i.Inv )
|
for ( Inventory i = CPlayer.mo.Inv; i; i=i.Inv )
|
||||||
|
|
@ -348,8 +350,8 @@ Class UTHud : BaseStatusBar
|
||||||
CurY = BaseY;
|
CurY = BaseY;
|
||||||
if ( !wslots[i] )
|
if ( !wslots[i] )
|
||||||
UTDrawTintedTex(Slots[i],1.6,tintcolor/2);
|
UTDrawTintedTex(Slots[i],1.6,tintcolor/2);
|
||||||
else if ( wslots[i] != cw )
|
else if ( (wslots[i] != cw) && (wslots[i] != pw) )
|
||||||
if ( !UTDrawWeaponIcon(wslots[i],false,wslots[i]==pw,0.8) )
|
if ( !UTDrawWeaponIcon(wslots[i],false,0.8) )
|
||||||
UTDrawTintedTex(Slots[i],1.6,tintcolor/2);
|
UTDrawTintedTex(Slots[i],1.6,tintcolor/2);
|
||||||
}
|
}
|
||||||
for ( int i=0; i<10; i++ )
|
for ( int i=0; i<10; i++ )
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue