From fe08f11997bc245b22ae7d994ef8ed8c70d7ef9c Mon Sep 17 00:00:00 2001 From: Marisa Kirisame Date: Thu, 15 Nov 2018 19:03:20 +0100 Subject: [PATCH] Bumped ZScript ver. Added OnDrop to weapons replicating the UT drop style. Some fixes for UT player movement. Hide keys from HUD in DM. Added "classic jump boots" option. Fixed missing ambientglow on some weapon skins. --- cvarinfo.txt | 1 + gldefs.txt | 12 ++++++++++++ menudef.txt | 3 +++ zscript.txt | 2 +- zscript/powerups.zsc | 12 +++++++++--- zscript/utcommon.zsc | 27 +++++++++++++++++++++++---- zscript/uthud.zsc | 1 + 7 files changed, 50 insertions(+), 8 deletions(-) diff --git a/cvarinfo.txt b/cvarinfo.txt index 9f7923e..4a493fb 100644 --- a/cvarinfo.txt +++ b/cvarinfo.txt @@ -30,3 +30,4 @@ server bool flak_nowalkdrop = false; // don't drop off ledges while holding wal server bool flak_corpsedamage = false; // [WIP/EXPERIMENTAL] allow corpses to take damage and be gibbed, currently just causes a jump to XDeath until gore system is implemented server bool flak_swingers = true; // weapon recoil that affects player view server float flak_swingerstrength = 0.5; // strength of visual recoil +server bool flak_radboots = true; // jump boots protect against damaging floors (this is to account for the lack of a radsuit) diff --git a/gldefs.txt b/gldefs.txt index 60bf262..e2c887c 100644 --- a/gldefs.txt +++ b/gldefs.txt @@ -182,6 +182,10 @@ HardwareShader Texture "models/JFA1.png" { Shader "shaders/glsl/AmbientGlow.fp" } +HardwareShader Texture "models/Flak_t.png" +{ + Shader "shaders/glsl/AmbientGlow.fp" +} HardwareShader Texture "models/JMedBox1.png" { Shader "shaders/glsl/AmbientGlow.fp" @@ -264,6 +268,10 @@ HardwareShader Texture "models/JM21.png" { Shader "shaders/glsl/AmbientGlow.fp" } +HardwareShader Texture "models/Mini_t.png" +{ + Shader "shaders/glsl/AmbientGlow.fp" +} HardwareShader Texture "models/JRocketPack1.png" { Shader "shaders/glsl/AmbientGlow.fp" @@ -272,6 +280,10 @@ HardwareShader Texture "models/JuRocket1_.png" { Shader "shaders/glsl/AmbientGlow.fp" } +HardwareShader Texture "models/Eight_t.png" +{ + Shader "shaders/glsl/AmbientGlow.fp" +} HardwareShader Texture "models/BulletBoxT.png" { Shader "shaders/glsl/AmbientGlow.fp" diff --git a/menudef.txt b/menudef.txt index f96236f..f7cfcb8 100644 --- a/menudef.txt +++ b/menudef.txt @@ -29,6 +29,9 @@ OptionMenu "UTOptionMenu" Option "Visual Recoil", "flak_swingers", "YesNo" Slider "Visual Recoil Strength", "flak_swingerstrength", 0.0, 1.0, 0.1, 1 StaticText " " + StaticText "Item Options", "Gold" + Option "Jump Boots Act Like Radsuit", "flak_radboots", "YesNo" + StaticText " " StaticText "Translocator (Potentially Game-Breaking)", "Gold" Option "Prevent Boss Telefrag", "flak_nobosstelefrag", "YesNo" Option "Enable Translocator", "flak_translocator", "YesNo" diff --git a/zscript.txt b/zscript.txt index 9082fe8..e2ceb1f 100644 --- a/zscript.txt +++ b/zscript.txt @@ -1,4 +1,4 @@ -version "3.5" +version "3.7" #include "zscript/mk_matrix.zsc" #include "zscript/mk_coordutil.zsc" diff --git a/zscript/powerups.zsc b/zscript/powerups.zsc index 681e009..d6518a8 100644 --- a/zscript/powerups.zsc +++ b/zscript/powerups.zsc @@ -36,7 +36,9 @@ Class DamageAmpLight : DynamicLight Destroy(); return; } - SetOrigin(target.pos,true); + if ( target.player ) + SetOrigin(target.Vec2OffsetZ(0,0,target.player.viewz),true); + else SetOrigin(target.Vec3Offset(0,0,target.height/2),true); args[LIGHT_INTENSITY] = Random[ASMD](10,12)*8; bDORMANT = Powerup(master).isBlinking(); } @@ -317,7 +319,8 @@ Class UTJumpBoots : Inventory if ( pickup ) { Owner.GiveInventory("PowerJumpBoots_HighJump",1); - Owner.GiveInventory("PowerJumpBoots_IronFeet",1); + if ( flak_radboots ) + Owner.GiveInventory("PowerJumpBoots_IronFeet",1); } return false; } @@ -325,7 +328,8 @@ Class UTJumpBoots : Inventory { Super.Tick(); if ( !Owner || !Owner.player ) return; - amount--; + if ( flak_radboots ) + amount--; if ( (amount > 0) && (owner.player.jumptics == -1) ) { Amount = max(0,Amount-700); @@ -379,6 +383,8 @@ Class PowerJumpBoots_IronFeet : PowerIronFeet override void DoEffect() { Powerup.DoEffect(); + if ( !flak_radboots ) + DepleteOrDestroy(); } } diff --git a/zscript/utcommon.zsc b/zscript/utcommon.zsc index 30c8aa3..291291e 100644 --- a/zscript/utcommon.zsc +++ b/zscript/utcommon.zsc @@ -235,7 +235,7 @@ Class UTPlayer : DoomPlayer else Angle += cmd.yaw*(360./65536.); player.onground = (pos.z <= floorz) || bOnMobj || bMBFBouncer || (player.cheats & CF_NOCLIP2); if ( player.onground ) lastgroundtic = gametic; - if ( !player.onground && (abs(pos.z-floorz) <= maxdropoffheight) && (player.jumptics == 0) ) + if ( !player.onground && !bNoGravity && (waterlevel < 3) && (abs(pos.z-floorz) <= maxdropoffheight) && (player.jumptics == 0) ) { SetOrigin(Vec2OffsetZ(0,0,floorz),true); player.onground = true; @@ -277,9 +277,9 @@ Class UTPlayer : DoomPlayer } } last_sm = sm; - if ( !bNoGravity && player.onground ) + if ( !bNoGravity && player.onground && (waterlevel < 3) ) { - if ( !waterlevel && (dodge.length() > 0) ) + if ( dodge.length() > 0 ) { if ( flak_doomspeed ) vel += dodge.unit()*(groundspeed_doomish*1.5)/TICRATE; else vel += dodge.unit()*(groundspeed*1.5)/TICRATE; @@ -329,7 +329,7 @@ Class UTPlayer : DoomPlayer player.vel = vel.xy; } } - else if ( !bNoGravity && !waterlevel ) + else if ( !bNoGravity && (waterlevel < 3) ) { // air acceleration when falling float maxaccel = accelrate/TICRATE; @@ -491,6 +491,12 @@ Class UTWeapon : Weapon override void Tick() { Super.Tick(); + // don't slide on floor when dropped + if ( CurState == ResolveState("Spawn")+1 ) + { + if ( pos.z <= floorz ) + vel.xy *= 0; + } if ( !Owner || !Owner.player || (Owner.player.ReadyWeapon != self) ) return; Owner.player.WeaponState |= WF_WEAPONBOBBING; // UT weapons always bob } @@ -580,6 +586,19 @@ Class UTWeapon : Weapon return ammoitem; } + override void OnDrop( Actor dropper ) + { + Vector2 hofs = RotateVector((dropper.radius,0),dropper.angle); + SetOrigin(dropper.Vec3Offset(hofs.x,hofs.y,dropper.height*0.5),false); + Vector3 x, y, z; + [x, y, z] = Matrix4.GetAxes(dropper.pitch,dropper.angle,dropper.roll); + vel = x*12.0; + vel.z += 4.0; + angle = dropper.angle; + pitch = 0; + roll = 0; + } + Default { Weapon.BobStyle "Smooth"; diff --git a/zscript/uthud.zsc b/zscript/uthud.zsc index 843ede2..abd5985 100644 --- a/zscript/uthud.zsc +++ b/zscript/uthud.zsc @@ -509,6 +509,7 @@ 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) bool locks[6]; for ( int i=0; i<6; i++ ) locks[i] = CPlayer.mo.CheckKeys(i+1,false,true);