diff --git a/cvarinfo.txt b/cvarinfo.txt index 141afb425..86a09bc7c 100644 --- a/cvarinfo.txt +++ b/cvarinfo.txt @@ -81,6 +81,7 @@ user bool swwm_intermusic = false; // use original intermission music server int swwm_enemydrops = 0; // allow enemies to drop ammo and weapons (-1 - no ammo or weapons, 0 - ammo only, 1 - both) server bool swwm_shotgib = true; // buckshot can gib (some people don't like this for some reason, so it's an option now) user bool swwm_collectanim = true; // player special gestures for collectables (first person only) +user bool swwm_collectanimkey = true; // same but for key items server int swwm_shadows = 1; // enables blob shadows under certain things (0 - no shadows, 1 - mod objects, 2 - everything) user bool swwm_precisecrosshair = true; // use mod's own, more precise crosshair user bool swwm_ldspoil = false; // [LD] always shows "Legendary" prefix on Legendary monsters, otherwise only when they've transformed diff --git a/language.def_menu b/language.def_menu index 9f6bac09a..0396ace20 100644 --- a/language.def_menu +++ b/language.def_menu @@ -153,6 +153,7 @@ SWWM_ETITLE = "Effect Options"; SWWM_RAGESHADER = "Alternate Ragekit Shader"; SWWM_CAMHUD = "Full HUD In Cameras"; SWWM_UNCAPALERT = "Uncap Alert Range"; +SWWM_COLLECTANIMKEY = "Key Animations"; TOOLTIP_SWWM_VOICETYPE = "Sets the voice pack for the player."; TOOLTIP_SWWM_MUTEVOICE = "Control what gets muted, if you'd rather have a more silent protagonist."; TOOLTIP_SWWM_FLASHSTRENGTH = "Screen flashes usually happen when firing some weapons, you can lower this if these effects are harmful for you."; @@ -228,6 +229,7 @@ TOOLTIP_SWWM_LDSPOIL = "[LegenDoom] Always show the \"Legendary\" prefix on heal TOOLTIP_SWWM_RAGESHADER = "The normal Ragekit shader may be harmful for people with photosensitivity. Enabling this switches to a fainter alternative."; TOOLTIP_SWWM_CAMHUD = "By default, when the player is looking through a camera, most HUD elements excluding messages will be hidden. Set this to keep the full HUD."; TOOLTIP_SWWM_UNCAPALERT = "If enabled, all weapons and projectiles will have infinite noise radius. May fix maps that employ vanilla-style teleport traps."; +TOOLTIP_SWWM_COLLECTANIMKEY = "Play special first person animations when picking up keys."; // knowledge base SWWM_COMINGSOON = "(coming soon)"; SWWM_MISSTAB = "Mission"; diff --git a/language.es_menu b/language.es_menu index 957364b53..037acf813 100644 --- a/language.es_menu +++ b/language.es_menu @@ -152,6 +152,7 @@ SWWM_ETITLE = "Opciones de Efectos"; SWWM_RAGESHADER = "Shader Alternativo de Ragekit"; SWWM_CAMHUD = "HUD Completo en Cámaras"; SWWM_UNCAPALERT = "Rango de Alerta Ilimitado"; +SWWM_COLLECTANIMKEY = "Animaciones de Llaves"; TOOLTIP_SWWM_VOICETYPE = "Selecciona el pack de voz para el jugador."; TOOLTIP_SWWM_MUTEVOICE = "Controla lo que se mutea, si prefieres tener un protagonista más silencioso."; TOOLTIP_SWWM_FLASHSTRENGTH = "Los destellos en pantalla suelen ocurrir al disparar algunas armas, puedes reducirlo si este tipo de efectos te causan malestar."; @@ -227,6 +228,7 @@ TOOLTIP_SWWM_LDSPOIL = "[LegenDoom] Muestra siempre el sufijo de \"Legendario\" TOOLTIP_SWWM_RAGESHADER = "El shader normal del Ragekit puede ser dañino para personas con fotosensibilidad. Activando esto se cambia a una alternativa más suave."; TOOLTIP_SWWM_CAMHUD = "Por defecto, cuando el jugador está mirando por una cámara, la mayor parte de elementos del HUD excluyendo mensajes son ocultados. Activa esto para mantener el HUD completo."; TOOLTIP_SWWM_UNCAPALERT = "Si se activa, todas las armas y proyectiles tendrán un rango de ruido ilimitado. Puede arreglar mapas que usan trampas de teletransporte estilo vanilla."; +TOOLTIP_SWWM_COLLECTANIMKEY = "Muestra animaciones especiales en primera persona al recoger llaves."; // knowledge base SWWM_COMINGSOON = "(próximamente)"; SWWM_MISSTAB = "Misión"; diff --git a/language.version b/language.version index c09b7fcd9..8e9f6631e 100644 --- a/language.version +++ b/language.version @@ -1,2 +1,2 @@ [default] -SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r624 \cu(Thu 19 Nov 21:33:06 CET 2020)"; +SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r626 \cu(Fri 20 Nov 09:25:53 CET 2020)"; diff --git a/menudef.txt b/menudef.txt index f8a12d89d..6520ea6f3 100644 --- a/menudef.txt +++ b/menudef.txt @@ -109,6 +109,7 @@ OptionMenu "SWWMOptionMenu" Option "$SWWM_EARBUSTER", "swwm_earbuster", "YesNo" Option "$SWWM_BUSTERPAUSE", "swwm_cbtpause", "YesNo" Option "$SWWM_COLLECTANIM", "swwm_collectanim", "YesNo" + Option "$SWWM_COLLECTANIMKEY", "swwm_collectanimkey", "YesNo" StaticText " " StaticText "$SWWM_CTITLE", "Blue" Option "$SWWM_SKEYS", "swwm_sharekeys", "YesNo" diff --git a/zscript/swwm_hud.zsc b/zscript/swwm_hud.zsc index 6afa006f3..865a2dc48 100644 --- a/zscript/swwm_hud.zsc +++ b/zscript/swwm_hud.zsc @@ -1204,15 +1204,15 @@ Class SWWMStatusBar : BaseStatusBar for ( int j=l.Count()-1; j>=0; j-- ) { int len = fnt.StringWidth(l.StringAt(j)); - xx = (ss.x-len)/2.; - Screen.DrawText(fnt,pickcol.GetInt(),int(xx),yy+2,l.StringAt(j),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alph); + xx = int((ss.x-len)/2.); + Screen.DrawText(fnt,pickcol.GetInt(),xx,yy+2,l.StringAt(j),DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alph); yy -= h; } yy -= 6; } } - private void DrawMessages() + private void DrawMessages( double boxalph = 1. ) { if ( !chatduration ) chatduration = CVar.GetCVar('swwm_chatduration',players[consoleplayer]); if ( !msgduration ) msgduration = CVar.GetCVar('swwm_msgduration',players[consoleplayer]); @@ -1236,14 +1236,14 @@ Class SWWMStatusBar : BaseStatusBar int h = fnt.GetHeight(); int maxlen = 0; for ( int i=0; i 0) || (CPlayer != players[consoleplayer]) ) return; + if ( (!demo && !goner) || (CPlayer.Health > 0) || (CPlayer != players[consoleplayer]) ) return 1.; String str; double alph; int len; @@ -1325,14 +1325,15 @@ Class SWWMStatusBar : BaseStatusBar int deadtimer = goner?goner.deadtimer:demo.deadtimer; if ( goner || (demo.player.viewheight <= 6) ) { - Screen.Dim("Black",goner?1.:min(deadtimer/80.,1.),0,0,Screen.GetWidth(),Screen.GetHeight()); + double dimalph = goner?1.:min(deadtimer/80.,1.); + Screen.Dim("Black",dimalph,0,0,Screen.GetWidth(),Screen.GetHeight()); if ( demo && (demo.revivefail > level.maptime) ) { Screen.Dim("Red",clamp((demo.revivefail-level.maptime)/60.,0.,.2),0,0,Screen.GetWidth(),Screen.GetHeight()); str = StringTable.Localize("$SWWM_REFAIL"); fnt = LangFont(mTewiFont); len = fnt.StringWidth(str); - xx = (ss.x-len)/2.; + xx = int((ss.x-len)/2.); yy = ss.y-48; if ( ((demo.revivefail-level.maptime)%16) < 8 ) Screen.DrawText(fnt,Font.CR_RED,xx,yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); @@ -1341,38 +1342,40 @@ Class SWWMStatusBar : BaseStatusBar str = String.Format(StringTable.Localize("$SWWM_URDED"),CPlayer.GetUserName()); fnt = LangFont(mTewiFont); len = fnt.StringWidth(str); - xx = (ss.x-len)/2.; + xx = int((ss.x-len)/2.); yy = (ss.y-fnt.GetHeight()*4)/2.; Screen.DrawText(fnt,Font.CR_RED,xx,yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alph); if ( multiplayer || level.AllowRespawn || sv_singleplayerrespawn || G_SkillPropertyInt(SKILLP_PlayerRespawn) ) { - if ( sv_norespawn ) return; + if ( sv_norespawn ) return (1.-dimalph); alph = clamp((deadtimer-90)/60.,0.,1.); str = String.Format(StringTable.Localize("$SWWM_URDEDMP"),CPlayer.GetUserName()); fnt = LangFont(mTewiFont); len = fnt.StringWidth(str); - xx = (ss.x-len)/2.; + xx = int((ss.x-len)/2.); yy = ss.y/2.; Screen.DrawText(fnt,Font.CR_WHITE,xx,yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alph); - return; + return (1.-dimalph); } alph = clamp((deadtimer-140)/60.,0.,1.); str = String.Format(StringTable.Localize("$SWWM_URDED2"),CPlayer.GetUserName()); fnt = LangFont(mTewiFont); len = fnt.StringWidth(str); - xx = (ss.x-len)/2.; + xx = int((ss.x-len)/2.); yy = ss.y/2.; Screen.DrawText(fnt,Font.CR_WHITE,xx,yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alph); if ( goner || !swwm_revive ) - return; + return (1.-dimalph); alph = clamp((deadtimer-160)/60.,0.,1.); str = String.Format(StringTable.Localize("$SWWM_URDED3"),CPlayer.GetUserName()); fnt = LangFont(mTewiFont); len = fnt.StringWidth(str); - xx = (ss.x-len)/2.; + xx = int((ss.x-len)/2.); yy = (ss.y+fnt.GetHeight()*2)/2.; Screen.DrawText(fnt,Font.CR_WHITE,xx,yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alph); + return (1.-dimalph); } + return 1.; } override void Draw( int state, double TicFrac ) @@ -1426,7 +1429,7 @@ Class SWWMStatusBar : BaseStatusBar if ( hnd ) hnd.DrawBossBar(self); DrawPickups(); DrawDeath(); - DrawMessages(); + DrawMessages(0.); } else { @@ -1437,8 +1440,8 @@ Class SWWMStatusBar : BaseStatusBar DrawWeapon(); if ( hnd ) hnd.DrawBossBar(self); DrawPickups(); - DrawDeath(); - DrawMessages(); + double malph = DrawDeath(); + DrawMessages(malph); } } }