Skip to content

Commit

Permalink
Merge pull request #12 from UndeadZeratul/11-majestic-sounds-not-working
Browse files Browse the repository at this point in the history
Majestic Tweaks
  • Loading branch information
UndeadZeratul authored Jul 18, 2023
2 parents e8ea2bb + c9c9d37 commit c3edc60
Show file tree
Hide file tree
Showing 8 changed files with 140 additions and 27 deletions.
16 changes: 8 additions & 8 deletions SNDINFO.majestic
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Majestic/Fire "Sounds/MajesticFire.ogg"
Majestic/MagOut "Sounds/MajesticMagOut.wav"
Majestic/MagIn "Sounds/MajesticMagIn.wav"
Majestic/Eject "Sounds/MajesticMagEject.wav"
Majestic/Charge "Sounds/MajesticCharge.ogg"
Majestic/Hammer "Sounds/MajesticHammer.wav"
Majestic/BatteryOut "Sounds/MajesticBatteryOut.ogg"
Majestic/BatteryIn "Sounds/MajesticBatteryIn.wav"
Majestic/Fire "Sounds/Majestic/MajesticFire.ogg"
Majestic/MagOut "Sounds/Majestic/MajesticMagOut.wav"
Majestic/MagIn "Sounds/Majestic/MajesticMagIn.wav"
Majestic/Eject "Sounds/Majestic/MajesticMagEject.wav"
Majestic/Charge "Sounds/Majestic/MajesticCharge.ogg"
Majestic/Hammer "Sounds/Majestic/MajesticHammer.wav"
Majestic/BatteryOut "Sounds/Majestic/MajesticBatteryOut.ogg"
Majestic/BatteryIn "Sounds/Majestic/MajesticBatteryIn.wav"
60 changes: 49 additions & 11 deletions TEXTURES.majestic
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Texture definitions generated by SLADE3
// on Sun Jul 4 03:06:28 2021
// on Tue Jul 18 07:52:17 2023

Sprite "MJMGA0", 15, 10
{
Expand Down Expand Up @@ -78,47 +78,63 @@ Sprite "MJCGA0", 89, 119
XScale 1.200
YScale 1.400
Offset -165, -128
Patch "MJSTCGA0", 0, 0
Patch "MJCGA0", 0, 0
}

Sprite "MJCGB0", 89, 119
{
XScale 1.200
YScale 1.400
Offset -165, -128
Patch "MJSTCGB0", 0, 0
Patch "MJCGB0", 0, 0
}

Sprite "MJCGC0", 89, 119
{
XScale 1.200
YScale 1.400
Offset -165, -128
Patch "MJSTCGC0", 0, 0
Patch "MJCGC0", 0, 0
}

Sprite "MJCGD0", 89, 119
{
XScale 1.200
YScale 1.400
Offset -165, -128
Patch "MJSTCGD0", 0, 0
Patch "MJCGD0", 0, 0
}

Sprite "MJCGE0", 110, 156
{
XScale 1.200
YScale 1.400
Offset -144, -91
Patch "MJSTCGE0", 0, 0
Patch "MJCFA0", 0, 0
}

Sprite "MJCGF0", 89, 119
{
XScale 1.100
YScale 1.400
Offset -149, -131
Patch "MJCGA0", 0, 0
}

Sprite "MJCGG0", 89, 119
{
XScale 1.200
YScale 1.400
Offset -165, -128
Patch "MJCGA0", 0, 0
}

Sprite "MJ2GA0", 89, 119
{
XScale 1.200
YScale 1.400
Offset -130, -128
Patch "MJSTCGA0", 0, 0
Patch "MJCGA0", 0, 0
{
FlipX
}
Expand All @@ -129,7 +145,7 @@ Sprite "MJ2GB0", 89, 119
XScale 1.200
YScale 1.400
Offset -130, -128
Patch "MJSTCGB0", 0, 0
Patch "MJCGB0", 0, 0
{
FlipX
}
Expand All @@ -140,7 +156,7 @@ Sprite "MJ2GC0", 89, 119
XScale 1.200
YScale 1.400
Offset -130, -128
Patch "MJSTCGC0", 0, 0
Patch "MJCGC0", 0, 0
{
FlipX
}
Expand All @@ -151,7 +167,7 @@ Sprite "MJ2GD0", 89, 119
XScale 1.200
YScale 1.400
Offset -130, -128
Patch "MJSTCGD0", 0, 0
Patch "MJCGD0", 0, 0
{
FlipX
}
Expand All @@ -162,7 +178,29 @@ Sprite "MJ2GE0", 110, 156
XScale 1.200
YScale 1.400
Offset -130, -91
Patch "MJSTCGE0", 0, 0
Patch "MJCFA0", 0, 0
{
FlipX
}
}

Sprite "MJ2GF0", 89, 119
{
XScale 1.100
YScale 1.400
Offset -114, -131
Patch "MJCGA0", 0, 0
{
FlipX
}
}

Sprite "MJ2GG0", 89, 119
{
XScale 1.200
YScale 1.400
Offset -130, -128
Patch "MJCGA0", 0, 0
{
FlipX
}
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
91 changes: 83 additions & 8 deletions zscript/accensus/weapons/Majestic/majestic.zs
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,13 @@ class HDMajestic : HDHandgun
}
}

action void A_CheckMajesticHand()
{
bool right = !invoker.wronghand;
right = right && Wads.CheckNumForName("id", 0) != -1 || !right && Wads.CheckNumForName("id", 0) == -1;
player.GetPSprite(PSP_WEAPON).sprite = GetSpriteIndex(right ? "MJCGA0" : "MJ2GA0");
}

const MaxCharge = 60;
const Tiers = 3;
private int Charge;
Expand Down Expand Up @@ -254,6 +261,7 @@ class HDMajestic : HDHandgun
Ready:
MJCG # 1
{
A_CheckMajesticHand();
A_WeaponReady(WRF_NOFIRE | (invoker.Charge == 0 ? WRF_ALL : 0));

if (PressingFire() && invoker.WeaponStatus[MJProp_Mag] > 0 || invoker.Charge > 0 && player.GetPSprite(PSP_WEAPON).frame == 1)
Expand Down Expand Up @@ -311,10 +319,12 @@ class HDMajestic : HDHandgun
}
Goto ReadyEnd;
Select0:
MJCG A 1 A_CheckMajesticFrame();
MJCG A 0 A_CheckMajesticHand();
#### A 1 A_CheckMajesticFrame();
Goto Select0Small;
Deselect0:
MJCG A 1
MJCG A 0 A_CheckMajesticHand();
#### A 1
{
invoker.MustCancel = false;
A_CheckMajesticFrame();
Expand All @@ -326,15 +336,15 @@ class HDMajestic : HDHandgun
Goto Ready;

Fire:
MJCG B 1;
MJCG A 1
#### B 1;
#### A 1
{
HDPlayerPawn(self).gunbraced = false;
}
MJCF A 1 Bright A_FireMajestic(false);
MJCF B 1;
MJCF C 1;
MJCG A 2 A_CheckMajesticFrame();
#### E 1 Bright A_FireMajestic(false);
#### F 1;
#### G 1;
#### A 2 A_CheckMajesticFrame();
Goto Ready;

Reload:
Expand Down Expand Up @@ -449,6 +459,71 @@ class HDMajestic : HDHandgun
#### # 1 Offset(2, 38);
#### # 1 Offset(1, 34);
Goto Nope;


Firemode:
SwapPistols:
#### A 0 A_SwapHandguns();
#### A 0 A_JumpIf(player.GetPSprite(PSP_WEAPON).sprite == GetSpriteIndex("MJCGA0"), "SwapPistols2");
SwapPistols1:
TNT1 A 0 A_Overlay(1026, "lowerleft");
TNT1 A 0 A_Overlay(1025, "raiseright");
TNT1 A 5;
MJCG A 0;
Goto Nope;
SwapPistols2:
TNT1 A 0 A_Overlay(1026, "lowerright");
TNT1 A 0 A_Overlay(1025, "raiseleft");
TNT1 A 5;
MJ2G A 0;
Goto Nope;
LowerLeft:
MJCG # 0 A_WeaponBusy(true);
#### # 1 Offset(-6, 38);
#### # 1 Offset(-12, 48);
#### # 1 Offset(-20, 60);
#### # 1 Offset(-34, 76);
#### # 1 Offset(-50, 86);
stop;
LowerRight:
MJ2G # 0 A_WeaponBusy(true);
#### # 1 Offset(6, 38);
#### # 1 Offset(12, 48);
#### # 1 Offset(20, 60);
#### # 1 Offset(34, 76);
#### # 1 Offset(50, 86);
Stop;
RaiseLeft:
MJCG # 0 A_WeaponBusy(false);
#### # 1 Offset(-50, 86);
#### # 1 Offset(-34, 76);
#### # 1 Offset(-20, 60);
#### # 1 Offset(-12, 48);
#### # 1 Offset(-6, 38);
Stop;
RaiseRight:
MJ2G # 0 A_WeaponBusy(false);
#### # 1 Offset(50, 86);
#### # 1 Offset(34, 76);
#### # 1 Offset(20, 60);
#### # 1 Offset(12, 48);
#### # 1 Offset(6, 38);
Stop;
WhyAreYouSmiling:
#### A 0 A_WeaponBusy(true);
#### # 1 Offset(0, 48);
#### # 1 Offset(0, 60);
#### # 1 Offset(0, 76);
TNT1 A 7;
TNT1 A 0
{
invoker.wronghand = !invoker.wronghand;
A_CheckMajesticHand();
}
#### # 1 Offset(0, 76);
#### # 1 Offset(0, 60);
#### # 1 Offset(0, 48);
Goto Nope;
}
}

Expand Down

0 comments on commit c3edc60

Please sign in to comment.