diff --git a/Readme.md b/Readme.md index 43b0e1e..fe36eff 100644 --- a/Readme.md +++ b/Readme.md @@ -11,6 +11,15 @@ This mod requires GZDoom 4.2.0 or later, and runs on top of Doom Tournament. - Backpack (replaces backpack, identical to Doom Tournament version) - Unreal 1 HUD - Translator (has to be spawned in, since it would only be useful for mappers) + - Armor (replaces blue armor) + - Shield Belt (replaces megasphere) + - Power Shield (replaces invulnerability) + - Asbestos Suit (replaces radsuit if map has lava) + - Kevlar Suit (replaces green armor) + - Toxin Suit (replaces radsuit if map has slime) + - Voice Box (rare spawn in backpacks) + - Dampener (rare spawn in backpacks) + - Forcefield (rare spawn in backpacks) ## In progress @@ -19,7 +28,7 @@ This mod requires GZDoom 4.2.0 or later, and runs on top of Doom Tournament. ## Planned - - Implement Stinger behavior described in the Unreal Bible. + - Implement Stinger behavior described in the Unreal Bible - Dispersion Pistol (slot 1) (replaces fist) - Dispersion Pistol Powerup (replaces Berserk) - Automag (slot 2) (replaces pistol) @@ -39,7 +48,7 @@ This mod requires GZDoom 4.2.0 or later, and runs on top of Doom Tournament. - Proto Automag (slot 2) (replaces pistol) - Dual Protomags - Quadshot (slot 3) (replaces shotguns) - - Peacemaker (slot 5) (rare spawn near backpack) + - Peacemaker (slot 5) (rare spawn in backpacks) - Impaler (slot 4) (replaces plasma rifle) - Flamethrower (slot 8) (replaces plasma rifle) - Fireblaster (slot 7) (replaces rocket launcher) @@ -47,27 +56,18 @@ This mod requires GZDoom 4.2.0 or later, and runs on top of Doom Tournament. - Autocannon (slot 0) (replaces bfg9000) - Amplifier (replaces berserk) - - Armor (replaces blue armor) - Flare (replaces armor bonus) - Flashlight (replaces light amplifier) - - Searchlight (replaces light amplifier) + - Searchlight (must be placed manually for balance reasons) - Medkit (replaces medkit) - Bandages (replaces stimpak) - Nali Fruit Seed (replaces health bonus) - Super Health (replaces soulsphere) - Invisibility (replaces blursphere) - - AntiGrav Boots (replaces radsuit) - - Shield Belt (replaces megasphere) - - Power Shield (replaces invulnerability) - - Asbestos Suit (replaces radsuit if map has lava) - - Kevlar Suit (replaces green armor) - - Toxin Suit (replaces radsuit if map has slime) - - Voice Box (rare spawn near backpack) - - Forcefield (rare spawn near backpack) - - Dampener (rare spawn near backpack) + - Jump Boots (replaces radsuit) - Motion Detector (replaces computer map) - - Minigun Sentry (rare spawn near backpack) + - Minigun Sentry (rare spawn in backpacks) ## Known bugs diff --git a/cvarinfo.txt b/cvarinfo.txt index f47fdd5..5de09a0 100644 --- a/cvarinfo.txt +++ b/cvarinfo.txt @@ -2,4 +2,4 @@ user int stinger_hudmode = 0; // hud mode user int stinger_hudscale = 1; // scale of hud (0 = fit to 480p) user int stinger_introtype = 0; // 0 - standard // 1 - unreal '97 - // 2 - unreal '95 \ No newline at end of file + // 2 - unreal '95 diff --git a/gldefs.txt b/gldefs.txt index ad91d37..574f456 100644 --- a/gldefs.txt +++ b/gldefs.txt @@ -1,3 +1,179 @@ +// Lights +PointLight ASMDAMMOLIGHT +{ + Color 0.0 0.4 0.7 + Size 15 + Offset 0 11 8 + Attenuate 1 +} +PointLight ASMDAMMOLIGHT2 +{ + Color 0.0 0.4 0.7 + Size 15 + Offset 0 5 8 + Attenuate 1 +} +Object AsmdAmmo +{ + Frame "SHOA" { light "ASMDAMMOLIGHT" } +} +Object AsmdAmmo2 +{ + Frame "SHOA" { light "ASMDAMMOLIGHT2" } +} +PointLight STINGERAMMOLIGHT +{ + Color 0.1 0.2 0.4 + Size 12 + Offset 0 5 0 + Attenuate 1 +} +PointLight STINGERAMMOLIGHT2 +{ + Color 0.1 0.2 0.4 + Size 12 + Offset 0 12 0 + Attenuate 1 +} +Object StingerAmmo +{ + Frame "SAMO" { light "STINGERAMMOLIGHT" } +} +Object StingerAmmo2 +{ + Frame "SAMO" { light "STINGERAMMOLIGHT2" } +} +PointLight FLAKAMMOLIGHT +{ + Color 0.1 0.4 0.0 + Size 8 + Offset 0 15 4 + Attenuate 1 +} +Object UFlakBox +{ + Frame "FAMO" { light "FLAKAMMOLIGHT" } +} +PointLight STINGERLIGHT0 +{ + Color 0.1 0.4 1.0 + Size 30 + Attenuate 1 +} +PointLight STINGERLIGHT1 +{ + Color 0.1 0.3 0.8 + Size 40 + Attenuate 1 +} +PointLight STINGERLIGHT2 +{ + Color 0.1 0.2 0.6 + Size 45 + Attenuate 1 +} +PointLight STINGERLIGHT3 +{ + Color 0.08 0.15 0.5 + Size 50 + Attenuate 1 +} +PointLight STINGERLIGHT4 +{ + Color 0.05 0.12 0.4 + Size 55 + Attenuate 1 +} +PointLight STINGERLIGHT5 +{ + Color 0.0 0.03 0.2 + Size 60 + Attenuate 1 +} +Object StingerProjectile +{ + Frame "TPRJA" { light "STINGERLIGHT0" } + Frame "TPRJB" { light "STINGERLIGHT1" } + Frame "TPRJC" { light "STINGERLIGHT1" } + Frame "TPRJD" { light "STINGERLIGHT2" } + Frame "TPRJE" { light "STINGERLIGHT3" } + Frame "TPRJF" { light "STINGERLIGHT4" } + Frame "TPRJG" { light "STINGERLIGHT5" } +} + +PointLight DAMPENERLIGHT0 +{ + Color 0.2 0.0 0.0 + Size 6 + Offset 0 6 0 + Attenuate 1 +} +PointLight DAMPENERLIGHT1 +{ + Color 0.6 0.0 0.0 + Size 15 + Offset 0 8 0 + Attenuate 1 +} +PointLight DAMPENERLIGHT2 +{ + Color 0.8 0.0 0.0 + Size 22 + Offset 0 10 0 + Attenuate 1 +} +PointLight DAMPENERLIGHT3 +{ + Color 0.9 0.0 0.0 + Size 28 + Offset 0 10 0 + Attenuate 1 +} +PointLight DAMPENERLIGHT4 +{ + Color 1.0 0.0 0.0 + Size 32 + Offset 0 10 0 + Attenuate 1 +} +Object Dampener +{ + Frame "DAMPA" { light "DAMPENERLIGHT0" } + Frame "DAMPB" { light "DAMPENERLIGHT1" } + Frame "DAMPC" { light "DAMPENERLIGHT2" } + Frame "DAMPD" { light "DAMPENERLIGHT3" } + Frame "DAMPE" { light "DAMPENERLIGHT4" } + Frame "DAMPF" { light "DAMPENERLIGHT3" } + Frame "DAMPG" { light "DAMPENERLIGHT2" } + Frame "DAMPH" { light "DAMPENERLIGHT2" } + Frame "DAMPI" { light "DAMPENERLIGHT2" } + Frame "DAMPJ" { light "DAMPENERLIGHT2" } +} + +PointLight SBELTLIGHT +{ + Color 0.25 0.0 0.0 + Size 20 + Offset 0 2 0 + Attenuate 1 +} +PointLight PBELTLIGHT +{ + Color 0.15 0.0 0.25 + Size 20 + Offset 0 2 0 + Attenuate 1 +} +Object ShieldBelt +{ + Frame "BELT" { light "SBELTLIGHT" } +} +Object PowerShield +{ + Frame "BELT" { light "PBELTLIGHT" } +} + +// Shaders / Brightmaps HardwareShader Texture "graphics/MenuBarr.png" { Shader "shaders/glsl/MenuBarrier.fp" @@ -127,10 +303,12 @@ HardwareShader Texture "models/JTaryPick1_.png" Brightmap Texture "models/JTaryPick1.png" { Map "brightmaps/JTaryPick1.png" + DisableFullbright } Brightmap Texture "models/Jburst1.png" { Map "brightmaps/Jburst1.png" + DisableFullbright } Brightmap Texture "models/Jflare.png" { @@ -316,3 +494,13 @@ HardwareShader Texture "models/minigun1_.png" { Shader "shaders/glsl/AmbientGlow.fp" } +HardwareShader Texture "models/ShockSm.png" +{ + Shader "shaders/glsl/ShockSm.fp" + Texture "smoketex" "models/ShockSm2.png" +} +HardwareShader Texture "textures/ForceFieldFX.png" +{ + Shader "shaders/glsl/FizzDistortXY.fp" + Texture "warptex" "textures/warptex.png" +} diff --git a/graphics/hud/HudLine.png b/graphics/hud/HudLine.png index 97fefee..1db81b5 100644 Binary files a/graphics/hud/HudLine.png and b/graphics/hud/HudLine.png differ diff --git a/graphics/hud083/ammo/Asmd083.png b/graphics/hud083/ammo/Asmd083.png index 705ee21..384e016 100644 Binary files a/graphics/hud083/ammo/Asmd083.png and b/graphics/hud083/ammo/Asmd083.png differ diff --git a/graphics/icons/I_PBelt.png b/graphics/icons/I_PBelt.png new file mode 100644 index 0000000..fec902b Binary files /dev/null and b/graphics/icons/I_PBelt.png differ diff --git a/graphics/icons/I_TSuit.png b/graphics/icons/I_TSuit.png new file mode 100644 index 0000000..2013bb4 Binary files /dev/null and b/graphics/icons/I_TSuit.png differ diff --git a/language.txt b/language.txt index e161c52..9a4b723 100644 --- a/language.txt +++ b/language.txt @@ -11,6 +11,14 @@ I_BACKPACKEXTRA = "The backpack also contains: "; I_ASMDAMMO = "You picked up an ASMD Core."; I_ASMDAMMO2 = "You picked up a Small ASMD Core."; I_ASMD = "You got the ASMD."; +I_UARMOR = "You got the Assault Vest."; +I_KEVSUIT = "You picked up the Kevlar Suit."; +I_ASBSUIT = "You picked up the Asbestos Suit."; +I_TOXSUIT = "You picked up the Toxin Suit."; +I_POWERSHIELD = "You got the Power Shield!"; +I_VOICEBOX = "You picked up the Voice Box."; +I_DAMPENER = "You got the Acoustic Dampener."; +I_FORCEFIELD = "You picked up the Force Field."; /* Tags */ T_STINGERAMMO = "Tarydium Shards"; T_STINGERAMMO2 = "Tarydium Shard Pack"; @@ -19,6 +27,14 @@ T_TRANSLATOR = "Translator"; T_ASMDAMMO = "ASMD Core"; T_ASMDAMMO2 = "Small ASMD Core"; T_ASMD = "ASMD"; +T_UARMOR = "Assault Vest"; +T_KEVSUIT = "Kevlar Suit"; +T_ASBSUIT = "Asbestos Suit"; +T_TOXSUIT = "Toxin Suit"; +T_POWERSHIELD = "Power Shield"; +T_VOICEBOX = "Voice Box"; +T_DAMPENER = "Acoustic Dampener"; +T_FORCEFIELD = "Force Field"; /* Miscellaneous */ TR_HINT = "Hint"; TR_NOMSG = "No new messages"; @@ -27,6 +43,9 @@ N_MALE2 = "Ash"; N_MALE3 = "Dante"; N_FEMALE1 = "Gina"; N_FEMALE2 = "Sonya"; +D_POWERSHIELD = "The Power Shield has depleted."; +D_DAMPENER = "Acoustic Dampener has run out."; +M_FFNOROOM = "No room to activate Force Field."; /* Menus */ STING_MTITLE = "Unreal Options"; STING_HOPTS = "HUD Options"; @@ -68,15 +87,34 @@ I_BACKPACKEXTRA = "La mochila tambien contiene: "; I_ASMDAMMO = "Has recogido un Núcleo de ASMD."; I_ASMDAMMO2 = "Has recogido un Núcleo Pequeño de ASMD."; I_ASMD = "Has obtenido el ASMD."; +I_UARMOR = "Has obtenido la Coraza de Asalto."; +I_KEVSUIT = "Has recogido el Traje de Kevlar."; +I_ASBSUIT = "Has recogido el Traje de Amianto."; +I_TOXSUIT = "Has recogido el Traje de Toxinas."; +I_POWERSHIELD = "¡Has obtenido el Escudo de Fuerza!"; +I_VOICEBOX = "Has recogido la Caja de Voz."; +I_DAMPENER = "Has obtenido el Amortiguador Acústico."; +I_FORCEFIELD = "Has recogido el Campo de Fuerza."; /* Tags */ T_STINGERAMMO = "Fragmentos de Tarydium"; T_STINGER = "Arma Aguijón"; T_TRANSLATOR = "Traductor"; T_ASMDAMMO = "Núcleo de ASMD"; T_ASMDAMMO2 = "Núcleo Pequeño de ASMD"; +T_UARMOR = "Coraza de Asalto"; +T_KEVSUIT = "Traje de Kevlar"; +T_ASBSUIT = "Traje de Amianto"; +T_TOXSUIT = "Traje de Toxinas"; +T_POWERSHIELD = "Escudo de Fuerza"; +T_VOICEBOX = "Caja de Voz"; +T_DAMPENER = "Amortiguador Acústico"; +T_FORCEFIELD = "Campo de Fuerza"; /* Miscellaneous */ TR_HINT = "Pista"; TR_NOMSG = "No hay mensajes nuevos"; +D_POWERSHIELD = "El Escudo de Fuerza se ha agotado."; +D_DAMPENER = "El Amortiguador Acústico se ha agotado."; +M_FFNOROOM = "No hay espacio para activar el Campo de Fuerza."; /* Menus */ STING_MTITLE = "Opciones de Unreal"; STING_HOPTS = "Opciones de HUD"; diff --git a/modeldef.asmd b/modeldef.asmd index 7a59e17..4600a2e 100644 --- a/modeldef.asmd +++ b/modeldef.asmd @@ -3,10 +3,10 @@ Model "ASMDAmmo" Path "models" Model 0 "AsmdAmmoM_d.3d" SurfaceSkin 0 1 "JAsmdAmmo1.png" - Scale 0.09 0.09 0.108 + Scale 0.09 -0.09 0.108 ZOffset 10 - FrameIndex ASMA A 0 0 + FrameIndex SHOA A 0 0 } Model "ASMDAmmoX" @@ -14,12 +14,23 @@ Model "ASMDAmmoX" Path "models" Model 0 "AsmdAmmoM_d.3d" SurfaceSkin 0 0 "ShockC.png" - //SurfaceSkin 0 2 "ShockSm.png" - Scale 0.09 0.09 0.108 + Scale 0.09 -0.09 0.108 ZOffset 10 DONTCULLBACKFACES - FrameIndex ASMA A 0 0 + FrameIndex SHOA A 0 0 +} + +Model "ASMDAmmoXX" +{ + Path "models" + Model 0 "AsmdAmmoM_d.3d" + SurfaceSkin 0 2 "ShockSm.png" + Scale 0.09 -0.09 0.108 + ZOffset 10 + DONTCULLBACKFACES + + FrameIndex SHOA A 0 0 } Model "ASMDAmmo2" @@ -27,10 +38,10 @@ Model "ASMDAmmo2" Path "models" Model 0 "AsmdAmmoSmallM_d.3d" SurfaceSkin 0 0 "JAsmdAmmo1.png" - Scale 0.05 0.05 0.06 + Scale 0.05 -0.05 0.06 ZOffset 6 - FrameIndex ASMA B 0 0 + FrameIndex SHOA B 0 0 } Model "ASMDAmmo2X" @@ -38,11 +49,11 @@ Model "ASMDAmmo2X" Path "models" Model 0 "AsmdAmmoSmallM_d.3d" SurfaceSkin 0 1 "ShockC.png" - Scale 0.05 0.05 0.06 + Scale 0.05 -0.05 0.06 ZOffset 6 DONTCULLBACKFACES - FrameIndex ASMA B 0 0 + FrameIndex SHOA B 0 0 } Model "ASMD" @@ -50,7 +61,7 @@ Model "ASMD" Path "models" Model 1 "ASMDPick_d.3d" Skin 1 "ASMD1_.png" - ZOffset 12 + ZOffset 8 AngleOffset 90 Scale 0.2 0.2 0.24 @@ -60,3 +71,103 @@ Model "ASMD" ROTATING FrameIndex ASMP A 1 0 } + +Model "ASMD" +{ + Path "models" + Model 2 "ASMDM_d.3d" + SurfaceSkin 2 0 "ShockSm.png" + AngleOffset -90 + Scale 0.14 -0.1 0.1 + Offset 9 -17.5 -10 + + // steam + FrameIndex ASVI A 2 14 + FrameIndex ASVF A 2 47 + FrameIndex ASVF B 2 48 + FrameIndex ASVF C 2 49 + FrameIndex ASVF D 2 50 + FrameIndex ASVF E 2 51 + FrameIndex ASVF F 2 52 + FrameIndex ASVF G 2 53 + FrameIndex ASVF H 2 54 + FrameIndex ASVF I 2 55 + FrameIndex ASVF J 2 56 +} + +Model "ASMD" +{ + Path "models" + Model 0 "ASMDM_d.3d" + SurfaceSkin 0 1 "ASMD1.png" + AngleOffset -90 + Scale 0.14 -0.1 0.1 + Offset 9 -17.5 -10 + + // select + FrameIndex ASMS A 0 0 + FrameIndex ASMS B 0 1 + FrameIndex ASMS C 0 2 + FrameIndex ASMS D 0 3 + FrameIndex ASMS E 0 4 + FrameIndex ASMS F 0 5 + FrameIndex ASMS G 0 6 + FrameIndex ASMS H 0 7 + FrameIndex ASMS I 0 8 + FrameIndex ASMS J 0 9 + FrameIndex ASMS K 0 10 + FrameIndex ASMS L 0 11 + FrameIndex ASMS M 0 12 + FrameIndex ASMS N 0 13 + // idle + FrameIndex ASMI A 0 14 + FrameIndex ASMI B 0 15 + // sway + FrameIndex ASMI C 0 76 + FrameIndex ASMI D 0 77 + FrameIndex ASMI E 0 78 + FrameIndex ASMI F 0 79 + // deselect + FrameIndex ASMD A 0 16 + FrameIndex ASMD B 0 17 + FrameIndex ASMD C 0 18 + FrameIndex ASMD D 0 19 + FrameIndex ASMD E 0 20 + FrameIndex ASMD F 0 21 + FrameIndex ASMD G 0 22 + FrameIndex ASMD H 0 23 + FrameIndex ASMD I 0 24 + FrameIndex ASMD J 0 25 + // fire + FrameIndex ASMF A 0 28 + FrameIndex ASMF B 0 29 + FrameIndex ASMF C 0 30 + FrameIndex ASMF D 0 31 + FrameIndex ASMF E 0 32 + FrameIndex ASMF F 0 33 + FrameIndex ASMF G 0 34 + FrameIndex ASMF H 0 35 + FrameIndex ASMF I 0 36 + // altfire + FrameIndex ASMA A 0 37 + FrameIndex ASMA B 0 38 + FrameIndex ASMA C 0 39 + FrameIndex ASMA D 0 40 + FrameIndex ASMA E 0 41 + FrameIndex ASMA F 0 42 + FrameIndex ASMA G 0 43 + FrameIndex ASMA H 0 44 + FrameIndex ASMA I 0 45 + FrameIndex ASMA J 0 46 + // steam + FrameIndex ASMV A 0 47 + FrameIndex ASMV B 0 48 + FrameIndex ASMV C 0 49 + FrameIndex ASMV D 0 50 + FrameIndex ASMV E 0 51 + FrameIndex ASMV F 0 52 + FrameIndex ASMV G 0 53 + FrameIndex ASMV H 0 54 + FrameIndex ASMV I 0 55 + FrameIndex ASMV J 0 56 +} diff --git a/modeldef.female1 b/modeldef.female1 index 3d699c7..2a0322b 100644 --- a/modeldef.female1 +++ b/modeldef.female1 @@ -4,8 +4,8 @@ Model "UPlayerFemale1" Model 0 "Female1_d.3d" SurfaceSkin 0 0 "gina.png" SurfaceSkin 0 1 "GunPick1.png" - Scale 0.216 -0.18 0.18 - Offset 0 0 35 + Scale 0.24 0.2 0.2 + Offset -2 0 32 RollOffset -90 AngleOffset -90 IGNORETRANSLATION // I'll figure out eventually how to make color changes work, but for now this is it diff --git a/modeldef.female2 b/modeldef.female2 index 60f672c..bb9b9c0 100644 --- a/modeldef.female2 +++ b/modeldef.female2 @@ -4,8 +4,8 @@ Model "UPlayerFemale2" Model 0 "Female2_d.3d" SurfaceSkin 0 0 "Sonya.png" SurfaceSkin 0 1 "GunPick1.png" - Scale 0.216 0.18 0.18 - Offset 0 0 35 + Scale 0.24 0.2 0.2 + Offset -2 0 32 RollOffset -90 AngleOffset -90 IGNORETRANSLATION // I'll figure out eventually how to make color changes work, but for now this is it diff --git a/modeldef.male1 b/modeldef.male1 index e322caf..3382906 100644 --- a/modeldef.male1 +++ b/modeldef.male1 @@ -4,8 +4,8 @@ Model "UPlayerMale1" Model 0 "Male1_d.3d" SurfaceSkin 0 0 "Kurgan.png" SurfaceSkin 0 1 "GunPick1.png" - Scale 0.216 -0.18 0.18 - Offset 4 -5 28 + Scale 0.24 0.2 0.2 + Offset 3 7 25 RollOffset -90 AngleOffset -90 IGNORETRANSLATION // I'll figure out eventually how to make color changes work, but for now this is it diff --git a/modeldef.male2 b/modeldef.male2 index 1b52723..b389ca7 100644 --- a/modeldef.male2 +++ b/modeldef.male2 @@ -4,8 +4,8 @@ Model "UPlayerMale2" Model 0 "Male2_d.3d" SurfaceSkin 0 0 "Ash.png" SurfaceSkin 0 1 "GunPick1.png" - Scale 0.216 0.18 0.18 - Offset 4 -5 28 + Scale 0.24 0.2 0.2 + Offset 3 -7 25 RollOffset -90 AngleOffset -90 IGNORETRANSLATION // I'll figure out eventually how to make color changes work, but for now this is it diff --git a/modeldef.male3 b/modeldef.male3 index ecfe356..2c78235 100644 --- a/modeldef.male3 +++ b/modeldef.male3 @@ -4,8 +4,8 @@ Model "UPlayerMale3" Model 0 "Male3_d.3d" SurfaceSkin 0 0 "Dante.png" SurfaceSkin 0 1 "GunPick1.png" - Scale 0.216 0.18 0.18 - Offset 4 -5 28 + Scale 0.24 0.2 0.2 + Offset 3 -7 25 RollOffset -90 AngleOffset -90 IGNORETRANSLATION // I'll figure out eventually how to make color changes work, but for now this is it diff --git a/modeldef.stinger b/modeldef.stinger index 8c7c6df..8fec86c 100644 --- a/modeldef.stinger +++ b/modeldef.stinger @@ -3,7 +3,7 @@ Model "Stinger" Path "models" Model 1 "StingerPickup_d.3d" Skin 1 "Sting1_.png" - Offset -3 -3 2 + Offset -3 3 2 AngleOffset -90 Scale 0.06 0.06 0.072 @@ -25,6 +25,17 @@ Model "StingerAmmo" FrameIndex SAMO A 0 0 } +Model "StingerAmmo2" +{ + Path "models" + Model 0 "TarydiumLarge_d.3d" + Skin 0 "JTaryPick1_.png" + Scale 0.04 0.04 0.048 + ZOffset 3 + + FrameIndex SAMO B 0 0 +} + Model "StingerProjectile" { Path "models" @@ -57,9 +68,9 @@ Model "Stinger" Path "models" Model 2 "StingerM_d.3d" SurfaceSkin 2 0 "FireEffect18.png" - Scale 0.1 -0.08 0.1 - AngleOffset 89 - Offset 6.8 -13.2 -10.6 + Scale 0.1 -0.1 0.1 + AngleOffset 90 + Offset 9 -12.5 -12 DONTCULLBACKFACES // Fire @@ -81,9 +92,9 @@ Model "Stinger" Path "models" Model 0 "StingerM_d.3d" SurfaceSkin 0 1 "Sting1.png" - Scale 0.1 -0.08 0.1 - AngleOffset 89 - Offset 6.8 -13.2 -10.6 + Scale 0.1 -0.1 0.1 + AngleOffset 90 + Offset 9 -12.5 -12 // Select FrameIndex STNS A 0 0 diff --git a/modeldef.uflak b/modeldef.uflak index abccc2c..d50a78f 100644 --- a/modeldef.uflak +++ b/modeldef.uflak @@ -7,7 +7,7 @@ Model "UFlakBox" ZOffset 6 RollOffset 180 - FrameIndex FBOX A 0 0 + FrameIndex FAMO A 0 0 } Model "UFlakAmmo" @@ -19,7 +19,7 @@ Model "UFlakAmmo" ZOffset 2.25 RollOffset -90 - FrameIndex FSHL B 0 0 + FrameIndex FAMO B 0 0 } Model "UFlakCannon" @@ -31,11 +31,11 @@ Model "UFlakCannon" AngleOffset 90 Scale 0.12 0.12 0.134 - FrameIndex FLKP B 1 0 + FrameIndex FPCK B 1 0 ZOffset 12 ROTATING - FrameIndex FLKP A 1 0 + FrameIndex FPCK A 1 0 } Model "UFlakCannon" @@ -43,9 +43,9 @@ Model "UFlakCannon" Path "models" Model 2 "flak_d.3d" SurfaceSkin 2 0 "FireEffect13.png" - Scale 0.1 -0.08 0.1 + Scale 0.1 -0.1 0.1 AngleOffset -90 - Offset 5 -9 -5 + Offset 7 -9.7 -5.8 DONTCULLBACKFACES // Fire @@ -78,9 +78,9 @@ Model "UFlakCannon" Path "models" Model 0 "flak_d.3d" SurfaceSkin 0 1 "Jflak1.png" - Scale 0.1 -0.08 0.1 + Scale 0.1 -0.1 0.1 AngleOffset -90 - Offset 5 -9 -5 + Offset 7 -9.7 -5.8 // Select FrameIndex FLKS A 0 0 diff --git a/modeldef.umisc b/modeldef.umisc index 0aa6c69..6af4eff 100644 --- a/modeldef.umisc +++ b/modeldef.umisc @@ -11,3 +11,171 @@ Model "UnrealBackpack" FrameIndex BPAK A 0 0 } + +Model "UArmor" +{ + Path "models" + Model 0 "ArmorM_d.3d" + Skin 0 "Jarmor1.png" + ZOffset 9 + AngleOffset -90 + Scale 0.07 -0.07 0.084 + + FrameIndex UARM A 0 0 +} + +Model "AsbestosSuit" +{ + Path "models" + Model 0 "Suit_d.3d" + Skin 0 "Asuit1.png" + RollOffset 90 + AngleOffset -90 + ZOffset 17 + Scale 0.096 -0.08 0.08 + + FrameIndex ASBS A 0 0 +} + +Model "ToxinSuit" +{ + Path "models" + Model 0 "ToxSuit_d.3d" + Skin 0 "AToxSuit1.png" + RollOffset 90 + AngleOffset -90 + ZOffset 17 + Scale 0.096 -0.08 0.08 + + FrameIndex TOXS A 0 0 +} + +Model "KevlarSuit" +{ + Path "models" + Model 0 "KevSuit_d.3d" + Skin 0 "AkevSuit1.png" + AngleOffset -90 + ZOffset 5 + Scale 0.08 -0.08 0.096 + + FrameIndex KEVS A 0 0 +} + +Model "ShieldBelt" +{ + Path "models" + Model 0 "ShieldBeltMesh_d.3d" + Skin 0 "Abelt1.png" + AngleOffset 90 + ZOffset 2 + Scale 0.05 -0.05 0.06 + + FrameIndex BELT A 0 0 +} + +Model "PowerShield" +{ + Path "models" + Model 0 "ShieldBeltMesh_d.3d" + Skin 0 "Apbelt1.png" + AngleOffset 90 + ZOffset 2 + Scale 0.05 -0.05 0.06 + + FrameIndex BELT A 0 0 +} + +Model "VoiceBox" +{ + Path "models" + Model 0 "VoiceBoxMesh_d.3d" + Skin 0 "Ainv1_.png" + ZOffset 4 + Scale 0.08 -0.08 0.096 + + FrameIndex VBOX A 0 0 +} +Model "VoiceBoxActive" +{ + Path "models" + Model 0 "VoiceBoxMesh_d.3d" + Skin 0 "Ainv1.png" + ZOffset 4 + Scale 0.08 -0.08 0.096 + + FrameIndex VBOX A 0 0 + FrameIndex VBOX B 0 1 + FrameIndex VBOX C 0 2 + FrameIndex VBOX D 0 3 + FrameIndex VBOX E 0 4 + FrameIndex VBOX F 0 5 + FrameIndex VBOX G 0 6 + FrameIndex VBOX H 0 7 + FrameIndex VBOX I 0 8 + FrameIndex VBOX J 0 9 +} + +Model "Dampener" +{ + Path "models" + Model 0 "DampenerM_d.3d" + Skin 0 "Ainv1.png" + ZOffset 6 + Scale 0.06 -0.06 0.072 + + FrameIndex DAMP A 0 0 + FrameIndex DAMP B 0 1 + FrameIndex DAMP C 0 2 + FrameIndex DAMP D 0 3 + FrameIndex DAMP E 0 4 + FrameIndex DAMP F 0 5 + FrameIndex DAMP G 0 6 + FrameIndex DAMP H 0 7 + FrameIndex DAMP I 0 8 + FrameIndex DAMP J 0 9 +} + +Model "Forcefield" +{ + Path "models" + Model 0 "ForceFieldPick_d.3d" + SurfaceSkin 0 1 "aforce1.png" + ZOffset 11 + Scale 0.14 -0.14 0.168 + + FrameIndex FFPK A 0 0 +} + +Model "ForcefieldX" +{ + Path "models" + Model 0 "ForceFieldPick_d.3d" + SurfaceSkin 0 0 "ForceF.png" + ZOffset 11 + Scale 0.14 -0.14 0.168 + DONTCULLBACKFACES + + FrameIndex FFPK A 0 0 +} + +Model "ForcefieldEffect" +{ + Path "models" + Model 0 "ForceFieldM_d.3d" + Skin 0 "textures/ForceFieldFX.png" + ZOffset 22 + Scale 0.16 -0.16 0.16 + DONTCULLBACKFACES + + FrameIndex FFLD A 0 0 + FrameIndex FFLD B 0 1 + FrameIndex FFLD C 0 2 + FrameIndex FFLD D 0 3 + FrameIndex FFLD E 0 4 + FrameIndex FFLD F 0 5 + FrameIndex FFLD G 0 6 + FrameIndex FFLD H 0 7 + FrameIndex FFLD I 0 8 + FrameIndex FFLD J 0 9 +} diff --git a/models/ForceF.png b/models/ForceF.png new file mode 100644 index 0000000..e56ebd2 Binary files /dev/null and b/models/ForceF.png differ diff --git a/models/JRocket1.png b/models/JRocket1.png index 0ea52ac..eeb75e3 100644 Binary files a/models/JRocket1.png and b/models/JRocket1.png differ diff --git a/models/ShockSm.png b/models/ShockSm.png index 417efcc..d462334 100644 Binary files a/models/ShockSm.png and b/models/ShockSm.png differ diff --git a/models/ShockSm2.png b/models/ShockSm2.png new file mode 100644 index 0000000..d1ce2e4 Binary files /dev/null and b/models/ShockSm2.png differ diff --git a/shaders/glsl/ShockSm.fp b/shaders/glsl/ShockSm.fp new file mode 100644 index 0000000..4670e9a --- /dev/null +++ b/shaders/glsl/ShockSm.fp @@ -0,0 +1,9 @@ +vec4 ProcessTexel() +{ + vec3 base = getTexel(vTexCoord.st).rgb; + vec2 scroll = vTexCoord.st*.5+vec2(.2,.5)*timer; + float smk = texture(smoketex,scroll).x; + scroll = vTexCoord.st*.9+vec2(-.2,.4)*timer; + smk *= texture(smoketex,scroll).x; + return vec4(base*smk,1.); +} diff --git a/sndinfo.txt b/sndinfo.txt index 93a9333..a31b52d 100644 --- a/sndinfo.txt +++ b/sndinfo.txt @@ -83,9 +83,9 @@ $playeralias ufemale neutral *pain75-drowning u1/femaledrowning $playeralias ufemale neutral *pain50-drowning u1/femaledrowning $playeralias ufemale neutral *pain25-drowning u1/femaledrowning -misc/secret teleprt2 +misc/secret secret misc/i_pkup ammosnd -misc/p_pkup gpicksnd +misc/p_pkup genpicks misc/spawn respsnd misc/chat beep misc/chat2 beep @@ -93,6 +93,9 @@ misc/u1superh health1 misc/u1heal health2 misc/u1armor armorsnd misc/teleport teleprt1 +misc/suit suitsnd + +sbelt/pickup psbelta2 menu/activate Select4 // Activate a new menu menu/backup Select4 // Backup to previous menu @@ -114,3 +117,12 @@ stinger/hit2 ricochet stinger/flesh chunkhit flak/click click + +asmd/vapour vapour + +dampener/on dampsnd +dampener/off dampndea + +ffield/on fieldsnd +ffield/active ffieldl2 +ffield/hit ffieldh2 diff --git a/sounds/GPickSnd.ogg b/sounds/GPickSnd.ogg deleted file mode 100644 index b4d04ad..0000000 Binary files a/sounds/GPickSnd.ogg and /dev/null differ diff --git a/sounds/Secret.ogg b/sounds/Secret.ogg new file mode 100644 index 0000000..9c38e28 Binary files /dev/null and b/sounds/Secret.ogg differ diff --git a/sounds/click.ogg b/sounds/click.ogg deleted file mode 100644 index c168d83..0000000 Binary files a/sounds/click.ogg and /dev/null differ diff --git a/textures.asmd b/textures.asmd index d393f7a..0b6a272 100644 --- a/textures.asmd +++ b/textures.asmd @@ -1,5 +1 @@ -Sprite "ASMAA0",1,1{} -Sprite "ASMAB0",1,1{} -Sprite "ASMPA0",1,1{} -Sprite "ASMPB0",1,1{} -Sprite "ASMIA0",1,1{} +Sprite "TAZBA0",1,1{} diff --git a/textures.stinger b/textures.stinger index efb8457..846392c 100644 --- a/textures.stinger +++ b/textures.stinger @@ -1,63 +1,4 @@ Sprite "STNPA0",1,1{} -Sprite "STNPB0",1,1{} Sprite "STNSA0",1,1{} -Sprite "STNSB0",1,1{} -Sprite "STNSC0",1,1{} -Sprite "STNSD0",1,1{} -Sprite "STNSE0",1,1{} -Sprite "STNSF0",1,1{} -Sprite "STNSG0",1,1{} -Sprite "STNSH0",1,1{} -Sprite "STNSI0",1,1{} -Sprite "STNSJ0",1,1{} -Sprite "STNSK0",1,1{} -Sprite "STNSL0",1,1{} -Sprite "STNSM0",1,1{} -Sprite "STNSN0",1,1{} -Sprite "STNSO0",1,1{} -Sprite "STNSP0",1,1{} -Sprite "STNSQ0",1,1{} -Sprite "STNSR0",1,1{} -Sprite "STNSS0",1,1{} -Sprite "STNST0",1,1{} -Sprite "STNSU0",1,1{} -Sprite "STNIA0",1,1{} -Sprite "STNDA0",1,1{} -Sprite "STNDB0",1,1{} -Sprite "STNDC0",1,1{} -Sprite "STNDD0",1,1{} -Sprite "STNDE0",1,1{} -Sprite "STNDF0",1,1{} -Sprite "STNDG0",1,1{} -Sprite "STNDH0",1,1{} -Sprite "STNDI0",1,1{} -Sprite "STNDJ0",1,1{} -Sprite "STNDK0",1,1{} -Sprite "STNFA0",1,1{} -Sprite "STNFB0",1,1{} -Sprite "STNFC0",1,1{} -Sprite "STNHA0",1,1{} -Sprite "STNHB0",1,1{} -Sprite "STNHC0",1,1{} -Sprite "STNHD0",1,1{} -Sprite "STNHE0",1,1{} -Sprite "STNHF0",1,1{} -Sprite "STNHG0",1,1{} -Sprite "STFFA0",1,1{} -Sprite "STFFB0",1,1{} -Sprite "STFFC0",1,1{} -Sprite "STFHA0",1,1{} -Sprite "STFHB0",1,1{} -Sprite "STFHC0",1,1{} -Sprite "STFHD0",1,1{} -Sprite "STFHE0",1,1{} -Sprite "STFHF0",1,1{} -Sprite "STFHG0",1,1{} Sprite "SAMOA0",1,1{} Sprite "TPRJA0",1,1{} -Sprite "TPRJB0",1,1{} -Sprite "TPRJC0",1,1{} -Sprite "TPRJD0",1,1{} -Sprite "TPRJE0",1,1{} -Sprite "TPRJF0",1,1{} -Sprite "TPRJG0",1,1{} diff --git a/textures.uflak b/textures.uflak deleted file mode 100644 index e27615c..0000000 --- a/textures.uflak +++ /dev/null @@ -1,133 +0,0 @@ -Sprite "FBOXA0",1,1{} -Sprite "FSHLA0",1,1{} -Sprite "FSHLB0",1,1{} -Sprite "FLKPA0",1,1{} -Sprite "FLKPB0",1,1{} -Sprite "FLKSA0",1,1{} -Sprite "FLKSB0",1,1{} -Sprite "FLKSC0",1,1{} -Sprite "FLKSD0",1,1{} -Sprite "FLKSE0",1,1{} -Sprite "FLKSF0",1,1{} -Sprite "FLKSG0",1,1{} -Sprite "FLKSH0",1,1{} -Sprite "FLKSI0",1,1{} -Sprite "FLKSJ0",1,1{} -Sprite "FLKSK0",1,1{} -Sprite "FLKSL0",1,1{} -Sprite "FLKSM0",1,1{} -Sprite "FLKSN0",1,1{} -Sprite "FLKSO0",1,1{} -Sprite "FLKSP0",1,1{} -Sprite "FLKSQ0",1,1{} -Sprite "FLKSR0",1,1{} -Sprite "FLKSS0",1,1{} -Sprite "FLKST0",1,1{} -Sprite "FLKSU0",1,1{} -Sprite "FLKSV0",1,1{} -Sprite "FLKSW0",1,1{} -Sprite "FLKSX0",1,1{} -Sprite "FLKSY0",1,1{} -Sprite "FLKSZ0",1,1{} -Sprite "FLS2A0",1,1{} -Sprite "FLS2B0",1,1{} -Sprite "FLS2C0",1,1{} -Sprite "FLS2D0",1,1{} -Sprite "FLKLA0",1,1{} -Sprite "FLKLB0",1,1{} -Sprite "FLKLC0",1,1{} -Sprite "FLKLD0",1,1{} -Sprite "FLKLE0",1,1{} -Sprite "FLKLF0",1,1{} -Sprite "FLKLG0",1,1{} -Sprite "FLKLH0",1,1{} -Sprite "FLKLI0",1,1{} -Sprite "FLKLJ0",1,1{} -Sprite "FLKLK0",1,1{} -Sprite "FLKLL0",1,1{} -Sprite "FLKLM0",1,1{} -Sprite "FLKLN0",1,1{} -Sprite "FLKLO0",1,1{} -Sprite "FLKIA0",1,1{} -Sprite "FLKFA0",1,1{} -Sprite "FLKFB0",1,1{} -Sprite "FLKFC0",1,1{} -Sprite "FLKFD0",1,1{} -Sprite "FLKFE0",1,1{} -Sprite "FLKFF0",1,1{} -Sprite "FLKFG0",1,1{} -Sprite "FLKFH0",1,1{} -Sprite "FLKFI0",1,1{} -Sprite "FLKFJ0",1,1{} -Sprite "FLKAA0",1,1{} -Sprite "FLKAB0",1,1{} -Sprite "FLKAC0",1,1{} -Sprite "FLKAD0",1,1{} -Sprite "FLKAE0",1,1{} -Sprite "FLKAF0",1,1{} -Sprite "FLKAG0",1,1{} -Sprite "FLKAH0",1,1{} -Sprite "FLKAI0",1,1{} -Sprite "FLKAJ0",1,1{} -Sprite "FLKAK0",1,1{} -Sprite "FLKEA0",1,1{} -Sprite "FLKEB0",1,1{} -Sprite "FLKEC0",1,1{} -Sprite "FLKED0",1,1{} -Sprite "FLKEE0",1,1{} -Sprite "FLKEF0",1,1{} -Sprite "FLKEG0",1,1{} -Sprite "FLKEH0",1,1{} -Sprite "FLKEI0",1,1{} -Sprite "FLKEJ0",1,1{} -Sprite "FLKEK0",1,1{} -Sprite "FLKEL0",1,1{} -Sprite "FLKEM0",1,1{} -Sprite "FLKEN0",1,1{} -Sprite "FLKEO0",1,1{} -Sprite "FLKEP0",1,1{} -Sprite "FLKEQ0",1,1{} -Sprite "FLKER0",1,1{} -Sprite "FLKES0",1,1{} -Sprite "FLD2A0",1,1{} -Sprite "FLD2B0",1,1{} -Sprite "FLD2C0",1,1{} -Sprite "FLD2D0",1,1{} -Sprite "FLD2E0",1,1{} -Sprite "FLD2F0",1,1{} -Sprite "FLD2G0",1,1{} -Sprite "FLD2H0",1,1{} -Sprite "FLD2I0",1,1{} -Sprite "FLD2J0",1,1{} -Sprite "FLD2K0",1,1{} -Sprite "FLD2L0",1,1{} -Sprite "FLD2M0",1,1{} -Sprite "FLD2N0",1,1{} -Sprite "FLD2O0",1,1{} -Sprite "FLKDA0",1,1{} -Sprite "FLKDB0",1,1{} -Sprite "FLKDC0",1,1{} -Sprite "FLKDD0",1,1{} -Sprite "FLKDE0",1,1{} -Sprite "FLKDF0",1,1{} -Sprite "FLFFA0",1,1{} -Sprite "FLFFB0",1,1{} -Sprite "FLFFC0",1,1{} -Sprite "FLFFD0",1,1{} -Sprite "FLFFE0",1,1{} -Sprite "FLFFF0",1,1{} -Sprite "FLFFG0",1,1{} -Sprite "FLFFH0",1,1{} -Sprite "FLFFI0",1,1{} -Sprite "FLFFJ0",1,1{} -Sprite "FLFAA0",1,1{} -Sprite "FLFAB0",1,1{} -Sprite "FLFAC0",1,1{} -Sprite "FLFAD0",1,1{} -Sprite "FLFAE0",1,1{} -Sprite "FLFAF0",1,1{} -Sprite "FLFAG0",1,1{} -Sprite "FLFAH0",1,1{} -Sprite "FLFAI0",1,1{} -Sprite "FLFAJ0",1,1{} -Sprite "FLFAK0",1,1{} \ No newline at end of file diff --git a/textures.umisc b/textures.umisc index 2c50383..cbe13f2 100644 --- a/textures.umisc +++ b/textures.umisc @@ -5,3 +5,11 @@ Texture "BLKNESS",64,64 Blend "#000000",1.0 } } +Sprite "UARMA0",1,1{} +Sprite "ASBSA0",1,1{} +Sprite "TOXSA0",1,1{} +Sprite "KEVSA0",1,1{} +Sprite "VBOXA0",1,1{} +Sprite "DAMPA0",1,1{} +Sprite "FFPKA0",1,1{} +Sprite "FFLDA0",1,1{} diff --git a/textures/ForceFieldFX.png b/textures/ForceFieldFX.png new file mode 100644 index 0000000..e4ae919 Binary files /dev/null and b/textures/ForceFieldFX.png differ diff --git a/zscript/asmd.zsc b/zscript/asmd.zsc index b7de7dc..20e59a8 100644 --- a/zscript/asmd.zsc +++ b/zscript/asmd.zsc @@ -17,11 +17,14 @@ Class ASMDAmmo : Ammo tracer = Spawn("ASMDAmmoX",pos); tracer.angle = angle; tracer.target = self; + tracer = Spawn("ASMDAmmoXX",pos); + tracer.angle = angle; + tracer.target = self; } States { Spawn: - ASMA A -1; + SHOA A -1; Stop; } } @@ -51,7 +54,17 @@ Class ASMDAmmoX : Actor States { Spawn: - ASMA A -1 Bright; + SHOA A -1 Bright; + Stop; + } +} + +Class ASMDAmmoXX : ASMDAmmoX +{ + States + { + Spawn: + SHOA A -1; Stop; } } @@ -61,7 +74,7 @@ Class ASMDAmmo2X : ASMDAmmoX States { Spawn: - ASMA B -1 Bright; + SHOA B -1 Bright; Stop; } } @@ -86,13 +99,43 @@ Class ASMDAmmo2 : ASMDAmmo States { Spawn: - ASMA B -1; + SHOA B -1; Stop; } } Class ASMD : UTWeapon { + override void PlayUpSound( Actor origin ) + { + origin.A_PlaySound(upsound,CHAN_WEAPON,Dampener.Active(origin)?.1:1.); + } + action void A_ShockFire() + { + Weapon weap = Weapon(invoker); + if ( !weap ) return; + if ( weap.Ammo1.Amount <= 0 ) return; + if ( !weap.DepleteAmmo(weap.bAltFire,true,1) ) return; + A_PlaySound("shock/fire",CHAN_WEAPON,Dampener.Active(self)?.2:1.); + invoker.FireEffect(); + UTMainHandler.DoFlash(self,Color(80,64,32,255),1); + UTMainHandler.DoSwing(self,(FRandom[ASMD](-0.1,-0.6),FRandom[ASMD](-0.1,0.5)),2,-0.3,3,SWING_Spring,0,4); + if ( !Dampener.Active(self) ) A_AlertMonsters();A_AlertMonsters(); + A_QuakeEx(2,2,2,4,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1); + } + action void A_ShockAlt() + { + Weapon weap = Weapon(invoker); + if ( !weap ) return; + if ( weap.Ammo1.Amount <= 0 ) return; + if ( !weap.DepleteAmmo(weap.bAltFire,true,1) ) return; + A_PlaySound("shock/altfire",CHAN_WEAPON,Dampener.Active(self)?.2:1.); + invoker.FireEffect(); + UTMainHandler.DoFlash(self,Color(80,64,32,255),1); + UTMainHandler.DoSwing(self,(FRandom[ASMD](-0.1,-0.6),FRandom[ASMD](-0.1,0.5)),3,-0.4,3,SWING_Spring,0,4); + if ( !Dampener.Active(self) ) A_AlertMonsters();A_AlertMonsters(); + A_QuakeEx(2,2,2,8,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1); + } Default { Tag "$T_ASMD"; @@ -114,5 +157,85 @@ Class ASMD : UTWeapon Stop; ASMP B -1; Stop; + Ready: + ASMS ABCDEFGHIJKLMN 1 A_WeaponReady(WRF_NOFIRE); + Idle: + #### # 8 A_Overlay(-9999,"Dummy"); // little hackeroo to make this more responsive + ASMI AB 30; + Goto Idle+1; + Dummy: + TNT1 A 1 + { + A_CheckReload(); + A_WeaponReady(); + // that's a mouthful + if ( player.FindPSprite(PSP_WEAPON).CurState.InStateSequence(invoker.FindState("Idle")) && (player.cmd.forwardmove || player.cmd.sidemove) && (player.vel.length() > 0.5) ) + player.SetPSPrite(PSP_WEAPON,invoker.FindState("Sway")); + } + Wait; + Vapour: + #### # 2 A_Overlay(-9999,"Dummy"); + ASMI A 6 + { + A_PlaySound("asmd/vapour",CHAN_6,0.5); + A_Overlay(PSP_FLASH,"VapourFlash"); + A_OverlayFlags(PSP_FLASH,PSPF_RenderStyle,true); + A_OverlayRenderstyle(PSP_FLASH,STYLE_Add); + } + ASMV ABCDEFGHIJ 4; + Goto Idle; + VapourFlash: + ASVI A 6; + ASVF ABCDEFGHIJ 4; + Stop; + Sway: + #### # 4; + ASMI C 10 A_JumpIf((!player.cmd.forwardmove && !player.cmd.sidemove) || (player.vel.length() < 0.5),4); + ASMI D 10 A_JumpIf((!player.cmd.forwardmove && !player.cmd.sidemove) || (player.vel.length() < 0.5),5); + ASMI E 10 A_JumpIf((!player.cmd.forwardmove && !player.cmd.sidemove) || (player.vel.length() < 0.5),6); + ASMI F 10 A_JumpIf((!player.cmd.forwardmove && !player.cmd.sidemove) || (player.vel.length() < 0.5),7); + Goto Sway+1; + ASMI C 4; + ASMI A 0 A_Jump(32,"Vapour"); + Goto Idle; + ASMI D 4; + ASMI A 0 A_Jump(32,"Vapour"); + Goto Idle; + ASMI E 4; + ASMI A 0 A_Jump(32,"Vapour"); + Goto Idle; + ASMI F 4; + ASMI A 0 A_Jump(32,"Vapour"); + Goto Idle; + Fire: + #### # 1 + { + A_ShockFire(); + A_Overlay(-9999,"Null"); + } + ASMF ABCDEFGH 2; + ASMF I 5; + ASMI A 0 A_Refire(); + ASMI A 0 A_Jump(48,"Vapour"); + Goto Idle; + AltFire: + #### # 1 + { + A_ShockAlt(); + A_Overlay(-9999,"Null"); + } + ASMA ABCDFGHI 2; + ASMA J 1; + ASMA J 0 A_Refire(); + ASMI A 0 A_Jump(48,"Vapour"); + Goto Idle; + Deselect: + ASMD A 1 A_Overlay(-9999,"Null"); + ASMD BCDEFGHIJ 1; + ASMD J 1 A_Lower(int.max); + Wait; + Select: + ASMS A 1 A_Raise(int.max); + Wait; } } diff --git a/zscript/miscitems.zsc b/zscript/miscitems.zsc index 8e35a45..bf213de 100644 --- a/zscript/miscitems.zsc +++ b/zscript/miscitems.zsc @@ -88,14 +88,15 @@ Class UnrealBackpack : BackpackItem replaces Backpack Super.DoPickupSpecial(toucher); if ( gameinfo.gametype&GAME_DOOMCHEX ) { - static const Class xitems[] = {"Flare", "Seeds", "SentryItem", "VoiceBox", "ForceField", "Dampener"}; - int xitemn[6]; - xitemn[0] = max(0,Random[BackpackExtra](-3,5)); - xitemn[1] = max(0,Random[BackpackExtra](-3,5)); - xitemn[2] = max(0,Random[BackpackExtra](-4,1)); + static const Class xitems[] = {"Flare", "Seeds", "SentryItem", "VoiceBox", "ForceField", "Dampener", "Peacemaker"}; + int xitemn[7]; + xitemn[0] = max(0,Random[BackpackExtra](-1,3)); + xitemn[1] = max(0,Random[BackpackExtra](-1,3)); + xitemn[2] = max(0,Random[BackpackExtra](-2,1)); xitemn[3] = max(0,Random[BackpackExtra](-2,1)); - xitemn[4] = max(0,Random[BackpackExtra](-3,1)); - xitemn[5] = max(0,Random[BackpackExtra](-2,1)); + xitemn[4] = max(0,Random[BackpackExtra](-2,1)); + xitemn[5] = max(0,Random[BackpackExtra](-1,1)); + xitemn[6] = max(0,Random[BackpackExtra](-2,1)); // random doubling if ( !Random[BackpackExtra](0,4) ) xitemn[0] *= 2; if ( !Random[BackpackExtra](0,4) ) xitemn[1] *= 2; @@ -103,11 +104,12 @@ Class UnrealBackpack : BackpackItem replaces Backpack if ( !Random[BackpackExtra](0,7) ) xitemn[3] *= 2; if ( !Random[BackpackExtra](0,6) ) xitemn[4] *= 2; if ( !Random[BackpackExtra](0,5) ) xitemn[5] *= 2; + if ( !Random[BackpackExtra](0,9) ) xitemn[6] *= 2; int total = 0; - for ( int i=0; i<6; i++ ) total += xitemn[i]; + for ( int i=0; i<7; i++ ) total += xitemn[i]; if ( total <= 0 ) return; String extratxt = StringTable.Localize("$I_BACKPACKEXTRA"); - for ( int i=0; i<6; i++ ) + for ( int i=0; i<7; i++ ) { if ( xitemn[i] <= 0 ) continue; extratxt = extratxt..String.Format("%dx %s, ",xitemn[i],GetDefaultByType(xitems[i]).GetTag()); @@ -187,6 +189,167 @@ Class UTranslator : UnrealInventory Class VoiceBox : UnrealInventory { + Actor box; + + Default + { + Tag "$T_VOICEBOX"; + Inventory.PickupMessage "$I_VOICEBOX"; + Inventory.Icon "I_VoiceB"; + Inventory.MaxAmount 5; + UnrealInventory.Charge 600; + } + override void Tick() + { + Super.Tick(); + if ( bActive ) + { + if ( box ) Charge = box.ReactionTime; + else + { + Charge = DefaultCharge; + bActive = false; + Amount--; + if ( Amount <= 0 ) DepleteOrDestroy(); + } + } + } + override bool Use( bool pickup ) + { + if ( pickup || bActive ) return false; + bActive = true; + Vector3 x, y, z; + [x, y, z] = dt_CoordUtil.GetAxes(Owner.pitch,Owner.angle,Owner.roll); + Vector3 origin = Owner.Vec2OffsetZ(0,0,Owner.player.viewz); + origin = level.Vec3Offset(origin,x*20.-z*8.); + box = Spawn("VoiceBoxActive",origin); + box.ReactionTime = Charge; + box.vel = x*12.; + box.vel.z += 3.; + box.target = Owner; + box.angle = Owner.angle; + box.pitch = Owner.pitch; + return false; + } + States + { + Spawn: + VBOX A -1; + Stop; + } +} + +Class VoiceBoxHitbox : Actor +{ + Default + { + Tag "$T_VOICEBOX"; + Radius 6; + Height 9; + Health 60; + +SHOOTABLE; + +NOGRAVITY; + +NOCLIP; + +DONTSPLASH; + +NOBLOOD; + +NOTELEPORT; + } + override void Tick() + { + Super.Tick(); + if ( !master ) + { + Destroy(); + return; + } + SetOrigin(master.pos,true); + } + override void Die( Actor source, Actor inflictor, int dmgflags, Name MeansOfDeath ) + { + if ( master ) master.ReactionTime = 0; + Super.Die(source,inflictor,dmgflags,MeansOfDeath); + } +} + +Class VoiceBoxActive : Actor +{ + Actor b; + bool alreadyhit; + + override void PostBeginPlay() + { + Super.PostBeginPlay(); + b = Spawn("VoiceBoxHitbox",pos); + b.master = self; + } + action void A_VoiceBoxPlay() + { + static const String BattleSounds[] = + { + "automag/shot", + "utrl/explode", + "automag/shot", + "automag/shot", + "flak/altfire", + "utrl/explode", + "flak/fire", + "shock/fire", + "stinger/hit2", + "automag/shot" + }; + if ( invoker.b ) invoker.b.A_AlertMonsters(0,AMF_TARGETEMITTER); + for ( int i=0; i<10; i++ ) if ( !Random[Voicebox](0,30) ) A_PlaySound(BattleSounds[i],CHAN_AUTO,FRandom[Voicebox](0.5,1.0)); + } + Default + { + Radius 6; + Height 6; + PROJECTILE; + -NOGRAVITY; + +USEBOUNCESTATE; + +SKYEXPLODE; + +MOVEWITHSECTOR; + +CANBOUNCEWATER; + BounceType "Hexen"; + BounceFactor 0.3; + WallBounceFactor 0.3; + Gravity 0.35; + ReactionTime 200; + } + States + { + Spawn: + VBOX A -1; + Stop; + Bounce: + VBOX A 0 + { + if ( alreadyhit ) + { + ClearBounce(); + ExplodeMissile(); + } + else + { + A_SetPitch(0); + A_PlaySound("transloc/bounce"); + if ( BlockingFloor ) alreadyhit = true; + } + } + Goto Spawn; + Death: + VBOX A 30; + VBOX ABCDEFGHIJ 1 + { + A_VoiceBoxPlay(); + ReactionTime--; + return A_JumpIf(ReactionTime<=0,"Death2"); + } + Goto Death+1; + Death2: + TNT1 A 1 A_Log("// TODO explosion"); + Stop; + } } Class Flare : UnrealInventory @@ -209,14 +372,200 @@ Class Dampener : UnrealInventory if ( d && d.bActive ) return true; return false; } + override bool Use( bool pickup ) + { + if ( pickup ) return false; + bActive = !bActive; + Owner.A_PlaySound(bActive?"dampener/on":"dampener/off",CHAN_ITEM); + return false; + } + override void Tick() + { + Super.Tick(); + if ( !bActive ) return; + if ( DrainCharge(1) ) + { + Owner.A_PlaySound("dampener/off",CHAN_ITEM); + PrintPickupMessage(true,StringTable.Localize("$D_DAMPENER")); + } + } + Default + { + Tag "$T_DAMPENER"; + Inventory.PickupMessage "$I_DAMPENER"; + Inventory.Icon "I_Dampen"; + Inventory.MaxAmount 5; + UnrealInventory.Charge 1000; + } + States + { + Spawn: + DAMP A 8 A_CheckProximity(1,"PlayerPawn",80,1,CPXF_ANCESTOR|CPXF_CHECKSIGHT); + Wait; + DAMP ABC 8; + DAMP DEFGHIJ 3; + DAMP D 0 A_CheckProximity(1,"PlayerPawn",80,0,CPXF_ANCESTOR|CPXF_CHECKSIGHT|CPXF_EXACT); + Goto Spawn+4; + DAMP CBA 8; + Goto Spawn; + } } Class Forcefield : UnrealInventory { + Default + { + Tag "$T_FORCEFIELD"; + Inventory.PickupMessage "$I_FORCEFIELD"; + Inventory.Icon "I_ForceF"; + Inventory.MaxAmount 5; + } + override bool Use( bool pickup ) + { + if ( pickup ) return false; + Vector3 x, y, z; + [x, y, z] = dt_CoordUtil.GetAxes(Owner.pitch,Owner.angle,Owner.roll); + Vector3 origin = level.Vec3Offset(Owner.Vec2OffsetZ(0,0,Owner.player.viewz),x*90.); + origin = level.Vec3Offset(origin,(0,0,-GetDefaultByType("ForceFieldEffect").Height*.5)); + if ( !level.IsPointInLevel(origin) ) + { + PrintPickupMessage(true,StringTable.Localize("$M_FFNOROOM")); + return false; + } + let a = Spawn("ForceFieldEffect",origin); + if ( !a.TestMobjLocation() ) + { + PrintPickupMessage(true,StringTable.Localize("$M_FFNOROOM")); + a.Destroy(); + return false; + } + a.target = Owner; + a.angle = Owner.angle; + return true; + } + override void PostBeginPlay() + { + Super.PostBeginPlay(); + tracer = Spawn("ForcefieldX",pos); + tracer.angle = angle; + tracer.target = self; + } + States + { + Spawn: + FFPK A -1; + Stop; + } +} + +Class ForcefieldX : Actor +{ + Default + { + RenderStyle "Add"; + +NOGRAVITY; + +NOCLIP; + +DONTSPLASH; + Radius 0.1; + Height 0; + } + override void Tick() + { + Super.Tick(); + if ( !target ) + { + Destroy(); + return; + } + Warp(target,flags:WARPF_COPYINTERPOLATION|WARPF_NOCHECKPOSITION); + bInvisible = target.bInvisible||!target.InStateSequence(target.CurState,target.FindState("Spawn")); + } + States + { + Spawn: + FFPK A -1 Bright; + Stop; + } +} + +Class ForceFieldLight : DynamicLight +{ + double cdown; + Default + { + DynamicLight.Type "Point"; + +DYNAMICLIGHT.ATTENUATE; + Args 0,0,0,100; + } + override void Tick() + { + Super.Tick(); + if ( !target ) + { + Destroy(); + return; + } + SetOrigin(target.Vec3Offset(0,0,target.height/2.),true); + if ( isFrozen() ) return; + args[LIGHT_RED] = int(255*cdown); + args[LIGHT_BLUE] = int(255*cdown); + if ( target.bSOLID ) + { + cdown = min(1.,cdown+1./27); + return; + } + cdown = max(0.,cdown-1./35); + if ( cdown <= 0. ) Destroy(); + } } Class ForcefieldEffect : Actor { + double nvol; + + Default + { + Tag "$T_FORCEFIELD"; + RenderStyle "Add"; + +NOGRAVITY; + +NOTELEPORT; + +DONTSPLASH; + +CANNOTPUSH; + +SHOOTABLE; + +SOLID; + +NODAMAGE; + +NOBLOOD; + Mass int.max; + Health int.max; + Radius 15; + Height 45; + } + override int DamageMobj( Actor inflictor, Actor source, int damage, Name mod, int flags, double angle ) + { + A_PlaySound("ffield/hit",CHAN_BODY); + return Super.DamageMobj(inflictor,source,damage,mod,flags,angle); + } + override void PostBeginPlay() + { + Super.PostBeginPlay(); + A_PlaySound("ffield/on",CHAN_ITEM); + A_PlaySound("ffield/active",CHAN_VOICE,0.6,true); + let tracer = Spawn("ForceFieldLight",pos); + tracer.target = self; + } + States + { + Spawn: + FFLD ABCDEFGHI 3 Bright; + FFLD J 700 Bright; + FFLD J 35 Bright + { + A_UnsetShootable(); + A_UnsetSolid(); + } + FFLD A 1 Bright A_PlaySound("ffield/hit",CHAN_VOICE); + Stop; + } } Class UFlashlight : UnrealInventory diff --git a/zscript/stinger.zsc b/zscript/stinger.zsc index bcebbc0..5180cf0 100644 --- a/zscript/stinger.zsc +++ b/zscript/stinger.zsc @@ -5,11 +5,11 @@ Class StingerAmmo : Ammo Tag "$T_STINGERAMMO"; Inventory.Icon "I_Stingr"; Inventory.PickupMessage ""; - Inventory.Amount 40; + Inventory.Amount 5; Inventory.MaxAmount 200; - Ammo.BackpackAmount 80; + Ammo.BackpackAmount 20; Ammo.BackpackMaxAmount 400; - Ammo.DropAmount 10; + Ammo.DropAmount 2; } override String PickupMessage() { @@ -25,6 +25,18 @@ Class StingerAmmo : Ammo Class StingerAmmo2 : StingerAmmo { + Default + { + Tag "$T_STINGERAMMO2"; + Inventory.Amount 40; + Ammo.DropAmount 15; + } + States + { + Spawn: + SAMO B -1; + Stop; + } } Class StingerProjectile : Actor @@ -87,6 +99,10 @@ Class Stinger : UTWeapon Weapon.AmmoGive 40; UTWeapon.DropAmmo 20; } + override void PlayUpSound( Actor origin ) + { + origin.A_PlaySound(upsound,CHAN_WEAPON,Dampener.Active(origin)?.1:1.); + } action void A_StingerFire( bool hold = false ) { Weapon weap = Weapon(invoker); @@ -177,7 +193,7 @@ Class Stinger : UTWeapon STNI A 3; STNI A 0 A_Refire(1); Goto Idle; - STNI A 0 A_PlaySound("stinger/hold",CHAN_WEAPON,CountInv("Dampener")?.1:1.,true); + STNI A 0 A_PlaySound("stinger/hold",CHAN_WEAPON,Dampener.Active(self)?.1:1.,true); Hold: STNH A 1 { @@ -188,7 +204,7 @@ Class Stinger : UTWeapon } STNH BCDEFG 1; STNH A 0 A_Refire(); - STNH A 2 A_PlaySound("stinger/release",CHAN_WEAPON); + STNH A 2 A_PlaySound("stinger/release",CHAN_WEAPON,Dampener.Active(self)?.1:1.); Goto Idle; AltFire: STNF A 2 A_StingerAltFire(); diff --git a/zscript/uarmoritems.zsc b/zscript/uarmoritems.zsc index 947005e..19a94b0 100644 --- a/zscript/uarmoritems.zsc +++ b/zscript/uarmoritems.zsc @@ -1,31 +1,250 @@ Class UnrealArmor : UTArmor { + int priority; + + Property AbsorptionPriority : priority; + Default { -INVENTORY.ALWAYSPICKUP; + UnrealArmor.AbsorptionPriority 0; + } + + override void AttachToOwner( Actor other ) + { + Super.AttachToOwner(other); + // re-sort self against other armors based on priority + Inventory cprev = null, prev = null; + for ( Inventory i=other.Inv; i; i=i.Inv ) + { + if ( i.Inv == self ) prev = i; + if ( !(i is 'UnrealArmor') || (i == self) || (UnrealArmor(i).priority >= priority) ) + { + cprev = i; + continue; + } + // got one, move ourselves + if ( prev ) prev.Inv = Inv; + if ( cprev ) cprev.Inv = self; + else other.Inv = self; + Inv = i; + break; + } } } Class UArmor : UnrealArmor { -} - -Class KevlarSuit : UnrealArmor -{ + Default + { + Tag "$T_UARMOR"; + Inventory.Amount 100; + Inventory.MaxAmount 100; + Inventory.InterHubAmount 100; + UTArmor.ArmorAbsorption 90; + UnrealArmor.AbsorptionPriority 7; + Inventory.PickupMessage "$I_UARMOR"; + Inventory.PickupSound "misc/u1armor"; + Inventory.Icon "I_Armor"; + } + States + { + Spawn: + UARM A -1; + Stop; + } } Class AsbestosSuit : UnrealArmor { + Default + { + Tag "$T_ASBSUIT"; + Inventory.Amount 50; + Inventory.MaxAmount 50; + Inventory.InterHubAmount 50; + UTArmor.ArmorAbsorption 50; + UnrealArmor.AbsorptionPriority 6; + Inventory.PickupMessage "$I_ASBSUIT"; + Inventory.PickupSound "misc/suit"; + Inventory.Icon "I_Suit"; + } + override void AbsorbDamage( int damage, Name damageType, out int newdamage ) + { + if ( (damageType == 'Fire') || (damageType == 'Ice') ) damage = newdamage = 0; + Super.AbsorbDamage(damage,damageType,newdamage); + } + override void AttachToOwner( Actor other ) + { + // remove other suits + Inventory i = other.FindInventory("ToxinSuit"); + if ( i ) other.RemoveInventory(i); + i = other.FindInventory("KevlarSuit"); + if ( i ) other.RemoveInventory(i); + Super.AttachToOwner(other); + } + States + { + Spawn: + ASBS A -1; + Stop; + } } Class ToxinSuit : UnrealArmor { + Default + { + Tag "$T_TOXSUIT"; + Inventory.Amount 50; + Inventory.MaxAmount 50; + Inventory.InterHubAmount 50; + UTArmor.ArmorAbsorption 50; + UnrealArmor.AbsorptionPriority 6; + Inventory.PickupMessage "$I_TOXSUIT"; + Inventory.PickupSound "misc/suit"; + Inventory.Icon "I_TSuit"; + } + override void AbsorbDamage( int damage, Name damageType, out int newdamage ) + { + if ( damageType == 'Slime' ) damage = newdamage = 0; + Super.AbsorbDamage(damage,damageType,newdamage); + } + override void AttachToOwner( Actor other ) + { + Super.AttachToOwner(other); + // remove other suits + Inventory i = other.FindInventory("AsbestosSuit"); + if ( i ) other.RemoveInventory(i); + i = other.FindInventory("KevlarSuit"); + if ( i ) other.RemoveInventory(i); + } + States + { + Spawn: + TOXS A -1; + Stop; + } +} + +Class KevlarSuit : UnrealArmor +{ + Default + { + Tag "$T_KEVSUIT"; + Inventory.Amount 100; + Inventory.MaxAmount 100; + Inventory.InterHubAmount 100; + UTArmor.ArmorAbsorption 80; + UnrealArmor.AbsorptionPriority 6; + Inventory.PickupMessage "$I_KEVSUIT"; + Inventory.PickupSound "misc/suit"; + Inventory.Icon "I_Kevlar"; + } + override void AttachToOwner( Actor other ) + { + Super.AttachToOwner(other); + // remove other suits + Inventory i = other.FindInventory("AsbestosSuit"); + if ( i ) other.RemoveInventory(i); + i = other.FindInventory("ToxinSuit"); + if ( i ) other.RemoveInventory(i); + } + States + { + Spawn: + KEVS A -1; + Stop; + } } Class ShieldBelt : UnrealArmor { + override void AbsorbDamage( int damage, Name damageType, out int newdamage ) + { + if ( (damage > 0) && (amount > 0) && !DamageTypeDefinition.IgnoreArmor(damageType) ) + { + Owner.A_PlaySound("belt/absorb",CHAN_7); + UTMainHandler.DoFlash(Owner,Color(80,255,224,0),5); + } + int oldamt = amount; + Super.AbsorbDamage(damage,damageType,newdamage); + if ( (oldamt > 0) && (amount <= 0) ) PrintPickupMessage(true,StringTable.Localize("$D_SHIELDBELT")); + } + Default + { + Tag "$T_SHIELDBELT"; + +COUNTITEM; + +INVENTORY.BIGPOWERUP; + Inventory.Amount 100; + Inventory.MaxAmount 100; + Inventory.InterHubAmount 100; + UTArmor.ArmorAbsorption 100; + UnrealArmor.AbsorptionPriority 10; + Inventory.PickupMessage "$I_SHIELDBELT"; + Inventory.PickupSound "belt/pickup"; + Inventory.RespawnTics 2100; + Inventory.Icon "I_Shield"; + } + States + { + Spawn: + BELT A -1; + Stop; + } } Class PowerShield : UnrealArmor { + bool gothit; + + override void AbsorbDamage( int damage, Name damageType, out int newdamage ) + { + if ( (damage > 0) && (amount > 0) && !DamageTypeDefinition.IgnoreArmor(damageType) ) + { + Owner.A_PlaySound("belt/absorb",CHAN_7); + UTMainHandler.DoFlash(Owner,Color(80,224,0,255),5); + gothit = true; + } + int oldamt = amount; + amount = int.max; // blocks all damage + Super.AbsorbDamage(damage,damageType,newdamage); + amount = oldamt; // does not drain here + } + override void Tick() + { + Super.Tick(); + if ( !Owner || !Owner.player ) return; + if ( gothit ) + { + amount--; + gothit = false; + } + if ( amount <= 0 ) + { + PrintPickupMessage(true,StringTable.Localize("$D_POWERSHIELD")); + DepleteOrDestroy(); + } + } + Default + { + Tag "$T_POWERSHIELD"; + +COUNTITEM; + +INVENTORY.BIGPOWERUP; + Inventory.Amount 200; + Inventory.MaxAmount 200; + Inventory.InterHubAmount 200; + UTArmor.ArmorAbsorption 100; + UnrealArmor.AbsorptionPriority 11; // wow dude + Inventory.PickupMessage "$I_POWERSHIELD"; + Inventory.PickupSound "sbelt/pickup"; + Inventory.RespawnTics 3500; + Inventory.Icon "I_PBelt"; + } + States + { + Spawn: + BELT A -1; + Stop; + } } diff --git a/zscript/uflakcannon.zsc b/zscript/uflakcannon.zsc index 29b4e63..c309b89 100644 --- a/zscript/uflakcannon.zsc +++ b/zscript/uflakcannon.zsc @@ -18,7 +18,7 @@ Class UFlakBox : Ammo States { Spawn: - FBOX A -1; + FAMO A -1; Stop; } } @@ -37,17 +37,21 @@ Class UFlakAmmo : UFlakBox States { Spawn: - FSHL B -1; + FAMO B -1; Stop; } } Class UFlakCannon : UTWeapon { + override void PlayUpSound( Actor origin ) + { + origin.A_PlaySound(upsound,CHAN_WEAPON,Dampener.Active(origin)?.1:1.); + } action void A_Loading( bool first = false ) { - if ( first ) A_PlaySound("flak/load",CHAN_WEAPON); - else A_PlaySound("flak/reload",CHAN_6); + if ( first ) A_PlaySound("flak/load",CHAN_WEAPON,Dampener.Active(self)?.1:1.); + else A_PlaySound("flak/reload",CHAN_6,Dampener.Active(self)?.06:.6); } action void A_FireChunks() { @@ -96,16 +100,16 @@ Class UFlakCannon : UTWeapon States { Spawn: - FLKP A -1; + FPCK A -1; Stop; - FLKP B -1; + FPCK B -1; Stop; Select: FLKS A 1 A_Raise(int.max); Wait; Ready: - FLKS ABCDEFGHIJKLMNOPQRSTUVWXYZ 1 A_WeaponReady(WRF_NOFIRE); - FLS2 ABCD 1 A_WeaponReady(WRF_NOFIRE); + FLKS ABCDFGHIKLMNPQRSUVWXZ 1 A_WeaponReady(WRF_NOFIRE); + FLS2 ABC 1 A_WeaponReady(WRF_NOFIRE); FLKL A 1 A_Loading(true); FLKL BCEFGIJKMNO 1; Goto Idle; @@ -124,7 +128,7 @@ Class UFlakCannon : UTWeapon FLKF A 1 A_FireChunks(); FLKF BCDEFGHI 1; FLKF J 5; - FLKE A 1 A_PlaySound("flak/click",CHAN_6); + FLKE A 1 A_PlaySound("flak/click",CHAN_6,Dampener.Active(self)?.05:.5); FLKE BCDEFGHIJKLMN 1; FLKE S 4; Goto Loading; diff --git a/zscript/unrealcommon.zsc b/zscript/unrealcommon.zsc index 528c93c..c8f7508 100644 --- a/zscript/unrealcommon.zsc +++ b/zscript/unrealcommon.zsc @@ -124,7 +124,7 @@ Class UPlayer : UTPlayer if ( !type ) continue; let def = GetDefaultByType (type); if ( def.Icon.isValid() && (def.MaxAmount > 1) && - !(type is "PuzzleItem") && !(type is "Powerup") && !(type is "Ammo") && !(type is "Armor")) + !(type is "PuzzleItem") && !(type is "Powerup") && !(type is "Ammo") && !(type is "Armor") ) { // Do not give replaced items unless using "give everything" if ( (giveall == ALL_YESYES) || (GetReplacement(type) == type) ) @@ -488,10 +488,42 @@ Class UnrealInventory : Inventory // Drawstuffs over HUD virtual ui void PostRender( double lbottom ) {} + bool DrainCharge( int val ) + { + Charge -= val; + if ( Charge > 0 ) return false; + if ( Amount > 1 ) + { + Amount--; + Charge = DefaultCharge; + bActive = false; + return true; + } + DepleteOrDestroy(); + return true; + } + override void AttachToOwner( Actor other ) + { + Super.AttachToOwner(other); + Charge = DefaultCharge; + } + override bool HandlePickup( Inventory item ) + { + if ( (item.GetClass() == GetClass()) && ((MaxAmount > 1) || (DefaultCharge > 0)) ) + { + if ( MaxAmount > 1 ) Amount = min(MaxAmount,Amount+item.Amount); + else Charge = DefaultCharge; // reset charge + item.bPickupGood = true; + return true; + } + return Super.HandlePickup(item); + } + Default { +INVENTORY.INVBAR; UnrealInventory.Charge 0; + Inventory.PickupSound "misc/p_pkup"; } } @@ -599,21 +631,6 @@ Class UnrealStaticHandler : StaticEventHandler Class UnrealMainHandler : EventHandler { - // can't detect terraindef-based damage - // this is currently an engine limitation - static bool, bool DetectHurtfloors() - { - bool foundslime = false, foundlava = false; - for ( int i=0; i OldAmmoType[18]; String OldArmor[6]; Class OldArmorType[6]; + String OldKeys[7]; HUDFont mOldDigits; // Translations @@ -59,6 +60,13 @@ Class UnrealHUD : BaseStatusBar IconSel = TexMan.CheckForTexture("IconSel",TexMan.Type_Any); IconBase = TexMan.CheckForTexture("IconBase",TexMan.Type_Any); RedIcon = Translation.GetID('RedIcon'); + KeyIcons[0] = TexMan.CheckForTexture("I_KeyR",TexMan.Type_Any); + KeyIcons[1] = TexMan.CheckForTexture("I_KeyB",TexMan.Type_Any); + KeyIcons[2] = TexMan.CheckForTexture("I_KeyY",TexMan.Type_Any); + KeyIcons[3] = TexMan.CheckForTexture("I_SkullR",TexMan.Type_Any); + KeyIcons[4] = TexMan.CheckForTexture("I_SkullB",TexMan.Type_Any); + KeyIcons[5] = TexMan.CheckForTexture("I_SkullY",TexMan.Type_Any); + KeyIcons[6] = TexMan.CheckForTexture("I_KeyG",TexMan.Type_Any); mOldDigits = HUDFont.Create(Font.FindFont('U083Digits'),26,Mono_CellLeft); OldAmmo[0] = "Disp083"; OldAmmo[1] = "Clip083"; @@ -108,6 +116,13 @@ Class UnrealHUD : BaseStatusBar OldArmorType[3] = "ToxinSuit"; OldArmorType[4] = "ShieldBelt"; OldArmorType[5] = "PowerShield"; + OldKeys[0] = "Redk083"; + OldKeys[1] = "Bluek083"; + OldKeys[2] = "Goldk083"; + OldKeys[3] = "Rskul083"; + OldKeys[4] = "Bskul083"; + OldKeys[5] = "Gskul083"; + OldKeys[6] = "Grenk083"; } override void Draw( int state, double TicFrac ) @@ -145,15 +160,17 @@ Class UnrealHUD : BaseStatusBar UTWeapon(CPlayer.ReadyWeapon).PostRender(lbottom); } - private void DrawNumberOf( int n, double x, double y ) + private void DrawNumberOf( Inventory i, double x, double y ) { - if ( n <= 0 ) return; - CurX = X-4; - CurY = Y+20; - n++; - string itxt = String.Format("%d",n); + if ( i.Amount <= 1 ) return; + double TempX = CurX, TempY = CurY; + string itxt = String.Format("%d",i.Amount); + CurX += 30; + CurY += 23; CurX -= TinyRedFont.StringWidth(itxt); Screen.DrawText(TinyRedFont,Font.CR_UNTRANSLATED,CurX,CurY,itxt,DTA_VirtualWidthF,ClipX,DTA_VirtualHeightF,ClipY,DTA_KeepRatio,true); + CurX = TempX; + CurY = TempY; } private void DrawIconValue( int n ) @@ -190,8 +207,10 @@ Class UnrealHUD : BaseStatusBar Screen.DrawTexture(IconBase,false,CurX,CurY,DTA_VirtualWidthF,ClipX,DTA_VirtualHeightF,ClipY,DTA_KeepRatio,true); Screen.DrawTexture(i.Icon,false,dx,dy,DTA_VirtualWidthF,dw,DTA_VirtualHeightF,dh,DTA_KeepRatio,true,DTA_TopOffset,0,DTA_LeftOffset,0); } - if ( (i is 'UnrealInventory') && (UnrealInventory(i).DefaultCharge > 0) ) - Screen.DrawTexture(HudLine,false,CurX+2,CurY+29,DTA_VirtualWidthF,ClipX,DTA_VirtualHeightF,ClipY,DTA_KeepRatio,true,DTA_WindowRightF,Min(27.*(UnrealInventory(i).Charge/double(UnrealInventory(i).DefaultCharge)),27.)); + if ( (i is 'UnrealInventory') && (UnrealInventory(i).DefaultCharge > 0) && (UnrealInventory(i).Charge < UnrealInventory(i).DefaultCharge) ) + Screen.DrawTexture(HudLine,false,CurX+2,CurY+29,DTA_VirtualWidthF,ClipX,DTA_VirtualHeightF,ClipY,DTA_KeepRatio,true,DTA_WindowRightF,Min(28.*(UnrealInventory(i).Charge/double(UnrealInventory(i).DefaultCharge)),28.)); + else if ( (i is 'UTArmor') && !HudMode ) + Screen.DrawTexture(HudLine,false,CurX+2,CurY+29,DTA_VirtualWidthF,ClipX,DTA_VirtualHeightF,ClipY,DTA_KeepRatio,true,DTA_WindowRightF,Min(28.*(i.Amount/double(i.MaxAmount)),28.)); } private void DrawFragCount( double x, double y ) @@ -347,7 +366,7 @@ Class UnrealHUD : BaseStatusBar { bRed = ((Prev is 'UnrealInventory') && UnrealInventory(Prev).bActive) || (Prev is 'Powerup') || ((Prev is 'UTranslator') && bFlashTranslator); DrawHudIcon(x,y,Prev,bRed); - if ( Prev.MaxAmount > 1 ) DrawNumberOf(Prev.Amount,x,y); + if ( Prev.MaxAmount > 1 ) DrawNumberOf(Prev,x,y); } bRed = ((SelectedItem is 'UnrealInventory') && UnrealInventory(SelectedItem).bActive) || (SelectedItem is 'Powerup') || ((SelectedItem is 'UTranslator') && bFlashTranslator); if ( !Next && !Prev && !bDrawOne ) DrawHudIcon(x+64,y,SelectedItem,bRed); @@ -355,13 +374,13 @@ Class UnrealHUD : BaseStatusBar CurX = x+32; if ( !Next && !Prev && !bDrawOne ) CurX = x+64; CurY = y; - Screen.DrawTexture(IconSel,false,CurX,CurY,DTA_VirtualWidthF,ClipX,DTA_VirtualHeightF,ClipY,DTA_KeepRatio,true); - if ( SelectedItem.MaxAmount > 1 ) DrawNumberOf(SelectedItem.Amount,CurX,y); + Screen.DrawTexture(IconSel,false,CurX,CurY,DTA_VirtualWidthF,ClipX,DTA_VirtualHeightF,ClipY,DTA_KeepRatio,true,DTA_Alpha,0.5); + if ( SelectedItem.MaxAmount > 1 ) DrawNumberOf(SelectedItem,CurX,y); if ( Next ) { bRed = ((Next is 'UnrealInventory') && UnrealInventory(Next).bActive) || (Next is 'Powerup') || ((Next is 'UTranslator') && bFlashTranslator); DrawHudIcon(x+64,y,Next,bRed); - if ( Next.MaxAmount > 1 ) DrawNumberOf(Next.Amount,x+64,y); + if ( Next.MaxAmount > 1 ) DrawNumberOf(Next,x+64,y); } } @@ -380,8 +399,10 @@ Class UnrealHUD : BaseStatusBar if ( !bDrawOne ) { DrawHudIcon(CurX,y,Inv,false); - DrawIconValue(Inv.Amount); CurX += 32; + CurY += HudMode?29:27; + DrawIconValue(Inv.Amount); + CurY -= HudMode?29:27; } else if ( UTArmor(Inv).absorb > CurAbs ) { @@ -392,11 +413,13 @@ Class UnrealHUD : BaseStatusBar if ( bDrawOne && BestArmor ) { DrawHudIcon(CurX,Y,BestArmor,false); - DrawIconValue(BestArmor.Amount); CurX += 32; + CurY += HudMode?29:27; + DrawIconValue(BestArmor.Amount); + CurY -= HudMode?29:27; } if ( (ArmorAmount > 0) && !HudMode ) - Screen.DrawText(LargeFont,Font.CR_UNTRANSLATED,CurX,Y,String.Format("%d",ArmorAmount),DTA_VirtualWidthF,ClipX,DTA_VirtualHeightF,ClipY,DTA_KeepRatio,true); + Screen.DrawText(LargeFont,Font.CR_UNTRANSLATED,CurX+2,Y,String.Format("%d",ArmorAmount),DTA_VirtualWidthF,ClipX,DTA_VirtualHeightF,ClipY,DTA_KeepRatio,true); } private void DrawAmmo( double x, double y ) @@ -426,7 +449,7 @@ Class UnrealHUD : BaseStatusBar CurX = X+2; CurY = Y+29; if ( (HudMode != 1) && (HudMode != 2) && (HudMode != 4) ) - Screen.DrawTexture(HudLine,false,CurX,CurY,DTA_VirtualWidthF,ClipX,DTA_VirtualHeightF,ClipY,DTA_KeepRatio,true,DTA_WindowRightF,Min(27.*(CPlayer.ReadyWeapon.Ammo1.Amount/double(CPlayer.ReadyWeapon.Ammo1.MaxAmount)),27.)); + Screen.DrawTexture(HudLine,false,CurX,CurY,DTA_VirtualWidthF,ClipX,DTA_VirtualHeightF,ClipY,DTA_KeepRatio,true,DTA_WindowRightF,Min(28.*(CPlayer.ReadyWeapon.Ammo1.Amount/double(CPlayer.ReadyWeapon.Ammo1.MaxAmount)),28.)); // TODO secondary ammo display } @@ -441,11 +464,11 @@ Class UnrealHUD : BaseStatusBar CurY += 29; DrawIconValue(Max(0,CPlayer.mo.Health)); CurY -= 29; - if ( !HudMode ) Screen.DrawText(cfont,Font.CR_UNTRANSLATED,CurX,CurY,String.Format("%d",Max(0,CPlayer.mo.Health)),DTA_VirtualWidthF,ClipX,DTA_VirtualHeightF,ClipY,DTA_KeepRatio,true); + if ( !HudMode ) Screen.DrawText(cfont,Font.CR_UNTRANSLATED,CurX+2,CurY,String.Format("%d",Max(0,CPlayer.mo.Health)),DTA_VirtualWidthF,ClipX,DTA_VirtualHeightF,ClipY,DTA_KeepRatio,true); CurX = X+2; CurY = Y+29; if ( (HudMode != 1) && (HudMode != 2) && (HudMode != 4) ) - Screen.DrawTexture(HudLine,false,CurX,CurY,DTA_VirtualWidthF,ClipX,DTA_VirtualHeightF,ClipY,DTA_KeepRatio,true,DTA_WindowRightF,Min(27.*(CPlayer.mo.Health/double(CPlayer.mo.SpawnHealth())),27.)); + Screen.DrawTexture(HudLine,false,CurX,CurY,DTA_VirtualWidthF,ClipX,DTA_VirtualHeightF,ClipY,DTA_KeepRatio,true,DTA_WindowRightF,Min(28.*(CPlayer.mo.Health/double(CPlayer.mo.SpawnHealth())),28.)); } private void DrawIdentifyInfo() @@ -470,9 +493,25 @@ Class UnrealHUD : BaseStatusBar } } - private void DrawKeys( double x, double y ) + private void DrawKeys( double x, double y, bool leftright = false ) { - // TODO draws the key icons from right to left, bottom to top + if ( deathmatch ) return; // no need to draw in DM + if ( gameinfo.gametype&(GAME_Hexen|GAME_Strife) ) return; // no key display for these ATM (will do eventually) + CurX = x; + CurY = y; + int cnt = 0; + for ( int i=0; i<6; i++ ) + { + if ( !CPlayer.mo.CheckKeys(i+1,false,true) ) continue; + Screen.DrawTexture(KeyIcons[((i==0)&&(gameinfo.gametype&GAME_Heretic))?6:i],false,CurX,CurY,DTA_VirtualWidthF,ClipX,DTA_VirtualHeightF,ClipY,DTA_KeepRatio,true); + cnt++; + if ( !(cnt%3) ) + { + CurX = x; + CurY -= 16; + } + else CurX += leftright?16:-16; + } } private void DrawUnrealHUD() @@ -499,13 +538,20 @@ Class UnrealHUD : BaseStatusBar else if ( HudMode == 3 ) DrawInventory(ClipX-96,ClipY-64); else if ( HudMode == 4 ) DrawInventory(ClipX-64,ClipY-64,true); else if ( HudMode == 2 ) DrawInventory(ClipX/2-64,ClipY-32); - // Display Frag count - if ( HudMode < 3 ) DrawFragCount(ClipX-32,ClipY-64); - else if ( HudMode == 3 ) DrawFragCount(0,ClipY-64); - else if ( HudMode == 4 ) DrawFragCount(0,ClipY-32); - // Display Keys - if ( HudMode < 3 ) DrawKeys(ClipX-32,ClipY-32); - else if ( HudMode < 6 ) DrawKeys(ClipX,ClipY-32); + if ( deathmatch ) + { + // Display Frag count + if ( HudMode < 3 ) DrawFragCount(ClipX-32,ClipY-64); + else if ( HudMode == 3 ) DrawFragCount(0,ClipY-64); + else if ( HudMode == 4 ) DrawFragCount(0,ClipY-32); + } + else + { + // Display Keys + if ( HudMode < 3 ) DrawKeys(ClipX-(deathmatch?48:16),ClipY-48); + else if ( HudMode == 3 ) DrawKeys(deathmatch?32:0,ClipY-48,true); + else if ( HudMode == 4 ) DrawKeys(deathmatch?32:0,ClipY-16,true); + } // Display Identification Info DrawIdentifyInfo(); } @@ -515,6 +561,7 @@ Class UnrealHUD : BaseStatusBar // 0.83 status bar, just for funsies DrawImage("Bar083",(0,336),DI_ITEM_OFFSETS); static const float slotofs[] = {525, 84, 128, 173, 216, 259, 349, 392, 436, 481}; + static const float keyofs[] = {187, 211, 235, 379, 403, 427}; for ( int i=0; i<10; i++ ) { if ( !CPlayer.HasWeaponsInSlot(i) ) continue; @@ -557,20 +604,27 @@ Class UnrealHUD : BaseStatusBar break; } } + for ( int i=0; i<6; i++ ) + { + if ( !CPlayer.mo.CheckKeys(i+1,false,true) ) continue; + DrawImage(OldKeys[((i==0)&&(gameinfo.gametype&GAME_Heretic))?6:i],(keyofs[i],366),DI_ITEM_OFFSETS); + } + if ( HudMode > 5 ) return; + // Draw frags in DM + if ( deathmatch ) DrawFragCount(ClipX-32,0); // Need to draw the inventory bar (and translator) - if ( ClipX < 320 ) HudMode = 4; - DrawInventory(ClipX-96,0,false,true); + DrawInventory(ClipX-(deathmatch?128:96),0,false,true); } override void Tick() { Super.Tick(); + CPlayer.inventorytics = 0; vtracer.ignore = CPlayer.mo; vtracer.trace(CPlayer.mo.Vec2OffsetZ(0,0,CPlayer.viewz),CPlayer.mo.CurSector,(cos(CPlayer.mo.angle)*cos(CPlayer.mo.pitch),sin(CPlayer.mo.angle)*cos(CPlayer.mo.pitch),-sin(CPlayer.mo.pitch)),1000,0); if ( vtracer.Results.HitType != TRACE_HitActor ) return; lastseen = vtracer.Results.HitActor; lastseentic = gametic; - CPlayer.inventorytics = 0; } override void DrawAutomapHUD( double ticFrac ) @@ -590,17 +644,8 @@ Class UnrealHUD : BaseStatusBar [tmp,tmp,hres] = StatusbarToRealCoords(0,0,HorizontalResolution); double swidth = 0; double ltop = 0, rtop = 0; - if ( HudMode < 2 ) - { - for ( Inventory Inv=CPlayer.mo.Inv; Inv; Inv=Inv.Inv ) - { - if ( !(Inv is 'UTArmor') ) continue; - if ( (Inv.Amount <= 0) || Inv.Icon.IsNull() ) continue; - rtop += 64*scalev.y; - break; - } - if ( CPlayer.mo.InvSel ) ltop += 64*scalev.y; - } + if ( (HudMode < 6) && CPlayer.mo.InvSel ) + rtop += (32*scalev.y)/scale.Y; int protrusion = GetProtrusion(swidth/hres); [tmp,tmp,hres] = StatusbarToRealCoords(0,0,protrusion); width += int((swidth-hres)/scale.X); diff --git a/zscript/upowerups.zsc b/zscript/upowerups.zsc index 78e8f69..be09eec 100644 --- a/zscript/upowerups.zsc +++ b/zscript/upowerups.zsc @@ -18,6 +18,23 @@ Class Amplifier : UnrealInventory Class UJumpBoots : UnrealInventory { + override void PostBeginPlay() + { + Super.PostBeginPlay(); + // detect hurtfloors + // can't detect terraindef-based damage + // this is currently an engine limitation + bool foundslime = false; + bool foundlava = false; + for ( int i=0; i