1.1.3 mini-update:
- Added hacky ammo displays. - Removed swingers. - Updated patron credits.
This commit is contained in:
parent
475447905f
commit
eaf19d3007
55 changed files with 293 additions and 199 deletions
192
zscript/ammoled.zsc
Normal file
192
zscript/ammoled.zsc
Normal file
|
|
@ -0,0 +1,192 @@
|
|||
const PULSELEDBASE = 60000;
|
||||
const FLAKLEDBASE = 61000;
|
||||
const MINILEDBASE = 62000;
|
||||
const ROCKETLEDBASE = 63000;
|
||||
|
||||
Class PulseGunLED : Actor
|
||||
{
|
||||
Actor base, digits[3], bar;
|
||||
transient PulseGun mygun;
|
||||
|
||||
override void PostBeginPlay()
|
||||
{
|
||||
SetOrigin((PULSELEDBASE+64,128,99),false);
|
||||
pitch = 90;
|
||||
if ( !base ) base = Spawn("AmmoLEDScreen",(PULSELEDBASE+128,0,0));
|
||||
for ( int i=0; i<3; i++ ) if ( !digits[i] ) digits[i] = Spawn("LEDFont",(PULSELEDBASE+99,104+48*i,1));
|
||||
if ( !bar ) bar = Spawn("AmmoCountBar",(PULSELEDBASE+110,30,1));
|
||||
}
|
||||
override void Tick()
|
||||
{
|
||||
if ( !mygun ) return;
|
||||
base.SetState(base.SpawnState);
|
||||
int amo = flak_pulsereload?mygun.ClipCount:mygun.Ammo1.Amount;
|
||||
int mamo = flak_pulsereload?mygun.default.ClipCount:mygun.Ammo1.MaxAmount;
|
||||
digits[0].SetState(digits[0].SpawnState+1+((amo/100)%10));
|
||||
digits[1].SetState(digits[1].SpawnState+1+((amo/10)%10));
|
||||
digits[2].SetState(digits[2].SpawnState+1+(amo%10));
|
||||
if ( amo < 10 )
|
||||
{
|
||||
digits[0].SetShade(Color(255,0,0));
|
||||
digits[1].SetShade(Color(255,0,0));
|
||||
digits[2].SetShade(Color(255,0,0));
|
||||
}
|
||||
else
|
||||
{
|
||||
digits[0].SetShade(Color(0,0,255));
|
||||
digits[1].SetShade(Color(0,0,255));
|
||||
digits[2].SetShade(Color(0,0,255));
|
||||
}
|
||||
bar.scale.x = amo/double(mamo);
|
||||
}
|
||||
}
|
||||
|
||||
Class FlakCannonLED : Actor
|
||||
{
|
||||
Actor base, digits[3];
|
||||
transient FlakCannon mygun;
|
||||
|
||||
override void PostBeginPlay()
|
||||
{
|
||||
SetOrigin((FLAKLEDBASE+32,64,45),false);
|
||||
pitch = 90;
|
||||
if ( !base ) base = Spawn("AmmoLEDScreen",(FLAKLEDBASE+64,0,0));
|
||||
for ( int i=0; i<3; i++ ) if ( !digits[i] ) digits[i] = Spawn("LEDFont",(FLAKLEDBASE+51,54+20*i,1));
|
||||
}
|
||||
override void Tick()
|
||||
{
|
||||
if ( !mygun ) return;
|
||||
base.SetState(base.SpawnState+1);
|
||||
int amo = mygun.Ammo1.Amount;
|
||||
digits[0].SetState(digits[0].SpawnState+11+((amo/100)%10));
|
||||
digits[1].SetState(digits[1].SpawnState+11+((amo/10)%10));
|
||||
digits[2].SetState(digits[2].SpawnState+11+(amo%10));
|
||||
digits[0].SetShade(Color(255,0,0));
|
||||
digits[1].SetShade(Color(255,0,0));
|
||||
digits[2].SetShade(Color(255,0,0));
|
||||
}
|
||||
}
|
||||
|
||||
Class MinigunLED : Actor
|
||||
{
|
||||
Actor base, digits[3];
|
||||
transient Minigun mygun;
|
||||
|
||||
override void PostBeginPlay()
|
||||
{
|
||||
SetOrigin((MINILEDBASE+32,32,18),false);
|
||||
pitch = 90;
|
||||
if ( !base ) base = Spawn("AmmoLEDScreen",(MINILEDBASE+64,0,0));
|
||||
for ( int i=0; i<3; i++ ) if ( !digits[i] ) digits[i] = Spawn("LEDFont",(MINILEDBASE+51,22+20*i,1));
|
||||
}
|
||||
override void Tick()
|
||||
{
|
||||
if ( !mygun ) return;
|
||||
base.SetState(base.SpawnState+2);
|
||||
int amo = mygun.Ammo1.Amount;
|
||||
digits[0].SetState(digits[0].SpawnState+11+((amo/100)%10));
|
||||
digits[1].SetState(digits[1].SpawnState+11+((amo/10)%10));
|
||||
digits[2].SetState(digits[2].SpawnState+11+(amo%10));
|
||||
digits[0].SetShade(Color(255,0,0));
|
||||
digits[1].SetShade(Color(255,0,0));
|
||||
digits[2].SetShade(Color(255,0,0));
|
||||
}
|
||||
}
|
||||
|
||||
Class UTRocketLauncherLED : Actor
|
||||
{
|
||||
Actor base, digits[3];
|
||||
transient UTRocketLauncher mygun;
|
||||
|
||||
override void PostBeginPlay()
|
||||
{
|
||||
SetOrigin((ROCKETLEDBASE+32,32,18),false);
|
||||
pitch = 90;
|
||||
if ( !base ) base = Spawn("AmmoLEDScreen",(ROCKETLEDBASE+64,0,0));
|
||||
for ( int i=0; i<3; i++ ) if ( !digits[i] ) digits[i] = Spawn("LEDFont",(ROCKETLEDBASE+51,22+20*i,1));
|
||||
}
|
||||
override void Tick()
|
||||
{
|
||||
if ( !mygun ) return;
|
||||
base.SetState(base.SpawnState+3);
|
||||
int amo = mygun.Ammo1.Amount;
|
||||
digits[0].SetState(digits[0].SpawnState+11+((amo/100)%10));
|
||||
digits[1].SetState(digits[1].SpawnState+11+((amo/10)%10));
|
||||
digits[2].SetState(digits[2].SpawnState+11+(amo%10));
|
||||
digits[0].SetShade(Color(255,0,0));
|
||||
digits[1].SetShade(Color(255,0,0));
|
||||
digits[2].SetShade(Color(255,0,0));
|
||||
}
|
||||
}
|
||||
|
||||
Class LEDFont : Actor
|
||||
{
|
||||
Default
|
||||
{
|
||||
RenderStyle "Shaded";
|
||||
StencilColor "FF 00 00";
|
||||
Radius .1;
|
||||
Height 0.;
|
||||
RenderRadius 256;
|
||||
+NOBLOCKMAP;
|
||||
+NOGRAVITY;
|
||||
+NOINTERACTION;
|
||||
+DONTSPLASH;
|
||||
+FLATSPRITE;
|
||||
+YFLIP; // flatsprites™
|
||||
}
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
TNT1 A -1;
|
||||
LFN1 ABCDEFGHIJ -1 Bright;
|
||||
LFN2 ABCDEFGHIJ -1 Bright;
|
||||
Stop;
|
||||
}
|
||||
}
|
||||
|
||||
Class AmmoCountBar : Actor
|
||||
{
|
||||
Default
|
||||
{
|
||||
Radius .1;
|
||||
Height 0.;
|
||||
RenderRadius 256;
|
||||
+NOBLOCKMAP;
|
||||
+NOGRAVITY;
|
||||
+NOINTERACTION;
|
||||
+DONTSPLASH;
|
||||
+FLATSPRITE;
|
||||
+XFLIP; // flatsprites™
|
||||
+YFLIP; // flatsprites™
|
||||
}
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
AMCB A -1 Bright;
|
||||
Stop;
|
||||
}
|
||||
}
|
||||
|
||||
Class AmmoLEDScreen : Actor
|
||||
{
|
||||
Default
|
||||
{
|
||||
Radius .1;
|
||||
Height 0.;
|
||||
RenderRadius 256;
|
||||
+NOBLOCKMAP;
|
||||
+NOGRAVITY;
|
||||
+NOINTERACTION;
|
||||
+DONTSPLASH;
|
||||
+FLATSPRITE;
|
||||
+XFLIP; // flatsprites™
|
||||
+YFLIP; // flatsprites™
|
||||
}
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
AMLD ABCD -1 Bright;
|
||||
Stop;
|
||||
}
|
||||
}
|
||||
|
|
@ -720,13 +720,8 @@ Class BioRifle : UTWeapon
|
|||
{
|
||||
p = Spawn("BioGlob",origin);
|
||||
p.A_SetScale(1.0+invoker.charge*0.8);
|
||||
UTMainHandler.DoSwing(self,(FRandom[GES](-0.6,-1.3),FRandom[GES](-0.9,-0.2)),1+invoker.charge*0.3,-0.1,3,SWING_Spring,3,2);
|
||||
}
|
||||
else
|
||||
{
|
||||
p = Spawn("BioGel",origin);
|
||||
UTMainHandler.DoSwing(self,(FRandom[GES](-0.6,-1.3),FRandom[GES](-0.9,-0.2)),2,-0.5,2,SWING_Spring,2,2);
|
||||
}
|
||||
else p = Spawn("BioGel",origin);
|
||||
p.angle = angle;
|
||||
p.pitch = BulletSlope();
|
||||
p.vel = (cos(p.angle)*cos(p.pitch),sin(p.angle)*cos(p.pitch),-sin(p.pitch))*p.speed;
|
||||
|
|
@ -763,7 +758,6 @@ Class BioRifle : UTWeapon
|
|||
return;
|
||||
}
|
||||
invoker.special1 = 2;
|
||||
UTMainHandler.DoSwing(self,(FRandom[GES](-1,1),FRandom[GES](-1,1)),0.02*invoker.charge,0,5,SWING_Spring,0,2);
|
||||
if ( invoker.charge >= 5.1 ) return;
|
||||
if ( weap.Ammo1.Amount <= 0 ) return;
|
||||
if ( !weap.DepleteAmmo(weap.bAltFire,true,1) ) return;
|
||||
|
|
|
|||
|
|
@ -124,7 +124,6 @@ Class UTChainsaw : UTWeapon
|
|||
{
|
||||
invoker.ammocharge += 10./TICRATE;
|
||||
A_QuakeEx(2,2,2,2,0,1,"",QF_RELATIVE,rollIntensity:0.15);
|
||||
UTMainHandler.DoSwing(self,(FRandom[Chainsaw](-1,1),FRandom[Chainsaw](-1,1)),0.6,-0.2,2,SWING_Spring);
|
||||
invoker.sawcnt += 1./TICRATE;
|
||||
if ( invoker.sawcnt > 0.15 )
|
||||
{
|
||||
|
|
@ -177,7 +176,6 @@ Class UTChainsaw : UTWeapon
|
|||
{
|
||||
invoker.ammocharge += 20./TICRATE;
|
||||
A_QuakeEx(2,2,2,3,0,1,"",QF_RELATIVE,rollIntensity:0.15);
|
||||
UTMainHandler.DoSwing(self,(FRandom[Chainsaw](-1,1),FRandom[Chainsaw](-1,1)),0.6,-0.2,2,SWING_Spring);
|
||||
if ( initial ) invoker.FireEffect();
|
||||
A_AlertMonsters();
|
||||
Vector3 x, y, z;
|
||||
|
|
@ -233,7 +231,6 @@ Class UTChainsaw : UTWeapon
|
|||
A_QuakeEx(1,1,1,3,0,1,"",QF_RELATIVE,rollIntensity:0.4);
|
||||
}
|
||||
else A_QuakeEx(0,0,0,2,0,1,"",QF_RELATIVE,rollIntensity:0.2);
|
||||
UTMainHandler.DoSwing(self,(FRandom[Chainsaw](-1,1),FRandom[Chainsaw](-1,1)),0.25,-0.1,2,SWING_Spring);
|
||||
if ( bAlt || Random[Chainsaw](0,2) ) return;
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
|
|
@ -334,14 +331,9 @@ Class UTChainsaw : UTWeapon
|
|||
{
|
||||
A_StopSound(CHAN_WEAPONMISC);
|
||||
A_StartSound("chainsaw/fire",CHAN_WEAPON);
|
||||
UTMainHandler.DoSwing(self,(FRandom[Chainsaw](-0.8,-1.2),FRandom[Chainsaw](-0.4,-0.7)),0,1,5,SWING_Spring,6,3);
|
||||
}
|
||||
CSWA ABCDE 2 A_Vibrate(true);
|
||||
CSWA F 2
|
||||
{
|
||||
A_Overlay(PSP_WEAPON+1,"AltFireSwipes");
|
||||
UTMainHandler.DoSwing(self,(FRandom[Chainsaw](0.8,1.2),0),0,2,6,SWING_Spring,1,3);
|
||||
}
|
||||
CSWA F 2 A_Overlay(PSP_WEAPON+1,"AltFireSwipes");
|
||||
CSWA GHIJ 2;
|
||||
CSWA K 2 A_Vibrate(true);
|
||||
CSWA K 0
|
||||
|
|
|
|||
|
|
@ -294,6 +294,22 @@ Class UTRocketLauncher : UTWeapon
|
|||
int locktics;
|
||||
bool bSingleRocket;
|
||||
|
||||
UTRocketLauncherLED ammoled;
|
||||
|
||||
override void DoEffect()
|
||||
{
|
||||
Super.DoEffect();
|
||||
if ( !ammoled )
|
||||
{
|
||||
let ti = ThinkerIterator.Create("UTRocketLauncherLED");
|
||||
while ( ammoled=UTRocketLauncherLED(ti.Next()) ) break;
|
||||
if ( !ammoled ) ammoled = UTRocketLauncherLED(Spawn("UTRocketLauncherLED"));
|
||||
}
|
||||
if ( !Owner || !Owner.player || (Owner != players[consoleplayer].Camera) ) return;
|
||||
ammoled.mygun = self;
|
||||
TexMan.SetCameraToTexture(ammoled,"RAmmoLed",90);
|
||||
}
|
||||
|
||||
override void PostBeginPlay()
|
||||
{
|
||||
Super.PostBeginPlay();
|
||||
|
|
@ -366,8 +382,6 @@ Class UTRocketLauncher : UTWeapon
|
|||
UTPlayer(self).PlayAttacking3();
|
||||
A_AlertMonsters();
|
||||
A_QuakeEx(2+num,2+num,2+num,6+num,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1+num*0.05);
|
||||
for ( int i=0; i<num; i++ )
|
||||
UTMainHandler.DoSwing(self,(FRandom[Eightball](0.4,-0.8),FRandom[Eightball](-0.5,0.5)),1,-0.2,Random[Eightball](3,4),SWING_Spring,Random[Eightball](2,5),Random[Eightball](2,4));
|
||||
Vector3 x, y, z, x2, y2, z2;
|
||||
double a, s;
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
|
|
|
|||
|
|
@ -367,7 +367,6 @@ Class Enforcer : UTWeapon
|
|||
else A_Overlay(-3,"LeftMuzzleFlash");
|
||||
A_OverlayFlags(-3,PSPF_RENDERSTYLE|PSPF_FORCESTYLE,true);
|
||||
A_OverlayRenderstyle(-3,STYLE_Add);
|
||||
UTMainHandler.DoSwing(self,(FRandom[Enforcer](0.5,0.2),FRandom[Enforcer](-0.3,0.2)),2,0,1,SWING_Spring,0,2);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -375,7 +374,6 @@ Class Enforcer : UTWeapon
|
|||
else A_Overlay(-2,"MuzzleFlash");
|
||||
A_OverlayFlags(-2,PSPF_RENDERSTYLE|PSPF_FORCESTYLE,true);
|
||||
A_OverlayRenderstyle(-2,STYLE_Add);
|
||||
UTMainHandler.DoSwing(self,(FRandom[Enforcer](-0.2,-0.5),FRandom[Enforcer](-0.3,0.2)),2,0,1,SWING_Spring,0,2);
|
||||
}
|
||||
Vector3 x, y, z, x2, y2, z2;
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
|
|
|
|||
|
|
@ -637,6 +637,22 @@ Class FlakMag : UTCasing
|
|||
|
||||
Class FlakCannon : UTWeapon
|
||||
{
|
||||
FlakCannonLED ammoled;
|
||||
|
||||
override void DoEffect()
|
||||
{
|
||||
Super.DoEffect();
|
||||
if ( !ammoled )
|
||||
{
|
||||
let ti = ThinkerIterator.Create("FlakCannonLED");
|
||||
while ( ammoled=FlakCannonLED(ti.Next()) ) break;
|
||||
if ( !ammoled ) ammoled = FlakCannonLED(Spawn("FlakCannonLED"));
|
||||
}
|
||||
if ( !Owner || !Owner.player || (Owner != players[consoleplayer].Camera) ) return;
|
||||
ammoled.mygun = self;
|
||||
TexMan.SetCameraToTexture(ammoled,"FlakALed",90);
|
||||
}
|
||||
|
||||
action void A_Loading( bool first = false )
|
||||
{
|
||||
if ( first ) A_StartSound("flak/load",CHAN_WEAPONMISC,CHANF_OVERLAP);
|
||||
|
|
@ -651,7 +667,6 @@ Class FlakCannon : UTWeapon
|
|||
A_StartSound("flak/fire",CHAN_WEAPON);
|
||||
invoker.FireEffect();
|
||||
UTMainHandler.DoFlash(self,Color(160,255,96,0),1);
|
||||
UTMainHandler.DoSwing(self,(FRandom[Flak](-0.3,-0.8),FRandom[Flak](-0.5,0.5)),4,-1.5,2,SWING_Spring,2,2);
|
||||
A_AlertMonsters();
|
||||
A_QuakeEx(1,1,1,3,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.05);
|
||||
Vector3 x, y, z;
|
||||
|
|
@ -710,7 +725,6 @@ Class FlakCannon : UTWeapon
|
|||
A_StartSound("flak/altfire",CHAN_WEAPON);
|
||||
invoker.FireEffect();
|
||||
UTMainHandler.DoFlash(self,Color(128,255,96,0),1);
|
||||
UTMainHandler.DoSwing(self,(FRandom[Flak](-0.4,-0.8),FRandom[Flak](0.4,0.8)),4,-1,3,SWING_Spring,3,5);
|
||||
A_AlertMonsters();
|
||||
A_QuakeEx(2,2,2,6,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
|
||||
Vector3 x, y, z;
|
||||
|
|
|
|||
|
|
@ -69,7 +69,6 @@ Class ImpactHammer : UTWeapon
|
|||
A_AlertMonsters(gameinfo.gametype&GAME_Strife?100:0);
|
||||
}
|
||||
A_QuakeEx(clamp(int(invoker.chargesize),0,2),clamp(int(invoker.chargesize),0,2),clamp(int(invoker.chargesize),0,2),2,0,96,"",QF_RELATIVE,rollIntensity:clamp(invoker.chargesize*0.3,0,0.3));
|
||||
UTMainHandler.DoSwing(self,(FRandom[Impact](-1,1),FRandom[Impact](-1,1)),invoker.chargesize*0.1,0,1,SWING_Spring);
|
||||
if ( !(player.cmd.buttons&BT_ATTACK) )
|
||||
{
|
||||
player.SetPSprite(PSP_WEAPON,ResolveState("Release"));
|
||||
|
|
@ -90,7 +89,6 @@ Class ImpactHammer : UTWeapon
|
|||
A_StopSound(CHAN_WEAPONMISC);
|
||||
A_StartSound("impact/release",CHAN_WEAPON);
|
||||
invoker.FireEffect();
|
||||
UTMainHandler.DoSwing(self,(FRandom[Impact](-0.3,-1.5),FRandom[Impact](-1.2,-0.4)),3,-0.8,3,SWING_Spring,3,2);
|
||||
A_AlertMonsters(gameinfo.gametype&GAME_Strife?100:0);
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
|
|
@ -155,7 +153,6 @@ Class ImpactHammer : UTWeapon
|
|||
if ( !weap ) return;
|
||||
A_StartSound("impact/fire",CHAN_WEAPON);
|
||||
invoker.FireEffect();
|
||||
UTMainHandler.DoSwing(self,(FRandom[Impact](-0.3,-1.5),FRandom[Impact](-1.2,-0.4)),2,-0.6,2,SWING_Spring,1,2);
|
||||
A_AlertMonsters(gameinfo.gametype&GAME_Strife?100:0);
|
||||
A_QuakeEx(2,2,2,6,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
|
||||
Vector3 x, y, z;
|
||||
|
|
|
|||
|
|
@ -74,6 +74,22 @@ Class Minigun : UTWeapon
|
|||
{
|
||||
int bcnt, tcnt;
|
||||
|
||||
MinigunLED ammoled;
|
||||
|
||||
override void DoEffect()
|
||||
{
|
||||
Super.DoEffect();
|
||||
if ( !ammoled )
|
||||
{
|
||||
let ti = ThinkerIterator.Create("MinigunLED");
|
||||
while ( ammoled=MinigunLED(ti.Next()) ) break;
|
||||
if ( !ammoled ) ammoled = MinigunLED(Spawn("MinigunLED"));
|
||||
}
|
||||
if ( !Owner || !Owner.player || (Owner != players[consoleplayer].Camera) ) return;
|
||||
ammoled.mygun = self;
|
||||
TexMan.SetCameraToTexture(ammoled,"MiniALed",90);
|
||||
}
|
||||
|
||||
action void A_FireBullet( bool alt = false )
|
||||
{
|
||||
Weapon weap = Weapon(invoker);
|
||||
|
|
@ -89,16 +105,8 @@ Class Minigun : UTWeapon
|
|||
invoker.FireEffect();
|
||||
UTMainHandler.DoFlash(self,Color(32,255,255,0),1);
|
||||
A_AlertMonsters();
|
||||
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);
|
||||
}
|
||||
if ( alt ) A_QuakeEx(2,2,2,8,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.12);
|
||||
else A_QuakeEx(1,1,1,8,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.08);
|
||||
let l = Spawn("MinigunLight",pos);
|
||||
l.target = self;
|
||||
if ( !alt ) MinigunLight(l).cnt--;
|
||||
|
|
|
|||
|
|
@ -566,6 +566,22 @@ Class PulseGun : UTWeapon
|
|||
|
||||
Property ClipCount : clipcount;
|
||||
|
||||
PulseGunLED ammoled;
|
||||
|
||||
override void DoEffect()
|
||||
{
|
||||
Super.DoEffect();
|
||||
if ( !ammoled )
|
||||
{
|
||||
let ti = ThinkerIterator.Create("PulseGunLED");
|
||||
while ( ammoled=PulseGunLED(ti.Next()) ) break;
|
||||
if ( !ammoled ) ammoled = PulseGunLED(Spawn("PulseGunLED"));
|
||||
}
|
||||
if ( !Owner || !Owner.player || (Owner != players[consoleplayer].Camera) ) return;
|
||||
ammoled.mygun = self;
|
||||
TexMan.SetCameraToTexture(ammoled,"PAmmoLed",90);
|
||||
}
|
||||
|
||||
override int, int, bool, bool GetClipAmount()
|
||||
{
|
||||
if ( !flak_pulsereload ) return Super.GetClipAmount();
|
||||
|
|
@ -592,7 +608,6 @@ Class PulseGun : UTWeapon
|
|||
if ( !flak_pulsereload && (invoker.clipcount <= 0) ) invoker.clipcount = min(invoker.default.clipcount,weap.Ammo1.Amount);
|
||||
invoker.FireEffect();
|
||||
UTMainHandler.DoFlash(self,Color(32,128,255,128),1);
|
||||
UTMainHandler.DoSwing(self,(FRandom[Pulse](-1,1),FRandom[Pulse](-1,1)),0.1,-0.02,3,SWING_Spring,0,2);
|
||||
A_AlertMonsters();
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
|
|
@ -653,7 +668,6 @@ Class PulseGun : UTWeapon
|
|||
if ( !flak_pulsereload && (invoker.clipcount <=0) ) invoker.clipcount = (weap.Ammo1.Amount>0)?Min(50,weap.Ammo1.Amount):50;
|
||||
invoker.FireEffect();
|
||||
UTMainHandler.DoFlash(self,Color(32,128,255,128),1);
|
||||
UTMainHandler.DoSwing(self,(FRandom[Pulse](-1,-1),FRandom[Pulse](-1,1)),0.3,-0.1,2,SWING_Spring,0,3);
|
||||
A_AlertMonsters();
|
||||
A_QuakeEx(1,1,1,2,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.05);
|
||||
A_Overlay(-2,"MuzzleFlash");
|
||||
|
|
|
|||
|
|
@ -251,16 +251,8 @@ Class Ripper2 : UTWeapon
|
|||
invoker.FireEffect();
|
||||
UTMainHandler.DoFlash(self,Color(8,0,255,255),1);
|
||||
A_AlertMonsters();
|
||||
if ( alt )
|
||||
{
|
||||
A_QuakeEx(3,3,3,8,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
|
||||
UTMainHandler.DoSwing(self,(FRandom[Ripper](-0.3,-0.6),FRandom[Ripper](0.2,0.6)),3,-0.5,3,SWING_Spring,5,4);
|
||||
}
|
||||
else
|
||||
{
|
||||
A_QuakeEx(1,1,1,5,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.08);
|
||||
UTMainHandler.DoSwing(self,(FRandom[Ripper](-0.3,-0.6),FRandom[Ripper](0.2,0.6)),1,-0.3,2,SWING_Spring,2,2);
|
||||
}
|
||||
if ( alt ) A_QuakeEx(3,3,3,8,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
|
||||
else A_QuakeEx(1,1,1,5,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.08);
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+6*y-4*z);
|
||||
|
|
|
|||
|
|
@ -344,11 +344,7 @@ Class ShockBeam : Actor
|
|||
ExplodeMissile(null,t.Results.HitActor);
|
||||
if ( t.Results.HitActor is 'ShockHitbox' )
|
||||
{
|
||||
if ( target )
|
||||
{
|
||||
target.TakeInventory('ShockAmmo',2);
|
||||
UTMainHandler.DoSwing(target,(FRandom[ASMD](-0.1,-0.6),FRandom[ASMD](-0.1,0.5)),5,-1,3,SWING_Spring,3,6);
|
||||
}
|
||||
if ( target ) target.TakeInventory('ShockAmmo',2);
|
||||
let b = t.Results.HitActor.target;
|
||||
UTMainHandler.DoBlast(b,250,70000);
|
||||
b.ExplodeMissile(null,self);
|
||||
|
|
@ -581,11 +577,7 @@ Class SuperShockBeam : Actor
|
|||
ExplodeMissile(null,t.Results.HitActor);
|
||||
if ( t.Results.HitActor is 'ShockHitbox' )
|
||||
{
|
||||
if ( target )
|
||||
{
|
||||
target.TakeInventory('EnhancedShockAmmo',1);
|
||||
UTMainHandler.DoSwing(target,(FRandom[ASMD](-0.1,-0.6),FRandom[ASMD](-0.1,0.5)),10,-2,3,SWING_Spring,3,6);
|
||||
}
|
||||
if ( target ) target.TakeInventory('EnhancedShockAmmo',1);
|
||||
let b = t.Results.HitActor.target;
|
||||
UTMainHandler.DoBlast(b,400,70000);
|
||||
b.ExplodeMissile(null,self);
|
||||
|
|
@ -1069,7 +1061,6 @@ Class ShockRifle : UTWeapon
|
|||
A_StartSound("shock/fire",CHAN_WEAPON,CHANF_OVERLAP);
|
||||
invoker.FireEffect();
|
||||
UTMainHandler.DoFlash(self,Color(128,128,0,255),1);
|
||||
UTMainHandler.DoSwing(self,(FRandom[ASMD](-0.1,-0.6),FRandom[ASMD](-0.1,0.5)),2,-0.3,3,SWING_Spring,0,4);
|
||||
A_AlertMonsters();
|
||||
A_QuakeEx(2,2,2,4,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
|
||||
Vector3 x, y, z;
|
||||
|
|
@ -1107,7 +1098,6 @@ Class ShockRifle : UTWeapon
|
|||
A_StartSound("shock/altfire",CHAN_WEAPON,CHANF_OVERLAP);
|
||||
invoker.FireEffect();
|
||||
UTMainHandler.DoFlash(self,Color(128,128,0,255),1);
|
||||
UTMainHandler.DoSwing(self,(FRandom[ASMD](-0.1,-0.6),FRandom[ASMD](-0.1,0.5)),3,-0.4,3,SWING_Spring,0,4);
|
||||
A_AlertMonsters();
|
||||
A_QuakeEx(2,2,2,8,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1);
|
||||
Vector3 x, y, z;
|
||||
|
|
@ -1252,7 +1242,6 @@ Class EnhancedShockRifle : UTWeapon
|
|||
A_StartSound("shock/fire",CHAN_WEAPON,CHANF_OVERLAP);
|
||||
invoker.FireEffect();
|
||||
UTMainHandler.DoFlash(self,Color(128,255,128,0),1);
|
||||
UTMainHandler.DoSwing(self,(FRandom[ASMD](-0.1,-0.6),FRandom[ASMD](-0.1,0.5)),4,-0.6,3,SWING_Spring,0,4);
|
||||
A_AlertMonsters();
|
||||
A_QuakeEx(3,3,3,4,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.15);
|
||||
Vector3 x, y, z;
|
||||
|
|
@ -1290,7 +1279,6 @@ Class EnhancedShockRifle : UTWeapon
|
|||
A_StartSound("shock/altfire",CHAN_WEAPON,CHANF_OVERLAP);
|
||||
invoker.FireEffect();
|
||||
UTMainHandler.DoFlash(self,Color(128,255,128,0),1);
|
||||
UTMainHandler.DoSwing(self,(FRandom[ASMD](-0.1,-0.6),FRandom[ASMD](-0.1,0.5)),6,-0.8,3,SWING_Spring,0,4);
|
||||
A_AlertMonsters();
|
||||
A_QuakeEx(3,3,3,4,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.15);
|
||||
Vector3 x, y, z;
|
||||
|
|
|
|||
|
|
@ -84,17 +84,10 @@ Class SniperRifle : UTWeapon
|
|||
UTMainHandler.DoFlash(self,Color(32,0,0,255),1);
|
||||
A_StartSound("sniper/fire",CHAN_WEAPON,CHANF_OVERLAP);
|
||||
A_AlertMonsters();
|
||||
if ( zoomed )
|
||||
{
|
||||
A_QuakeEx(2,2,2,3,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.09);
|
||||
for ( int i=0; i<3; i++ )
|
||||
UTMainHandler.DoSwing(self,(FRandom[Sniper](-0.3,0.05),FRandom[Sniper](-0.3,0.1)),2,-0.5,Random[Sniper](3,4),SWING_Spring,Random[Sniper](3,4),Random[Sniper](4,5));
|
||||
}
|
||||
if ( zoomed ) A_QuakeEx(2,2,2,3,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.09);
|
||||
else
|
||||
{
|
||||
A_QuakeEx(3,3,3,6,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.12);
|
||||
for ( int i=0; i<3; i++ )
|
||||
UTMainHandler.DoSwing(self,(FRandom[Sniper](-0.3,0.05),FRandom[Sniper](-0.3,0.1)),4,-1,Random[Sniper](3,4),SWING_Spring,Random[Sniper](3,4),Random[Sniper](4,5));
|
||||
A_Overlay(-2,"MuzzleFlash");
|
||||
A_OverlayFlags(-2,PSPF_RENDERSTYLE|PSPF_FORCESTYLE,true);
|
||||
A_OverlayRenderstyle(-2,STYLE_Add);
|
||||
|
|
|
|||
|
|
@ -393,7 +393,6 @@ Class Translocator : UTWeapon
|
|||
if ( !weap ) return;
|
||||
A_StartSound("transloc/throw",CHAN_WEAPON);
|
||||
invoker.FireEffect();
|
||||
UTMainHandler.DoSwing(self,(FRandom[Translocator](-0.2,0.4),FRandom[Translocator](-0.2,0.7)),2,-0.3,3,SWING_Spring,2,3);
|
||||
A_AlertMonsters();
|
||||
Vector3 x, y, z;
|
||||
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
|
||||
|
|
@ -415,7 +414,6 @@ Class Translocator : UTWeapon
|
|||
if ( !weap ) return;
|
||||
A_StartSound("transloc/return",CHAN_WEAPON);
|
||||
invoker.FireEffect();
|
||||
UTMainHandler.DoSwing(self,(FRandom[Translocator](-0.2,-0.4),FRandom[Translocator](-0.2,0.7)),3,-1,2,SWING_Spring,2,2);
|
||||
A_AlertMonsters();
|
||||
if ( invoker.module && invoker.module.bAMBUSH )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2869,68 +2869,6 @@ Class UTBulletTrail : LineTracer
|
|||
}
|
||||
}
|
||||
|
||||
Enum ESwingMode
|
||||
{
|
||||
SWING_Straight, // constant increment
|
||||
SWING_Spring, // bounces back after a delay
|
||||
};
|
||||
|
||||
Class Swinger : Thinker
|
||||
{
|
||||
Actor target;
|
||||
Vector2 dir;
|
||||
double inc, rmul;
|
||||
int steps, mode, delay;
|
||||
double str, tstr;
|
||||
int cnt, cstate;
|
||||
|
||||
Enum ESwingerState
|
||||
{
|
||||
STATE_Initial,
|
||||
STATE_Wait,
|
||||
STATE_Return,
|
||||
};
|
||||
|
||||
override void Tick()
|
||||
{
|
||||
if ( !target ) cstate = -1;
|
||||
switch ( cstate )
|
||||
{
|
||||
case STATE_Initial:
|
||||
target.A_SetAngle(target.angle+dir.x*str*flak_swingerstrength,SPF_INTERPOLATE);
|
||||
target.A_SetPitch(target.pitch+dir.y*str*flak_swingerstrength,SPF_INTERPOLATE);
|
||||
str += inc;
|
||||
if ( ++cnt >= steps )
|
||||
{
|
||||
cnt = 0;
|
||||
str = tstr/steps;
|
||||
cstate = (mode==SWING_Straight)?(-1):(delay>0)?STATE_Wait:STATE_Return;
|
||||
}
|
||||
else tstr += str;
|
||||
break;
|
||||
case STATE_Wait:
|
||||
if ( ++cnt >= delay )
|
||||
{
|
||||
cnt = 0;
|
||||
cstate = STATE_Return;
|
||||
}
|
||||
break;
|
||||
case STATE_Return:
|
||||
target.A_SetAngle(target.angle-dir.x*(str/rmul)*flak_swingerstrength,SPF_INTERPOLATE);
|
||||
target.A_SetPitch(target.pitch-dir.y*(str/rmul)*flak_swingerstrength,SPF_INTERPOLATE);
|
||||
if ( ++cnt >= steps*rmul )
|
||||
{
|
||||
cnt = 0;
|
||||
cstate = -1;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
Destroy();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Class GenericFlash : HUDMessageBase
|
||||
{
|
||||
Color col;
|
||||
|
|
@ -3628,24 +3566,6 @@ Class UTMainHandler : EventHandler
|
|||
else Victim.vel += HitDirection*(MomentumTransfer/(Thinker.TICRATE*Victim.Mass));
|
||||
}
|
||||
|
||||
static void DoSwing( Actor target, Vector2 dir, double initial, double inc, int steps, int mode = 0, int delay = 0, double rmul = 1.0 )
|
||||
{
|
||||
if ( !flak_swingers ) return;
|
||||
let s = new("Swinger");
|
||||
s.ChangeStatNum(Thinker.STAT_USER);
|
||||
s.target = target;
|
||||
s.dir = dir;
|
||||
s.inc = inc;
|
||||
s.rmul = rmul;
|
||||
s.steps = steps;
|
||||
s.mode = mode;
|
||||
s.delay = delay;
|
||||
s.cnt = 0;
|
||||
s.cstate = 0;
|
||||
s.str = initial;
|
||||
s.tstr = initial;
|
||||
}
|
||||
|
||||
override void UiTick()
|
||||
{
|
||||
if ( !ispb && !isbd ) return;
|
||||
|
|
|
|||
|
|
@ -685,8 +685,6 @@ Class WarheadLauncher : UTWeapon
|
|||
A_StartSound("warhead/fire",CHAN_WEAPON,CHANF_OVERLAP);
|
||||
invoker.FireEffect();
|
||||
UTMainHandler.DoFlash(self,Color(128,255,128,128),1);
|
||||
UTMainHandler.DoSwing(self,(FRandom[Warhead](0.6,1.2),FRandom[Warhead](0.2,0.5)),4,-1,3,SWING_Spring,2,5);
|
||||
UTMainHandler.DoSwing(self,(FRandom[Warhead](0.2,0.5),FRandom[Warhead](-0.9,-1.5)),4,-0.6,5,SWING_Spring,3,3);
|
||||
A_AlertMonsters();
|
||||
A_QuakeEx(6,6,6,20,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.2);
|
||||
Vector3 x, y, z;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue