diff --git a/brightmaps/JPulsePickup_01.png b/brightmaps/JPulsePickup_01.png new file mode 100644 index 0000000..fa03e71 Binary files /dev/null and b/brightmaps/JPulsePickup_01.png differ diff --git a/cvarinfo.txt b/cvarinfo.txt index 000180b..c953875 100644 --- a/cvarinfo.txt +++ b/cvarinfo.txt @@ -1,9 +1,20 @@ -user bool flak_protomenu = false; +user int flak_protomenu = 0; +user bool flak_showmenu = true; server bool flak_betaudamage = false; server bool flak_pulsereload = false; server bool flak_enforcerreload = false; user bool flak_redeemerreadout = true; user int flak_colorprefs = 0; -user color flak_colorcustom = "ff ff ff"; -user float flak_opacity = 0.8; -user color flak_bgcolor = "00 00 00"; +user color flak_colorcustom = "00 80 ff"; +user int flak_opacity = 15; // UT's opacity is 1 <-> 16 in steps of 1 (default 15) + // 16 means fully opaque, everything else is just additive with gradually lowering alpha + // status is never fully opaque (clamped under 16) + // currently selected weapon and numbers are fully opaque until 8 opacity (their opacity is bumped by 7 basically) +user bool flak_showweapons = true; // if disabled, frags and ammo are shown centered, with a gap for armor and health +user bool flak_showstatus = true; // if disabled armor and health show on the top right (or center between frags and ammo if weapon display is disabled) +user bool flak_showammo = true; +user bool flak_showfrags = true; +user bool flak_showinfo = true; +user float flak_hudsize = 1.0; // 0.2 <-> 1.0 in steps of 0.2 (default 1.0) +user float flak_weaponsize = 0.8; // 0.2 <-> 1.0 in steps of 0.2 (default 0.8) +user float flak_statussize = 1.0; // 0.5 <-> 1.5 in steps of 0.1 (default 1.0) diff --git a/gldefs.txt b/gldefs.txt index 14493ec..7195853 100644 --- a/gldefs.txt +++ b/gldefs.txt @@ -184,7 +184,7 @@ Brightmap Texture "models/JPulseGun_02.png" } /*Brightmap Texture "models/JPulsePickup_01.png" { - Map "brightmaps/JPulseGun_02.png" + Map "brightmaps/JPulsePickup_01.png" }*/ HardwareShader Texture "models/JPulsePickup_01.png" { diff --git a/graphics/M_DOOM.png b/graphics/M_DOOM.png new file mode 100644 index 0000000..b5e7a37 Binary files /dev/null and b/graphics/M_DOOM.png differ diff --git a/maps/titlemap.wad b/maps/titlemap.wad index 911cfef..5a63358 100644 Binary files a/maps/titlemap.wad and b/maps/titlemap.wad differ diff --git a/menudef.txt b/menudef.txt index 9fc8edd..da626e1 100644 --- a/menudef.txt +++ b/menudef.txt @@ -3,6 +3,12 @@ OptionValue "BetaToggle" 0, "Normal" 1, "Beta" } +OptionValue "BetaToggleMenu" +{ + 0, "Normal" + 1, "Beta" + 2, "Beta (Alt. music)" +} OptionValue "ColorPrefs" { 0, "Team" @@ -14,7 +20,8 @@ OptionMenu "UTOptionMenu" Title "UT Options" StaticText "Menu Options", "Gold" - Option "Menu Type", "flak_protomenu", "BetaToggle" + Option "Show Menu", "flak_showmenu", "YesNo" + Option "Menu Type", "flak_protomenu", "BetaToggleMenu" Command "Apply Changes", "event refreshmenu" StaticText " " StaticText "Item Options", "Gold" @@ -26,10 +33,17 @@ OptionMenu "UTOptionMenu" Option "Redeemer Target Visuals", "flak_redeemerreadout", "YesNo" StaticText " " StaticText "HUD Options", "Gold" + Option "Show Weapon Bar", "flak_showweapons", "YesNo" + Option "Show Status Doll", "flak_showstatus", "YesNo" + Option "Show Frags", "flak_showfrags", "YesNo" + Option "Show Ammo", "flak_showammo", "YesNo" + Option "Show Player Names", "flak_showinfo", "YesNo" + Slider "HUD Size", "flak_hudsize", 0.2, 1.0, 0.2, 1 + Slider "Weapon Bar Size", "flak_weaponsize", 0.2, 1.0, 0.2, 1 + Slider "Status Doll Size", "flak_statussize", 0.5, 1.5, 0.1, 1 Option "Color Choice", "flak_colorprefs", "ColorPrefs" ColorPicker "Custom Color", "flak_colorcustom" - Slider "HUD Opacity", "flak_opacity", 0.5, 1, 0.05, 2 - ColorPicker "Background Color", "flak_bgcolor" + Slider "HUD Opacity", "flak_opacity", 1, 16, 1, 0 } AddOptionMenu "OptionsMenu" diff --git a/music/menu2.it b/music/menu2.it new file mode 100644 index 0000000..9c6099e Binary files /dev/null and b/music/menu2.it differ diff --git a/readme.txt b/readme.txt index a45d32c..3589b1d 100644 --- a/readme.txt +++ b/readme.txt @@ -1,6 +1,6 @@ DOOM TOURNAMENT -What began as a test for importing UT vertex meshes is turning into an actual +What began as a test for importing UT vertex meshes has turned into an actual full UT weapon and item mod. Currently implemented: @@ -39,21 +39,19 @@ Currently implemented: - Minigun (slot 7) - Sniper Rifle (slot 0) - Rocket Launcher (slot 9) + - Scaling/Customization options for the HUD In progress: - - Add some more effects, maybe some nicer recoil on guns too. - - General polishing and bugfixing. - - Trim out unused animations. - -TODO: - - - Scaling/Customization options for the HUD. + - Make biorifle sludge follow ceiling and wall movement (this might be hard) + - Add some more effects, maybe some nicer recoil on guns too + - General polishing and bugfixing + - Trim out unused animations Known bugs: - - Sometimes the slave enforcer gets "lowered" while the main enforcer is - reloading. No idea what causes this. - - Sludge doesn't react to ceiling and wall movement. + - Sometimes the slave enforcer has its psprite "lower" slightly while the main + enforcer is reloading. No idea what causes this (Could be bobbing-related) + - Sludge doesn't react to ceiling and wall movement - Pulse gun beams behave oddly when the player is on moving platforms. - This might just be a rendering interpolation glitch, as usual. \ No newline at end of file + This might just be a rendering interpolation glitch, as usual \ No newline at end of file diff --git a/textures/DTLogo.png b/textures/DTLogo.png new file mode 100644 index 0000000..37b133b Binary files /dev/null and b/textures/DTLogo.png differ diff --git a/zscript/armoritems.zsc b/zscript/armoritems.zsc index f51ace5..5b48928 100644 --- a/zscript/armoritems.zsc +++ b/zscript/armoritems.zsc @@ -60,8 +60,6 @@ Class UTThighPads : UTArmor replaces GreenArmor UTArmor.ArmorAbsorption 50; Inventory.PickupMessage "You got the Thigh Pads."; Inventory.PickupSound "misc/ut_armor"; - Radius 8; - Height 20; } States { @@ -82,8 +80,6 @@ Class UTBodyArmor : UTArmor replaces BlueArmor UTArmor.ArmorAbsorption 75; Inventory.PickupMessage "You got the Body Armor."; Inventory.PickupSound "misc/ut_armor"; - Radius 10; - Height 20; } States { @@ -99,7 +95,7 @@ Class UTShieldBelt : UTArmor replaces Megasphere { if ( (amount > 0) && !DamageTypeDefinition.IgnoreArmor(damageType) ) { - Owner.A_PlaySound("belt/absorb"); + Owner.A_PlaySound("belt/absorb",CHAN_7); UTMainHandler.DoFlash(Owner,Color(80,255,224,0),5); } Super.AbsorbDamage(damage,damageType,newdamage); @@ -141,8 +137,6 @@ Class UTShieldBelt : UTArmor replaces Megasphere Inventory.PickupMessage "You got the Shield Belt."; Inventory.PickupSound "belt/pickup"; Inventory.RespawnTics 2100; - Radius 10; - Height 8; } States { diff --git a/zscript/biorifle.zsc b/zscript/biorifle.zsc index 12c2781..d8a854b 100644 --- a/zscript/biorifle.zsc +++ b/zscript/biorifle.zsc @@ -28,8 +28,6 @@ Class BioAmmo : Ammo Ammo.BackpackAmount 50; Ammo.BackpackMaxAmount 100; Ammo.DropAmount 10; - Radius 8; - Height 8; } States { @@ -497,9 +495,6 @@ Class BioRifle : UTWeapon Weapon.AmmoType2 "BioAmmo"; Weapon.AmmoUse2 1; Weapon.AmmoGive 25; - Radius 10; - Height 16; - UTWeapon.DroppedHeight 14; } States { diff --git a/zscript/chainsaw.zsc b/zscript/chainsaw.zsc index df0b077..ab850fd 100644 --- a/zscript/chainsaw.zsc +++ b/zscript/chainsaw.zsc @@ -147,9 +147,6 @@ Class UTChainsaw : UTWeapon Weapon.SelectionOrder 9; +WEAPON.MELEEWEAPON; +FORCEPAIN; - Radius 20; - Height 16; - UTWeapon.DroppedHeight 12; } States { @@ -247,7 +244,7 @@ Class UTChainsaw : UTWeapon Goto Ready; Deselect: CSWD A 0 A_PlaySound("chainsaw/lower",CHAN_6); - CSWD ABCDEF 2; + CSWD ABCDEF 1; CSWD F 1 A_Lower(int.max); Wait; } diff --git a/zscript/eightball.zsc b/zscript/eightball.zsc index 4a4108b..753f76e 100644 --- a/zscript/eightball.zsc +++ b/zscript/eightball.zsc @@ -9,8 +9,6 @@ Class UTRocketAmmo : Ammo Ammo.BackpackAmount 12; Ammo.BackpackMaxAmount 48; Ammo.DropAmount 3; - Radius 4; - Height 14; } States { @@ -29,8 +27,6 @@ Class UTRocketAmmo2 : UTRocketAmmo Inventory.PickupMessage "You picked up a Single Rocket."; Inventory.Amount 1; Ammo.DropAmount 1; - Radius 2; - Height 13; } States { @@ -238,7 +234,7 @@ Class UTRocketLauncher : UTWeapon lockontex = TexMan.CheckForTexture("Crosshr6",TexMan.Type_Any); } - override void PostRender() + override void PreRender( double lbottom ) { if ( LockedTarget ) Screen.DrawTexture(lockontex,false,Screen.GetWidth()*0.5,Screen.GetHeight()*0.5); } @@ -351,6 +347,7 @@ Class UTRocketLauncher : UTWeapon } } // lose lock-on + if ( invoker.LockedOn ) A_PlaySound("utrl/seeklost",CHAN_6); invoker.LockedTarget = null; invoker.LockedOn = false; } @@ -393,9 +390,6 @@ Class UTRocketLauncher : UTWeapon Weapon.AmmoType2 "UTRocketAmmo"; Weapon.AmmoUse2 1; Weapon.AmmoGive 6; - Radius 20; - Height 16; - UTWeapon.DroppedHeight 12; } States { diff --git a/zscript/enforcer.zsc b/zscript/enforcer.zsc index 9bb7821..9a883fc 100644 --- a/zscript/enforcer.zsc +++ b/zscript/enforcer.zsc @@ -6,8 +6,6 @@ Class EClip : MiniAmmo replaces Clip Inventory.PickupMessage "You picked up a Clip."; Inventory.Amount 20; Ammo.DropAmount 5; - Radius 8; - Height 6; } States { @@ -159,11 +157,11 @@ Class Enforcer : UTWeapon replaces Pistol property ClipCount : ClipCount; property SlaveClipCount : SlaveClipCount; - override void PostRender() + override void PostRender( double lbottom ) { if ( !CVar.GetCVar('flak_enforcerreload').GetBool() ) return; - if ( Amount > 1 ) Screen.DrawText(confont,Font.CR_GREEN,Screen.GetWidth()*0.01,Screen.GetHeight()*0.9-confont.GetHeight()*2,String.Format("L Clip: %2d / 20\nR Clip: %2d / 20",slaveclipcount,clipcount)); - else Screen.DrawText(confont,Font.CR_GREEN,Screen.GetWidth()*0.01,Screen.GetHeight()*0.9-confont.GetHeight(),String.Format("Clip: %2d / 20",clipcount)); + if ( Amount > 1 ) Screen.DrawText(confont,Font.CR_GREEN,Screen.GetWidth()*0.01,lbottom-Screen.GetHeight()*0.01-confont.GetHeight()*2,String.Format("L Clip: %2d / 20\nR Clip: %2d / 20",slaveclipcount,clipcount)); + else Screen.DrawText(confont,Font.CR_GREEN,Screen.GetWidth()*0.01,lbottom-Screen.GetHeight()*0.01-confont.GetHeight(),String.Format("Clip: %2d / 20",clipcount)); } override bool HandlePickup( Inventory item ) @@ -204,7 +202,7 @@ Class Enforcer : UTWeapon replaces Pistol if ( !weap || !player ) return; if ( slave ) { - if ( CVar.GetCVar('flak_enforcerreload').GetBool() && (invoker.slaveclipcount < 5) ) A_PlaySound("enforcer/click",CHAN_7); + if ( CVar.GetCVar('flak_enforcerreload').GetBool() && (invoker.slaveclipcount < 5) ) A_PlaySound("enforcer/click",CHAN_6); if ( (invoker.slaveclipcount <= 0) || (weap.Ammo1.Amount <= 0) ) { invoker.slaverefire = 0; @@ -277,7 +275,7 @@ Class Enforcer : UTWeapon replaces Pistol } invoker.FireEffect(); UTMainHandler.DoFlash(self,Color(32,255,128,0),1); - A_PlaySound("enforcer/shoot",slave?CHAN_7:CHAN_WEAPON); + A_PlaySound("enforcer/shoot",slave?CHAN_6:CHAN_WEAPON); A_AlertMonsters(); A_QuakeEx(2,2,2,4,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.08); if ( slave ) @@ -362,9 +360,6 @@ Class Enforcer : UTWeapon replaces Pistol Weapon.AmmoGive 30; Enforcer.ClipCount 20; Enforcer.SlaveClipCount 20; - Radius 8; - Height 16; - UTWeapon.DroppedHeight 8; } States { @@ -391,7 +386,7 @@ Class Enforcer : UTWeapon replaces Pistol LeftReady: 2NFS A 0 { - A_PlaySound("enforcer/select",CHAN_7); + A_PlaySound("enforcer/select",CHAN_6); invoker.slaveactive = true; } 2NFS ABCDEFGHIJKLMNOPQRSTUVWXYZ 1 A_JumpIf(invoker.slavedown,"LeftDeselect"); @@ -486,18 +481,18 @@ Class Enforcer : UTWeapon replaces Pistol invoker.slaveclipcount = Min(20,invoker.Ammo1.Amount); invoker.slavereload = false; A_Overlay(-9998,"Null"); - A_PlaySound("enforcer/click",CHAN_7); + A_PlaySound("enforcer/click",CHAN_6); } 2NFR ABCDEFGHIJKLMNOPQRSTUVWXYZ 1; 2NR2 AB 1; - 2NR2 B 30 A_PlaySound("enforcer/reload",CHAN_7); - 2NFS A 0 A_PlaySound("enforcer/select",CHAN_7); + 2NR2 B 30 A_PlaySound("enforcer/reload",CHAN_6); + 2NFS A 0 A_PlaySound("enforcer/select",CHAN_6); Goto LeftReady; Deselect: ENFI A 1 { invoker.slavedown = true; } ENFD A 0 A_Overlay(-9999,"Null"); ENFD A 0 A_JumpIf(invoker.slaveactive,"Deselect"); - ENFD ABCDEFGHIJKL 1; + ENFD ABDEGHJK 1; ENFD L 1 A_Lower(int.max); Wait; LeftDeselect: @@ -506,7 +501,8 @@ Class Enforcer : UTWeapon replaces Pistol A_Overlay(-9998,"Null"); invoker.slaveactive = false; } - 2NFD ABCDEFGHIJKL 1; + 2NFD ABDEGHJK 1; + 2NFD L 0; Stop; MuzzleFlash: EMUZ A 2 Bright diff --git a/zscript/flakcannon.zsc b/zscript/flakcannon.zsc index 4be0da2..7987716 100644 --- a/zscript/flakcannon.zsc +++ b/zscript/flakcannon.zsc @@ -35,8 +35,6 @@ Class FlakAmmo : Ammo Ammo.BackpackAmount 20; Ammo.BackpackMaxAmount 50; Ammo.DropAmount 5; - Radius 10; - Height 8; } States { @@ -54,8 +52,6 @@ Class FlakAmmo2 : FlakAmmo Inventory.PickupMessage "You picked up a Flak Shell."; Inventory.Amount 1; Ammo.DropAmount 1; - Radius 4; - Height 6; } States { @@ -557,9 +553,6 @@ Class FlakCannon : UTWeapon Weapon.AmmoType2 "FlakAmmo"; Weapon.AmmoUse2 1; Weapon.AmmoGive 10; - Radius 12; - Height 16; - UTWeapon.DroppedHeight 16; } States { @@ -569,10 +562,10 @@ Class FlakCannon : UTWeapon FPCK B -1; Stop; Ready: - FLKS ABCDEFGHIJKLMNOPQRSTUVWXYZ 1 A_WeaponReady(WRF_NOFIRE); - FKS2 ABC 1 A_WeaponReady(WRF_NOFIRE); + FLKS ABDEGHJKMNPQSTVWYZ 1 A_WeaponReady(WRF_NOFIRE); + FKS2 BC 1 A_WeaponReady(WRF_NOFIRE); FLKL A 1 A_Loading(true); - FLKL BCDEFGHIJKLMNO 1; + FLKL BCEFGIJKMNO 1; Goto Idle; Loading: FLKL A 1 @@ -580,7 +573,7 @@ Class FlakCannon : UTWeapon A_CheckReload(); if ( invoker.Ammo1.Amount > 0 ) A_Loading(); } - FLKL BCDEFGHIJKLMNO 1; + FLKL BCEFGIJKMNO 1; Idle: FLKI A 10; FLKI A 1 A_WeaponReady(); @@ -599,7 +592,7 @@ Class FlakCannon : UTWeapon FLKS A 1 A_Raise(int.max); Wait; Deselect: - FLKD ABCDEFGHIJ 2; + FLKD ABCDEFGHIJ 1; FLKD J 1 A_Lower(int.max); Wait; MuzzleFlash: diff --git a/zscript/healitems.zsc b/zscript/healitems.zsc index 64b3f74..08df1b9 100644 --- a/zscript/healitems.zsc +++ b/zscript/healitems.zsc @@ -12,8 +12,6 @@ Class UTHealthPack : Health replaces Soulsphere Inventory.PickupMessage "You picked up the Big Keg O' Health."; Inventory.PickupSound "misc/ut_keg"; Inventory.RespawnTics 3500; - Radius 18; - Height 30; } States { @@ -32,8 +30,6 @@ Class UTHealthBox : Health replaces Medikit Inventory.PickupMessage "You picked up a Health Box."; Health.LowMessage 25,"You picked up a Health Box that you REALLY need!"; Inventory.PickupSound "misc/ut_heal"; - Radius 16; - Height 12; } States { @@ -52,8 +48,6 @@ Class UTMedBox : Health replaces Stimpack Inventory.PickupMessage "You picked up a Health Pack."; Inventory.PickupSound "misc/ut_heal"; Inventory.RespawnTics 700; - Radius 12; - Height 10; } States { @@ -75,8 +69,6 @@ Class UTHealthBonus : Health replaces HealthBonus Inventory.PickupMessage "You picked up a Health Vial."; Inventory.PickupSound "misc/ut_heal"; RenderStyle "Add"; - Radius 2; - Height 16; } States { diff --git a/zscript/impacthammer.zsc b/zscript/impacthammer.zsc index dae5169..31a12ad 100644 --- a/zscript/impacthammer.zsc +++ b/zscript/impacthammer.zsc @@ -289,7 +289,7 @@ Class ImpactHammer : UTWeapon replaces Fist Goto Idle; Deselect: IMPD A 0 A_StopSound(CHAN_WEAPON); - IMPD ABCDE 3; + IMPD ABCDE 2; IMPD E 1 A_Lower(int.max); Wait; } diff --git a/zscript/minigun.zsc b/zscript/minigun.zsc index 33d3e42..4ef5870 100644 --- a/zscript/minigun.zsc +++ b/zscript/minigun.zsc @@ -35,8 +35,6 @@ Class MiniAmmo : Ammo Ammo.BackpackAmount 100; Ammo.BackpackMaxAmount 199; Ammo.DropAmount 20; - Radius 12; - Height 14; } States { @@ -194,9 +192,6 @@ Class Minigun : UTWeapon Weapon.AmmoType2 "MiniAmmo"; Weapon.AmmoUse2 1; Weapon.AmmoGive 50; - Radius 20; - Height 16; - UTWeapon.DroppedHeight 8; } States { @@ -412,8 +407,8 @@ Class Minigun : UTWeapon MGU2 ABCDEFGHIJKLM 1; Goto Idle; Deselect: - MGND A 2 A_StopSound(CHAN_WEAPON); - MGND BCDEFGHIJ 2; + MGND A 1 A_StopSound(CHAN_WEAPON); + MGND BCDEFGHIJ 1; MGND J 1 A_Lower(int.max); Wait; MuzzleFlash: diff --git a/zscript/powerups.zsc b/zscript/powerups.zsc index fa7c9d4..25c35fe 100644 --- a/zscript/powerups.zsc +++ b/zscript/powerups.zsc @@ -12,8 +12,6 @@ Class UDamage : PowerupGiver replaces Berserk Powerup.Type "DamageAmplifier"; Inventory.PickupSound "udamage/pickup"; Inventory.RespawnTics 4200; - Radius 15; - Height 40; } override void PostBeginPlay() { @@ -79,7 +77,7 @@ Class DamageAmplifier : Powerup { Super.DoEffect(); if ( (EffectTics == 175) || (EffectTics == 140) || (EffectTics == 105) || (EffectTics == 70) || (EffectTics == 35) ) - Owner.A_PlaySound("udamage/drain",CHAN_6,1.0,false,0.25); + Owner.A_PlaySound("udamage/drain",CHAN_7,1.0,false,0.25); } override void EndEffect() @@ -95,8 +93,8 @@ Class DamageAmplifier : Powerup void FireEffect() { - if ( EffectTics < 350 ) Owner.A_PlaySound("udamage/fire2",CHAN_5,1.0,false,0.25); - else Owner.A_PlaySound("udamage/fire1",CHAN_5,1.0,false,0.25); + if ( EffectTics < 350 ) Owner.A_PlaySound("udamage/fire2",CHAN_7,1.0,false,0.25); + else Owner.A_PlaySound("udamage/fire1",CHAN_7,1.0,false,0.25); UTMainHandler.DoFlash(Owner,Color(96,238,0,255),10); } @@ -198,8 +196,6 @@ Class UTBackpack : BackpackItem replaces Backpack Tag "Backpack"; Inventory.PickupMessage "You got a Backpack."; Inventory.RespawnTics 2100; - Radius 10; - Height 32; } States { @@ -239,8 +235,6 @@ Class UTInvisibility : PowerupGiver replaces BlurSphere Inventory.PickupMessage "You have Invisibility."; Inventory.PickupSound "invis/pickup"; Inventory.RespawnTics 4200; - Radius 6; - Height 20; } override void PostBeginPlay() { @@ -298,8 +292,6 @@ Class UTMapRevealer : MapRevealer replaces Allmap Inventory.MaxAmount 0; Inventory.PickupSound "trans/pickup"; Inventory.PickupMessage "You got the Computer Map."; - Radius 10; - Height 4; } States { @@ -321,8 +313,6 @@ Class UTJumpBoots : Inventory replaces RadSuit Inventory.PickupMessage "You picked up the AntiGrav boots."; Inventory.PickupSound "boot/pickup"; Inventory.RespawnTics 1050; - Radius 9; - Height 14; } override bool Use( bool pickup ) { @@ -407,8 +397,6 @@ Class Searchlight : Inventory replaces Infrared Inventory.MaxAmount 200; Inventory.InterHubAmount 0; Inventory.PickupMessage "You picked up the Searchlight."; - Radius 10; - Height 16; } override bool Use( bool pickup ) diff --git a/zscript/pulsegun.zsc b/zscript/pulsegun.zsc index c28d800..1864e9e 100644 --- a/zscript/pulsegun.zsc +++ b/zscript/pulsegun.zsc @@ -27,8 +27,6 @@ Class PulseAmmo : Ammo Ammo.BackpackAmount 50; Ammo.BackpackMaxAmount 199; Ammo.DropAmount 10; - Radius 5; - Height 12; } States { @@ -415,10 +413,10 @@ Class PulseGun : UTWeapon Property ClipCount : clipcount; - override void PostRender() + override void PostRender( double lbottom ) { if ( !CVar.GetCVar('flak_pulsereload').GetBool() ) return; - Screen.DrawText(confont,Font.CR_GREEN,Screen.GetWidth()*0.01,Screen.GetHeight()*0.9-confont.GetHeight(),String.Format("Clip: %2d / 50",clipcount)); + Screen.DrawText(confont,Font.CR_GREEN,Screen.GetWidth()*0.01,lbottom-Screen.GetHeight()*0.01-confont.GetHeight(),String.Format("Clip: %2d / 50",clipcount)); } action void A_Reloading() @@ -536,9 +534,6 @@ Class PulseGun : UTWeapon Weapon.AmmoUse2 1; Weapon.AmmoGive 60; PulseGun.ClipCount 50; - Radius 18; - Height 16; - UTWeapon.DroppedHeight 12; } States { @@ -645,8 +640,8 @@ Class PulseGun : UTWeapon PGR2 ABCDEFGHIJKLMNOPQRSTUVWX 1; Goto Idle; Deselect: - PGNS W 0 A_StopSound(CHAN_WEAPON); - PGNS WVUTSRQPONMLKJIHGFEDCBA 1; + PGNS W 1 A_StopSound(CHAN_WEAPON); + PGNS VTSQPNMKJHGEDBA 1; PGNS A 1 A_Lower(int.max); Wait; Select: diff --git a/zscript/ripper.zsc b/zscript/ripper.zsc index 9a2bfc9..a65688d 100644 --- a/zscript/ripper.zsc +++ b/zscript/ripper.zsc @@ -9,8 +9,6 @@ Class RipperAmmo : Ammo Ammo.BackpackAmount 50; Ammo.BackpackMaxAmount 75; Ammo.DropAmount 10; - Radius 4; - Height 21; } States { @@ -253,9 +251,6 @@ Class Ripper2 : UTWeapon Weapon.AmmoType2 "RipperAmmo"; Weapon.AmmoUse2 1; Weapon.AmmoGive 15; - Radius 20; - Height 16; - UTWeapon.DroppedHeight 16; } action void A_RazorFire( bool alt = false ) { @@ -311,7 +306,7 @@ Class Ripper2 : UTWeapon RZRF HIJKLMNO 1; Goto Idle; Deselect: - RZRD ABCDEF 2; + RZRD ABCDEF 1; RZRD F 1 A_Lower(int.max); Wait; } diff --git a/zscript/shockrifle.zsc b/zscript/shockrifle.zsc index 5e95676..71570ca 100644 --- a/zscript/shockrifle.zsc +++ b/zscript/shockrifle.zsc @@ -9,8 +9,6 @@ Class ShockAmmo : Ammo Ammo.BackpackAmount 20; Ammo.BackpackMaxAmount 50; Ammo.DropAmount 5; - Radius 4; - Height 23; } States { @@ -958,9 +956,6 @@ Class ShockRifle : UTWeapon Weapon.AmmoType2 "ShockAmmo"; Weapon.AmmoUse2 1; Weapon.AmmoGive 20; - Radius 20; - Height 16; - UTWeapon.DroppedHeight 8; } States { @@ -987,7 +982,7 @@ Class ShockRifle : UTWeapon ASMA BCDEFGHIJ 2; Goto Idle; Deselect: - ASMD ABCDEFG 2; + ASMD ABCDEFG 1; ASMD G 1 A_Lower(int.max); Wait; Select: @@ -1007,8 +1002,6 @@ Class EnhancedShockAmmo : Ammo Ammo.BackpackAmount 0; Ammo.BackpackMaxAmount 25; Ammo.DropAmount 2; - Radius 4; - Height 23; } States { @@ -1072,9 +1065,6 @@ Class EnhancedShockRifle : UTWeapon replaces InvulnerabilitySphere Weapon.AmmoType2 "EnhancedShockAmmo"; Weapon.AmmoUse2 1; Weapon.AmmoGive 25; - Radius 20; - Height 16; - UTWeapon.DroppedHeight 8; } States { @@ -1101,7 +1091,7 @@ Class EnhancedShockRifle : UTWeapon replaces InvulnerabilitySphere ASMA BCDEFGHIJ 2; Goto Idle; Deselect: - ASMD ABCDEFG 2; + ASMD ABCDEFG 1; ASMD G 1 A_Lower(int.max); Wait; Select: diff --git a/zscript/sniperrifle.zsc b/zscript/sniperrifle.zsc index 181ba8b..d5a987a 100644 --- a/zscript/sniperrifle.zsc +++ b/zscript/sniperrifle.zsc @@ -9,8 +9,6 @@ Class RifleAmmo : Ammo Ammo.BackpackAmount 20; Ammo.BackpackMaxAmount 50; Ammo.DropAmount 5; - Radius 6; - Height 12; } States { @@ -28,8 +26,6 @@ Class RifleAmmo2 : RifleAmmo Inventory.PickupMessage "You got a Rifle Round."; Inventory.Amount 1; Ammo.DropAmount 1; - Radius 2; - Height 8; } States { @@ -57,10 +53,10 @@ Class SniperRifle : UTWeapon Super.PostBeginPlay(); reticle = TexMan.CheckForTexture("RReticle",Texman.Type_Any); } - override void PreRender() + override void PreRender( double lbottom ) { if ( sniperzoom <= 1.0 ) return; - Screen.DrawTexture(reticle,false,320,240,DTA_VirtualWidth,640,DTA_VirtualHeight,480); + Screen.DrawTexture(reticle,false,320,240,DTA_VirtualWidth,640,DTA_VirtualHeight,480,DTA_RenderStyle,(1|2<<8|1<<16)); Screen.DrawText(confont,Font.CR_DARKGREEN,192,160,String.Format("X%.1f",sniperzoom),DTA_Clean,true); } action void A_SniperFire( bool zoomed = false ) @@ -142,9 +138,6 @@ Class SniperRifle : UTWeapon Weapon.AmmoType2 "RifleAmmo"; Weapon.AmmoUse2 1; Weapon.AmmoGive 8; - Radius 20; - Height 16; - UTWeapon.DroppedHeight 10; } States { @@ -162,22 +155,7 @@ Class SniperRifle : UTWeapon A_ZoomFactor(invoker.sniperzoom=1.0,ZOOM_INSTANT); A_WeaponReady(WRF_NOFIRE); } - SRFS B 2 A_WeaponReady(WRF_NOFIRE); - SRFS C 1 A_WeaponReady(WRF_NOFIRE); - SRFS D 2 A_WeaponReady(WRF_NOFIRE); - SRFS E 1 A_WeaponReady(WRF_NOFIRE); - SRFS F 2 A_WeaponReady(WRF_NOFIRE); - SRFS G 1 A_WeaponReady(WRF_NOFIRE); - SRFS H 2 A_WeaponReady(WRF_NOFIRE); - SRFS I 1 A_WeaponReady(WRF_NOFIRE); - SRFS J 2 A_WeaponReady(WRF_NOFIRE); - SRFS K 1 A_WeaponReady(WRF_NOFIRE); - SRFS L 2 A_WeaponReady(WRF_NOFIRE); - SRFS M 1 A_WeaponReady(WRF_NOFIRE); - SRFS N 2 A_WeaponReady(WRF_NOFIRE); - SRFS O 1 A_WeaponReady(WRF_NOFIRE); - SRFS P 2 A_WeaponReady(WRF_NOFIRE); - SRFS Q 1 A_WeaponReady(WRF_NOFIRE); + SRFS BCDEFGHIJKLMNOPQ 1 A_WeaponReady(WRF_NOFIRE); Idle: SRFI A 1 { @@ -230,7 +208,7 @@ Class SniperRifle : UTWeapon Goto Idle; Deselect: SRFD A 0 A_ZoomFactor(invoker.sniperzoom=1.0,ZOOM_INSTANT); - SRFD ABCDEFG 2; + SRFD ABCDEFG 1; SRFD G 1 A_Lower(int.max); Wait; MuzzleFlash: diff --git a/zscript/translocator.zsc b/zscript/translocator.zsc index cdec0d2..60e0831 100644 --- a/zscript/translocator.zsc +++ b/zscript/translocator.zsc @@ -288,6 +288,7 @@ Class Translocator : UTWeapon p.target = self; p.angle = angle; p.pitch = BulletSlope(); + p.A_SetSize(radius); Vector3 dir = (cos(p.angle)*cos(p.pitch),sin(p.angle)*cos(p.pitch),-sin(p.pitch)); dir.z += 0.35*(1-abs(dir.z)); p.vel = dir*p.speed; @@ -323,10 +324,13 @@ Class Translocator : UTWeapon } // check if there's enough space Vector3 oldpos = pos, newpos = invoker.module.pos; + double modulefloorz = invoker.module.floorz, moduleceilingz = invoker.module.ceilingz; bool bBroken = invoker.module.bAMBUSH; invoker.module.Destroy(); invoker.FireEffect(); A_AlertMonsters(); + // squeeze down new z if ceiling is in the way + if ( (newpos.z+height > moduleceilingz) ) newpos.z = max(modulefloorz,moduleceilingz-height); if ( Warp(self,newpos.x,newpos.y,newpos.z,flags:WARPF_ABSOLUTEPOSITION|WARPF_TESTONLY) && TeleportMove(newpos,true) ) { SpawnTeleportFog(oldpos,true,false); @@ -357,9 +361,6 @@ Class Translocator : UTWeapon Weapon.SlotNumber 1; Weapon.SelectionOrder 10; +WEAPON.NO_AUTO_SWITCH; - Radius 5; - Height 16; - UTWeapon.DroppedHeight 4; } States { @@ -412,11 +413,11 @@ Class Translocator : UTWeapon Goto Idle2; Deselect: TLCD A 0 A_JumpIf(invoker.module,"Deselect2"); - TLCD ABCDEFG 2; + TLCD ABCDEFG 1; TLCD G 1 A_Lower(int.max); Wait; Deselect2: - TLD2 ABCDEFG 2; + TLD2 ABCDEFG 1; TLD2 G 1 A_Lower(int.max); Wait; } diff --git a/zscript/utcommon.zsc b/zscript/utcommon.zsc index ac91fd6..af59eee 100644 --- a/zscript/utcommon.zsc +++ b/zscript/utcommon.zsc @@ -1,11 +1,16 @@ Class UTPlayer : DoomPlayer { + bool lastground; + double lastvelz, prevvelz; + Default { Player.StartItem "MiniAmmo", 30; Player.StartItem "Enforcer"; Player.StartItem "Translocator"; Player.StartItem "ImpactHammer"; + Player.DamageScreenColor "FF 00 00", 1.0; + Player.ViewHeight 46; } // Have to modify the give cheat to handle UT armor @@ -163,7 +168,12 @@ Class UTPlayer : DoomPlayer Super.Tick(); double ang = level.time/(20*TICRATE/35.)*360.; if ( (abs(sin(ang)) >= 1.0) && player.onground && (player.cmd.forwardmove || player.cmd.sidemove) ) - A_PlaySound("ut/playerfootstep",CHAN_BODY); + A_PlaySound("ut/playerfootstep",CHAN_5,abs(vel.xy.length())*0.03); + if ( player.onground && !bNoGravity && !lastground && (lastvelz < -2) && (lastvelz >= -8) ) + A_PlaySound("*land",CHAN_AUTO,abs(lastvelz*0.0625)); + lastground = player.onground; + lastvelz = prevvelz; + prevvelz = vel.z; } } @@ -184,14 +194,10 @@ Class RandomSpawner2 : RandomSpawner Class UTWeapon : Weapon { - double droppedheight; - - Property DroppedHeight : droppedheight; - // Drawstuffs under HUD - virtual ui void PreRender() {} + virtual ui void PreRender( double lbottom ) {} // Drawstuffs over HUD - virtual ui void PostRender() {} + virtual ui void PostRender( double lbottom ) {} override Inventory CreateTossable( int amt ) { @@ -201,7 +207,6 @@ Class UTWeapon : Weapon { d.SetState(d.ResolveState("Spawn")+1); d.bALWAYSPICKUP = true; - d.A_SetSize(-1,UTWeapon(d).droppedheight); } return d; } @@ -210,7 +215,6 @@ Class UTWeapon : Weapon { SetState(ResolveState("Spawn")+1); bALWAYSPICKUP = true; - A_SetSize(-1,droppedheight); return false; } @@ -234,7 +238,6 @@ Class UTWeapon : Weapon Weapon.BobRangeX 0.2; Weapon.BobRangeY 0.4; +WEAPON.NOALERT; - UTWeapon.DroppedHeight 16; } } @@ -700,11 +703,13 @@ Class UTMainHandler : StaticEventHandler override void WorldLoaded( WorldEvent e ) { if ( gamestate != GS_LEVEL || e.IsSaveGame ) return; + // prettify Kinsie's test map for a more Unreal feel if ( level.levelname ~== "Modder Test Map" ) { TexMan.ReplaceTextures("-noflat-","-kinsie-",0); TextureID skytx = TexMan.CheckForTexture("BlueSky",TexMan.Type_Any); level.ChangeSky(skytx,skytx); + // TODO handplace some dynamic lights and add Unreal/UT ambient sounds } } @@ -716,9 +721,11 @@ Class UTMainHandler : StaticEventHandler ui void StartMenu() { if ( gamestate != GS_TITLELEVEL ) return; - if ( CVar.GetCVar('flak_protomenu',players[consoleplayer]).GetBool() ) + int proto = CVar.GetCVar('flak_protomenu',players[consoleplayer]).GetInt(); + if ( proto ) { - S_ChangeMusic("xyzdMenu"); + if ( proto > 1 ) S_ChangeMusic("menu2"); + else S_ChangeMusic("xyzdMenu"); tex = TexMan.CheckForTexture("protobg",TexMan.Type_Any); } else @@ -758,6 +765,7 @@ Class UTMainHandler : StaticEventHandler { if ( gamestate != GS_TITLELEVEL ) return; if ( tex.IsNull() || !tex.IsValid() ) return; + if ( !CVar.GetCVar('flak_showmenu',players[consoleplayer]).GetBool() ) return; Screen.Dim("Black",1.0,0,0,Screen.GetWidth(),Screen.GetHeight()); Screen.DrawTexture(tex,true,0,0,DTA_VirtualWidth,1024,DTA_VirtualHeight,768); } diff --git a/zscript/uthud.zsc b/zscript/uthud.zsc index f2c51a3..05f649c 100644 --- a/zscript/uthud.zsc +++ b/zscript/uthud.zsc @@ -27,17 +27,22 @@ Class UTHud : BaseStatusBar Class IconClasses[14]; double HScale; Color tintcolor, bgcolor; - double opacity; + int opacity; int lastfrag, lastfragcnt, lastpickup, lastslot; ViewTracer vtracer; Actor lastseen; int lastseentic; + bool showweapons, showfrags, showammo, showstatus, showinfo; + double hudsize, weaponsize, statussize; // For easier UT Canvas drawing Color DrawColor, WhiteColor, GoldColor; double CurX, CurY; double FracTic; + // Ugh... + const TINTSTYLE = (1|2<<8|1<<16|12<<24); + override void Init() { Super.Init(); @@ -139,8 +144,40 @@ Class UTHud : BaseStatusBar override void Draw( int state, double TicFrac ) { Super.Draw(state,TicFrac); + if ( players[consoleplayer].camera is 'GuidedWarShell' ) return; + HScale = Screen.GetWidth()/1280.; + switch ( CVar.GetCVar('flak_colorprefs',CPlayer).GetInt() ) + { + case 0: + if ( CPlayer.GetTeam() >= Teams.Size() ) + tintcolor = Color("White"); + else tintcolor = Color(Teams[CPlayer.GetTeam()].mName); + break; + case 1: + tintcolor = CPlayer.GetColor(); + break; + case 2: + tintcolor = Color(CVar.GetCVar('flak_colorcustom',CPlayer).GetString()); + break; + } + opacity = CVar.GetCVar('flak_opacity',players[consoleplayer]).GetInt(); + bgcolor = Color("Black"); + showweapons = CVar.GetCVar('flak_showweapons',players[consoleplayer]).GetBool(); + showstatus = CVar.GetCVar('flak_showstatus',players[consoleplayer]).GetBool(); + showfrags = CVar.GetCVar('flak_showfrags',players[consoleplayer]).GetBool(); + showammo = CVar.GetCVar('flak_showammo',players[consoleplayer]).GetBool(); + showinfo = CVar.GetCVar('flak_showinfo',players[consoleplayer]).GetBool(); + hudsize = CVar.GetCVar('flak_hudsize',players[consoleplayer]).GetFloat(); + weaponsize = CVar.GetCVar('flak_weaponsize',players[consoleplayer]).GetFloat(); + statussize = CVar.GetCVar('flak_statussize',players[consoleplayer]).GetFloat(); + double lbottom = Screen.GetHeight(); + if ( showweapons ) + { + if ( weaponsize*hudsize>=1.0 ) lbottom -= 64*hudsize*HScale; + if ( showfrags ) lbottom -= 64*hudsize*HScale; + } if ( (CPlayer.ReadyWeapon is 'UTWeapon') ) - UTWeapon(CPlayer.ReadyWeapon).PreRender(); + UTWeapon(CPlayer.ReadyWeapon).PreRender(lbottom); if ( (state == HUD_StatusBar) || (state == HUD_Fullscreen) ) { BeginHUD(); @@ -148,7 +185,7 @@ Class UTHud : BaseStatusBar DrawUTHUD(); } if ( (CPlayer.ReadyWeapon is 'UTWeapon') ) - UTWeapon(CPlayer.ReadyWeapon).PostRender(); + UTWeapon(CPlayer.ReadyWeapon).PostRender(lbottom); } private Color LerpColor( Color a, Color b, double x ) @@ -156,26 +193,24 @@ Class UTHud : BaseStatusBar return Color(a.a,int(a.r*(1.-x)+b.r*x),int(a.g*(1.-x)+b.g*x),int(a.b*(1.-x)+b.b*x)); } - private void UTDrawTintedTex( TextureID tx, double sx = 1.0, Color tint = Color("Black") ) + private void UTDrawTintedTex( TextureID tx, double sx = 1.0, int opacity = -1, Color tint = Color("Black") ) { double ss = (HScale*sx); double dw = (Screen.GetWidth()/ss), dh = (Screen.GetHeight()/ss); double dx = CurX/ss, dy = CurY/ss; - Screen.DrawTexture(tx,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_Alpha,opacity,DTA_FillColor,bgcolor); - Screen.DrawTexture(tx,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_AlphaChannel,true,DTA_FillColor,(tint!="Black")?tint:tintcolor); + if ( opacity == -1 ) opacity = self.opacity; + if ( opacity >= 16 ) Screen.DrawTexture(tx,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_FillColor,bgcolor); + double alpha = clamp(opacity/15.,0.0,1.0); + Screen.DrawTexture(tx,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_Alpha,alpha,DTA_RenderStyle,TINTSTYLE,DTA_FillColor,(tint!="Black")?tint:tintcolor); } - private void UTDrawColorTex( TextureID tx, double sx = 1.0, double alpha = 1.0 ) - { - double ss = (HScale*sx); - double dw = (Screen.GetWidth()/ss), dh = (Screen.GetHeight()/ss); - double dx = CurX/ss, dy = CurY/ss; - Screen.DrawTexture(tx,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_AlphaChannel,true,DTA_Alpha,alpha,DTA_FillColor,DrawColor); - } - private void UTDrawPlainTex( TextureID tx, double sx = 1.0, double alpha = 1.0 ) + private void UTDrawPlainTex( TextureID tx, double sx = 1.0, int opacity = -1 ) { double ss = (HScale*sx); double dw = (Screen.GetWidth()/ss), dh = (Screen.GetHeight()/ss); double dx = CurX/ss, dy = CurY/ss; + if ( opacity == -1 ) opacity = self.opacity; + if ( opacity >= 16 ) Screen.DrawTexture(tx,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_FillColor,bgcolor); + double alpha = clamp(opacity/15.,0.0,1.0); Screen.DrawTexture(tx,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_Alpha,alpha); } @@ -184,8 +219,8 @@ Class UTHud : BaseStatusBar for ( int i=0; i<14; i++ ) { if ( !(w is IconClasses[i]) ) continue; - if ( use ) UTDrawTintedTex(Uses[i],sx); - else UTDrawTintedTex(Icons[i],sx,tintcolor/2); + if ( use ) UTDrawTintedTex(Uses[i],sx,opacity+7); + else UTDrawTintedTex(Icons[i],sx,opacity,tintcolor/2); return true; } return false; @@ -201,17 +236,20 @@ Class UTHud : BaseStatusBar String digits = String.Format("%d",min(abs(value),9999)); double flen = 3*step; double len = digits.length()*step; + double alpha = clamp((opacity+7)/15.,0.0,1.0); for ( int i=0; i 15 ) Screen.DrawTexture(BigNum[11],false,CurX/ss,CurY/ss,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_FillColor,bgcolor); + Screen.DrawTexture(BigNum[11],false,CurX/ss,CurY/ss,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_Alpha,alpha,DTA_RenderStyle,TINTSTYLE,DTA_FillColor,DrawColor); CurX += step; } for ( int i=0; i 15 ) Screen.DrawTexture(BigNum[digits.CharCodeAt(i)-0x30],false,CurX/ss,CurY/ss,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_FillColor,bgcolor); + Screen.DrawTexture(BigNum[digits.CharCodeAt(i)-0x30],false,CurX/ss,CurY/ss,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_Alpha,alpha,DTA_RenderStyle,TINTSTYLE,DTA_FillColor,DrawColor); CurX += ((i=1.0) ) CurY -= 64*hudsize*HScale; + UTDrawTintedTex(Boxes[0],hudsize); + CurX += 8*hudsize*HScale; + CurY += 14*hudsize*HScale; DrawColor = WhiteColor; - if ( ammotype1 ) UTDrawBigNum(ammotype1.Amount); + if ( ammotype1 ) UTDrawBigNum(ammotype1.Amount,hudsize); if ( ammotype2 && (ammotype2 != ammotype1) ) { - CurX = Screen.GetWidth()-128*HScale; - CurY = Screen.GetHeight()-128*HScale; + CurX = showweapons?(Screen.GetWidth()-128*hudsize*HScale):((Screen.GetWidth()+256*hudsize*HScale)*0.5); + CurY = showweapons?(Screen.GetHeight()-128*hudsize*HScale):(Screen.GetHeight()-64*hudsize*HScale); + if ( showweapons && ((weaponsize*hudsize)>=1.0) ) CurY -= 64*hudsize*HScale; UTDrawTintedTex(Boxes[0]); - CurX += 8*HScale; - CurY += 14*HScale; - UTDrawBigNum(ammotype2.Amount); + CurX += 8*hudsize*HScale; + CurY += 14*hudsize**HScale; + UTDrawBigNum(ammotype2.Amount,hudsize); } } private void DrawStatus() { - CurX = Screen.GetWidth()-128*HScale; - CurY = 0; - Color dollcolor = tintcolor; - DamageAmplifier d; UTArmor b, a, t, s; - UTJumpBoots j; - d = DamageAmplifier(CPlayer.mo.FindInventory("DamageAmplifier")); b = UTArmor(CPlayer.mo.FindInventory("UTArmorBonus")); a = UTArmor(CPlayer.mo.FindInventory("UTBodyArmor")); t = UTArmor(CPlayer.mo.FindInventory("UTThighPads")); - j = UTJumpBoots(CPlayer.mo.FindInventory("UTJumpBoots")); s = UTArmor(CPlayer.mo.FindInventory("UTShieldBelt")); - if ( d && !d.isBlinking() ) dollcolor = d.BlendColor; - if ( CPlayer.GetGender() == 1 ) + if ( showstatus ) { - UTDrawTintedTex(Woman[0],1.0,dollcolor); - DrawColor = dollcolor; - if ( a ) UTDrawColorTex(Woman[1],1.0,a.Amount/double(a.MaxAmount)); - if ( t ) UTDrawColorTex(Woman[2],1.0,t.Amount/double(t.MaxAmount)); - if ( j ) UTDrawColorTex(Woman[3],1.0,j.Amount/double(j.MaxAmount)); - DrawColor = GoldColor; - if ( s ) UTDrawColorTex(Woman[4],1.0,s.Amount/double(s.MaxAmount)); + CurX = Screen.GetWidth()-128*HScale*hudsize*statussize; + CurY = 0; + Color dollcolor = tintcolor; + DamageAmplifier d; + UTJumpBoots j; + d = DamageAmplifier(CPlayer.mo.FindInventory("DamageAmplifier")); + j = UTJumpBoots(CPlayer.mo.FindInventory("UTJumpBoots")); + if ( d && !d.isBlinking() ) dollcolor = d.BlendColor; + if ( CPlayer.GetGender() == 1 ) + { + UTDrawTintedTex(Woman[0],hudsize*statussize,min(opacity,15),dollcolor); + if ( a ) UTDrawTintedTex(Woman[1],hudsize*statussize,min(opacity,15)*(a.Amount/double(a.MaxAmount)),dollcolor); + if ( t ) UTDrawTintedTex(Woman[2],hudsize*statussize,min(opacity,15)*(t.Amount/double(t.MaxAmount)),dollcolor); + if ( j ) UTDrawTintedTex(Woman[3],hudsize*statussize,min(opacity,15)*(j.Amount/double(j.MaxAmount)),dollcolor); + if ( s ) UTDrawTintedTex(Woman[4],hudsize*statussize,min(opacity,15)*(s.Amount/double(s.MaxAmount)),GoldColor); + } + else + { + UTDrawTintedTex(Man[0],hudsize*statussize,min(opacity,15),dollcolor); + if ( a ) UTDrawTintedTex(Man[1],hudsize*statussize,min(opacity,15)*(a.Amount/double(a.MaxAmount)),dollcolor); + if ( t ) UTDrawTintedTex(Man[2],hudsize*statussize,min(opacity,15)*(t.Amount/double(t.MaxAmount)),dollcolor); + if ( j ) UTDrawTintedTex(Man[3],hudsize*statussize,min(opacity,15)*(j.Amount/double(j.MaxAmount)),dollcolor); + if ( s ) UTDrawTintedTex(Man[4],hudsize*statussize,min(opacity,15)*(s.Amount/double(s.MaxAmount)),GoldColor); + } + } + DrawColor = WhiteColor; + if ( !showstatus && !showweapons ) + { + CurX = Screen.GetWidth()*0.5-128*hudsize*HScale; + CurY = Screen.GetHeight()-64*hudsize*HScale; } else { - UTDrawTintedTex(Man[0],1.0,dollcolor); - DrawColor = dollcolor; - if ( a ) UTDrawColorTex(Man[1],1.0,a.Amount/double(a.MaxAmount)); - if ( t ) UTDrawColorTex(Man[2],1.0,t.Amount/double(t.MaxAmount)); - if ( j ) UTDrawColorTex(Man[3],1.0,j.Amount/double(j.MaxAmount)); - DrawColor = GoldColor; - if ( s ) UTDrawColorTex(Man[4],1.0,s.Amount/double(s.MaxAmount)); + CurX = Screen.GetWidth()-140*hudsize*HScale; + if ( showstatus ) CurX -= 128*statussize*hudsize*HScale; + CurY = 0; } - DrawColor = WhiteColor; - CurX = Screen.GetWidth()-268*HScale; - UTDrawTintedTex(Boxes[1]); + UTDrawTintedTex(Boxes[1],hudsize); int allarmor = 0; if ( b ) allarmor += b.amount; if ( a ) allarmor += a.amount; if ( t ) allarmor += t.amount; if ( s ) allarmor += s.amount; - CurX += 8*HScale; - CurY += 14*HScale; - UTDrawBigNum(Min(199,allarmor)); - CurX = Screen.GetWidth()-268*HScale; - CurY = 64*HScale; + CurX += 8*hudsize*HScale; + CurY += 14*hudsize*HScale; + if ( !showstatus && b ) DrawColor = GoldColor; + UTDrawBigNum(Min(199,allarmor),hudsize); + DrawColor = WhiteColor; + if ( !showstatus && !showweapons ) + { + CurX = Screen.GetWidth()*0.5; + CurY = Screen.GetHeight()-64*hudsize*HScale; + } + else + { + CurX = Screen.GetWidth()-140*hudsize*HScale; + if ( showstatus ) CurX -= 128*statussize*hudsize*HScale; + CurY = 64*hudsize*HScale; + } if ( CPlayer.mo.Health < CPlayer.mo.SpawnHealth()/2 ) { Color blinkcolor; double blinky = ((gametic+fractic)/Thinker.TICRATE)*1.5; blinky = blinky-floor(blinky); blinkcolor = LerpColor(tintcolor,WhiteColor,blinky); - UTDrawTintedTex(Boxes[2],1.0,blinkcolor); + UTDrawTintedTex(Boxes[2],hudsize,-1,blinkcolor); DrawColor = LerpColor(WhiteColor,blinkcolor,blinky); - CurX += 8*HScale; - CurY += 14*HScale; - UTDrawBigNum(max(0,CPlayer.mo.Health)); + CurX += 8*hudsize*HScale; + CurY += 14*hudsize*HScale; + UTDrawBigNum(max(0,CPlayer.mo.Health),hudsize); } else { - UTDrawTintedTex(Boxes[2]); - CurX += 8*HScale; - CurY += 14*HScale; - UTDrawBigNum(Clamp(CPlayer.mo.Health,0,199)); + UTDrawTintedTex(Boxes[2],hudsize); + CurX += 8*hudsize*HScale; + CurY += 14*hudsize*HScale; + UTDrawBigNum(Clamp(CPlayer.mo.Health,0,199),hudsize); } } private void DrawWeapons() { - double BaseX = 128*HScale; - double WeapScale = 0.8*HScale; + double WeapScale = hudsize*weaponsize*HScale; + double BaseX = (Screen.GetWidth()-(1280*WeapScale))*0.5; double BaseY = Screen.GetHeight()-64*WeapScale; double WeaponOffset = 128*WeapScale; let cw = CPlayer.ReadyWeapon; + int cwslot = -1; let pw = CPlayer.PendingWeapon; + int pwslot = -1; if ( cw && (cw.SlotNumber != -1) ) { - int slot = cw.SlotNumber?(cw.SlotNumber-1):9; - CurX = BaseX+slot*WeaponOffset; + cwslot = cw.SlotNumber?(cw.SlotNumber-1):9; + CurX = BaseX+cwslot*WeaponOffset; CurY = BaseY; - UTDrawWeaponIcon(cw,true,0.8); - CurX = BaseX+slot*WeaponOffset; + UTDrawWeaponIcon(cw,true,hudsize*weaponsize); + CurX = BaseX+cwslot*WeaponOffset; CurY = BaseY; - UTDrawPlainTex(WeaponBox,0.8); + UTDrawPlainTex(WeaponBox,hudsize*weaponsize,opacity+7); } if ( pw && (pw.SlotNumber != -1) && (pw != WP_NOCHANGE) ) { - int slot = pw.SlotNumber?(pw.SlotNumber-1):9; - CurX = BaseX+slot*WeaponOffset-64*WeapScale; + pwslot = pw.SlotNumber?(pw.SlotNumber-1):9; + CurX = BaseX+pwslot*WeaponOffset-64*WeapScale; CurY = BaseY-32*WeapScale; - DrawColor = GoldColor; - UTDrawColorTex(Flash,0.8); - CurX = BaseX+slot*WeaponOffset; + UTDrawTintedTex(Flash,hudsize*weaponsize,min(opacity,15),GoldColor); + CurX = BaseX+pwslot*WeaponOffset; CurY = BaseY; - UTDrawWeaponIcon(pw,true,0.8); + UTDrawWeaponIcon(pw,true,hudsize*weaponsize); } Weapon wslots[10]; for ( Inventory i = CPlayer.mo.Inv; i; i=i.Inv ) @@ -351,18 +412,17 @@ Class UTHud : BaseStatusBar CurX = BaseX+i*WeaponOffset; CurY = BaseY; if ( !wslots[i] ) - UTDrawTintedTex(Slots[i],1.6,tintcolor/2); - else if ( (wslots[i] != cw) && (wslots[i] != pw) ) - if ( !UTDrawWeaponIcon(wslots[i],false,0.8) ) - UTDrawTintedTex(Slots[i],1.6,tintcolor/2); + UTDrawTintedTex(Slots[i],2*hudsize*weaponsize,-1,tintcolor/2); + else if ( (i != cwslot) && (i != pwslot) ) + if ( !UTDrawWeaponIcon(wslots[i],false,hudsize*weaponsize) ) + UTDrawTintedTex(Slots[i],2*hudsize*weaponsize,-1,tintcolor/2); } for ( int i=0; i<10; i++ ) { if ( !wslots[i] ) continue; CurX = BaseX+i*WeaponOffset+4*WeapScale; CurY = BaseY+4*WeapScale; - DrawColor = GoldColor; - UTDrawColorTex(BigNum[(i==9)?0:(i+1)],0.6); + UTDrawTintedTex(BigNum[(i==9)?0:(i+1)],0.75*hudsize*weaponsize,opacity+7,GoldColor); if ( !wslots[i].Ammo1 ) continue; CurY = BaseY+52*WeapScale; Vector2 ss = (0.6875,0.5)*WeapScale; @@ -370,13 +430,15 @@ Class UTHud : BaseStatusBar double dx = CurX/ss.x, dy = CurY/ss.y; Vector2 bs = TexMan.GetScaledSize(AmmoBar); double ddw = bs.x*(wslots[i].Ammo1.Amount/double(wslots[i].Ammo1.MaxAmount)); - Screen.DrawTexture(AmmoBar,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_WindowRightF,ddw); + double alpha = clamp((opacity+7)/15.,0.0,1.0); + Screen.DrawTexture(AmmoBar,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_WindowRightF,ddw,DTA_Alpha,alpha); } } private void DrawFragCount() { - CurX = 0; - CurY = Screen.GetHeight()-64*HScale; + CurX = showweapons?0:(Screen.GetWidth()*0.5-256*hudsize*HScale); + CurY = Screen.GetHeight()-64*hudsize*HScale; + if ( showweapons && ((weaponsize*hudsize)>=1.0) ) CurY -= 64*hudsize*HScale; DrawColor = tintcolor; double whiten = ((gametic+fractic)-lastfrag)/Thinker.TICRATE; if ( whiten < 3.0 ) @@ -384,19 +446,19 @@ Class UTHud : BaseStatusBar if ( tintcolor == GoldColor ) DrawColor = WhiteColor; else DrawColor = GoldColor; - CurX -= 64*HScale; - CurY -= 32*HScale; - UTDrawColorTex(Flash); - CurX += 64*HScale; - CurY += 32*HScale; + CurX -= 64*hudsize*HScale; + CurY -= 32*hudsize*HScale; + UTDrawTintedTex(Flash,hudsize,min(opacity,15),DrawColor); + CurX += 64*hudsize*HScale; + CurY += 32*hudsize*HScale; whiten = 4*whiten-int(4*whiten); DrawColor = lerpcolor(tintcolor,DrawColor,whiten); } - UTDrawTintedTex(Boxes[3],1.0,DrawColor); - CurX += 44*HScale; - CurY += 14*HScale; + UTDrawTintedTex(Boxes[3],hudsize,-1,DrawColor); + CurX += 44*hudsize*HScale; + CurY += 14*hudsize*HScale; DrawColor = WhiteColor; - UTDrawBigNum((deathmatch||teamplay)?CPlayer.fragcount:CPlayer.killcount); + UTDrawBigNum((deathmatch||teamplay)?CPlayer.fragcount:CPlayer.killcount,hudsize); } private void DrawIdentifyInfo() { @@ -427,47 +489,42 @@ Class UTHud : BaseStatusBar int nrows = 0, nrowss = 0; for ( int i=0; i<3; i++ ) if ( locks[i] ) nrows++; for ( int i=3; i<6; i++ ) if ( locks[i] ) nrowss++; - CurX = (Screen.GetWidth()-64*HScale); - CurY = (Screen.GetHeight()-nrows*64*HScale)*0.5; - CurY -= max(0,nrows-1)*4*HScale; + CurX = (Screen.GetWidth()-64*hudsize*HScale); + CurY = (Screen.GetHeight()-nrows*64*hudsize*HScale)*0.5; + CurY -= max(0,nrows-1)*4*hudsize*HScale; if ( locks[0] ) { - DrawColor = "Red"; - UTDrawColorTex(Keys[0]); - CurY += 72*HScale; + UTDrawTintedTex(Keys[0],hudsize,min(opacity,15),Color("Red")); + CurY += 72*hudsize*HScale; } if ( locks[1] ) { - DrawColor = "Blue"; - UTDrawColorTex(Keys[1]); - CurY += 72*HScale; + UTDrawTintedTex(Keys[1],hudsize,min(opacity,15),Color("Blue")); + CurY += 72*hudsize*HScale; } if ( locks[2] ) { - DrawColor = "Gold"; - UTDrawColorTex(Keys[2]); - CurY += 72*HScale; + UTDrawTintedTex(Keys[2],hudsize,min(opacity,15),Color("Gold")); + CurY += 72*hudsize*HScale; } - if ( nrows ) CurX -= 56*HScale; - CurY = (Screen.GetHeight()-nrowss*64*HScale)*0.5; - CurY += max(0,nrowss-1)*2*HScale; + if ( nrows ) CurX -= 56*hudsize*HScale; + CurY = (Screen.GetHeight()-nrowss*64*hudsize*HScale)*0.5; + CurY += max(0,nrowss-1)*2*hudsize*HScale; if ( locks[3] ) { DrawColor = "Red"; - UTDrawColorTex(Keys[3]); - CurY += 60*HScale; + UTDrawTintedTex(Keys[3],hudsize,min(opacity,15),Color("Red")); + CurY += 60*hudsize*HScale; } if ( locks[4] ) { - DrawColor = "Blue"; - UTDrawColorTex(Keys[3]); - CurY += 60*HScale; + UTDrawTintedTex(Keys[3],hudsize,min(opacity,15),Color("Blue")); + CurY += 60*hudsize*HScale; } if ( locks[5] ) { - DrawColor = "Gold"; - UTDrawColorTex(Keys[3]); - CurY += 60*HScale; + UTDrawTintedTex(Keys[3],hudsize,min(opacity,15),Color("Gold")); + CurY += 60*hudsize*HScale; } } @@ -493,35 +550,17 @@ Class UTHud : BaseStatusBar private void DrawUTHUD() { - if ( players[consoleplayer].camera is 'GuidedWarShell' ) return; - HScale = Screen.GetWidth()/1280.; - switch ( CVar.GetCVar('flak_colorprefs',CPlayer).GetInt() ) - { - case 0: - if ( CPlayer.GetTeam() >= Teams.Size() ) - tintcolor = Color("White"); - else tintcolor = Color(Teams[CPlayer.GetTeam()].mName); - break; - case 1: - tintcolor = CPlayer.GetColor(); - break; - case 2: - tintcolor = Color(CVar.GetCVar('flak_colorcustom',CPlayer).GetString()); - break; - } - opacity = CVar.GetCVar('flak_opacity',CPlayer).GetFloat(); - bgcolor = Color(CVar.GetCVar('flak_bgcolor',CPlayer).GetString()); // Display Weapons - DrawWeapons(); + if ( showweapons ) DrawWeapons(); // Display Frag count - DrawFragCount(); + if ( showfrags ) DrawFragCount(); // Draw Ammo - DrawAmmo(); + if ( showammo ) DrawAmmo(); // Draw Health/Armor status DrawStatus(); // Display Keys DrawKeys(); // Display Identification Info - if ( CPlayer == players[consoleplayer] ) DrawIdentifyInfo(); + if ( CPlayer == players[consoleplayer] && showinfo ) DrawIdentifyInfo(); } } diff --git a/zscript/warheadlauncher.zsc b/zscript/warheadlauncher.zsc index 30c41ef..e0600cd 100644 --- a/zscript/warheadlauncher.zsc +++ b/zscript/warheadlauncher.zsc @@ -11,8 +11,6 @@ Class WarheadAmmo : Ammo Ammo.BackpackMaxAmount 2; Ammo.DropAmount 1; Inventory.RespawnTics 2100; - Radius 2; - Height 42; } States { @@ -496,17 +494,17 @@ Class RedeemerHUD : HUDMessageBase { for ( int i=0; i