diff --git a/Readme.md b/Readme.md index b707541..634265b 100644 --- a/Readme.md +++ b/Readme.md @@ -39,6 +39,8 @@ Doom Tournament (currently the devel branch is required). - Flare (replaces armor bonus) - Flashlight (replaces light amplifier) - Searchlight (must be placed manually for balance reasons) + - Jump Boots (replaces radsuit) + - SCUBA Gear (replaces radsuit if map has swimmable water) ## In progress @@ -48,9 +50,6 @@ Doom Tournament (currently the devel branch is required). - Minigun (slot 0) (replaces chaingun) - SMP 7243 (slot 0) (replaces bfg9000) - - Jump Boots (replaces radsuit) - - SCUBA Gear (replaces radsuit if map has swimmable water) - ## Planned - Unreal Bible & prototype build behaviour restoration diff --git a/cvarinfo.txt b/cvarinfo.txt index 830e36f..8d1c03f 100644 --- a/cvarinfo.txt +++ b/cvarinfo.txt @@ -74,3 +74,5 @@ server bool sting_olsmp = false; // adds the stupid oldskool SMP 7243 to // this weapon is dumb, but just for // the sake of completion it's there as // an option +server bool sting_autoscuba = false; // SCUBA gear toggles automatically + // when needed \ No newline at end of file diff --git a/language.txt b/language.txt index 97830b5..c24da94 100644 --- a/language.txt +++ b/language.txt @@ -207,6 +207,8 @@ STING_UOPTS = "Compatibility options"; STING_DPISTOL = "Dispersion Pistol altfire isn't upgraded"; STING_PSHIELD = "Power Shield does not drain over time"; STING_NOPSTART = "Players don't start up with an Automag"; +STING_QOPTS = "Convenience features"; +STING_AUTOSCUBA = "Automatic SCUBA Gear toggling"; STING_OLSMP = "Enable SMP 7243 from Oldskool Amp'd"; STING_MCREDS = "Unreal Credits"; STING_CDR = "Doomreal"; @@ -407,6 +409,8 @@ STING_DPISTOL = "El fuego alternativo de la Pistola de Dispersión no es mejorad STING_PSHIELD = "El Escudo de Fuerza no pierde carga con el tiempo"; STING_NOPSTART = "Los jugadores no empiezan la partida con un Automag"; STING_OLSMP = "Habilitar SMP 7243 de Oldskool Amp'd"; +STING_QOPTS = "Características de comodidad"; +STING_AUTOSCUBA = "Uso automático de Kit de Buceo"; STING_MCREDS = "Créditos de Unreal"; STING_CDR = "Doomreal"; STING_CLEAD = "Desarrolladora Jefe:"; diff --git a/menudef.txt b/menudef.txt index 9b4849f..6fa2e9c 100644 --- a/menudef.txt +++ b/menudef.txt @@ -42,6 +42,9 @@ OptionMenu "UnrealOptionMenu" Option "$STING_PSHIELD", "sting_pshield", "YesNo" Option "$STING_NOPSTART", "sting_nopstart", "YesNo" Option "$STING_OLSMP", "sting_olsmp", "YesNo" + StaticText " " + StaticText "$STING_QOPTS", "Gold" + Option "$STING_AUTOSCUBA", "sting_autoscuba", "YesNo" } AddOptionMenu "OptionsMenu" diff --git a/modeldef.flamegun b/modeldef.flamegun index 7732daf..8acf4ce 100644 --- a/modeldef.flamegun +++ b/modeldef.flamegun @@ -8,7 +8,7 @@ Model "FlameGun" FrameIndex FGNP B 1 0 - ZOffset 9 + ZOffset 12 ROTATING FrameIndex FGNP A 1 0 } diff --git a/sndinfo.txt b/sndinfo.txt index 278a448..17dd5ed 100644 --- a/sndinfo.txt +++ b/sndinfo.txt @@ -206,6 +206,10 @@ univis/toggle invisibl lite/off fshlite2 +scuba/stop scubada1 +scuba/water scubal1 +scuba/air scubal2 + automag/select cocking automag/fire shot automag/click click diff --git a/zscript/biggun.zsc b/zscript/biggun.zsc index 116fd8f..7d6f49e 100644 --- a/zscript/biggun.zsc +++ b/zscript/biggun.zsc @@ -57,6 +57,7 @@ Class HitListEntry { Actor hitactor; Vector3 hitlocation, x; + int hitdamage; } Class BigTracer : LineTracer @@ -65,6 +66,14 @@ Class BigTracer : LineTracer double penetration; // please don't laugh } +Class BigCasing : UTCasing +{ + Default + { + BounceSound "flak/bounce"; // much heavier sound + } +} + Class BigGun : UnrealWeapon { Default diff --git a/zscript/unrealhud.zsc b/zscript/unrealhud.zsc index 7a47576..80c1b2a 100644 --- a/zscript/unrealhud.zsc +++ b/zscript/unrealhud.zsc @@ -372,7 +372,7 @@ Class UnrealHUD : BaseStatusBar if ( (HUDMode == 5) || !SelectedItem ) return; Count++; if ( Count > 20 ) Count = 0; - if ( !Next && !bDrawOne ) x += 32; // this was missing from the original, causing a gap when there's only two items in the inventory + if ( Prev && !Next && !bDrawOne ) x += 32; // this was missing from the original, causing a gap when there's only two items in the inventory if ( Prev ) { bRed = ((Prev is 'UnrealInventory') && UnrealInventory(Prev).bActive) || (Prev is 'Powerup') || ((Prev is 'UTranslator') && bFlashTranslator); diff --git a/zscript/upowerups.zsc b/zscript/upowerups.zsc index 32c1abc..947125c 100644 --- a/zscript/upowerups.zsc +++ b/zscript/upowerups.zsc @@ -187,6 +187,7 @@ Class AmpSound : Actor Class UJumpBoots : UnrealInventory { int draincnt; + Default { Tag "$T_JUMPBOOTS"; @@ -242,12 +243,63 @@ Class UJumpBoots : UnrealInventory for ( int i=0; i replacements; + replacements.Clear(); + if ( foundslime ) replacements.Push("ToxinSuit"); + if ( foundlava ) replacements.Push("AsbestosSuit"); + if ( foundswim ) replacements.Push("SCUBAGear"); + if ( replacements.Size() > 0 ) + { + int rslot = Random[LBootRep](0,replacements.Size()-1); + let r = Spawn(replacements[rslot],pos,ALLOW_REPLACE); + r.spawnangle = spawnangle; + r.spawnpoint = spawnpoint; + r.angle = angle; + r.pitch = pitch; + r.roll = roll; + r.special = special; + r.args[0] = args[0]; + r.args[1] = args[1]; + r.args[2] = args[2]; + r.args[3] = args[3]; + r.args[4] = args[4]; + r.ChangeTid(tid); + r.SpawnFlags = SpawnFlags&~MTF_SECRET; + r.HandleSpawnFlags(); + r.SpawnFlags = SpawnFlags; + r.bCountSecret = SpawnFlags&MTF_SECRET; + r.vel = vel; + r.master = master; + r.target = target; + r.tracer = tracer; + r.bDropped = bDropped; + Destroy(); } - // TODO replace self with asbestos/toxin suits or scuba } override void AttachToOwner( Actor Other ) { @@ -301,6 +353,40 @@ Class SCUBAGear : UnrealInventory Inventory.RespawnTics 700; UnrealInventory.Charge 4200; } + override bool Use( bool pickup ) + { + if ( pickup ) return false; + bActive = !bActive; + if ( !bActive ) Owner.A_PlaySound("scuba/stop",CHAN_ITEM); + return false; + } + override void AbsorbDamage( int damage, Name damageType, out int newdamage ) + { + if ( bActive && (damageType == 'Drowning') ) + newdamage = 0; + } + override void DoEffect() + { + Super.DoEffect(); + if ( sting_autoscuba && ((bActive && (Owner.waterlevel < 2)) || (!bActive && (Owner.waterlevel > 2))) ) + Use(false); + if ( bActive && !tracer ) + { + tracer = Spawn("SCUBASound",Owner.pos); + tracer.target = Owner; + tracer.master = self; + } + else if ( !bActive && tracer ) tracer.Destroy(); + if ( !bActive ) return; + if ( PlayerPawn(Owner) ) PlayerPawn(Owner).ResetAirSupply(); + if ( (Charge <= 0) || DrainCharge(1) ) + { + Owner.A_PlaySound("scuba/stop",CHAN_ITEM); + if ( Owner.CheckLocalView() ) Console.Printf(StringTable.Localize("$D_SCUBA")); + if ( tracer ) tracer.Destroy(); + DepleteOrDestroy(); + } + } States { Spawn: @@ -308,3 +394,52 @@ Class SCUBAGear : UnrealInventory Stop; } } + +Class SCUBASound : Actor +{ + Default + { + +NOBLOCKMAP; + +NOGRAVITY; + } + override void Tick() + { + Super.Tick(); + if ( !target || !master ) + { + Destroy(); + return; + } + SetOrigin(target.pos,true); + if ( target.CheckLocalView() ) + { + A_SoundVolume(CHAN_VOICE,0.0); + A_SoundVolume(CHAN_5,0.0); + A_SoundVolume(CHAN_6,(target.waterlevel<3)?1.0:0.0); + A_SoundVolume(CHAN_7,(target.waterlevel>=3)?1.0:0.0); + } + else + { + A_SoundVolume(CHAN_VOICE,(target.waterlevel<3)?0.25:0.0); + A_SoundVolume(CHAN_5,(target.waterlevel>=3)?0.25:0.0); + A_SoundVolume(CHAN_6,0.0); + A_SoundVolume(CHAN_7,0.0); + } + } + override void PostBeginPlay() + { + Super.PostBeginPlay(); + A_PlaySound("scuba/air",CHAN_VOICE,0.25,true,1.5); + A_PlaySound("scuba/water",CHAN_5,0.25,true,1.5); + A_PlaySound("scuba/air",CHAN_6,1.0,true,ATTN_NONE); + A_PlaySound("scuba/water",CHAN_7,1.0,true,ATTN_NONE); + } + override void OnDestroy() + { + Super.OnDestroy(); + A_StopSound(CHAN_VOICE); + A_StopSound(CHAN_5); + A_StopSound(CHAN_6); + A_StopSound(CHAN_7); + } +}