Quadravol can be picked up and selected, more later.
Removed subpixel shader (causes rendering issues).
This commit is contained in:
parent
38981732f3
commit
b9cfcaee04
25 changed files with 171 additions and 20 deletions
|
|
@ -14,7 +14,7 @@ Class HeavyMahSheenGun : SWWMWeapon
|
|||
transient SpreadSlugTracer st;
|
||||
|
||||
transient ui Canvas AmmoLed;
|
||||
ui TextureID AmmoLedBase, AmmoLedBar, AmmoLedSpeed, AmmoLedNums, AmmoLedCam;
|
||||
ui TextureID AmmoLedBase, AmmoLedBar, AmmoLedSpeed, AmmoLedNums;
|
||||
|
||||
override void RenderTexture( RenderEvent e )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,9 +6,50 @@ Class Quadravol : SWWMWeapon
|
|||
int clipcount;
|
||||
int chargelevel;
|
||||
bool chambered, charged;
|
||||
bool onehand;
|
||||
|
||||
Property ClipCount : clipcount;
|
||||
|
||||
transient ui Canvas AmmoLed;
|
||||
ui TextureID AmmoLedBase, AmmoLedRound, AmmoLedCharge;
|
||||
|
||||
override void RenderTexture( RenderEvent e )
|
||||
{
|
||||
if ( !AmmoLed ) AmmoLed = TexMan.GetCanvas("QUADRLED");
|
||||
if ( !AmmoLedBase ) AmmoLedBase = TexMan.CheckForTexture("models/QuadLEDBase.png",TexMan.Type_Any);
|
||||
if ( !AmmoLedRound ) AmmoLedRound = TexMan.CheckForTexture("models/QuadLEDRound.png",TexMan.Type_Any);
|
||||
if ( !AmmoLedCharge ) AmmoLedCharge = TexMan.CheckForTexture("models/QuadLEDCharge.png",TexMan.Type_Any);
|
||||
AmmoLed.Clear(0,0,64,64,0xFF101033);
|
||||
AmmoLed.DrawTexture(AmmoLedBase,false,0,0,DTA_LegacyRenderStyle,STYLE_Add,DTA_Color,0xFF00FFFF);
|
||||
Vector3 lainbow = SWWMUtility.HSVToRGB(((5-chargelevel)/7.5,1.,1.));
|
||||
Color col = Color(255,int(lainbow.x*255),int(lainbow.y*255),int(lainbow.z*255));
|
||||
AmmoLed.DrawTexture(AmmoLedCharge,false,12,4,DTA_SrcX,(chargelevel%4)*64,DTA_SrcY,(chargelevel/4)*64,DTA_SrcWidth,40,DTA_SrcHeight,40,DTA_DestWidth,40,DTA_DestHeight,40,DTA_LegacyRenderStyle,STYLE_Add,DTA_Color,(chargelevel>0)?col:0xFF00FF00);
|
||||
for ( int i=0; i<clipcount; i++ ) AmmoLed.DrawTexture(AmmoLedRound,false,36-8*i,52,DTA_LegacyRenderStyle,STYLE_Add,DTA_Color,0xFF0000FF);
|
||||
if ( chambered ) AmmoLed.DrawTexture(AmmoLedRound,false,52,52,DTA_LegacyRenderStyle,STYLE_Add,DTA_Color,charged?0xFF0000FF:0xFF00FF00);
|
||||
}
|
||||
|
||||
override bool ReportHUDAmmo()
|
||||
{
|
||||
return (chargelevel>0)||(chambered&&!charged)||(clipcount>0)||(Ammo1.Amount > 0);
|
||||
}
|
||||
|
||||
override bool CheckAmmo( int firemode, bool autoswitch, bool requireammo, int ammocount )
|
||||
{
|
||||
if ( (firemode == PrimaryFire) || (firemode == EitherFire) )
|
||||
{
|
||||
if ( (chargelevel > 0) || (chambered && !charged) || (clipcount > 0) || (Ammo1.Amount > 0) ) return true;
|
||||
if ( autoswitch ) PlayerPawn(Owner).PickNewWeapon(null);
|
||||
return false;
|
||||
}
|
||||
return Super.CheckAmmo(firemode,autoswitch,requireammo,ammocount);
|
||||
}
|
||||
|
||||
override void PlayUpSound( Actor origin )
|
||||
{
|
||||
if ( onehand ) origin.A_StartSound("quadshot/selectfast",CHAN_WEAPON,CHANF_OVERLAP);
|
||||
else origin.A_StartSound(UpSound,CHAN_WEAPON,CHANF_OVERLAP);
|
||||
}
|
||||
|
||||
Default
|
||||
{
|
||||
Tag "$T_QUADRAVOL";
|
||||
|
|
@ -19,12 +60,14 @@ Class Quadravol : SWWMWeapon
|
|||
Weapon.SlotNumber 6;
|
||||
Weapon.SlotPriority 2.;
|
||||
Weapon.SelectionOrder 650;
|
||||
Weapon.UpSound "quadshot/select";
|
||||
Weapon.AmmoType1 "QuadravolAmmo";
|
||||
Weapon.AmmoGive1 1;
|
||||
SWWMWeapon.DropAmmoType "SWWMRocketAmmoSmall";
|
||||
Quadravol.ClipCount 5;
|
||||
Stamina 80000;
|
||||
+SWWMWEAPON.NOFIRSTGIVE;
|
||||
+SWWMWEAPON.HASSCRTEX;
|
||||
+WEAPON.EXPLOSIVE;
|
||||
Radius 28;
|
||||
Height 32;
|
||||
|
|
@ -34,5 +77,34 @@ Class Quadravol : SWWMWeapon
|
|||
Spawn:
|
||||
XZW1 A -1;
|
||||
Stop;
|
||||
Select:
|
||||
XZW2 R 1 A_FullRaise();
|
||||
XZW2 STUVWXYZ 1;
|
||||
XZW3 ABCDEFGHI 1;
|
||||
XZW3 JKLMN 2;
|
||||
Goto Ready;
|
||||
Ready:
|
||||
XZW2 A 1 A_WeaponReady();
|
||||
Wait;
|
||||
Fire:
|
||||
XZW2 A 1;
|
||||
Goto Ready;
|
||||
AltFire:
|
||||
XZW2 A 1;
|
||||
Goto Ready;
|
||||
Reload:
|
||||
XZW2 A 1;
|
||||
Goto Ready;
|
||||
Zoom:
|
||||
XZW2 A 1;
|
||||
Goto Ready;
|
||||
User1:
|
||||
XZW2 A 1;
|
||||
Goto Ready;
|
||||
Deselect:
|
||||
XZW2 A 1 A_StartSound("quadshot/deselect",CHAN_WEAPON,CHANF_OVERLAP);
|
||||
XZW2 BCDEFGHIJKLMNOPQR 1;
|
||||
XZW2 R -1 A_FullLower();
|
||||
Stop;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue