Impact Hammer fully implemented.
This commit is contained in:
parent
ea0ef80782
commit
1ddda70712
19 changed files with 428 additions and 40 deletions
10
decaldef.txt
10
decaldef.txt
|
|
@ -125,3 +125,13 @@ decal BoltScorch
|
||||||
x-scale 0.15
|
x-scale 0.15
|
||||||
y-scale 0.15
|
y-scale 0.15
|
||||||
}
|
}
|
||||||
|
|
||||||
|
decal ImpactMark
|
||||||
|
{
|
||||||
|
pic impcrack
|
||||||
|
shade "00 00 00"
|
||||||
|
randomflipx
|
||||||
|
randomflipy
|
||||||
|
x-scale 0.25
|
||||||
|
y-scale 0.25
|
||||||
|
}
|
||||||
|
|
|
||||||
BIN
graphics/RReticle.png
Normal file
BIN
graphics/RReticle.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.6 KiB |
Binary file not shown.
Binary file not shown.
BIN
graphics/impcrack.png
Normal file
BIN
graphics/impcrack.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
BIN
graphics/pock0_t.png
Normal file
BIN
graphics/pock0_t.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 821 B |
Binary file not shown.
BIN
graphics/pock2_t.png
Normal file
BIN
graphics/pock2_t.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 883 B |
Binary file not shown.
BIN
graphics/pock4_t.png
Normal file
BIN
graphics/pock4_t.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 871 B |
Binary file not shown.
BIN
graphics/ripblast.png
Normal file
BIN
graphics/ripblast.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.6 KiB |
Binary file not shown.
|
|
@ -3,7 +3,8 @@ Model "ImpactHammer"
|
||||||
Path "models"
|
Path "models"
|
||||||
Model 1 "ImpPick_d.3d"
|
Model 1 "ImpPick_d.3d"
|
||||||
Skin 1 "JImpPick1.png"
|
Skin 1 "JImpPick1.png"
|
||||||
Scale -0.24 0.2 0.2
|
Scale -0.2 0.24 0.2
|
||||||
|
AngleOffset 270
|
||||||
ZOffset 12
|
ZOffset 12
|
||||||
ROTATING
|
ROTATING
|
||||||
|
|
||||||
|
|
@ -14,8 +15,83 @@ Model "ImpactHammer"
|
||||||
Path "models"
|
Path "models"
|
||||||
Model 1 "ImpPick_d.3d"
|
Model 1 "ImpPick_d.3d"
|
||||||
Skin 1 "JImpPick1.png"
|
Skin 1 "JImpPick1.png"
|
||||||
Scale -0.24 0.2 0.2
|
Scale -0.2 0.24 0.2
|
||||||
ZOffset 6
|
AngleOffset 270
|
||||||
|
ZOffset 9
|
||||||
|
|
||||||
FrameIndex IMPP B 1 0
|
FrameIndex IMPP B 1 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Model "ImpactHammer"
|
||||||
|
{
|
||||||
|
Path "models"
|
||||||
|
Model 0 "ImpactHammer_d.3d"
|
||||||
|
SurfaceSkin 0 0 "JImpactHammer1.png"
|
||||||
|
SurfaceSkin 0 1 "JImpactHammer2.png"
|
||||||
|
SurfaceSkin 0 2 "JImpactHammer3.png"
|
||||||
|
SurfaceSkin 0 3 "JImpactHammer4.png"
|
||||||
|
PitchOffset 5
|
||||||
|
Scale 0.1 0.05 0.1
|
||||||
|
Offset 5.8 -12.8 -7.7
|
||||||
|
|
||||||
|
// select
|
||||||
|
FrameIndex IMPS A 0 0
|
||||||
|
FrameIndex IMPS B 0 1
|
||||||
|
FrameIndex IMPS C 0 2
|
||||||
|
FrameIndex IMPS D 0 3
|
||||||
|
FrameIndex IMPS E 0 4
|
||||||
|
FrameIndex IMPS F 0 5
|
||||||
|
FrameIndex IMPS G 0 6
|
||||||
|
FrameIndex IMPS H 0 7
|
||||||
|
FrameIndex IMPS I 0 8
|
||||||
|
FrameIndex IMPS J 0 9
|
||||||
|
FrameIndex IMPS K 0 10
|
||||||
|
FrameIndex IMPS L 0 11
|
||||||
|
FrameIndex IMPS M 0 12
|
||||||
|
FrameIndex IMPS N 0 13
|
||||||
|
FrameIndex IMPS O 0 14
|
||||||
|
FrameIndex IMPS P 0 15
|
||||||
|
FrameIndex IMPS Q 0 16
|
||||||
|
// idle
|
||||||
|
FrameIndex IMPI A 0 17
|
||||||
|
// pull
|
||||||
|
FrameIndex IMPL A 0 17
|
||||||
|
FrameIndex IMPL B 0 18
|
||||||
|
FrameIndex IMPL C 0 19
|
||||||
|
FrameIndex IMPL D 0 20
|
||||||
|
FrameIndex IMPL E 0 21
|
||||||
|
// shake
|
||||||
|
FrameIndex IMPR A 0 22
|
||||||
|
FrameIndex IMPR B 0 23
|
||||||
|
FrameIndex IMPR C 0 24
|
||||||
|
FrameIndex IMPR D 0 25
|
||||||
|
FrameIndex IMPR E 0 26
|
||||||
|
FrameIndex IMPR F 0 27
|
||||||
|
FrameIndex IMPR G 0 28
|
||||||
|
FrameIndex IMPR H 0 29
|
||||||
|
FrameIndex IMPR I 0 30
|
||||||
|
FrameIndex IMPR J 0 31
|
||||||
|
// fire
|
||||||
|
FrameIndex IMPF A 0 35
|
||||||
|
FrameIndex IMPF B 0 36
|
||||||
|
FrameIndex IMPF C 0 37
|
||||||
|
FrameIndex IMPF D 0 38
|
||||||
|
FrameIndex IMPF E 0 39
|
||||||
|
FrameIndex IMPF F 0 40
|
||||||
|
FrameIndex IMPF G 0 41
|
||||||
|
FrameIndex IMPF H 0 42
|
||||||
|
FrameIndex IMPF I 0 43
|
||||||
|
FrameIndex IMPF J 0 44
|
||||||
|
FrameIndex IMPF K 0 45
|
||||||
|
FrameIndex IMPF L 0 46
|
||||||
|
FrameIndex IMPF M 0 47
|
||||||
|
FrameIndex IMPF N 0 48
|
||||||
|
FrameIndex IMPF O 0 49
|
||||||
|
FrameIndex IMPF P 0 50
|
||||||
|
// down
|
||||||
|
FrameIndex IMPD A 0 51
|
||||||
|
FrameIndex IMPD B 0 52
|
||||||
|
FrameIndex IMPD C 0 53
|
||||||
|
FrameIndex IMPD D 0 54
|
||||||
|
FrameIndex IMPD E 0 55
|
||||||
|
}
|
||||||
60
sndinfo.txt
60
sndinfo.txt
|
|
@ -120,6 +120,39 @@ misc/gibbed4 gib4
|
||||||
misc/gibbed5 gib5
|
misc/gibbed5 gib5
|
||||||
$random misc/gibbed { misc/gibbed1 misc/gibbed2 misc/gibbed3 misc/gibbed4 misc/gibbed5 }
|
$random misc/gibbed { misc/gibbed1 misc/gibbed2 misc/gibbed3 misc/gibbed4 misc/gibbed5 }
|
||||||
|
|
||||||
|
impact/select imppick
|
||||||
|
impact/pull impaltst
|
||||||
|
impact/loop imploop
|
||||||
|
impact/release impaltrl
|
||||||
|
impact/fire impfire
|
||||||
|
|
||||||
|
ges/hit gelhit
|
||||||
|
ges/select gelselec
|
||||||
|
ges/fire gelshot
|
||||||
|
ges/charge bioaltrp
|
||||||
|
ges/explode explg02
|
||||||
|
$limit ges/hit 64
|
||||||
|
$limit ges/explode 64
|
||||||
|
|
||||||
|
shock/select tazersel
|
||||||
|
shock/fire tazefire
|
||||||
|
shock/altfire tazealtf
|
||||||
|
shock/hit expl03
|
||||||
|
shock/blast specexpl
|
||||||
|
$pitchshiftrange 5
|
||||||
|
shock/ball expla02
|
||||||
|
$pitchshift shock/ball 5
|
||||||
|
$pitchshiftrange 0
|
||||||
|
sshock/blast expl2
|
||||||
|
|
||||||
|
pulse/bolt pulseblt
|
||||||
|
pulse/down pulsedwn
|
||||||
|
pulse/hit pulseexp
|
||||||
|
pulse/fire pulsefir
|
||||||
|
pulse/fly pulsefly
|
||||||
|
pulse/select pulsepck
|
||||||
|
pulse/reload pulserel
|
||||||
|
|
||||||
flak/select pdown
|
flak/select pdown
|
||||||
flak/load hidraul2
|
flak/load hidraul2
|
||||||
flak/reload load1
|
flak/reload load1
|
||||||
|
|
@ -134,34 +167,7 @@ $random flak/bounce { flak/bounce1 flak/bounce2 flak/bounce3 }
|
||||||
$limit flak/bounce 64
|
$limit flak/bounce 64
|
||||||
flak/explode expl04
|
flak/explode expl04
|
||||||
|
|
||||||
shock/select tazersel
|
|
||||||
shock/fire tazefire
|
|
||||||
shock/altfire tazealtf
|
|
||||||
shock/hit expl03
|
|
||||||
shock/blast specexpl
|
|
||||||
$pitchshiftrange 5
|
|
||||||
shock/ball expla02
|
|
||||||
$pitchshift shock/ball 5
|
|
||||||
$pitchshiftrange 0
|
|
||||||
sshock/blast expl2
|
|
||||||
|
|
||||||
warhead/explode warexplo
|
warhead/explode warexplo
|
||||||
warhead/fly warfly
|
warhead/fly warfly
|
||||||
warhead/select warhpick
|
warhead/select warhpick
|
||||||
warhead/fire warhshot
|
warhead/fire warhshot
|
||||||
|
|
||||||
ges/hit gelhit
|
|
||||||
ges/select gelselec
|
|
||||||
ges/fire gelshot
|
|
||||||
ges/charge bioaltrp
|
|
||||||
ges/explode explg02
|
|
||||||
$limit ges/hit 64
|
|
||||||
$limit ges/explode 64
|
|
||||||
|
|
||||||
pulse/bolt pulseblt
|
|
||||||
pulse/down pulsedwn
|
|
||||||
pulse/hit pulseexp
|
|
||||||
pulse/fire pulsefir
|
|
||||||
pulse/fly pulsefly
|
|
||||||
pulse/select pulsepck
|
|
||||||
pulse/reload pulserel
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,56 @@
|
||||||
Sprite "IMPPA0",1,1{}
|
Sprite "IMPPA0",1,1{}
|
||||||
Sprite "IMPPB0",1,1{}
|
Sprite "IMPPB0",1,1{}
|
||||||
|
Sprite "IMPSA0",1,1{}
|
||||||
|
Sprite "IMPSB0",1,1{}
|
||||||
|
Sprite "IMPSC0",1,1{}
|
||||||
|
Sprite "IMPSD0",1,1{}
|
||||||
|
Sprite "IMPSE0",1,1{}
|
||||||
|
Sprite "IMPSF0",1,1{}
|
||||||
|
Sprite "IMPSG0",1,1{}
|
||||||
|
Sprite "IMPSH0",1,1{}
|
||||||
|
Sprite "IMPSI0",1,1{}
|
||||||
|
Sprite "IMPSJ0",1,1{}
|
||||||
|
Sprite "IMPSK0",1,1{}
|
||||||
|
Sprite "IMPSL0",1,1{}
|
||||||
|
Sprite "IMPSM0",1,1{}
|
||||||
|
Sprite "IMPSN0",1,1{}
|
||||||
|
Sprite "IMPSO0",1,1{}
|
||||||
|
Sprite "IMPSP0",1,1{}
|
||||||
|
Sprite "IMPSQ0",1,1{}
|
||||||
|
Sprite "IMPIA0",1,1{}
|
||||||
|
Sprite "IMPLA0",1,1{}
|
||||||
|
Sprite "IMPLB0",1,1{}
|
||||||
|
Sprite "IMPLC0",1,1{}
|
||||||
|
Sprite "IMPLD0",1,1{}
|
||||||
|
Sprite "IMPLE0",1,1{}
|
||||||
|
Sprite "IMPRA0",1,1{}
|
||||||
|
Sprite "IMPRB0",1,1{}
|
||||||
|
Sprite "IMPRC0",1,1{}
|
||||||
|
Sprite "IMPRD0",1,1{}
|
||||||
|
Sprite "IMPRE0",1,1{}
|
||||||
|
Sprite "IMPRF0",1,1{}
|
||||||
|
Sprite "IMPRG0",1,1{}
|
||||||
|
Sprite "IMPRH0",1,1{}
|
||||||
|
Sprite "IMPRI0",1,1{}
|
||||||
|
Sprite "IMPRJ0",1,1{}
|
||||||
|
Sprite "IMPFA0",1,1{}
|
||||||
|
Sprite "IMPFB0",1,1{}
|
||||||
|
Sprite "IMPFC0",1,1{}
|
||||||
|
Sprite "IMPFD0",1,1{}
|
||||||
|
Sprite "IMPFE0",1,1{}
|
||||||
|
Sprite "IMPFF0",1,1{}
|
||||||
|
Sprite "IMPFG0",1,1{}
|
||||||
|
Sprite "IMPFH0",1,1{}
|
||||||
|
Sprite "IMPFI0",1,1{}
|
||||||
|
Sprite "IMPFJ0",1,1{}
|
||||||
|
Sprite "IMPFK0",1,1{}
|
||||||
|
Sprite "IMPFL0",1,1{}
|
||||||
|
Sprite "IMPFM0",1,1{}
|
||||||
|
Sprite "IMPFN0",1,1{}
|
||||||
|
Sprite "IMPFO0",1,1{}
|
||||||
|
Sprite "IMPFP0",1,1{}
|
||||||
|
Sprite "IMPDA0",1,1{}
|
||||||
|
Sprite "IMPDB0",1,1{}
|
||||||
|
Sprite "IMPDC0",1,1{}
|
||||||
|
Sprite "IMPDD0",1,1{}
|
||||||
|
Sprite "IMPDE0",1,1{}
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,188 @@
|
||||||
Class ImpactHammer : UTWeapon replaces Fist
|
Class HammerImpact : Actor
|
||||||
{
|
{
|
||||||
|
Default
|
||||||
|
{
|
||||||
|
Radius 0.1;
|
||||||
|
Height 0;
|
||||||
|
+NOGRAVITY;
|
||||||
|
+NOCLIP;
|
||||||
|
+DONTSPLASH;
|
||||||
|
}
|
||||||
|
override void PostBeginPlay()
|
||||||
|
{
|
||||||
|
Super.PostBeginPlay();
|
||||||
|
A_SprayDecal("ImpactMark",20);
|
||||||
|
int numpt = Random[Impact](20,40);
|
||||||
|
Vector3 x = (cos(angle)*cos(pitch),sin(angle)*cos(pitch),-sin(pitch));
|
||||||
|
for ( int i=0; i<numpt; i++ )
|
||||||
|
{
|
||||||
|
Vector3 pvel = (x+(FRandom[Impact](-.8,.8),FRandom[Impact](-.8,.8),FRandom[Impact](-.8,.8))).unit()*FRandom[Impact](1,3);
|
||||||
|
A_SpawnParticle(Color(1,1,1)*Random[Impact](128,192),0,Random[Impact](30,60),FRandom[Impact](2,8),0,0,0,0,pvel.x,pvel.y,pvel.z,0,0,0.03,0.5,-1,0.5);
|
||||||
|
}
|
||||||
|
numpt = Random[Impact](8,12);
|
||||||
|
for ( int i=0; i<numpt; i++ )
|
||||||
|
{
|
||||||
|
Vector3 pvel = (FRandom[Impact](-1,1),FRandom[Impact](-1,1),FRandom[Impact](-1,1)).unit()*FRandom[Impact](2,4);
|
||||||
|
A_SpawnParticle("FFA000",SPF_FULLBRIGHT,Random[Impact](10,20),FRandom[Impact](1.2,3.6),0,0,0,0,pvel.x,pvel.y,pvel.z,0,0,0,3.0,-1,-0.25);
|
||||||
|
}
|
||||||
|
Destroy();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Class ImpactHammer : UTWeapon replaces Fist
|
||||||
|
{
|
||||||
|
double chargesize, count;
|
||||||
|
|
||||||
|
action void A_ResetCharge()
|
||||||
|
{
|
||||||
|
invoker.chargesize = 0;
|
||||||
|
invoker.count = 0;
|
||||||
|
invoker.FireEffect(); // intentional UT behavior
|
||||||
|
}
|
||||||
|
action void A_ChargeUp( int amt = 1 )
|
||||||
|
{
|
||||||
|
invoker.chargesize += (0.75*amt)/TICRATE;
|
||||||
|
invoker.count += double(amt)/TICRATE;
|
||||||
|
if ( invoker.count > 0.2 )
|
||||||
|
{
|
||||||
|
invoker.count = 0;
|
||||||
|
A_AlertMonsters();
|
||||||
|
}
|
||||||
|
A_QuakeEx(clamp(invoker.chargesize*3,0,3),clamp(invoker.chargesize*3,0,3),clamp(invoker.chargesize*3,0,3),amt+1,0,96,"",QF_RELATIVE,rollIntensity:clamp(invoker.chargesize*0.3,0,0.3));
|
||||||
|
}
|
||||||
|
action void A_FireBlast()
|
||||||
|
{
|
||||||
|
Weapon weap = Weapon(invoker);
|
||||||
|
if ( !weap ) return;
|
||||||
|
A_PlaySound("impact/release",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+3.0*y-4.0*z;
|
||||||
|
double realcharge = min(1.5,invoker.chargesize);
|
||||||
|
FLineTraceData d;
|
||||||
|
LineTrace(angle,80,BulletSlope(),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d);
|
||||||
|
if ( d.HitType == TRACE_HitActor )
|
||||||
|
{
|
||||||
|
d.HitActor.DamageMobj(invoker,self,60*realcharge,'impact');
|
||||||
|
d.HitActor.vel += x*(1000/d.HitActor.mass)*realcharge;
|
||||||
|
if ( d.HitActor.bNOBLOOD )
|
||||||
|
{
|
||||||
|
let p = Spawn("HammerImpact",d.HitLocation-d.HitDir*4);
|
||||||
|
p.angle = atan2(d.HitDir.y,d.HitDir.x);
|
||||||
|
p.pitch = asin(-d.HitDir.z);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
d.HitActor.TraceBleed(60*realcharge,invoker);
|
||||||
|
d.HitActor.SpawnBlood(d.HitLocation,atan2(-d.HitDir.y,-d.HitDir.x),60*realcharge);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ( d.HitType != TRACE_HitNone )
|
||||||
|
{
|
||||||
|
realcharge = max(1.0,invoker.chargesize);
|
||||||
|
DamageMobj(invoker,self,24*realcharge,'impact'); // It's a flat damage of 36 on UT, but I think it's more fair for it to scale
|
||||||
|
TraceBleed(24*realcharge,invoker);
|
||||||
|
vel -= x*(1200/mass)*realcharge;
|
||||||
|
let p = Spawn("HammerImpact",d.HitLocation-d.HitDir*4);
|
||||||
|
p.angle = atan2(d.HitDir.y,d.HitDir.x);
|
||||||
|
p.pitch = asin(-d.HitDir.z);
|
||||||
|
if ( d.HitType == TRACE_HitWall ) d.HitLine.RemoteActivate(self,d.LineSide,SPAC_Impact,d.HitLocation-d.HitDir*4);
|
||||||
|
}
|
||||||
|
A_QuakeEx(realcharge*4,realcharge*4,realcharge*4,12,0,96,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:realcharge*0.2);
|
||||||
|
realcharge = max(1.0,invoker.chargesize);
|
||||||
|
int numpt = Random[Impact](20,40);
|
||||||
|
for ( int i=0; i<numpt; i++ )
|
||||||
|
{
|
||||||
|
Vector3 pvel = (x+(FRandom[Impact](-.4,.4),FRandom[Impact](-.4,.4),FRandom[Impact](-.4,.4))).unit()*FRandom[Impact](1,3)*realcharge;
|
||||||
|
A_SpawnParticle(Color(1,1,1)*Random[Impact](128,192),0,Random[Impact](30,60),FRandom[Impact](2,8),0,origin.x-pos.x,origin.y-pos.y,origin.z-pos.z,pvel.x,pvel.y,pvel.z,0,0,0.03,0.5,-1,0.5);
|
||||||
|
}
|
||||||
|
numpt = Random[Impact](10,20);
|
||||||
|
for ( int i=0; i<numpt; i++ )
|
||||||
|
{
|
||||||
|
Vector3 pvel = (x+(FRandom[Impact](-.5,.5),FRandom[Impact](-.5,.5),FRandom[Impact](-.5,.5))).unit()*FRandom[Impact](2,4)*realcharge;
|
||||||
|
A_SpawnParticle(Color(1,1,1)*Random[Impact](16,64),0,Random[Impact](5,10),FRandom[Impact](0.3,0.8),0,origin.x-pos.x,origin.y-pos.y,origin.z-pos.z,pvel.x,pvel.y,pvel.z,0,0,-0.2,2.,-0.1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
action void A_FireAltBlast()
|
||||||
|
{
|
||||||
|
Weapon weap = Weapon(invoker);
|
||||||
|
if ( !weap ) return;
|
||||||
|
A_PlaySound("impact/fire",CHAN_WEAPON);
|
||||||
|
invoker.FireEffect();
|
||||||
|
A_AlertMonsters();
|
||||||
|
A_QuakeEx(2,2,2,6,0,96,"",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;
|
||||||
|
FLineTraceData d;
|
||||||
|
LineTrace(angle,180,BulletSlope(),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d);
|
||||||
|
double dscale = d.Distance/180.;
|
||||||
|
if ( d.HitType == TRACE_HitActor )
|
||||||
|
{
|
||||||
|
d.HitActor.DamageMobj(invoker,self,20*dscale,'impact');
|
||||||
|
d.HitActor.vel += x*(500/d.HitActor.mass)*dscale;
|
||||||
|
}
|
||||||
|
else if ( d.HitType != TRACE_HitNone )
|
||||||
|
{
|
||||||
|
DamageMobj(invoker,self,24*dscale,'impact');
|
||||||
|
vel -= x*(600/mass)*dscale;
|
||||||
|
if ( d.HitType == TRACE_HitWall ) d.HitLine.RemoteActivate(self,d.LineSide,SPAC_Impact,d.HitLocation-d.HitDir*4);
|
||||||
|
}
|
||||||
|
// push aside projectiles
|
||||||
|
let t = ThinkerIterator.Create("Actor");
|
||||||
|
Actor m;
|
||||||
|
while ( m = Actor(t.Next()) )
|
||||||
|
{
|
||||||
|
if ( !m.bMISSILE ) continue;
|
||||||
|
double rdist = level.Vec3Diff(origin,m.pos).length();
|
||||||
|
Vector3 rdir = level.Vec3Diff(origin,m.pos).unit();
|
||||||
|
if ( LineTrace(atan2(rdir.y,rdir.x),rdist,asin(-rdir.z),TRF_THRUACTORS|TRF_ABSPOSITION,origin.z,origin.x,origin.y) || (rdist > 550) || (rdir dot x < 0.9) ) continue;
|
||||||
|
m.speed = m.vel.length();
|
||||||
|
if ( m.vel dot y > 0 ) m.vel = m.speed*(m.vel+(750-rdist)*y*0.01).unit();
|
||||||
|
else m.vel = m.speed*(m.vel-(750-rdist)*y*0.01).unit();
|
||||||
|
if ( m.target == self ) continue;
|
||||||
|
if ( m.bSEEKERMISSILE ) m.tracer = m.target;
|
||||||
|
m.target = self;
|
||||||
|
}
|
||||||
|
int numpt = Random[Impact](20,40);
|
||||||
|
for ( int i=0; i<numpt; i++ )
|
||||||
|
{
|
||||||
|
Vector3 pvel = (x+(FRandom[Impact](-.4,.4),FRandom[Impact](-.4,.4),FRandom[Impact](-.4,.4))).unit()*FRandom[Impact](1,3);
|
||||||
|
A_SpawnParticle(Color(1,1,1)*Random[Impact](128,192),0,Random[Impact](30,60),FRandom[Impact](2,8),0,origin.x-pos.x,origin.y-pos.y,origin.z-pos.z,pvel.x,pvel.y,pvel.z,0,0,0.03,0.5,-1,0.5);
|
||||||
|
}
|
||||||
|
numpt = Random[Impact](10,20);
|
||||||
|
for ( int i=0; i<numpt; i++ )
|
||||||
|
{
|
||||||
|
Vector3 pvel = (x+(FRandom[Impact](-.5,.5),FRandom[Impact](-.5,.5),FRandom[Impact](-.5,.5))).unit()*FRandom[Impact](2,4);
|
||||||
|
A_SpawnParticle(Color(1,1,1)*Random[Impact](16,64),0,Random[Impact](5,10),FRandom[Impact](0.3,0.8),0,origin.x-pos.x,origin.y-pos.y,origin.z-pos.z,pvel.x,pvel.y,pvel.z,0,0,-0.2,2.,-0.1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
action void A_ImpactRefire( statelabel flash = null )
|
||||||
|
{
|
||||||
|
FLineTraceData d;
|
||||||
|
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;
|
||||||
|
LineTrace(angle,40,BulletSlope(),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d);
|
||||||
|
if ( (invoker.chargesize > 1) && (d.HitType == TRACE_HitActor) )
|
||||||
|
{
|
||||||
|
A_ClearRefire();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
A_Refire(flash);
|
||||||
|
}
|
||||||
|
|
||||||
Default
|
Default
|
||||||
{
|
{
|
||||||
Tag "Impact Hammer";
|
Tag "Impact Hammer";
|
||||||
|
Obituary "%o was smeared by %k's piston.";
|
||||||
Inventory.PickupMessage "You got the Impact Hammer.";
|
Inventory.PickupMessage "You got the Impact Hammer.";
|
||||||
Weapon.UpSound "";
|
Weapon.UpSound "impact/select";
|
||||||
Weapon.SlotNumber 1;
|
Weapon.SlotNumber 1;
|
||||||
Weapon.SelectionOrder 9;
|
Weapon.SelectionOrder 9;
|
||||||
+WEAPON.MELEEWEAPON;
|
+WEAPON.MELEEWEAPON;
|
||||||
+INVENTORY.UNTOSSABLE;
|
|
||||||
}
|
}
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
|
@ -17,5 +191,78 @@ Class ImpactHammer : UTWeapon replaces Fist
|
||||||
Stop;
|
Stop;
|
||||||
IMPP B -1;
|
IMPP B -1;
|
||||||
Stop;
|
Stop;
|
||||||
|
Select:
|
||||||
|
IMPS A 1 A_Raise(int.max);
|
||||||
|
Wait;
|
||||||
|
Ready:
|
||||||
|
IMPS ABCDEFGHIJKLMNOPQ 1;
|
||||||
|
Idle:
|
||||||
|
IMPI A 1 A_WeaponReady();
|
||||||
|
Wait;
|
||||||
|
Fire:
|
||||||
|
IMPL A 0
|
||||||
|
{
|
||||||
|
A_ResetCharge();
|
||||||
|
A_PlaySound("impact/pull",CHAN_WEAPON);
|
||||||
|
}
|
||||||
|
IMPL A 5 A_ChargeUp(5);
|
||||||
|
IMPL B 0 A_ImpactRefire(1);
|
||||||
|
Goto Release;
|
||||||
|
IMPL B 5 A_ChargeUp(5);
|
||||||
|
IMPL C 0 A_ImpactRefire(1);
|
||||||
|
Goto Release;
|
||||||
|
IMPL C 5 A_ChargeUp(5);
|
||||||
|
IMPL D 0 A_ImpactRefire(1);
|
||||||
|
Goto Release;
|
||||||
|
IMPL D 5 A_ChargeUp(5);
|
||||||
|
IMPL E 0 A_ImpactRefire(1);
|
||||||
|
Goto Release;
|
||||||
|
IMPL E 5 A_ChargeUp(5);
|
||||||
|
IMPL E 0 A_ImpactRefire(1);
|
||||||
|
Goto Release;
|
||||||
|
IMPL E 0 A_PlaySound("impact/loop",CHAN_WEAPON,looping:true);
|
||||||
|
Hold:
|
||||||
|
IMPR A 1 A_ChargeUp();
|
||||||
|
IMPR B 0 A_ImpactRefire(1);
|
||||||
|
Goto Release;
|
||||||
|
IMPR B 1 A_ChargeUp();
|
||||||
|
IMPR C 0 A_ImpactRefire(1);
|
||||||
|
Goto Release;
|
||||||
|
IMPR C 1 A_ChargeUp();
|
||||||
|
IMPR D 0 A_ImpactRefire(1);
|
||||||
|
Goto Release;
|
||||||
|
IMPR D 1 A_ChargeUp();
|
||||||
|
IMPR E 0 A_ImpactRefire(1);
|
||||||
|
Goto Release;
|
||||||
|
IMPR E 1 A_ChargeUp();
|
||||||
|
IMPR F 0 A_ImpactRefire(1);
|
||||||
|
Goto Release;
|
||||||
|
IMPR F 1 A_ChargeUp();
|
||||||
|
IMPR G 0 A_ImpactRefire(1);
|
||||||
|
Goto Release;
|
||||||
|
IMPR G 1 A_ChargeUp();
|
||||||
|
IMPR H 0 A_ImpactRefire(1);
|
||||||
|
Goto Release;
|
||||||
|
IMPR H 1 A_ChargeUp();
|
||||||
|
IMPR I 0 A_ImpactRefire(1);
|
||||||
|
Goto Release;
|
||||||
|
IMPR I 1 A_ChargeUp();
|
||||||
|
IMPR J 0 A_ImpactRefire(1);
|
||||||
|
Goto Release;
|
||||||
|
IMPR J 1 A_ChargeUp();
|
||||||
|
IMPR A 0 A_ImpactRefire("Hold");
|
||||||
|
Goto Release;
|
||||||
|
Release:
|
||||||
|
IMPF A 0 A_FireBlast();
|
||||||
|
IMPF AABCCDEEFGGHIIJKKLMMNOOP 1;
|
||||||
|
Goto Idle;
|
||||||
|
AltFire:
|
||||||
|
IMPF A 0 A_FireAltBlast();
|
||||||
|
IMPF ABCDEFGHIJKLMNOP 1;
|
||||||
|
Goto Idle;
|
||||||
|
Deselect:
|
||||||
|
IMPD ABCDE 3;
|
||||||
|
IMPD E 1 A_Lower(int.max);
|
||||||
|
Wait;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ Class Translocator : UTWeapon
|
||||||
Inventory.PickupMessage "You got the Translocator Source Module.";
|
Inventory.PickupMessage "You got the Translocator Source Module.";
|
||||||
Weapon.SlotNumber 1;
|
Weapon.SlotNumber 1;
|
||||||
Weapon.SelectionOrder 10;
|
Weapon.SelectionOrder 10;
|
||||||
+INVENTORY.UNTOSSABLE;
|
|
||||||
+WEAPON.NO_AUTO_SWITCH;
|
+WEAPON.NO_AUTO_SWITCH;
|
||||||
}
|
}
|
||||||
States
|
States
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ Class UTHud : BaseStatusBar
|
||||||
Slots[7] = TexMan.CheckForTexture("SlotFlak",TexMan.Type_Any);
|
Slots[7] = TexMan.CheckForTexture("SlotFlak",TexMan.Type_Any);
|
||||||
Slots[8] = TexMan.CheckForTexture("Slot8bal",TexMan.Type_Any);
|
Slots[8] = TexMan.CheckForTexture("Slot8bal",TexMan.Type_Any);
|
||||||
Slots[9] = TexMan.CheckForTexture("SlotRifl",TexMan.Type_Any);
|
Slots[9] = TexMan.CheckForTexture("SlotRifl",TexMan.Type_Any);
|
||||||
Icons[0] = TexMan.CheckForTexture("IconImp",TexMan.Type_Any);
|
Icons[0] = TexMan.CheckForTexture("IconImpH",TexMan.Type_Any);
|
||||||
Icons[1] = TexMan.CheckForTexture("IconAuto",TexMan.Type_Any);
|
Icons[1] = TexMan.CheckForTexture("IconAuto",TexMan.Type_Any);
|
||||||
Icons[2] = TexMan.CheckForTexture("IconBio",TexMan.Type_Any);
|
Icons[2] = TexMan.CheckForTexture("IconBio",TexMan.Type_Any);
|
||||||
Icons[3] = TexMan.CheckForTexture("IconASMD",TexMan.Type_Any);
|
Icons[3] = TexMan.CheckForTexture("IconASMD",TexMan.Type_Any);
|
||||||
|
|
@ -93,7 +93,7 @@ Class UTHud : BaseStatusBar
|
||||||
Icons[11] = TexMan.CheckForTexture("IconTrns",TexMan.Type_Any);
|
Icons[11] = TexMan.CheckForTexture("IconTrns",TexMan.Type_Any);
|
||||||
Icons[12] = TexMan.CheckForTexture("IconWarH",TexMan.Type_Any);
|
Icons[12] = TexMan.CheckForTexture("IconWarH",TexMan.Type_Any);
|
||||||
Icons[13] = TexMan.CheckForTexture("IconASMD",TexMan.Type_Any);
|
Icons[13] = TexMan.CheckForTexture("IconASMD",TexMan.Type_Any);
|
||||||
Uses[0] = TexMan.CheckForTexture("UseImp",TexMan.Type_Any);
|
Uses[0] = TexMan.CheckForTexture("UseImpH",TexMan.Type_Any);
|
||||||
Uses[1] = TexMan.CheckForTexture("UseAuto",TexMan.Type_Any);
|
Uses[1] = TexMan.CheckForTexture("UseAuto",TexMan.Type_Any);
|
||||||
Uses[2] = TexMan.CheckForTexture("UseBio",TexMan.Type_Any);
|
Uses[2] = TexMan.CheckForTexture("UseBio",TexMan.Type_Any);
|
||||||
Uses[3] = TexMan.CheckForTexture("UseASMD",TexMan.Type_Any);
|
Uses[3] = TexMan.CheckForTexture("UseASMD",TexMan.Type_Any);
|
||||||
|
|
@ -360,18 +360,14 @@ Class UTHud : BaseStatusBar
|
||||||
CurY = BaseY+4*WeapScale;
|
CurY = BaseY+4*WeapScale;
|
||||||
DrawColor = GoldColor;
|
DrawColor = GoldColor;
|
||||||
UTDrawColorTex(BigNum[(i==9)?0:(i+1)],0.6);
|
UTDrawColorTex(BigNum[(i==9)?0:(i+1)],0.6);
|
||||||
if ( !wslots[i].Ammo1 ) return;
|
if ( !wslots[i].Ammo1 ) continue;
|
||||||
CurY = BaseY+52*WeapScale;
|
CurY = BaseY+52*WeapScale;
|
||||||
Vector2 ss = (0.6875,0.5)*WeapScale;
|
Vector2 ss = (0.6875,0.5)*WeapScale;
|
||||||
double dw = (Screen.GetWidth()/ss.x), dh = (Screen.GetHeight()/ss.y);
|
double dw = (Screen.GetWidth()/ss.x), dh = (Screen.GetHeight()/ss.y);
|
||||||
double dx = CurX/ss.x, dy = CurY/ss.y;
|
double dx = CurX/ss.x, dy = CurY/ss.y;
|
||||||
Vector2 bs = TexMan.GetScaledSize(AmmoBar);
|
Vector2 bs = TexMan.GetScaledSize(AmmoBar);
|
||||||
double ddw = bs.x*(wslots[i].Ammo1.Amount/double(wslots[i].Ammo1.MaxAmount));
|
double ddw = bs.x*(wslots[i].Ammo1.Amount/double(wslots[i].Ammo1.MaxAmount));
|
||||||
int cx, cy, cw, ch;
|
Screen.DrawTexture(AmmoBar,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_WindowRightF,ddw);
|
||||||
[cx,cy,cw,ch] = Screen.GetClipRect();
|
|
||||||
Screen.SetClipRect(CurX,CurY,ddw*ss.x,bs.y*ss.y);
|
|
||||||
Screen.DrawTexture(AmmoBar,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true);
|
|
||||||
Screen.SetClipRect(cx,cy,cw,ch);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void DrawFragCount()
|
private void DrawFragCount()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue