diff --git a/cvarinfo.txt b/cvarinfo.txt index b6aa99516..62f8e1302 100644 --- a/cvarinfo.txt +++ b/cvarinfo.txt @@ -93,6 +93,7 @@ user int swwm_shadowdist = 2000; // max distance beyond which blob shadows are server bool swwm_swapweapons = true; // [DLC1] allows carrying only one weapon in each slot (excluding starter melee and pistol) user int swwm_forcestats = 0; // always shows level stats on the HUD, not just when the automap is open (2 - also show map name, otherwise only stats) user int swwm_funtrails = 0; // recolors trails of eviscerator chunks and sheen bullets +server bool swwm_pistolstart = false; // enforces pistol start for all maps (excluding hubs) // TODO selection order array of weapons, for user tweaking // if empty, use default selection order defined in zscript diff --git a/language.def_menu b/language.def_menu index 67a7dec66..1f42c96bf 100644 --- a/language.def_menu +++ b/language.def_menu @@ -190,6 +190,7 @@ SWWM_TRAILS_BLUE = "Blue"; SWWM_TRAILS_MAGENTA = "Magenta"; SWWM_TRAILS_RAINBOW = "Rainbow"; SWWM_TRAILS_TRANS = "TRANS RIGHTS"; +SWWM_PISTOLSTART = "Force Pistol Start"; 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."; @@ -273,6 +274,7 @@ TOOLTIP_SWWM_SHADOWDIST = "Maximum distance at which to show blob shadows. May h TOOLTIP_SWWM_SWAPWEAPONS = "Allow only one weapon per slot (excluding Deep Impact and Explodium Gun). Disable if you'd rather ignore this puny attempt at balance."; TOOLTIP_SWWM_FORCESTATS = "Shows map statistics in the HUD even when the automap isn't open."; TOOLTIP_SWWM_FUNTRAILS = "Recolors the trails left by slot 5 weapon projectiles."; +TOOLTIP_SWWM_PISTOLSTART = "Forces you to pistol start between levels. This excludes travel between levels within a hub, however."; // knowledge base SWWM_COMINGSOON = "(coming soon)"; SWWM_MISSTAB = "Mission"; diff --git a/language.es_menu b/language.es_menu index 795631b2b..42f13d8cf 100644 --- a/language.es_menu +++ b/language.es_menu @@ -187,6 +187,7 @@ SWWM_TRAILS_CYAN = "Cian"; SWWM_TRAILS_BLUE = "Azul"; SWWM_TRAILS_MAGENTA = "Magenta"; SWWM_TRAILS_RAINBOW = "Arcoiris"; +SWWM_PISTOLSTART = "Forzar Pistol Start"; 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."; @@ -270,6 +271,7 @@ TOOLTIP_SWWM_SHADOWDIST = "Distancia máxima a la que mostrar sombras. Puede ayu TOOLTIP_SWWM_SWAPWEAPONS = "Permite solo un arma por puesto (excluyendo Deep Impact y Pistola de Explodium). Desactiva si prefieres ignorar este intento inútil de balance."; TOOLTIP_SWWM_FORCESTATS = "Muestra estadísticas de mapa en el HUD incluso cuando el automapa no está abierto."; TOOLTIP_SWWM_FUNTRAILS = "Recolorea los rastros dejados por proyectiles de armas de ranura 5."; +TOOLTIP_SWWM_PISTOLSTART = "Fuerza hacer pistol start entre niveles. Aunque esto excluye viajes entre niveles de un mismo hub."; // knowledge base SWWM_COMINGSOON = "(próximamente)"; SWWM_MISSTAB = "Misión"; diff --git a/language.version b/language.version index 23d9a26f5..f1258a93a 100644 --- a/language.version +++ b/language.version @@ -1,3 +1,3 @@ [default] -SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r236 \cu(Fri 29 Jan 17:21:19 CET 2021)\c-"; -SWWM_SHORTVER="\cw0.9.11b-pre r236 \cu(2021-01-29 17:21:19)\c-"; +SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r238 \cu(Fri 29 Jan 21:32:43 CET 2021)\c-"; +SWWM_SHORTVER="\cw0.9.11b-pre r238 \cu(2021-01-29 21:32:43)\c-"; diff --git a/menudef.txt b/menudef.txt index 68c0a6dcd..9756725ac 100644 --- a/menudef.txt +++ b/menudef.txt @@ -130,6 +130,7 @@ OptionMenu "SWWMOptionMenu" Option "$SWWM_FUNTRAILS", "swwm_funtrails", "SWWMFunTrails" StaticText " " StaticText "$SWWM_BTITLE", "Blue" + Option "$SWWM_PISTOLSTART", "swwm_pistolstart", "YesNo" Option "$SWWM_ENEMYDROPS", "swwm_enemydrops", "SWWMEnemyDropType" Option "$SWWM_RESETSCORE", "swwm_resetscore", "YesNo" Option "$SWWM_EXTRAALERT", "swwm_extraalert", "YesNo" diff --git a/modeldef.explodiumgun b/modeldef.explodiumgun index 840ffec52..d0219424d 100644 --- a/modeldef.explodiumgun +++ b/modeldef.explodiumgun @@ -89,6 +89,10 @@ Model "ExplodiumGun" FrameIndex XZWZ J 2 0 } +Model "ExplodiumGun" +{ +} + Model "ExplodiumGun" { Path "models" @@ -120,7 +124,6 @@ Model "ExplodiumGun" FrameIndex XZW2 G 1 10 FrameIndex XZW2 H 1 11 // Fire - SurfaceSkin 1 4 "ExplodiumCasing.png" // show casing FrameIndex XZW2 I 1 13 FrameIndex XZW2 J 1 14 FrameIndex XZW2 K 1 15 @@ -130,9 +133,9 @@ Model "ExplodiumGun" FrameIndex XZW2 O 1 19 FrameIndex XZW2 P 1 20 FrameIndex XZW2 Q 1 21 + // unused FrameIndex XZW2 R 1 22 FrameIndex XZW2 S 1 23 - SurfaceSkin 1 4 "" // hide casing // Reload (Part 1) FrameIndex XZW2 T 1 25 FrameIndex XZW2 U 1 26 @@ -259,7 +262,6 @@ Model "ExplodiumGun" FrameIndex XZW6 Z 1 121 SurfaceSkin 1 5 "ExplodiumGun.png" // show mag // Check Bullet - SurfaceSkin 1 4 "ExplodiumCasing.png" // show casing FrameIndex XZW7 A 1 157 FrameIndex XZW7 B 1 158 FrameIndex XZW7 C 1 159 @@ -279,7 +281,6 @@ Model "ExplodiumGun" FrameIndex XZW7 Q 1 173 FrameIndex XZW7 R 1 174 FrameIndex XZW7 S 1 175 - SurfaceSkin 1 4 "" // hide casing // Melee FrameIndex XZW7 T 1 177 FrameIndex XZW7 U 1 178 @@ -339,5 +340,22 @@ Model "ExplodiumGun" FrameIndex XZW9 U 1 233 FrameIndex XZW9 V 1 234 FrameIndex XZW9 W 1 235 + // Casing + SurfaceSkin 1 0 "" + SurfaceSkin 1 1 "" + SurfaceSkin 1 2 "" + SurfaceSkin 1 3 "" + SurfaceSkin 1 4 "ExplodiumCasing.png" + SurfaceSkin 1 5 "" + FrameIndex XZWA A 1 14 + FrameIndex XZWA B 1 15 + FrameIndex XZWA C 1 16 + FrameIndex XZWA D 1 17 + FrameIndex XZWA E 1 18 + FrameIndex XZWA F 1 19 + FrameIndex XZWA G 1 20 + FrameIndex XZWA H 1 21 + FrameIndex XZWA I 1 22 + FrameIndex XZWA J 1 23 } diff --git a/modeldef.explodiumgun2 b/modeldef.explodiumgun2 index bddb7acaf..ec8973183 100644 --- a/modeldef.explodiumgun2 +++ b/modeldef.explodiumgun2 @@ -86,7 +86,6 @@ Model "DualExplodiumGun" FrameIndex XZW2 G 1 10 FrameIndex XZW2 H 1 11 // Fire - SurfaceSkin 1 4 "ExplodiumCasing.png" // show casing FrameIndex XZW2 I 1 13 FrameIndex XZW2 J 1 14 FrameIndex XZW2 K 1 15 @@ -96,9 +95,9 @@ Model "DualExplodiumGun" FrameIndex XZW2 O 1 19 FrameIndex XZW2 P 1 20 FrameIndex XZW2 Q 1 21 + // unused FrameIndex XZW2 R 1 22 FrameIndex XZW2 S 1 23 - SurfaceSkin 1 4 "" // hide casing // Reload (Part 1) FrameIndex XZW2 T 1 25 FrameIndex XZW2 U 1 26 @@ -239,7 +238,6 @@ Model "DualExplodiumGun" FrameIndex XZWB G 1 10 FrameIndex XZWB H 1 11 // Fire - SurfaceSkin 1 4 "ExplodiumCasing.png" // show casing FrameIndex XZWB I 1 13 FrameIndex XZWB J 1 14 FrameIndex XZWB K 1 15 @@ -249,9 +247,9 @@ Model "DualExplodiumGun" FrameIndex XZWB O 1 19 FrameIndex XZWB P 1 20 FrameIndex XZWB Q 1 21 + // unused FrameIndex XZWB R 1 22 FrameIndex XZWB S 1 23 - SurfaceSkin 1 4 "" // hide casing // Reload (Part 1) FrameIndex XZWB T 1 25 FrameIndex XZWB U 1 26 @@ -371,4 +369,37 @@ Model "DualExplodiumGun" FrameIndex XZWH U 1 233 FrameIndex XZWH V 1 234 FrameIndex XZWH W 1 235 + // Casings + SurfaceSkin 1 0 "" + SurfaceSkin 1 1 "" + SurfaceSkin 1 2 "" + SurfaceSkin 1 3 "" + SurfaceSkin 1 4 "ExplodiumCasing.png" + SurfaceSkin 1 5 "" + // RIGHT + Model 1 "ExplodiumGun1st_d.3d" + Offset 3 0 -2 + FrameIndex XZWA A 1 14 + FrameIndex XZWA B 1 15 + FrameIndex XZWA C 1 16 + FrameIndex XZWA D 1 17 + FrameIndex XZWA E 1 18 + FrameIndex XZWA F 1 19 + FrameIndex XZWA G 1 20 + FrameIndex XZWA H 1 21 + FrameIndex XZWA I 1 22 + FrameIndex XZWA J 1 23 + // LEFT + Model 1 "ExplodiumGun1stL_d.3d" + Offset -3 0 -2 + FrameIndex XZWI A 1 14 + FrameIndex XZWI B 1 15 + FrameIndex XZWI C 1 16 + FrameIndex XZWI D 1 17 + FrameIndex XZWI E 1 18 + FrameIndex XZWI F 1 19 + FrameIndex XZWI G 1 20 + FrameIndex XZWI H 1 21 + FrameIndex XZWI I 1 22 + FrameIndex XZWI J 1 23 } diff --git a/models/ExplodiumGun1st.blend b/models/ExplodiumGun1st.blend index 11fc85636..9fd771d8f 100644 Binary files a/models/ExplodiumGun1st.blend and b/models/ExplodiumGun1st.blend differ diff --git a/models/ExplodiumGun1stL_a.3d b/models/ExplodiumGun1stL_a.3d index 5f101eb3e..2ed4602f2 100644 Binary files a/models/ExplodiumGun1stL_a.3d and b/models/ExplodiumGun1stL_a.3d differ diff --git a/models/ExplodiumGun1st_a.3d b/models/ExplodiumGun1st_a.3d index ac4822558..3e03b4186 100644 Binary files a/models/ExplodiumGun1st_a.3d and b/models/ExplodiumGun1st_a.3d differ diff --git a/models/ExplodiumGun1st_d.3d b/models/ExplodiumGun1st_d.3d index 136b7aecb..104d70c4f 100644 Binary files a/models/ExplodiumGun1st_d.3d and b/models/ExplodiumGun1st_d.3d differ diff --git a/zscript/swwm_ammo.zsc b/zscript/swwm_ammo.zsc index 81f836729..1037e080c 100644 --- a/zscript/swwm_ammo.zsc +++ b/zscript/swwm_ammo.zsc @@ -1855,12 +1855,7 @@ Class HammerspaceEmbiggener : Inventory { if ( !(i is 'Ammo') ) continue; i.MaxAmount = i.default.MaxAmount; - if ( i.Amount > i.MaxAmount ) - { - int dropme = max(0,i.Amount-i.MaxAmount); - if ( dropme > 0 ) i.CreateTossable(dropme); - i.Amount = i.MaxAmount; - } + if ( i.Amount > i.MaxAmount ) i.Amount = i.MaxAmount; } Super.DepleteOrDestroy(); } diff --git a/zscript/swwm_blazeit.zsc b/zscript/swwm_blazeit.zsc index 8855508c7..8e90397ab 100644 --- a/zscript/swwm_blazeit.zsc +++ b/zscript/swwm_blazeit.zsc @@ -1497,13 +1497,10 @@ Class Hellblazer : SWWMWeapon action void A_GlassOverlay( StateLabel g ) { - if ( !player.FindPSprite(PSP_WEAPON+1) ) - { - A_Overlay(PSP_WEAPON+1,g); - A_OverlayFlags(PSP_WEAPON+1,PSPF_RENDERSTYLE|PSPF_FORCESTYLE,true); - A_OverlayRenderStyle(PSP_WEAPON+1,STYLE_Add); - } - else player.SetPSprite(PSP_WEAPON+1,invoker.FindState(g)); + player.SetPSprite(PSP_WEAPON+1,invoker.FindState(g)); + // we have to still use A_Overlay* functions for these + A_OverlayFlags(PSP_WEAPON+1,PSPF_RENDERSTYLE|PSPF_FORCESTYLE,true); + A_OverlayRenderStyle(PSP_WEAPON+1,STYLE_Add); } action state A_JumpByAmmoType( StateLabel a, StateLabel b, StateLabel c, StateLabel d, StateLabel g, StateLabel o = null ) diff --git a/zscript/swwm_handler.zsc b/zscript/swwm_handler.zsc index ff6550222..5147204c0 100644 --- a/zscript/swwm_handler.zsc +++ b/zscript/swwm_handler.zsc @@ -743,11 +743,11 @@ Class SWWMHandler : EventHandler // level end stats override void WorldUnloaded( WorldEvent e ) { - if ( !(gameinfo.gametype&GAME_STRIFE) ) + let ti = ThinkerIterator.Create("SWWMStats",Thinker.STAT_STATIC); + SWWMStats s; + while ( s = SWWMStats(ti.Next()) ) { - let ti = ThinkerIterator.Create("SWWMStats",Thinker.STAT_STATIC); - SWWMStats s; - while ( s = SWWMStats(ti.Next()) ) + if ( !(gameinfo.gametype&GAME_STRIFE) ) { int clust = 0; bool secret = false; @@ -784,8 +784,9 @@ Class SWWMHandler : EventHandler s.clustervisit.Push(clust); s.secretdone.Push(secret|s.secretdone[csiz-1]); } - s.AddLevelStats(); } + s.AddLevelStats(); + s.lastcluster = level.cluster; } ClearAllShaders(players[consoleplayer]); // reset score on dead players (death exit™) @@ -1030,6 +1031,24 @@ Class SWWMHandler : EventHandler if ( !c.CallTryPickup(p.mo) ) c.Destroy(); } + // reset inventory (including unclearables) on forced pistol starts (must have visited at least one map, though) + if ( swwm_pistolstart && (s.lstats.Size() > 0) && ((s.lastcluster != level.cluster) || !(level.clusterflags&LevelLocals.CLUSTER_HUB)) ) + { + if ( swwm_resetscore ) c.credits = c.hcredits = 0; + Actor last = p.mo; + while ( last.inv ) + { + let inv = last.inv; + if ( !(inv is 'SWWMCollectible') ) + { + inv.Destroy(); + if ( !inv.bDestroyed ) last = inv; + } + else last = inv; + } + p.mo.GiveDefaultInventory(); + p.mo.BringUpWeapon(); + } } override void PlayerRespawned( PlayerEvent e ) diff --git a/zscript/swwm_splode.zsc b/zscript/swwm_splode.zsc index 545f09045..9801b077d 100644 --- a/zscript/swwm_splode.zsc +++ b/zscript/swwm_splode.zsc @@ -301,6 +301,7 @@ Class ExplodiumGun : SWWMWeapon int clipcount; bool chambered; bool preinit; + double casex, casey; transient ui TextureID WeaponBox; transient ui Font TewiFont; @@ -591,9 +592,26 @@ Class ExplodiumGun : SWWMWeapon Wait; Fire: XZW2 A 1 A_Schutt(); - XZW2 IJKLMNOPQR 1; - XZW2 S 2 A_DropCasing(); + XZW2 I 1; + XZW2 J 1 + { + int layer = PSP_WEAPON+1; + while ( player.FindPSprite(layer) ) layer++; + A_Overlay(layer,"Casing"); + } + XZW2 KLMNOP 1; + XZW2 Q 2; Goto Ready; + Casing: + XZWA A 1 + { + A_OverlayOffset(OverlayID(),0,0); + invoker.casex = FRandom[Explodium](-1.,5.); + invoker.casey = FRandom[Explodium](-2.,1.); + } + XZWA BCDEFGHIJ 1 A_OverlayOffset(OverlayID(),invoker.casex,invoker.casey,WOF_ADD|WOF_INTERPOLATE); + TNT1 A 1 A_DropCasing(); + Stop; AltFire: XZW2 A 2 { @@ -730,6 +748,7 @@ Class DualExplodiumGun : SWWMWeapon { int clipcount; bool chambered; + double casex, casey, lcasex, lcasey; transient ui TextureID WeaponBox; transient ui Font TewiFont; @@ -1003,14 +1022,48 @@ Class DualExplodiumGun : SWWMWeapon Wait; Fire: XZW2 A 1 A_Schutt(); - XZW2 IJKLMNOPQR 1; - XZW2 S 2 A_DropCasing(); + XZW2 I 1; + XZW2 J 1 + { + int layer = PSP_WEAPON+2; + while ( player.FindPSprite(layer) ) layer++; + A_Overlay(layer,"Casing"); + } + XZW2 KLMNOP 1; + XZW2 Q 2; Goto Ready; LeftFire: XZWB A 1 A_Schutt(-1); - XZWB IJKLMNOPQR 1; - XZWB S 2 A_DropCasing(-1); + XZWB I 1; + XZWB J 1 + { + int layer = PSP_WEAPON+12; + while ( player.FindPSprite(layer) ) layer++; + A_Overlay(layer,"LeftCasing"); + } + XZWB KLMNOP 1; + XZWB Q 2; Goto LeftReady; + Casing: + XZWA A 1 + { + A_OverlayOffset(OverlayID(),0,0); + invoker.casex = FRandom[Explodium](-1.,5.); + invoker.casey = FRandom[Explodium](-2.,1.); + } + XZWA BCDEFGHIJ 1 A_OverlayOffset(OverlayID(),invoker.casex,invoker.casey,WOF_ADD|WOF_INTERPOLATE); + TNT1 A 1 A_DropCasing(); + Stop; + LeftCasing: + XZWI A 1 + { + A_OverlayOffset(OverlayID(),0,0); + invoker.lcasex = FRandom[Explodium](-5.,1.); + invoker.lcasey = FRandom[Explodium](-1.,2.); + } + XZWI BCDEFGHIJ 1 A_OverlayOffset(OverlayID(),invoker.lcasex,invoker.lcasey,WOF_ADD|WOF_INTERPOLATE); + TNT1 A 1 A_DropCasing(-1); + Stop; Lower: XZW2 A 2; XZW7 TUV 2; @@ -1184,7 +1237,7 @@ Class DualExplodiumGun : SWWMWeapon XZWA T 2; XZWA U 2 { player.SetPSPrite(PSP_WEAPON+1,ResolveState("LeftDeselect")); } XZWA VW 2; - XZW2 BBB 2; + XZW2 B 6; XZW2 B -1 A_FullLower(); Stop; LeftDeselect: diff --git a/zscript/swwm_thinkers.zsc b/zscript/swwm_thinkers.zsc index a61b7d27c..5b64c707c 100644 --- a/zscript/swwm_thinkers.zsc +++ b/zscript/swwm_thinkers.zsc @@ -114,6 +114,8 @@ Class SWWMStats : Thinker Array questbacklog; // hackaround for stuff getting lost Array > ownedcollectibles; + // for pistol start info (to avoid it within hubs) + int lastcluster; bool GotWeapon( Class which ) {