More stuff before public release.

Adjust the aspect of new 0.83 hud icons.
Impaler plays unique sound when ending altfire instead of select sound.
Adapt some things for the old sounds add-on.
Minor HUD adjustments (weapon slot related).
Left a couple notes of what I might do next.
This commit is contained in:
Marisa the Magician 2019-09-27 14:20:00 +02:00
commit bac9b6674d
25 changed files with 38 additions and 6 deletions

View file

@ -570,7 +570,7 @@ Class DispersionPistol : UnrealWeapon
if ( self is 'UTPlayer' )
UTPlayer(self).PlayAttacking3();
DefaultAmmo(weap.Ammo1).rechargephase = 0;
A_PlaySound("dpistol/fire",CHAN_WEAPON,Dampener.Active(self)?.4:1.);
A_PlaySound("dpistol/altfire",CHAN_WEAPON,Dampener.Active(self)?.4:1.);
double mult = Amplifier.GetMult(self,int(invoker.ChargeSize*50)+50);
invoker.FireEffect();
int ulevel = sting_dpistol?0:invoker.upgradelevel;

View file

@ -953,7 +953,7 @@ Class Impaler : UnrealWeapon
player.SetPSprite(-3,invoker.FindState("GemAltRelease"));
player.SetPSprite(-2,invoker.FindState("ZapAltRelease"));
A_StopBeam();
A_PlaySound("impaler/gem",CHAN_WEAPON,looping:true);
A_PlaySound("impaler/altend",CHAN_WEAPON,looping:true);
}
IMPA QRSTUVWX 2;
Goto Idle;

View file

@ -975,7 +975,11 @@ Class UFlamethrower : UnrealWeapon
TNT1 A 1 A_FireFlame();
Wait;
Hold:
FLMF FGHIJK 2 A_SoundVolume(CHAN_WEAPON,Dampener.Active(self)?.1:1.);
FLMF FGHIJK 2
{
A_SoundVolume(CHAN_WEAPON,Dampener.Active(self)?.1:1.);
A_SoundVolume(CHAN_6,Dampener.Active(self)?.02:.2);
}
Loop;
Release:
#### # 2
@ -983,6 +987,7 @@ Class UFlamethrower : UnrealWeapon
A_Overlay(-9999,"Null");
player.SetPSprite(-2,ResolveState("FlameRelease"));
A_PlaySound("flamet/fireend",CHAN_WEAPON,Dampener.Active(self)?.1:1.);
A_SoundVolume(CHAN_6,Dampener.Active(self)?.1:1.);
A_ClearRefire();
}
FLMF MNOP 2;

View file

@ -860,6 +860,7 @@ Class AmmoUsedInSlot
Class UnrealMainHandler : EventHandler
{
Array<AmmoUsedInSlot> AmmoSlots;
transient int slotflash[10]; // used by the 0.83 hud
override void WorldThingDamaged( WorldEvent e )
{
@ -1189,6 +1190,8 @@ Class UnrealMainHandler : EventHandler
let t = players[e.player].mo.FindInventory("UTranslator");
if ( t ) t.Use(false);
}
else if ( e.Name ~== "Bar083SlotFlash" )
slotflash[e.Args[0]] = gametic+20;
}
private static bool CmpWeapon( Class<Weapon> a, Class <Weapon> b )
{

View file

@ -332,7 +332,8 @@ Class UnrealHUD : BaseStatusBar
for ( int i=0; i<10; i++ )
{
Font cfont = TinyFont;
if ( cwslot == i ) cfont = TinyWhiteFont;
if ( (pwslot != -1) && (pwslot == i) || (pwslot == -1) && (cwslot == i) )
cfont = TinyWhiteFont;
int realslot = i?i:10;
CurX = HalfHUDX-3+realslot*6;
CurY = HalfHUDY+4;
@ -616,6 +617,14 @@ Class UnrealHUD : BaseStatusBar
}
}
override void ReceivedWeapon( Weapon weapn )
{
Super.ReceivedWeapon(weapn);
if ( weapn.SlotNumber == -1 ) return;
// fuckin' hell
EventHandler.SendNetworkEvent("Bar083SlotFlash",weapn.SlotNumber);
}
private void DrawUnrealBar()
{
// 0.83 status bar, just for funsies
@ -646,7 +655,16 @@ Class UnrealHUD : BaseStatusBar
{
if ( !CPlayer.HasWeaponsInSlot(i) ) continue;
bool used = (CPlayer.ReadyWeapon&&(CPlayer.ReadyWeapon.SlotNumber==i));
DrawImage("Slot083",(slotofs[i],342),DI_ITEM_OFFSETS,used?1.:.8);
if ( CPlayer.PendingWeapon && (CPlayer.PendingWeapon != WP_NOCHANGE) )
used = (CPlayer.PendingWeapon.SlotNumber==i);
DrawImage(used?"Used083":"Slot083",(slotofs[i],342),DI_ITEM_OFFSETS);
}
let hnd = UnrealMainHandler(EventHandler.Find("UnrealMainHandler"));
if ( hnd )
{
for ( int i=0; i<10; i++ )
if ( hnd.slotflash[i] > gametic )
DrawImage("Flsh083",(slotofs[i],342),DI_ITEM_OFFSETS,(hnd.slotflash[i]-gametic+FracTic)/20.);
}
DrawString(mOldDigits,FormatNumber(CPlayer.health,3),(358,366),DI_TEXT_ALIGN_RIGHT);
int ArmorAmount = 0, CurAbs = -1;

View file

@ -113,7 +113,7 @@ Class Amplifier : UnrealInventory
{
if ( pickup ) return false;
bActive = !bActive;
Owner.A_PlaySound("amplifier/set",CHAN_ITEM);
Owner.A_PlaySound(bActive?"amplifier/set":"amplifier/unset",CHAN_ITEM);
return false;
}
override void DoEffect()