diff --git a/Readme.md b/Readme.md index 89c1837..c23c852 100644 --- a/Readme.md +++ b/Readme.md @@ -58,19 +58,21 @@ This mod requires GZDoom 4.2.4 or later. - UT gore system (WIP, toggleable) - Liquid splashes - Original Invulnerability and Night Vision items + - Hexen compatibility ## In progress - - Tooltips for menu options. - - Help screens describing items and stuff (maybe?). + - N/A, this is the 1.1 release. ## Planned - - Stuff for 1.1 - - Fancy titlemap like Doomreal. + - Stuff for 1.2 + - Fancy titlemap with intro narration. - Touch up blood/gibbing features. At the moment, Nashgore is still a superior alternative. - - Hexen/Strife compatibility ??? + - Help screens describing items and stuff (maybe?). + - Chex Quest compatibility ? + - Strife compatibility ???? - Stuff for much later - Add ammo counters to Pulsegun, Minigun, Flak Cannon and Rocket Launcher once scripted textures are implemented diff --git a/brightmaps/JAmmoBox1.png b/brightmaps/JAmmoBox1.png new file mode 100644 index 0000000..ebc2c47 Binary files /dev/null and b/brightmaps/JAmmoBox1.png differ diff --git a/brightmaps/S_Ammo.png b/brightmaps/S_Ammo.png new file mode 100644 index 0000000..bc5cee2 Binary files /dev/null and b/brightmaps/S_Ammo.png differ diff --git a/gldefs.txt b/gldefs.txt index 3930326..f1b9e19 100644 --- a/gldefs.txt +++ b/gldefs.txt @@ -242,6 +242,51 @@ Object ActUTNightVision Frame "UKEY" { light "UTVISLIGHT" } } +PointLight UTAMMOBOXLOW +{ + Color 0.1 0.2 0.5 + Size 16 + Offset 0 20 0 + Attenuate 1 +} +PointLight UTAMMOBOXMED +{ + Color 0.2 0.5 0.1 + Size 18 + Offset 0 20 0 + Attenuate 1 +} +PointLight UTAMMOBOXHIGH +{ + Color 0.5 0.1 0.2 + Size 20 + Offset 0 20 0 + Attenuate 1 +} +PointLight UTAMMOBOXFULL +{ + Color 0.3 0.1 0.5 + Size 24 + Offset 0 20 0 + Attenuate 1 +} +Object UTMinorAmmoBox +{ + Frame "ABOX" { light "UTAMMOBOXLOW" } +} +Object UTMediumAmmoBox +{ + Frame "ABOX" { light "UTAMMOBOXMED" } +} +Object UTMajorAmmoBox +{ + Frame "ABOX" { light "UTAMMOBOXHIGH" } +} +Object ActUTFullAmmoBox +{ + Frame "ABOX" { light "UTAMMOBOXFULL" } +} + // Shaders / Brightmaps HardwareShader Texture "models/Jgreen.png" { @@ -811,6 +856,32 @@ HardwareShader Texture "models/Effect1.png" { Shader "shaders/glsl/MeshEnviroMap_AmbientGlow.fp" } +HardwareShader Texture "models/ABoxBlue_env.png" +{ + Shader "shaders/glsl/MeshEnviroMap_AmbientGlow.fp" +} +HardwareShader Texture "models/ABoxGreen_env.png" +{ + Shader "shaders/glsl/MeshEnviroMap_AmbientGlow.fp" +} +HardwareShader Texture "models/ABoxRed_env.png" +{ + Shader "shaders/glsl/MeshEnviroMap_AmbientGlow.fp" +} +HardwareShader Texture "models/ABoxPurple_env.png" +{ + Shader "shaders/glsl/MeshEnviroMap_AmbientGlow.fp" +} +HardwareShader Texture "models/JAmmoBox1.png" +{ + Shader "shaders/glsl/AmbientGlow_Brightmapped.fp" + Texture brighttex "brightmaps/JAmmoBox1.png" +} +HardwareShader Texture "models/S_Ammo.png" +{ + Shader "shaders/glsl/AmbientGlow_Brightmapped.fp" + Texture brighttex "brightmaps/S_Ammo.png" +} // PP shaders HardwareShader PostProcess scene { diff --git a/graphics/DTLogo.png b/graphics/DTLogo.png index 3fd25d2..c237da3 100644 Binary files a/graphics/DTLogo.png and b/graphics/DTLogo.png differ diff --git a/graphics/hud/ItemABox.png b/graphics/hud/ItemABox.png new file mode 100644 index 0000000..a4623dc Binary files /dev/null and b/graphics/hud/ItemABox.png differ diff --git a/language.txt b/language.txt index 4a4ebdb..58d1857 100644 --- a/language.txt +++ b/language.txt @@ -88,6 +88,10 @@ I_REDEEMER = "You got the Redeemer."; I_CHAINSAWAMMO = "You picked up a Fuel Can."; I_UTINVUL = "You have Invulnerability!"; I_UTVISION = "You have Night Vision."; +I_AMMOBOXLOW = "You picked up a lesser Ammo Cube."; +I_AMMOBOXMED = "You picked up a medium Ammo Cube."; +I_AMMOBOXHIGH = "You picked up a greater Ammo Cube."; +I_AMMOBOXFULL = "You got a full Ammo Cube."; /* Tags */ T_ARMORBONUS = "Armor Bonus"; T_THIGHPADS = "Thigh Pads"; @@ -144,6 +148,10 @@ T_REDEEMER = "Redeemer"; T_CHAINSAWAMMO = "Chainsaw Fuel"; T_UTINVUL = "Invulnerability"; T_UTVISION = "Night Vision"; +T_AMMOBOXLOW = "Lesser Ammo Cube"; +T_AMMOBOXMED = "Medium Ammo Cube"; +T_AMMOBOXHIGH = "Greater Ammo Cube"; +T_AMMOBOXFULL = "Full Ammo Cube"; /* Miscellaneous */ D_SHIELDBELT = "The Shield Belt has depleted."; D_UDAMAGE = "Damage Amplifier has worn off."; @@ -362,6 +370,10 @@ I_REDEEMER = "Has obtenido el Redentor."; I_CHAINSAWAMMO = "Has recogido una Lata de Combustible."; I_UTINVUL = "Tienes la Invulnerabilidad!"; I_UTVISION = "Tienes la Visión Nocturna."; +I_AMMOBOXLOW = "Has recogido un Cubo de Munición menor."; +I_AMMOBOXMED = "Has recogido un Cubo de Munición mediano."; +I_AMMOBOXHIGH = "Has recogido un Cubo de Munición mayor."; +I_AMMOBOXFULL = "Has obtenido un Cubo de Munición completa."; /* Tags */ T_ARMORBONUS = "Armadura Extra"; T_THIGHPADS = "Musleras"; @@ -418,6 +430,10 @@ T_REDEEMER = "Redentor"; T_CHAINSAWAMMO = "Combustible de Motosierra"; T_UTINVUL = "Invulnerabilidad"; T_UTVISION = "Visión Nocturna"; +T_AMMOBOXLOW = "Cubo de Munición menor"; +T_AMMOBOXMED = "Cubo de Munición mediano"; +T_AMMOBOXHIGH = "Cubo de Munición mayor"; +T_AMMOBOXFULL = "Cubo de Munición completa"; /* Miscellaneous */ D_SHIELDBELT = "El Cinturón Protector se ha agotado."; D_UDAMAGE = "El Amplificador de Daño ha desaparecido."; diff --git a/modeldef.misc b/modeldef.misc index 7b0bc89..b26431d 100644 --- a/modeldef.misc +++ b/modeldef.misc @@ -886,3 +886,60 @@ Model "UTLavaSplish" FrameIndex SPSH Y 0 25 FrameIndex SPSH Z 0 26 } + +Model "UTMinorAmmoBox" +{ + Path "models" + Model 0 "AmmoCube_d.3d" + SurfaceSkin 0 0 "JAmmoBox1.png" + SurfaceSkin 0 1 "ABoxBlue_env.png" + SurfaceSkin 0 2 "S_Ammo.png" + Scale 0.015 0.015 0.015 + ZOffset 20 + ROTATING + Rotation-Speed 3 + + FrameIndex ABOX A 0 0 +} +Model "UTMediumAmmoBox" +{ + Path "models" + Model 0 "AmmoCube_d.3d" + SurfaceSkin 0 0 "JAmmoBox1.png" + SurfaceSkin 0 1 "ABoxGreen_env.png" + SurfaceSkin 0 2 "S_Ammo.png" + Scale 0.017 0.017 0.017 + ZOffset 20 + ROTATING + Rotation-Speed 3 + + FrameIndex ABOX A 0 0 +} +Model "UTMajorAmmoBox" +{ + Path "models" + Model 0 "AmmoCube_d.3d" + SurfaceSkin 0 0 "JAmmoBox1.png" + SurfaceSkin 0 1 "ABoxRed_env.png" + SurfaceSkin 0 2 "S_Ammo.png" + Scale 0.02 0.02 0.02 + ZOffset 20 + ROTATING + Rotation-Speed 3 + + FrameIndex ABOX A 0 0 +} +Model "ActUTFullAmmoBox" +{ + Path "models" + Model 0 "AmmoCube_d.3d" + SurfaceSkin 0 0 "JAmmoBox1.png" + SurfaceSkin 0 1 "ABoxPurple_env.png" + SurfaceSkin 0 2 "S_Ammo.png" + Scale 0.03 0.03 0.03 + ZOffset 20 + ROTATING + Rotation-Speed 3 + + FrameIndex ABOX A 0 0 +} diff --git a/models/ABoxBlue_env.png b/models/ABoxBlue_env.png new file mode 100644 index 0000000..727b38d Binary files /dev/null and b/models/ABoxBlue_env.png differ diff --git a/models/ABoxGreen_env.png b/models/ABoxGreen_env.png new file mode 100644 index 0000000..6ae2275 Binary files /dev/null and b/models/ABoxGreen_env.png differ diff --git a/models/ABoxPurple_env.png b/models/ABoxPurple_env.png new file mode 100644 index 0000000..75b4a6b Binary files /dev/null and b/models/ABoxPurple_env.png differ diff --git a/models/ABoxRed_env.png b/models/ABoxRed_env.png new file mode 100644 index 0000000..65acab2 Binary files /dev/null and b/models/ABoxRed_env.png differ diff --git a/models/AmmoCube_d.3d b/models/AmmoCube_d.3d index 53eb247..297b8b0 100644 Binary files a/models/AmmoCube_d.3d and b/models/AmmoCube_d.3d differ diff --git a/models/JAmmoBox1.png b/models/JAmmoBox1.png index 7dab7e4..31c4552 100644 Binary files a/models/JAmmoBox1.png and b/models/JAmmoBox1.png differ diff --git a/models/NewGreen.png b/models/NewGreen.png deleted file mode 100644 index 58f1ae4..0000000 Binary files a/models/NewGreen.png and /dev/null differ diff --git a/models/newblue.png b/models/newblue.png deleted file mode 100644 index ec2a4a6..0000000 Binary files a/models/newblue.png and /dev/null differ diff --git a/models/newgold.png b/models/newgold.png deleted file mode 100644 index ccfa0a1..0000000 Binary files a/models/newgold.png and /dev/null differ diff --git a/models/newred.png b/models/newred.png deleted file mode 100644 index 7d35413..0000000 Binary files a/models/newred.png and /dev/null differ diff --git a/shaders/glsl/MeshEnviroMap.fp b/shaders/glsl/MeshEnviroMap.fp index 09ed936..572c467 100644 --- a/shaders/glsl/MeshEnviroMap.fp +++ b/shaders/glsl/MeshEnviroMap.fp @@ -3,5 +3,5 @@ vec4 ProcessTexel() { vec3 eyedir = normalize(uCameraPos.xyz-pixelpos.xyz); vec3 norm = reflect(eyedir,normalize(vWorldNormal.xyz)); - return getTexel(norm.xz*0.5); + return getTexel(norm.xz*0.5+0.5); } diff --git a/shaders/glsl/MeshEnviroMap_AmbientGlow.fp b/shaders/glsl/MeshEnviroMap_AmbientGlow.fp index 58c5107..937ac4e 100644 --- a/shaders/glsl/MeshEnviroMap_AmbientGlow.fp +++ b/shaders/glsl/MeshEnviroMap_AmbientGlow.fp @@ -10,5 +10,5 @@ vec4 ProcessTexel() { vec3 eyedir = normalize(uCameraPos.xyz-pixelpos.xyz); vec3 norm = reflect(eyedir,normalize(vWorldNormal.xyz)); - return getTexel(norm.xz*0.5); + return getTexel(norm.xz*0.5+0.5); } diff --git a/sndinfo.txt b/sndinfo.txt index 04c63fb..c42966c 100644 --- a/sndinfo.txt +++ b/sndinfo.txt @@ -166,6 +166,12 @@ $random ut/playerfootstep { ut/playerfootstep1 ut/playerfootstep2 ut/playerfoots ut/bossfootstep bfootstp +// Hexen fixup +PlayerLand DSEMPTY +PuzzleFailFighter DSEMPTY +PuzzleFailCleric DSEMPTY +PuzzleFailMage DSEMPTY + // fluid sounds ut/playerfootstepwet lsplash diff --git a/textures.misc b/textures.misc index 73a5155..821f667 100644 --- a/textures.misc +++ b/textures.misc @@ -21,3 +21,4 @@ Sprite "CHIPA0",1,1{} Sprite "USKLA0",1,1{} Sprite "UKEYA0",1,1{} Sprite "RNGXA0",1,1{} +Sprite "ABOXA0",1,1{} diff --git a/zscript/compat.zsc b/zscript/compat.zsc index 9f64d84..5a0b4b1 100644 --- a/zscript/compat.zsc +++ b/zscript/compat.zsc @@ -287,13 +287,13 @@ Class UTHexenAmmoBox : Inventory default { UTHexenAmmoBox.AmmoFactor -1; - +INVENTORY.ALWAYSPICKUP; - Inventory.PickupSound = "misc/i_pkup"; + +FLOATBOB; + Inventory.PickupSound "misc/i_pkup"; } override bool TryPickup( in out Actor toucher ) { - bool hasgiven = (AmmoFactor <= 0); // always true + bool hasgiven = (AmmoFactor < 0); // always true for ( int i=0; i)(AllActorClasses[i]); @@ -315,23 +315,27 @@ Class UTHexenAmmoBox : Inventory } } // sneaky fix for chainsaw ammo - if ( (type is 'ChainsawAmmo') && flak_sawammo ) isvalid = true; + if ( (type is 'ChainsawAmmo') && flak_sawammo && (GetReplacement(type) == type) ) isvalid = true; if ( !isvalid ) continue; let ammoitem = Ammo(toucher.FindInventory(type)); - int amount; - if ( AmmoFactor < 0 ) amount = GetDefaultByType(type).MaxAmount; + int amount = GetDefaultByType(type).BackpackAmount; + if ( AmmoFactor < 0 ) + { + if ( ammoitem ) amount = ammoitem.MaxAmount; + else amount = GetDefaultByType(type).MaxAmount; + } else { - amount = (GetDefaultByType(type).Amount*100)/AmmoFactor; + amount = (amount*AmmoFactor)/100; // extra ammo in baby mode and nightmare mode if ( !bIgnoreSkill ) amount = int(amount*G_SkillPropertyFloat(SKILLP_AmmoFactor)); } - if ( amount < 0 ) amount = 0; + if ( amount <= 0 ) continue; if ( !ammoitem ) { // The player did not have the ammoitem. Add it. ammoitem = Ammo(Spawn(type)); - ammoitem.Amount = bDepleted?0:amount; + ammoitem.Amount = amount; if ( ammoitem.Amount > ammoitem.MaxAmount ) ammoitem.Amount = ammoitem.MaxAmount; ammoitem.AttachToOwner(toucher); @@ -340,7 +344,7 @@ Class UTHexenAmmoBox : Inventory else { // The player had the ammoitem. Give some more. - if ( !bDepleted && (ammoitem.Amount < ammoitem.MaxAmount) ) + if ( ammoitem.Amount < ammoitem.MaxAmount ) { ammoitem.Amount += amount; if ( ammoitem.Amount > ammoitem.MaxAmount ) @@ -375,12 +379,12 @@ Class UTMediumAmmoBox : UTHexenAmmoBox { Tag "$T_AMMOBOXMED"; Inventory.PickupMessage "$I_AMMOBOXMED"; - UTHexenAmmoBox.AmmoFactor 120; + UTHexenAmmoBox.AmmoFactor 90; } States { Spawn: - ABOX B -1; + ABOX A -1; Stop; } } @@ -390,12 +394,12 @@ Class UTMajorAmmoBox : UTHexenAmmoBox { Tag "$T_AMMOBOXHIGH"; Inventory.PickupMessage "$I_AMMOBOXHIGH"; - UTHexenAmmoBox.AmmoFactor 180; + UTHexenAmmoBox.AmmoFactor 120; } States { Spawn: - ABOX C -1; + ABOX A -1; Stop; } } @@ -407,6 +411,7 @@ Class ActUTFullAmmoBox : UTActivatable Inventory.Icon "ItemABox"; Inventory.PickupMessage "$I_AMMOBOXFULL"; +COUNTITEM; + +FLOATBOB; +INVENTORY.BIGPOWERUP; UTActivatable.GiveItem "UTHexenAmmoBox"; Inventory.RespawnTics 4200; @@ -414,7 +419,7 @@ Class ActUTFullAmmoBox : UTActivatable States { Spawn: - ABOX D -1; + ABOX A -1; Stop; } } diff --git a/zscript/impacthammer.zsc b/zscript/impacthammer.zsc index 480d336..d5053df 100644 --- a/zscript/impacthammer.zsc +++ b/zscript/impacthammer.zsc @@ -66,7 +66,7 @@ Class ImpactHammer : UTWeapon if ( invoker.count > .2 ) { invoker.count = 0; - A_AlertMonsters(); + A_AlertMonsters(gameinfo.gametype&GAME_Strife?100:0); } A_QuakeEx(clamp(int(invoker.chargesize),0,2),clamp(int(invoker.chargesize),0,2),clamp(int(invoker.chargesize),0,2),2,0,96,"",QF_RELATIVE,rollIntensity:clamp(invoker.chargesize*0.3,0,0.3)); UTMainHandler.DoSwing(self,(FRandom[Impact](-1,1),FRandom[Impact](-1,1)),invoker.chargesize*0.1,0,1,SWING_Spring); @@ -90,7 +90,7 @@ Class ImpactHammer : UTWeapon A_PlaySound("impact/release",CHAN_WEAPON); invoker.FireEffect(); UTMainHandler.DoSwing(self,(FRandom[Impact](-0.3,-1.5),FRandom[Impact](-1.2,-0.4)),3,-0.8,3,SWING_Spring,3,2); - A_AlertMonsters(); + A_AlertMonsters(gameinfo.gametype&GAME_Strife?100:0); Vector3 x, y, z; [x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll); Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+3*y-4*z); @@ -102,6 +102,7 @@ Class ImpactHammer : UTWeapon int dmg = int(60*realcharge); dmg = d.HitActor.DamageMobj(invoker,self,dmg,'impact',DMG_THRUSTLESS); d.HitActor.vel = x*(8000/d.HitActor.mass)*realcharge; + if ( gameinfo.gametype&GAME_Strife ) d.HitActor.DaggerAlert(self); if ( d.HitActor.bNOBLOOD ) { let p = Spawn("HammerImpact",d.HitLocation-d.HitDir*4); @@ -154,7 +155,7 @@ Class ImpactHammer : UTWeapon A_PlaySound("impact/fire",CHAN_WEAPON); invoker.FireEffect(); UTMainHandler.DoSwing(self,(FRandom[Impact](-0.3,-1.5),FRandom[Impact](-1.2,-0.4)),2,-0.6,2,SWING_Spring,1,2); - A_AlertMonsters(); + A_AlertMonsters(gameinfo.gametype&GAME_Strife?100:0); A_QuakeEx(2,2,2,6,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:0.1); Vector3 x, y, z; [x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll); @@ -167,6 +168,7 @@ Class ImpactHammer : UTWeapon int dmg = int(20*dscale); dmg = d.HitActor.DamageMobj(invoker,self,dmg,'impact',DMG_THRUSTLESS); d.HitActor.vel = x*(4000/d.HitActor.mass)*dscale; + if ( gameinfo.gametype&GAME_Strife ) d.HitActor.DaggerAlert(self); } else if ( d.HitType != TRACE_HitNone ) { diff --git a/zscript/powerups.zsc b/zscript/powerups.zsc index a872ddd..c2dac03 100644 --- a/zscript/powerups.zsc +++ b/zscript/powerups.zsc @@ -234,7 +234,7 @@ Class UTBackpack : BackpackItem } } // sneaky fix for chainsaw ammo - if ( (type is 'ChainsawAmmo') && flak_sawammo ) isvalid = true; + if ( (type is 'ChainsawAmmo') && flak_sawammo && (GetReplacement(type) == type) ) isvalid = true; if ( !isvalid ) continue; let ammoitem = Ammo(other.FindInventory(type)); int amount = GetDefaultByType(type).BackpackAmount; diff --git a/zscript/utcommon.zsc b/zscript/utcommon.zsc index 11efb7f..d4de737 100644 --- a/zscript/utcommon.zsc +++ b/zscript/utcommon.zsc @@ -1,5 +1,6 @@ Class UTPlayer : DoomPlayer { + bool doprintnoammo; bool lastground; int lastwaterlevel; int lastgroundtic; @@ -198,9 +199,14 @@ Class UTPlayer : DoomPlayer let type = (class)(AllActorClasses[i]); if ( !type ) continue; let def = GetDefaultByType(type); - if ( !(gameinfo.gametype&GAME_Raven) - && ((type is "UTActivatable") || (type is "UTActivatableHealth")) ) - continue; // don't give these outside of Heretic/Hexen + if ( (!(gameinfo.gametype&GAME_Raven) + && ((type is "UTActivatable") || (type is "UTActivatableHealth"))) + || ((gameinfo.gametype&GAME_HERETIC) && (type is 'ActUTFullAmmoBox')) ) + { + // don't give activatables outside of Heretic/Hexen + // don't give full ammo cubes outside of Hexen + continue; + } if ( def.Icon.isValid() && (def.MaxAmount > 1) && !(type is "PuzzleItem") && !(type is "Powerup") && !(type is "Ammo") && !(type is "Armor")) { @@ -235,9 +241,28 @@ Class UTPlayer : DoomPlayer else GiveInventory(type,amount,true); } + // modified so it displays the "has no ammo" message + override Weapon PickWeapon( int slot, bool checkammo ) + { + doprintnoammo = true; + let rslt = Super.PickWeapon(slot,checkammo); + doprintnoammo = false; + return rslt; + } + override void Tick() { Super.Tick(); + if ( !flak_utmovement || !player || (player.mo != self) || (player.cheats&(CF_FROZEN|CF_TOTALLYFROZEN)) ) + { + bNOFRICTION = false; + bNOFRICTIONBOUNCE = false; + } + else + { + bNOFRICTION = true; + bNOFRICTIONBOUNCE = true; + } if ( InStateSequence(CurState,FindState("See",true)) ) SetStateLabel("See2"); if ( (waterlevel >= 2) && (lastwaterlevel < 2) ) @@ -252,17 +277,6 @@ Class UTPlayer : DoomPlayer else if ( (waterlevel < 3) && underwatersnd ) underwatersnd.Destroy(); lastwaterlevel = waterlevel; - if ( !flak_utmovement || !player || (player.mo != self) || (player.cheats&(CF_FROZEN|CF_TOTALLYFROZEN)) ) - { - bNOFRICTION = false; - bNOFRICTIONBOUNCE = false; - return; - } - else - { - bNOFRICTION = true; - bNOFRICTIONBOUNCE = true; - } if ( !footsteps ) footsteps = CVar.GetCVar('flak_footsteps',players[consoleplayer]); if ( !footsteps.GetBool() || (Health <= 0) ) return; double ang = level.time/(20*TICRATE/35.)*360.; @@ -1895,11 +1909,9 @@ Class UTWeapon : Weapon override bool CheckAmmo( int fireMode, bool autoSwitch, bool requireAmmo, int ammocount ) { bool rslt = Super.CheckAmmo(fireMode,autoSwitch,requireAmmo,ammocount); - if ( (gametic > lastnoammotic) && !rslt && !autoSwitch && !requireAmmo && Owner.CheckLocalView() ) - { - lastnoammotic = gametic; - Console.Printf(StringTable.Localize((Amount>1)?"$M_NOAMMO2":"$M_NOAMMO"),GetTag()); - } + if ( (gametic <= lastnoammotic) || rslt || !Owner.CheckLocalView() || !(Owner is 'UTPlayer') || !UTPlayer(Owner).doprintnoammo ) return rslt; + lastnoammotic = gametic; + Console.Printf(StringTable.Localize((Amount>1)?"$M_NOAMMO2":"$M_NOAMMO"),GetTag()); return rslt; } @@ -3133,6 +3145,10 @@ Class UTMainHandler : EventHandler else if ( e.Replacee == 'FWeaponPiece1' ) e.Replacement = 'WarheadAmmo'; else if ( e.Replacee == 'CWeaponPiece1' ) e.Replacement = 'UTBackpack'; else if ( (e.Replacee == 'MWeaponPiece1') || (e.Replacee == 'MWeapBloodscourge') || (e.Replacee.GetClassName() == 'mkFullBloodscourge') ) e.Replacement = 'WarheadLauncher'; + else if ( e.Replacee == 'Mana1' ) e.Replacement = 'UTMinorAmmoBox'; + else if ( e.Replacee == 'Mana2' ) e.Replacement = 'UTMediumAmmoBox'; + else if ( e.Replacee == 'Mana3' ) e.Replacement = 'UTMajorAmmoBox'; + else if ( e.Replacee == 'ArtiBoostMana' ) e.Replacement = 'ActUTFullAmmoBox'; // TODO Strife replacements } @@ -3199,19 +3215,23 @@ Class UTMainHandler : EventHandler level.sectors[i].SetTexture(1,skyflatnum); if ( level.sectors[i].GetTexture(0) == deftex ) { - if ( gameinfo.gametype == GAME_DOOM ) + if ( gameinfo.gametype&GAME_DOOM ) level.sectors[i].SetTexture(0,((i==47)||((i>=256)&&(i<=260)))?baseceil:baseflor); - else if ( gameinfo.gametype == GAME_HERETIC ) + else if ( gameinfo.gametype&GAME_HERETIC ) level.sectors[i].SetTexture(0,((i==47)||((i>=144)&&(i<=148)))?baseceil:baseflor); + else if ( gameinfo.gametype&GAME_HEXEN ) + level.sectors[i].SetTexture(0,((i==47)||((i>=152)&&(i<=155)))?baseceil:baseflor); level.sectors[i].SetXScale(0,2.); level.sectors[i].SetYScale(0,2.); } if ( level.sectors[i].GetTexture(1) == deftex ) { - if ( gameinfo.gametype == GAME_DOOM ) + if ( gameinfo.gametype&GAME_DOOM ) level.sectors[i].SetTexture(1,((i==47)||((i>=256)&&(i<=260)))?baseflor:baseceil); - else if ( gameinfo.gametype == GAME_HERETIC ) + else if ( gameinfo.gametype&GAME_HERETIC ) level.sectors[i].SetTexture(1,((i==47)||((i>=144)&&(i<=148)))?baseflor:baseceil); + else if ( gameinfo.gametype&GAME_HEXEN ) + level.sectors[i].SetTexture(1,((i==47)||((i>=152)&&(i<=155)))?baseflor:baseceil); level.sectors[i].SetXScale(1,2.); level.sectors[i].SetYScale(1,2.); } @@ -3223,8 +3243,8 @@ Class UTMainHandler : EventHandler for ( int j=0; j<3; j++ ) { if ( level.sides[i].GetTexture(j) != deftex ) continue; - if ( ((gameinfo.gametype == GAME_DOOM) && ((i==529) || (i==530) || (i==533) || (i==534))) - || ((gameinfo.gametype == GAME_HERETIC) && ((i==295) || (i==296) || (i==309) || (i==310))) ) + if ( ((gameinfo.gametype&GAME_DOOM) && ((i==529) || (i==530) || (i==533) || (i==534))) + || ((gameinfo.gametype&GAME_RAVEN) && ((i==295) || (i==296) || (i==309) || (i==310))) ) { level.sides[i].SetTexture(j,xbasewall); level.sides[i].SetTextureYOffset(j,-2304); @@ -3236,7 +3256,7 @@ Class UTMainHandler : EventHandler } // fixup level.sectors[53].SetFade("00 00 20"); - if ( gameinfo.gametype == GAME_DOOM ) + if ( gameinfo.gametype&GAME_DOOM ) { for ( int i=215; i<246; i++ ) { @@ -3248,7 +3268,7 @@ Class UTMainHandler : EventHandler level.sides[1844].SetTexture(1,glasstex); level.lines[945].alpha = 0.5; } - else if ( gameinfo.gametype == GAME_HERETIC ) + else if ( gameinfo.gametype&GAME_HERETIC ) { for ( int i=104; i<134; i++ ) { @@ -3260,6 +3280,18 @@ Class UTMainHandler : EventHandler level.sides[216].SetTexture(1,glasstex); level.lines[125].alpha = 0.5; } + else if ( gameinfo.gametype&GAME_HEXEN ) + { + for ( int i=111; i<141; i++ ) + { + if ( (i==114) || (i==117) || (i==123) + || (i==126) || (i==128) || (i==134) + || (i==139) ) continue; + level.sectors[i].SetSpecialColor(0,"00 00 00"); + } + level.sides[216].SetTexture(1,glasstex); + level.lines[125].alpha = 0.5; + } AddLight((0,-288,128),"E0 E0 FF",256); AddLight((-2560,1024,1280),"E0 E0 FF",1024); AddLight((0,1024,1280),"E0 E0 FF",1024); @@ -3271,7 +3303,7 @@ Class UTMainHandler : EventHandler AddLight((2904,1344,128),"80 80 FF",256); AddLight((3408,1344,128),"80 80 FF",256); AddLight((1568,1760,64),"20 20 80",128); - if ( gameinfo.gametype == GAME_DOOM ) + if ( gameinfo.gametype&GAME_DOOM ) { AddLight((1824,1760,64),"80 20 20",128); AddLight((2080,1760,64),"FF 80 20",128); @@ -3281,8 +3313,14 @@ Class UTMainHandler : EventHandler AddLight((2944,960,64),"20 FF 20",128); AddLight((2944,736,64),"20 FF 20",128); AddLight((3264,960,64),"FF 20 20",128); + AddLight((3264,736,64),"A0 A0 30",128); + AddLight((3264,512,64),"80 80 20",128); + AddLight((3584,960,64),"80 80 20",128); + AddLight((3584,736,64),"20 FF 20",128); + AddLight((3584,512,64),"FF 80 20",128); + AddLight((3584,288,64),"FF 80 FF",128); } - else if ( gameinfo.gametype == GAME_HERETIC ) + else if ( gameinfo.gametype&GAME_HERETIC ) { AddLight((1824,1760,64),"A0 A0 30",128); AddLight((2080,1760,64),"80 80 20",128); @@ -3291,18 +3329,6 @@ Class UTMainHandler : EventHandler AddLight((2944,960,64),"A0 A0 30",128); AddLight((2944,736,64),"A0 A0 30",128); AddLight((3264,960,64),"A0 A0 30",128); - } - AddLight((3264,736,64),"A0 A0 30",128); - if ( gameinfo.gametype == GAME_DOOM ) - { - AddLight((3264,512,64),"80 80 20",128); - AddLight((3584,960,64),"80 80 20",128); - AddLight((3584,736,64),"20 FF 20",128); - AddLight((3584,512,64),"FF 80 20",128); - AddLight((3584,288,64),"FF 80 FF",128); - } - else if ( gameinfo.gametype == GAME_HERETIC ) - { AddLight((3264,736,64),"A0 A0 30",128); AddLight((3264,512,64),"A0 A0 30",128); AddLight((3264,288,64),"FF 80 20",128); @@ -3311,6 +3337,23 @@ Class UTMainHandler : EventHandler AddLight((3584,512,64),"FF 80 20",128); AddLight((3584,288,64),"A0 A0 30",128); } + else if ( gameinfo.gametype&GAME_HEXEN ) + { + AddLight((1824,1760,64),"40 80 20",128); + AddLight((2080,1760,64),"FF 80 20",128); + AddLight((2336,1760,64),"20 20 80",128); + AddLight((2592,1760,64),"20 20 80",128); + AddLight((2944,960,64),"40 80 20",128); + AddLight((2944,736,64),"40 80 20",128); + AddLight((3264,960,64),"40 80 20",128); + AddLight((3264,736,64),"40 80 20",128); + AddLight((3264,512,64),"40 80 20",128); + AddLight((3264,288,64),"FF 80 20",128); + AddLight((3584,960,64),"40 80 20",128); + AddLight((3584,736,64),"FF 80 20",128); + AddLight((3584,512,64),"FF 80 20",128); + AddLight((3584,288,64),"FF 80 20",128); + } AddAmbient((0,-288,192),"testamb/wind1",0.5,1.6); AddAmbient((-2560,1024,768),"testamb/wind1",0.4,0.8); AddAmbient((0,1024,768),"testamb/wind1",0.4,0.8); @@ -3318,7 +3361,7 @@ Class UTMainHandler : EventHandler AddAmbient((768,1600,1280),"testamb/wind2",0.8,1.6); AddAmbient((3174,1344,128),"testamb/water",0.4,1.6); AddAmbient((1568,1760,64),"testamb/water",0.4,2.4); - if ( gameinfo.gametype == GAME_DOOM ) + if ( gameinfo.gametype&GAME_DOOM ) { AddAmbient((2080,1760,64),"testamb/lava",0.8,2.4); AddAmbient((2336,1760,64),"testamb/slime",0.4,2.4); @@ -3326,12 +3369,19 @@ Class UTMainHandler : EventHandler AddAmbient((2944,736,64),"testamb/slime",0.4,2.4); AddAmbient((3584,736,64),"testamb/slime",0.4,2.4); } - else if ( gameinfo.gametype == GAME_HERETIC ) + else if ( gameinfo.gametype&GAME_HERETIC ) { AddAmbient((2336,1760,64),"testamb/water",0.4,2.4); AddAmbient((2592,1760,64),"testamb/lava",0.8,2.4); AddAmbient((3264,288,64),"testamb/lava",0.8,2.4); } + else if ( gameinfo.gametype&GAME_HEXEN ) + { + AddAmbient((2080,1760,64),"testamb/lava",0.8,2.4); + AddAmbient((3264,288,64),"testamb/lava",0.8,2.4); + AddAmbient((3584,736,64),"testamb/lava",0.4,2.4); + AddAmbient((3584,288,64),"testamb/lava",0.4,2.4); + } AddAmbient((3584,512,64),"testamb/lava",0.8,2.4); } diff --git a/zscript/uthud.zsc b/zscript/uthud.zsc index 1a84253..58ca8dd 100644 --- a/zscript/uthud.zsc +++ b/zscript/uthud.zsc @@ -681,7 +681,41 @@ Class UTHud : BaseStatusBar private void DrawKeys() { 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) + if ( gameinfo.gametype&(GAME_Hexen|GAME_Strife) ) + { + if ( !automapactive ) return; + int kw = (gameinfo.gametype&GAME_Strife)?20:30, + kh = (gameinfo.gametype&GAME_Strife)?20:40; + double ks = (gameinfo.gametype&GAME_Strife)?2.:1.5; + int nkeys = 0; + Array rows; + Array keys; + keys.Clear(); + rows.Clear(); + rows.Push(0); + for ( Inventory i=CPlayer.mo.inv; i; i=i.inv ) + { + if ( !(i is 'Key') ) continue; + keys.Push(i); + if ( rows[rows.Size()-1] >= 6 ) rows.Push(1); + else rows[rows.Size()-1]++; + } + int j = 0; + CurX = (Screen.GetWidth()-kw*hudsize*HScale*ks); + for ( int i=0; i