From 95d92cb8a589f427877e0ebfaa85aed1679d3313 Mon Sep 17 00:00:00 2001 From: Marisa Kirisame Date: Tue, 23 Nov 2021 22:18:41 +0100 Subject: [PATCH] Some cleanup. --- cvarinfo.base | 2 -- language.def_base | 2 +- language.es_base | 2 +- language.version | 4 +-- menudef.txt | 2 -- tools/mkstartup.c | 5 ++++ zscript/hud/swwm_hud.zsc | 6 ++--- zscript/items/swwm_baseammo.zsc | 11 ++++++++ zscript/items/swwm_powerups.zsc | 2 +- zscript/swwm_monsters.zsc | 43 -------------------------------- zscript/utility/swwm_utility.zsc | 4 ++- 11 files changed, 27 insertions(+), 56 deletions(-) diff --git a/cvarinfo.base b/cvarinfo.base index ed95fc557..6c7bbdac0 100644 --- a/cvarinfo.base +++ b/cvarinfo.base @@ -18,10 +18,8 @@ nosave int swwm_pickduration = 3; // lifespan of pickup messages server bool swwm_sharekeys = true; // share keys in mp user bool swwm_autousearmor = true; // automatically use armor items when possible user bool swwm_autousehealth = true; // automatically use health items when possible -user bool swwm_autouseammo = true; // automatically use ammo fabricators when possible (excl. tier 4) server int swwm_enforceautousearmor = 0; // 1: server enforces auto use, -1: server enforces no auto use, 0: server respects user setting server int swwm_enforceautousehealth = 0; // likewise for health -server int swwm_enforceautouseammo = 0; // likewise for fabricators nosave bool swwm_targeter = true; // show targeter healthbars nosave bool swwm_targettags = true; // show enemy tags above healthbars nosave bool swwm_healthnums = true; // show damage/healing numbers diff --git a/language.def_base b/language.def_base index baea6effa..ef7b1a5e9 100644 --- a/language.def_base +++ b/language.def_base @@ -1253,7 +1253,7 @@ SWWM_INTERTIP75 = "Kobolds are small little creechers that go yip."; SWWM_INTERTIP76 = "I showed you my intermission tip pls respond."; SWWM_INTERTIP77 = "AAA gaming is rotten to the core, riddled with corporate torture of honest workers. Support small developers whenever you can."; SWWM_INTERTIP78 = "Xenia > Tux\n\nBring back the cool Linux fox girl. Penguins suck."; -SWWM_INTERTIP79 = "Eliminate fascism."; +SWWM_INTERTIP79 = "Punching fascists is perfectly reasonable."; SWWM_INTERTIP80 = "Ceci n'est pas un conseil."; SWWM_INTERTIP81 = "Age only affects appearance, and has no bearing on ability. Gender has no bearing on ability. Everyone has imperfections, prejudice births malcontents, become a dark spirit.\nTime for crab."; SWWM_INTERTIP82 = "\"IF THE ZOO BANS ME FOR HOLLERING AT THE ANIMALS I WILL FACE GOD AND WALK BACKWARDS INTO HELL\" — dril"; diff --git a/language.es_base b/language.es_base index 756e96a4d..d9d9ec9ce 100644 --- a/language.es_base +++ b/language.es_base @@ -1127,7 +1127,7 @@ SWWM_INTERTIP75 = "Los kobolds son pequeñas criaturitas que hacen yip."; SWWM_INTERTIP76 = "Te he enseñado mi consejo de intermisión contesta pls."; SWWM_INTERTIP77 = "El gaming AAA está podrido hasta la médula, plagado por la tortura corporativa de trabajadores honestos. Apoya a los pequeños desarrolladores siempre que puedas."; SWWM_INTERTIP78 = "Xenia > Tux\n\nDevolvednos a la chica zorro molona de Linux. Los pingüinos apestan."; -SWWM_INTERTIP79 = "Elimina el fascismo."; +SWWM_INTERTIP79 = "Abofetear fachas es perfectamente razonable."; SWWM_INTERTIP81 = "La edad solo afecta a la apariencia, y no tiene relación a la habilidad. El género no tiene relación a la habilidad. Todo el mundo tiene imperfecciones, los prejuicios traen consigo malcontentos, conviertete en un espíritu oscuro.\nHora de cangrejo."; SWWM_INTERTIP82 = "\"SI EL ZOO ME PROHIBE LA ENTRADA POR GRITAR A LOS ANIMALES PLANTARÉ CARA A DIOS Y CAMINARÉ DE ESPALDAS AL INFIERNO\" — dril"; SWWM_INTERTIP83 = "SWWM GZ es realmente Un Extraño Mod de Armas (Some Weird Weapons Mod) para GZDoom."; diff --git a/language.version b/language.version index 3cd92e0e2..205f1dd34 100644 --- a/language.version +++ b/language.version @@ -1,3 +1,3 @@ [default] -SWWM_MODVER="\chSWWM \czGZ\c- \cw1.2pre r53 \cu(Sun 7 Nov 11:15:49 CET 2021)\c-"; -SWWM_SHORTVER="\cw1.2pre r53 \cu(2021-11-07 11:15:49)\c-"; +SWWM_MODVER="\chSWWM \czGZ\c- \cw1.2pre r54 \cu(Tue 23 Nov 22:18:41 CET 2021)\c-"; +SWWM_SHORTVER="\cw1.2pre r54 \cu(2021-11-23 22:18:41)\c-"; diff --git a/menudef.txt b/menudef.txt index a75dcd4f8..ff05d4753 100644 --- a/menudef.txt +++ b/menudef.txt @@ -193,7 +193,6 @@ OptionMenu "SWWMOptionMenu" Option "$SWWM_MELEEPICKUP", "swwm_meleepickup", "YesNo" Option "$SWWM_ARMORUSE", "swwm_autousearmor", "YesNo" Option "$SWWM_HEALTHUSE", "swwm_autousehealth", "YesNo" - Option "$SWWM_AMMOUSE", "swwm_autouseammo", "YesNo" Option "$SWWM_BARRIERUSE", "swwm_autousebarrier", "YesNo" Option "$SWWM_SINGLEFIRST", "swwm_singlefirst", "YesNo" Option "$SWWM_EARBUSTER", "swwm_earbuster", "YesNo" @@ -207,7 +206,6 @@ OptionMenu "SWWMOptionMenu" Option "$SWWM_SKEYS", "swwm_sharekeys", "YesNo" Option "$SWWM_SVARMORUSE", "swwm_enforceautousearmor", "SWWMEnforce" Option "$SWWM_SVHEALTHUSE", "swwm_enforceautousehealth", "SWWMEnforce" - Option "$SWWM_SVAMMOUSE", "swwm_enforceautouseammo", "SWWMEnforce" Option "$SWWM_SVBARRIERUSE", "swwm_enforceautousebarrier", "SWWMEnforce" Option "$SWWM_OTHERVOICE", "swwm_othervoice", "YesNo" StaticText " " diff --git a/tools/mkstartup.c b/tools/mkstartup.c index fb92097f9..56494c9b6 100644 --- a/tools/mkstartup.c +++ b/tools/mkstartup.c @@ -38,6 +38,8 @@ int main( void ) // STARTUP.data.pal : 16 colors, RGB8 (48 bytes) // NOTCH.data : 16x23, I8 (368 bytes) // NETNOTCH.data : 4x16, I8 (64 bytes) + // the NOTCH and NETNOTCH files are optional and their processing will + // be skipped if not found uint8_t pal[48] = {0}; uint8_t startup[4][38400] = {{0}}; uint8_t notch[184] = {0}; @@ -68,6 +70,7 @@ int main( void ) fwrite(&startup,1,153600,fout); fclose(fout); fin = fopen("NOTCH.data","rb"); + if ( !fin ) goto nnotch; fout = fopen("NOTCH.dat","wb"); // compose 4-bit linear notch image for ( int i=0; i<184; i++ ) @@ -79,7 +82,9 @@ int main( void ) fclose(fin); fwrite(¬ch,1,184,fout); fclose(fout); +nnotch: fin = fopen("NETNOTCH.data","rb"); + if ( !fin ) return 0; fout = fopen("NETNOTCH.dat","wb"); // compose 4-bit linear netnotch image for ( int i=0; i<32; i++ ) diff --git a/zscript/hud/swwm_hud.zsc b/zscript/hud/swwm_hud.zsc index 6f20ca9b9..60e7a226b 100644 --- a/zscript/hud/swwm_hud.zsc +++ b/zscript/hud/swwm_hud.zsc @@ -2684,7 +2684,7 @@ Class SWWMStatusBar : BaseStatusBar { if ( sv_norespawn ) return (1.-dimalph); alph = clamp((deadtimer-90)/60.,0.,1.); - str = String.Format(StringTable.Localize("$SWWM_URDEDMP"),CPlayer.GetUserName()); + str = String.Format(StringTable.Localize("$SWWM_URDEDMP")); fnt = LangFont(mTewiFont); len = fnt.StringWidth(str); xx = int((ss.x-len)/2.); @@ -2696,7 +2696,7 @@ Class SWWMStatusBar : BaseStatusBar return (1.-dimalph); } alph = clamp((deadtimer-140)/60.,0.,1.); - str = String.Format(StringTable.Localize("$SWWM_URDED2"),CPlayer.GetUserName()); + str = String.Format(StringTable.Localize("$SWWM_URDED2")); fnt = LangFont(mTewiFont); len = fnt.StringWidth(str); xx = int((ss.x-len)/2.); @@ -2705,7 +2705,7 @@ Class SWWMStatusBar : BaseStatusBar if ( goner || !swwm_revive ) return (1.-dimalph); alph = clamp((deadtimer-160)/60.,0.,1.); - str = String.Format(StringTable.Localize("$SWWM_URDED3"),CPlayer.GetUserName()); + str = String.Format(StringTable.Localize("$SWWM_URDED3")); fnt = LangFont(mTewiFont); len = fnt.StringWidth(str); xx = int((ss.x-len)/2.); diff --git a/zscript/items/swwm_baseammo.zsc b/zscript/items/swwm_baseammo.zsc index ed5b5a7a4..3247196bf 100644 --- a/zscript/items/swwm_baseammo.zsc +++ b/zscript/items/swwm_baseammo.zsc @@ -380,6 +380,17 @@ Class MagAmmo : Inventory abstract Inventory last; while ( excess > 0 ) { + // drop full mag if possible + if ( excess >= ClipSize ) + { + double ang = FRandom[Junk](0,360); + last = DoDrop(ParentAmmo); + last.SetOrigin(item.pos,false); + last.vel.xy = (cos(ang),sin(ang))*FRandom[Junk](2,5); + excess -= ClipSize; + continue; + } + // drop bullets otherwise for ( int i=0; i0)?ndmg:dmg,Source); if ( (flags&DE_HOWL) && a && (a.Health > 0) && a.bISMONSTER && !Random[DoBlast](0,3) ) a.Howl(); + if ( (flags&DE_COUNTFHKILLS) && (oldhp < basehp) ) continue; // was not at full health if ( (!a || (a.Health <= 0)) && (!(flags&DE_COUNTENEMIES) || hostile) && (!(flags&DE_COUNTSTEALTH) || inactive) ) nkill++; } // traverse portals (needed since BlockThingsIterator can't properly cross sector portals in both vertical directions)