Minigun implemented.
Tweaked some muzzle flashes.
|
|
@ -28,6 +28,7 @@ Doom Tournament (currently the devel branch is required).
|
|||
- Rifle (slot 9) (replaces plasma rifle)
|
||||
- Restored rapid fire
|
||||
- Restored flashlight
|
||||
- Minigun (slot 0) (replaces chaingun)
|
||||
- SMP 7243 (slot 0) (replaces bfg9000)
|
||||
- Backpack (replaces backpack, identical to Doom Tournament version)
|
||||
- Unreal 1 HUD
|
||||
|
|
@ -61,7 +62,7 @@ Doom Tournament (currently the devel branch is required).
|
|||
|
||||
## In progress
|
||||
|
||||
- Minigun (slot 0) (replaces chaingun)
|
||||
- N/A
|
||||
|
||||
## Planned
|
||||
|
||||
|
|
|
|||
17
gldefs.txt
|
|
@ -365,6 +365,18 @@ Object SentryGun
|
|||
Frame "SENFC" { light "SENTRYLIGHT3" }
|
||||
}
|
||||
|
||||
PointLight FFIELDLIGHT
|
||||
{
|
||||
Color 1.0 0.1 1.0
|
||||
Size 15
|
||||
Offset 0 12 0
|
||||
Attenuate 1
|
||||
}
|
||||
Object ForceField
|
||||
{
|
||||
Frame "FFPK" { light "FFIELDLIGHT" }
|
||||
}
|
||||
|
||||
// Shaders / Brightmaps
|
||||
HardwareShader Texture "graphics/MenuBarr.png"
|
||||
{
|
||||
|
|
@ -695,6 +707,11 @@ HardwareShader Texture "models/ShockSm.png"
|
|||
Shader "shaders/glsl/ShockSm.fp"
|
||||
Texture "smoketex" "models/ShockSm2.png"
|
||||
}
|
||||
HardwareShader Texture "models/ForceF.png"
|
||||
{
|
||||
Shader "shaders/glsl/ShockCore.fp"
|
||||
Texture "warptex" "textures/roughwarp.png"
|
||||
}
|
||||
HardwareShader Texture "models/ShockC.png"
|
||||
{
|
||||
Shader "shaders/glsl/ShockCore.fp"
|
||||
|
|
|
|||
|
|
@ -47,27 +47,62 @@ Model "Automag"
|
|||
{
|
||||
Path "models"
|
||||
Model 3 "Flat_d.3d"
|
||||
Skin 3 "EMuz1.png"
|
||||
AngleOffset 90
|
||||
Scale 0.04 0.04 0.04
|
||||
Offset 12.4 -30.0 -3.9
|
||||
|
||||
FrameIndex AMUZ A 3 0
|
||||
Skin 3 "AMuz1.png"
|
||||
FrameIndex AMZ1 A 3 0
|
||||
Skin 3 "AMuz2.png"
|
||||
FrameIndex AMZ1 B 3 0
|
||||
Skin 3 "AMuz3.png"
|
||||
FrameIndex AMZ1 C 3 0
|
||||
Skin 3 "AMuz4.png"
|
||||
FrameIndex AMZ1 D 3 0
|
||||
Skin 3 "AMuz5.png"
|
||||
FrameIndex AMZ1 E 3 0
|
||||
|
||||
Scale 0.04 0.04 0.04
|
||||
Offset 3.9 -30.0 -10
|
||||
|
||||
FrameIndex AMUZ B 3 0
|
||||
Skin 3 "AMuz1.png"
|
||||
FrameIndex AMZ2 A 3 0
|
||||
Skin 3 "AMuz2.png"
|
||||
FrameIndex AMZ2 B 3 0
|
||||
Skin 3 "AMuz3.png"
|
||||
FrameIndex AMZ2 C 3 0
|
||||
Skin 3 "AMuz4.png"
|
||||
FrameIndex AMZ2 D 3 0
|
||||
Skin 3 "AMuz5.png"
|
||||
FrameIndex AMZ2 E 3 0
|
||||
|
||||
Scale 0.04 0.04 0.04
|
||||
Offset -12.4 -30.0 -3.9
|
||||
|
||||
FrameIndex AMUZ C 3 0
|
||||
Skin 3 "AMuz1.png"
|
||||
FrameIndex AMZ3 A 3 0
|
||||
Skin 3 "AMuz2.png"
|
||||
FrameIndex AMZ3 B 3 0
|
||||
Skin 3 "AMuz3.png"
|
||||
FrameIndex AMZ3 C 3 0
|
||||
Skin 3 "AMuz4.png"
|
||||
FrameIndex AMZ3 D 3 0
|
||||
Skin 3 "AMuz5.png"
|
||||
FrameIndex AMZ3 E 3 0
|
||||
|
||||
Scale 0.04 0.04 0.04
|
||||
Offset -3.9 -30.0 -10
|
||||
|
||||
FrameIndex AMUZ D 3 0
|
||||
Skin 3 "AMuz1.png"
|
||||
FrameIndex AMZ4 A 3 0
|
||||
Skin 3 "AMuz2.png"
|
||||
FrameIndex AMZ4 B 3 0
|
||||
Skin 3 "AMuz3.png"
|
||||
FrameIndex AMZ4 C 3 0
|
||||
Skin 3 "AMuz4.png"
|
||||
FrameIndex AMZ4 D 3 0
|
||||
Skin 3 "AMuz5.png"
|
||||
FrameIndex AMZ4 E 3 0
|
||||
}
|
||||
|
||||
Model "Automag"
|
||||
|
|
|
|||
|
|
@ -33,23 +33,23 @@ Model "OLSMP"
|
|||
Scale 0.04 0.04 0.04
|
||||
Offset 12.4 -30.0 -3.9
|
||||
|
||||
Skin 2 "Muz1.png"
|
||||
Skin 2 "UMuz1.png"
|
||||
FrameIndex AMUZ A 2 0
|
||||
Skin 2 "Muz2.png"
|
||||
Skin 2 "UMuz2.png"
|
||||
FrameIndex AMUZ B 2 0
|
||||
Skin 2 "Muz3.png"
|
||||
Skin 2 "UMuz3.png"
|
||||
FrameIndex AMUZ C 2 0
|
||||
Skin 2 "Muz4.png"
|
||||
Skin 2 "UMuz4.png"
|
||||
FrameIndex AMUZ D 2 0
|
||||
Skin 2 "Muz5.png"
|
||||
Skin 2 "UMuz5.png"
|
||||
FrameIndex AMUZ E 2 0
|
||||
Skin 2 "Muz6.png"
|
||||
Skin 2 "UMuz6.png"
|
||||
FrameIndex AMUZ F 2 0
|
||||
Skin 2 "Muz7.png"
|
||||
Skin 2 "UMuz7.png"
|
||||
FrameIndex AMUZ G 2 0
|
||||
Skin 2 "Muz8.png"
|
||||
Skin 2 "UMuz8.png"
|
||||
FrameIndex AMUZ H 2 0
|
||||
Skin 2 "Muz9.png"
|
||||
Skin 2 "UMuz9.png"
|
||||
FrameIndex AMUZ I 2 0
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,8 +43,8 @@ Model "URifle"
|
|||
Skin 2 "URifMuz.png"
|
||||
AngleOffset 90
|
||||
PitchOffset 90
|
||||
Scale 0.12 0.12 0.12
|
||||
Offset 12 -50 -10
|
||||
Scale 0.16 0.16 0.16
|
||||
Offset 13 -60 -12
|
||||
|
||||
FrameIndex SMUZ A 2 0
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,3 +25,151 @@ Model "UMinigun"
|
|||
ROTATING
|
||||
FrameIndex MGNP A 1 0
|
||||
}
|
||||
|
||||
Model "UMinigun"
|
||||
{
|
||||
Path "models"
|
||||
Model 2 "Flat_d.3d"
|
||||
Scale 0.2 0.2 0.2
|
||||
Offset 18 -80.0 -20
|
||||
AngleOffset 90
|
||||
PitchOffset 90
|
||||
|
||||
Skin 2 "UMuz1.png"
|
||||
FrameIndex MMUZ A 2 0
|
||||
Skin 2 "UMuz2.png"
|
||||
FrameIndex MMUZ B 2 0
|
||||
Skin 2 "UMuz3.png"
|
||||
FrameIndex MMUZ C 2 0
|
||||
Skin 2 "UMuz4.png"
|
||||
FrameIndex MMUZ D 2 0
|
||||
Skin 2 "UMuz5.png"
|
||||
FrameIndex MMUZ E 2 0
|
||||
Skin 2 "UMuz6.png"
|
||||
FrameIndex MMUZ F 2 0
|
||||
Skin 2 "UMuz7.png"
|
||||
FrameIndex MMUZ G 2 0
|
||||
Skin 2 "UMuz8.png"
|
||||
FrameIndex MMUZ H 2 0
|
||||
Skin 2 "UMuz9.png"
|
||||
FrameIndex MMUZ I 2 0
|
||||
}
|
||||
|
||||
Model "UMinigun"
|
||||
{
|
||||
Path "models"
|
||||
Model 0 "minigunM_d.3d"
|
||||
SurfaceSkin 0 1 "minigun1.png"
|
||||
SurfaceSkin 0 2 "minigun1.png"
|
||||
AngleOffset 90
|
||||
RollOffset -90
|
||||
Scale 0.22 -0.22 0.22
|
||||
Offset 15 -56 -18
|
||||
|
||||
// Select
|
||||
FrameIndex MGNS A 0 0
|
||||
FrameIndex MGNS B 0 1
|
||||
FrameIndex MGNS C 0 2
|
||||
FrameIndex MGNS D 0 3
|
||||
FrameIndex MGNS E 0 4
|
||||
FrameIndex MGNS F 0 5
|
||||
FrameIndex MGNS G 0 6
|
||||
FrameIndex MGNS H 0 7
|
||||
FrameIndex MGNS I 0 8
|
||||
FrameIndex MGNS J 0 9
|
||||
FrameIndex MGNS K 0 10
|
||||
FrameIndex MGNS L 0 11
|
||||
FrameIndex MGNS M 0 12
|
||||
FrameIndex MGNS N 0 13
|
||||
FrameIndex MGNS O 0 14
|
||||
FrameIndex MGNS P 0 15
|
||||
FrameIndex MGNS Q 0 16
|
||||
FrameIndex MGNS R 0 17
|
||||
FrameIndex MGNS S 0 18
|
||||
FrameIndex MGNS T 0 19
|
||||
FrameIndex MGNS U 0 20
|
||||
FrameIndex MGNS V 0 21
|
||||
FrameIndex MGNS W 0 22
|
||||
// Idle
|
||||
FrameIndex MGNI A 0 23
|
||||
// Wind
|
||||
FrameIndex MGNW A 0 24
|
||||
FrameIndex MGNW B 0 25
|
||||
FrameIndex MGNW C 0 26
|
||||
FrameIndex MGNW D 0 27
|
||||
FrameIndex MGNW E 0 28
|
||||
FrameIndex MGNW F 0 29
|
||||
FrameIndex MGNW G 0 30
|
||||
FrameIndex MGNW H 0 31
|
||||
FrameIndex MGNW I 0 32
|
||||
FrameIndex MGNW J 0 33
|
||||
FrameIndex MGNW K 0 34
|
||||
FrameIndex MGNW L 0 35
|
||||
FrameIndex MGNW M 0 36
|
||||
FrameIndex MGNW N 0 37
|
||||
FrameIndex MGNW O 0 38
|
||||
// Shoot1
|
||||
FrameIndex MGNF A 0 39
|
||||
FrameIndex MGNF B 0 40
|
||||
FrameIndex MGNF C 0 41
|
||||
FrameIndex MGNF D 0 42
|
||||
FrameIndex MGNF E 0 43
|
||||
FrameIndex MGNF F 0 44
|
||||
FrameIndex MGNF G 0 45
|
||||
FrameIndex MGNF H 0 46
|
||||
FrameIndex MGNF I 0 47
|
||||
FrameIndex MGNF J 0 48
|
||||
FrameIndex MGNF K 0 49
|
||||
FrameIndex MGNF L 0 50
|
||||
FrameIndex MGNF M 0 51
|
||||
FrameIndex MGNF N 0 52
|
||||
FrameIndex MGNF O 0 53
|
||||
// Shoot2
|
||||
FrameIndex MGNA A 0 54
|
||||
FrameIndex MGNA B 0 55
|
||||
FrameIndex MGNA C 0 56
|
||||
FrameIndex MGNA D 0 57
|
||||
FrameIndex MGNA E 0 58
|
||||
FrameIndex MGNA F 0 59
|
||||
FrameIndex MGNA G 0 60
|
||||
FrameIndex MGNA H 0 61
|
||||
FrameIndex MGNA I 0 62
|
||||
FrameIndex MGNA J 0 63
|
||||
FrameIndex MGNA K 0 64
|
||||
FrameIndex MGNA L 0 65
|
||||
FrameIndex MGNA M 0 66
|
||||
FrameIndex MGNA N 0 67
|
||||
FrameIndex MGNA O 0 68
|
||||
FrameIndex MGNA P 0 69
|
||||
FrameIndex MGNA Q 0 70
|
||||
FrameIndex MGNA R 0 71
|
||||
FrameIndex MGNA S 0 72
|
||||
FrameIndex MGNA T 0 73
|
||||
// Unwind
|
||||
FrameIndex MGNU A 0 74
|
||||
FrameIndex MGNU B 0 75
|
||||
FrameIndex MGNU C 0 76
|
||||
FrameIndex MGNU D 0 77
|
||||
FrameIndex MGNU E 0 78
|
||||
FrameIndex MGNU F 0 79
|
||||
FrameIndex MGNU G 0 80
|
||||
FrameIndex MGNU H 0 81
|
||||
FrameIndex MGNU I 0 82
|
||||
FrameIndex MGNU J 0 83
|
||||
FrameIndex MGNU K 0 84
|
||||
FrameIndex MGNU L 0 85
|
||||
FrameIndex MGNU M 0 86
|
||||
FrameIndex MGNU N 0 87
|
||||
FrameIndex MGNU O 0 88
|
||||
// Down
|
||||
FrameIndex MGND A 0 109
|
||||
FrameIndex MGND B 0 110
|
||||
FrameIndex MGND C 0 111
|
||||
FrameIndex MGND D 0 112
|
||||
FrameIndex MGND E 0 113
|
||||
FrameIndex MGND F 0 114
|
||||
FrameIndex MGND G 0 115
|
||||
FrameIndex MGND H 0 116
|
||||
FrameIndex MGND I 0 117
|
||||
FrameIndex MGND J 0 118
|
||||
}
|
||||
|
|
|
|||
BIN
models/AMuz1.png
Normal file
|
After Width: | Height: | Size: 6.6 KiB |
BIN
models/AMuz2.png
Normal file
|
After Width: | Height: | Size: 6.4 KiB |
BIN
models/AMuz3.png
Normal file
|
After Width: | Height: | Size: 7 KiB |
BIN
models/AMuz4.png
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
models/AMuz5.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2.1 KiB |
BIN
models/UMuz1.png
Normal file
|
After Width: | Height: | Size: 8.8 KiB |
BIN
models/UMuz2.png
Normal file
|
After Width: | Height: | Size: 9.4 KiB |
BIN
models/UMuz3.png
Normal file
|
After Width: | Height: | Size: 9.6 KiB |
BIN
models/UMuz4.png
Normal file
|
After Width: | Height: | Size: 9.4 KiB |
BIN
models/UMuz5.png
Normal file
|
After Width: | Height: | Size: 9.4 KiB |
BIN
models/UMuz6.png
Normal file
|
After Width: | Height: | Size: 9.4 KiB |
BIN
models/UMuz7.png
Normal file
|
After Width: | Height: | Size: 9 KiB |
BIN
models/UMuz8.png
Normal file
|
After Width: | Height: | Size: 9.2 KiB |
BIN
models/UMuz9.png
Normal file
|
After Width: | Height: | Size: 8.9 KiB |
|
|
@ -224,6 +224,11 @@ rifle/fire riflesht
|
|||
rifle/scopeon rifllon
|
||||
rifle/scopeoff riflloff
|
||||
|
||||
umini/wind windu2
|
||||
umini/fire regf1
|
||||
umini/altfire altf1
|
||||
umini/unwind windd2
|
||||
|
||||
translator/event transa3
|
||||
|
||||
detector/start detact
|
||||
|
|
|
|||
BIN
sounds/WindU2.ogg
Normal file
|
|
@ -545,29 +545,37 @@ Class Automag : UnrealWeapon
|
|||
2UTD E 0;
|
||||
Stop;
|
||||
MuzzleFlash:
|
||||
AMUZ A 2 Bright
|
||||
AMZ1 # 2 Bright
|
||||
{
|
||||
let psp = player.FindPSprite(OverlayID());
|
||||
psp.frame = Random[Automag](0,4);
|
||||
let l = Spawn("EnforcerLight",pos);
|
||||
l.target = self;
|
||||
}
|
||||
Stop;
|
||||
AltMuzzleFlash:
|
||||
AMUZ B 2 Bright
|
||||
AMZ2 # 2 Bright
|
||||
{
|
||||
let psp = player.FindPSprite(OverlayID());
|
||||
psp.frame = Random[Automag](0,4);
|
||||
let l = Spawn("EnforcerLight",pos);
|
||||
l.target = self;
|
||||
}
|
||||
Stop;
|
||||
LeftMuzzleFlash:
|
||||
AMUZ C 2 Bright
|
||||
AMZ3 # 2 Bright
|
||||
{
|
||||
let psp = player.FindPSprite(OverlayID());
|
||||
psp.frame = Random[Automag](0,4);
|
||||
let l = Spawn("EnforcerLight",pos);
|
||||
l.target = self;
|
||||
}
|
||||
Stop;
|
||||
LeftAltMuzzleFlash:
|
||||
AMUZ D 2 Bright
|
||||
AMZ4 # 2 Bright
|
||||
{
|
||||
let psp = player.FindPSprite(OverlayID());
|
||||
psp.frame = Random[Automag](0,4);
|
||||
let l = Spawn("EnforcerLight",pos);
|
||||
l.target = self;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,6 +26,123 @@ Class UMiniAmmo : Ammo
|
|||
|
||||
Class UMinigun : UnrealWeapon
|
||||
{
|
||||
int bcnt, tcnt;
|
||||
|
||||
action void A_FireBullet( bool alt = false )
|
||||
{
|
||||
Weapon weap = Weapon(invoker);
|
||||
if ( !weap ) return;
|
||||
if ( weap.Ammo1.Amount <= 0 ) return;
|
||||
A_Overlay(-2,"MuzzleFlash",true);
|
||||
A_OverlayFlags(-2,PSPF_RENDERSTYLE|PSPF_FORCESTYLE,true);
|
||||
A_OverlayRenderstyle(-2,STYLE_Add);
|
||||
invoker.bcnt++;
|
||||
if ( (alt && (invoker.bcnt < 2)) || (!alt && (invoker.bcnt < 4)) ) return;
|
||||
invoker.bcnt = 0;
|
||||
if ( !weap.DepleteAmmo(weap.bAltFire,true,1) ) return;
|
||||
invoker.FireEffect();
|
||||
UTMainHandler.DoFlash(self,Color(32,255,255,0),1);
|
||||
if ( !Dampener.Active(self) ) A_AlertMonsters();
|
||||
A_SoundVolume(CHAN_WEAPON,Dampener.Active(self)?.1:1.);
|
||||
if ( alt )
|
||||
{
|
||||
A_QuakeEx(2,2,2,8,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.12);
|
||||
UTMainHandler.DoSwing(self,(FRandom[Minigun](-1,1),FRandom[Minigun](-1,1)),0.5,0,1,SWING_Spring,0,3);
|
||||
}
|
||||
else
|
||||
{
|
||||
A_QuakeEx(1,1,1,8,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.08);
|
||||
UTMainHandler.DoSwing(self,(FRandom[Minigun](-1,1),FRandom[Minigun](-1,1)),0.3,0,1,SWING_Spring,0,3);
|
||||
}
|
||||
let l = Spawn("MinigunLight",pos);
|
||||
l.target = self;
|
||||
if ( !alt ) MinigunLight(l).cnt--;
|
||||
Vector3 x, y, z, x2, y2, z2;
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 origin = pos+(0,0,player.viewheight)+10.0*x+y*3.0-z*3.0;
|
||||
double a = FRandom[Minigun](0,360), s = FRandom[Minigun](0,alt?0.05:0.02);
|
||||
[x2, y2, z2] = dt_CoordUtil.GetAxes(BulletSlope(),angle,roll);
|
||||
Vector3 dir = (x2+y2*cos(a)*s+z2*sin(a)*s).unit();
|
||||
FLineTraceData d;
|
||||
LineTrace(atan2(dir.y,dir.x),10000,asin(-dir.z),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d);
|
||||
if ( d.HitType == TRACE_HitActor )
|
||||
{
|
||||
int dmg = Random[Minigun](8,14); // fun fact: the Minigun is one of the few weapons that has actual RNG damage in Unreal
|
||||
dmg = d.HitActor.DamageMobj(invoker,self,dmg,'shot',DMG_USEANGLE|DMG_THRUSTLESS,atan2(d.HitDir.y,d.HitDir.x));
|
||||
double mm = 500;
|
||||
if ( FRandom[Minigun](0,1) < 0.2 ) mm *= 2.;
|
||||
UTMainHandler.DoKnockback(d.HitActor,d.HitDir,dmg*mm);
|
||||
if ( d.HitActor.bNOBLOOD )
|
||||
{
|
||||
let p = Spawn("BulletImpact",d.HitLocation);
|
||||
p.scale *= 0.75;
|
||||
p.angle = atan2(d.HitDir.y,d.HitDir.x)+180;
|
||||
p.pitch = asin(d.HitDir.z);
|
||||
}
|
||||
else
|
||||
{
|
||||
d.HitActor.TraceBleed(dmg,self);
|
||||
d.HitActor.SpawnBlood(d.HitLocation,atan2(d.HitDir.y,d.HitDir.x)+180,dmg);
|
||||
}
|
||||
}
|
||||
else if ( d.HitType != TRACE_HitNone )
|
||||
{
|
||||
Vector3 hitnormal = -d.HitDir;
|
||||
if ( d.HitType == TRACE_HitFloor )
|
||||
{
|
||||
if ( d.Hit3DFloor ) hitnormal = -d.Hit3DFloor.top.Normal;
|
||||
else hitnormal = d.HitSector.floorplane.Normal;
|
||||
}
|
||||
else if ( d.HitType == TRACE_HitCeiling )
|
||||
{
|
||||
if ( d.Hit3DFloor ) hitnormal = -d.Hit3DFloor.bottom.Normal;
|
||||
else hitnormal = d.HitSector.ceilingplane.Normal;
|
||||
}
|
||||
else if ( d.HitType == TRACE_HitWall )
|
||||
{
|
||||
hitnormal = (-d.HitLine.delta.y,d.HitLine.delta.x,0).unit();
|
||||
if ( !d.LineSide ) hitnormal *= -1;
|
||||
}
|
||||
let p = Spawn("BulletImpact",d.HitLocation+hitnormal*0.01);
|
||||
p.scale *= 0.75;
|
||||
p.angle = atan2(hitnormal.y,hitnormal.x);
|
||||
p.pitch = asin(-hitnormal.z);
|
||||
if ( d.HitLine ) d.HitLine.RemoteActivate(self,d.LineSide,SPAC_Impact,d.HitLocation);
|
||||
}
|
||||
if ( !Random[Minigun](0,1) )
|
||||
{
|
||||
let t = Spawn("MinigunTracer",origin+x*20.0);
|
||||
t.angle = atan2(dir.y,dir.x);
|
||||
t.pitch = asin(-dir.z);
|
||||
MinigunTracer(t).dest = d.HitLocation;
|
||||
}
|
||||
for ( int i=0; i<2; i++ )
|
||||
{
|
||||
let s = Spawn("UTViewSmoke",origin);
|
||||
UTViewSmoke(s).ofs = (10,3,-3);
|
||||
s.scale *= 1.5;
|
||||
s.alpha *= 0.6;
|
||||
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*4.0+y*3.0-z*12.0;
|
||||
let c = Spawn("UCasing",origin);
|
||||
c.vel = x*FRandom[Junk](-1.5,1.5)-y*FRandom[Junk](2,4)+z*FRandom[Junk](-2,1);
|
||||
}
|
||||
|
||||
action void A_MinigunRefire()
|
||||
{
|
||||
Weapon weap = Weapon(invoker);
|
||||
if ( !weap || !player ) return;
|
||||
if ( weap.Ammo1.Amount <= 0 )
|
||||
{
|
||||
A_ClearRefire();
|
||||
return;
|
||||
}
|
||||
weap.bAltFire = !!(player.cmd.buttons&BT_ALTATTACK);
|
||||
A_Refire("Hold");
|
||||
}
|
||||
|
||||
Default
|
||||
{
|
||||
Tag "$T_MINIGUN";
|
||||
|
|
@ -47,5 +164,66 @@ Class UMinigun : UnrealWeapon
|
|||
Stop;
|
||||
MGNP B -1;
|
||||
Stop;
|
||||
Select:
|
||||
MGNS A 1 A_Raise(int.max);
|
||||
Wait;
|
||||
Ready:
|
||||
MGNS ABCDEFGHIJKLMNOPQRSTUVW 1 A_WeaponReady(WRF_NOFIRE);
|
||||
Idle:
|
||||
MGNI A 1
|
||||
{
|
||||
A_CheckReload();
|
||||
A_WeaponReady();
|
||||
}
|
||||
Wait;
|
||||
FireDummy:
|
||||
TNT1 A 1
|
||||
{
|
||||
let weap = Weapon(invoker);
|
||||
if ( !(player.cmd.buttons&(BT_ATTACK|BT_ALTATTACK)) || (weap.Ammo1.Amount <= 0) )
|
||||
{
|
||||
player.SetPSprite(PSP_WEAPON,invoker.FindState("Release"));
|
||||
return ResolveState("Null");
|
||||
}
|
||||
return ResolveState(null);
|
||||
}
|
||||
Wait;
|
||||
Fire:
|
||||
AltFire:
|
||||
MGNW A 0 A_PlaySound("umini/wind",CHAN_WEAPON,Dampener.Active(self)?.1:1.);
|
||||
MGNW ABCDEFGHIJKLMNO 1;
|
||||
Hold:
|
||||
MGNF A 0
|
||||
{
|
||||
A_Overlay(-9999,"FireDummy");
|
||||
A_PlaySound("umini/fire",CHAN_WEAPON,Dampener.Active(self)?.1:1.,true);
|
||||
}
|
||||
MGNF ABCDEFGHIJKLMNO 1 A_FireBullet(false);
|
||||
MGNF A 0 A_JumpIf(invoker.bAltFire,1);
|
||||
Goto Hold+1;
|
||||
AltHold:
|
||||
MGNA A 0
|
||||
{
|
||||
A_Overlay(-9999,"FireDummy");
|
||||
A_PlaySound("umini/altfire",CHAN_WEAPON,Dampener.Active(self)?.1:1.,true);
|
||||
}
|
||||
MGNA ABCDEFGHIJKLMNOPQRST 1 A_FireBullet(true);
|
||||
Goto AltHold+1;
|
||||
Release:
|
||||
MGNU A 0 A_PlaySound("umini/unwind",CHAN_WEAPON,Dampener.Active(self)?.1:1.);
|
||||
MGNU ABCDEFGHIJKLMNO 2 A_MinigunRefire();
|
||||
Goto Idle;
|
||||
Deselect:
|
||||
MGND A 0 A_StopSound(CHAN_WEAPON);
|
||||
MGND ABCDEFGHIJ 1;
|
||||
MGND J 1 A_Lower(int.max);
|
||||
Wait;
|
||||
MuzzleFlash:
|
||||
MMUZ # 2 Bright
|
||||
{
|
||||
let psp = player.FindPSprite(OverlayID());
|
||||
psp.frame = Random[Minigun](0,8);
|
||||
}
|
||||
Stop;
|
||||
}
|
||||
}
|
||||
|
|
|
|||