Quadravol pumping (partial). No reload or fire yet.

This commit is contained in:
Mari the Deer 2022-08-16 01:40:32 +02:00
commit 871d6b5d71
6 changed files with 154 additions and 11 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 B

After

Width:  |  Height:  |  Size: 116 B

Before After
Before After

View file

@ -1,3 +1,3 @@
[default]
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r324 \cu(Mon 15 Aug 15:07:27 CEST 2022)\c-";
SWWM_SHORTVER="\cw1.3pre r324 \cu(2022-08-15 15:07:27)\c-";
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r324 \cu(Tue 16 Aug 01:40:32 CEST 2022)\c-";
SWWM_SHORTVER="\cw1.3pre r324 \cu(2022-08-16 01:40:32)\c-";

View file

@ -13,6 +13,24 @@ Model "Quadravol"
FrameIndex XZW1 A 0 0
}
Model "Quadravol"
{
Path "models"
Model 2 "Quadravol1st_d.3d"
SurfaceSkin 2 5 "QuadCell.png"
AngleOffset -90
Scale -0.01 0.005 0.01
// Eject
FrameIndex XZWZ A 2 88
FrameIndex XZWZ B 2 89
FrameIndex XZWZ C 2 90
FrameIndex XZWZ D 2 91
FrameIndex XZWZ E 2 92
FrameIndex XZWZ F 2 93 // Drop
}
Model "Quadravol"
{
Path "models"
@ -68,4 +86,60 @@ Model "Quadravol"
FrameIndex XZW3 L 1 37
FrameIndex XZW3 M 1 38
FrameIndex XZW3 N 1 39
// FireOne
FrameIndex XZW3 O 1 41
FrameIndex XZW3 P 1 42
FrameIndex XZW3 Q 1 43
FrameIndex XZW3 R 1 44
FrameIndex XZW3 S 1 45
FrameIndex XZW3 T 1 46
FrameIndex XZW3 U 1 47
FrameIndex XZW3 V 1 48
// FireTwo
FrameIndex XZW3 W 1 50
FrameIndex XZW3 X 1 51
FrameIndex XZW3 Y 1 52
FrameIndex XZW3 Z 1 53
FrameIndex XZW4 A 1 54
FrameIndex XZW4 B 1 55
FrameIndex XZW4 C 1 56
FrameIndex XZW4 D 1 57
// FireThree
FrameIndex XZW4 E 1 59
FrameIndex XZW4 F 1 60
FrameIndex XZW4 G 1 61
FrameIndex XZW4 H 1 62
FrameIndex XZW4 I 1 63
FrameIndex XZW4 J 1 64
FrameIndex XZW4 K 1 65
FrameIndex XZW4 L 1 66
// FireFour
FrameIndex XZW4 M 1 68
FrameIndex XZW4 N 1 69
FrameIndex XZW4 O 1 70
FrameIndex XZW4 P 1 71
FrameIndex XZW4 Q 1 72
FrameIndex XZW4 R 1 73
FrameIndex XZW4 S 1 74
FrameIndex XZW4 T 1 75
// FireFive
FrameIndex XZW4 U 1 77
FrameIndex XZW4 V 1 78
FrameIndex XZW4 W 1 79
FrameIndex XZW4 X 1 80
FrameIndex XZW4 Y 1 81
FrameIndex XZW4 Z 1 82
FrameIndex XZW5 A 1 83
FrameIndex XZW5 B 1 84
// LeverAct
FrameIndex XZW5 C 1 86
FrameIndex XZW5 D 1 87 // LeverForward
FrameIndex XZW5 E 1 88 // Eject
FrameIndex XZW5 F 1 89
FrameIndex XZW5 G 1 90
FrameIndex XZW5 H 1 91 // LeverBack
FrameIndex XZW5 I 1 92
FrameIndex XZW5 J 1 93 // Chamber
FrameIndex XZW5 K 1 94
FrameIndex XZW5 L 1 95
}

Binary file not shown.

Binary file not shown.

View file

@ -5,7 +5,7 @@ Class Quadravol : SWWMWeapon
{
int clipcount;
int chargelevel;
bool chambered, charged;
bool chambered, charged, waschambered, wascharged;
bool onehand;
Property ClipCount : clipcount;
@ -20,12 +20,36 @@ Class Quadravol : SWWMWeapon
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-1)/8.,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);
AmmoLed.DrawTexture(AmmoLedBase,false,0,0,DTA_LegacyRenderStyle,STYLE_Shaded,DTA_FillColor,0xFF00FFFF);
Color col;
switch ( chargelevel )
{
default:
col = 0xFF00FF00;
break;
case 1:
case 9:
col = 0xFF0080FF;
break;
case 2:
case 8:
col = 0xFF0000FF;
break;
case 3:
case 7:
col = 0xFF8000FF;
break;
case 4:
case 6:
col = 0xFFFF0080;
break;
case 5:
col = 0xFFFF0000;
break;
}
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_Shaded,DTA_FillColor,col);
for ( int i=0; i<clipcount; i++ ) AmmoLed.DrawTexture(AmmoLedRound,false,36-8*i,52,DTA_LegacyRenderStyle,STYLE_Shaded,DTA_FillColor,0xFFFF8000);
if ( chambered ) AmmoLed.DrawTexture(AmmoLedRound,false,52,52,DTA_LegacyRenderStyle,STYLE_Shaded,DTA_FillColor,charged?0xFF404040:0xFFFF8000);
}
override bool ReportHUDAmmo()
@ -50,6 +74,34 @@ Class Quadravol : SWWMWeapon
else origin.A_StartSound(UpSound,CHAN_WEAPON,CHANF_OVERLAP);
}
action void A_Eject()
{
invoker.waschambered = invoker.chambered;
invoker.wascharged = invoker.charged;
invoker.chambered = (invoker.clipcount>0);
invoker.clipcount = max(0,invoker.clipcount-1);
invoker.charged = false;
if ( invoker.waschambered )
{
A_ChangeModel("",2,"","",5,"models",invoker.wascharged?"QuadCell_Used.png":"QuadCell.png",CMDL_USESURFACESKIN,-1);
A_Overlay(PSP_WEAPON+1,"DropCasing");
}
}
action bool A_Fill()
{
if ( !invoker.chambered || invoker.charged || (invoker.chargelevel >= 5) ) return false;
invoker.charged = true;
invoker.chargelevel++;
return true;
}
action void A_DropCasing()
{
if ( invoker.wascharged ) Console.Printf("\cg// TODO - Drop Casing\c-");
else Console.Printf("\cg// TODO - Drop Ammo\c-");
}
Default
{
Tag "$T_QUADRAVOL";
@ -84,14 +136,31 @@ Class Quadravol : SWWMWeapon
XZW3 JKLMN 2;
Goto Ready;
Ready:
XZW2 A 1 A_WeaponReady();
XZW2 A 1
{
A_Fill(); // just in case
A_WeaponReady();
}
Wait;
Fire:
XZW2 A 1;
Goto Ready;
AltFire:
XZW2 A 1;
XZW2 A 2;
XZW5 C 2;
XZW5 D 2 A_StartSound("quadshot/leverforward",CHAN_WEAPON,CHANF_OVERLAP);
XZW5 E 2 A_Eject();
XZW5 FG 3;
XZW5 H 2 A_StartSound("quadshot/leverback",CHAN_WEAPON,CHANF_OVERLAP);
XZW5 I 2;
XZW5 J 2 A_Fill();
XZW5 K 2;
XZW5 L 3;
Goto Ready;
DropCasing:
XZWZ ABCDEF 2;
TNT1 A 1 A_DropCasing();
Stop;
Reload:
XZW2 A 1;
Goto Ready;