diff --git a/CHANGELOG.md b/CHANGELOG.md index 952013871..377537897 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ - **Extended Mouselook range**; pitch effects are now applied even when looking all the way up and down - **Disabled crosshair when using Chasecam**; now configurable through the `chasecam_crosshair` CVAR - **Permanent Weapon Bobbing can now be toggled** through the `always_bob` CVAR +- **Made Extra Gibbing configurable** through the `extra_gibbing_#` CVARs - **Moved Nugget key bindings to Key Bindings page 10** ## Bug Fixes diff --git a/README.md b/README.md index 54144af3c..f1f59da85 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Although the new code has been written with the intention of not breaking demo c Most of Nugget Doom's features come from other sources, like source ports and mods; the initial implementations for some are **ported from (p.f.)** said sources, while others are just **inspired by (i.b.)** them. These acknowledgements are included in the feature lists below; be aware that some might be inaccurate or outright missing. -A few settings are labeled as _**CFG-Only**_: they can only be toggled by editing `nugget-doom.cfg`. For these settings, their config variable names are provided alongside the _CFG-Only_ label as guidance. +A few settings are labeled as _**CFG-Only**_: they can only be toggled by editing `nugget-doom.cfg`. For these settings, their CVAR names are provided alongside the _CFG-Only_ label as guidance. ### General @@ -60,7 +60,7 @@ A few settings are labeled as _**CFG-Only**_: they can only be toggled by editin - **Always Bob** setting (CFG-Only: `always_bob`) - _**Weapon Bobbing Percentage**_ setting [i.b. Crispy Doom, ZDoom] - _**Bobbing Styles**_ selection [p.f. Zandronum] -- _**Weapon Inertia**_ setting (scale determined by the CFG-Only variable `weapon_inertia_scale_pct`) +- _**Weapon Inertia**_ setting (scale determined by the CFG-Only `weapon_inertia_scale_pct` CVAR) - _**Squat Weapon Down On Impact**_ setting [p.f. Crispy Doom] - _**Translucent Flashes**_ setting [i.b. Crispy Doom] - **Show Berserk availability** setting [partially p.f. Crispy Doom] @@ -97,7 +97,7 @@ A few settings are labeled as _**CFG-Only**_: they can only be toggled by editin ### Enemies -- _**Extra Gibbing**_ setting, to force Berserk Fist, Chainsaw and SSG gibbing [i.b. Smooth Doom] +- _**Extra Gibbing**_ setting, to force Berserk Fist/Chainsaw/SSG gibbing (configurable through the CFG-Only `extra_gibbing_#` CVARs) [i.b. Smooth Doom] - _**Bloodier Gibbing**_ setting [i.b. Smooth Doom] - _**ZDoom-like item drops**_ setting [of course, i.b. ZDoom] - _**Selective Fuzz Darkening**_ setting @@ -144,7 +144,7 @@ A few settings are labeled as _**CFG-Only**_: they can only be toggled by editin - _**'TURBO'**_ to change the player speed in-game - _**'TNTEM'**_ as an alternative to _'KILLEM'_ - _**'FPS'**_ as a replacement for _'SHOWFPS'_ -- **Mid-air control while on noclipping mode** [p.f. Crispy Doom] +- **Mid-air control while in noclipping mode** [p.f. Crispy Doom] - Reenabled _**'NOMOMENTUM'**_ cheat [p.f. Crispy Doom] ### Miscellaneous diff --git a/src/doomstat.c b/src/doomstat.c index 968c7196a..b2a1c9d42 100644 --- a/src/doomstat.c +++ b/src/doomstat.c @@ -184,7 +184,7 @@ int hudcolor_ms_comp; int event_timers[NUMTIMERS]; // Enemies -int extra_gibbing; +int extra_gibbing_on; int bloodier_gibbing; int zdoom_item_drops; @@ -205,6 +205,7 @@ int weapon_inertia_scale_pct; int sx_fix; int blink_keys; int automap_overlay_darkening; +int extra_gibbing[NUMEXGIBS]; int nugget_comp[NUGGET_COMP_TOTAL], default_nugget_comp[NUGGET_COMP_TOTAL]; diff --git a/src/doomstat.h b/src/doomstat.h index 8867a11bd..c468160c8 100644 --- a/src/doomstat.h +++ b/src/doomstat.h @@ -521,7 +521,7 @@ typedef enum { extern int event_timers[]; // Enemies -extern int extra_gibbing; +extern int extra_gibbing_on; extern int bloodier_gibbing; extern int zdoom_item_drops; @@ -542,6 +542,14 @@ extern int weapon_inertia_scale_pct; extern int sx_fix; extern int blink_keys; extern int automap_overlay_darkening; +typedef enum { + EXGIB_FIST, + EXGIB_CSAW, + EXGIB_SSG, + + NUMEXGIBS +} extragibbing_t; +extern int extra_gibbing[]; // Doom Compatibility enum { diff --git a/src/m_menu.c b/src/m_menu.c index b1f776759..44e387c5c 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -1271,7 +1271,7 @@ void M_DrawOptions(void) /* M_DrawThermo(OptionsDef.x,OptionsDef.y+LINEHEIGHT*(mousesens+1), 10,mouseSensitivity); killough */ - // [Nugget] Increase size to accommodate for extra screen sizes + // [Nugget] Increase size to accommodate extra screen sizes M_DrawThermo(OptionsDef.x,OptionsDef.y+LINEHEIGHT*(scrnsize+1), 9+2,screenSize); } @@ -7733,7 +7733,12 @@ void M_ResetSetupMenu(void) M_UpdateCenteredWeaponItem(); M_UpdateMultiLineMsgItem(); M_UpdateCriticalItems(); - // [Nugget] + + // [Nugget] --------------- + + if (!(extra_gibbing[EXGIB_FIST] || extra_gibbing[EXGIB_CSAW] || extra_gibbing[EXGIB_SSG])) + { enem_settings1[enem1_extra_gibbing].m_flags |= S_DISABLE; } + M_UpdateVertaimItem(); } diff --git a/src/m_misc.c b/src/m_misc.c index 2790d7ecf..039cf0634 100644 --- a/src/m_misc.c +++ b/src/m_misc.c @@ -1127,9 +1127,30 @@ default_t defaults[] = { { "extra_gibbing", - (config_t *) &extra_gibbing, NULL, + (config_t *) &extra_gibbing_on, NULL, {0}, {0,1}, number, ss_enem, wad_yes, - "1 to enable extra gibbing" + "1 to enable extra gibbing in general (affected by CVARs below)" + }, + + { + "extra_gibbing_fist", + (config_t *) &extra_gibbing[EXGIB_FIST], NULL, + {1}, {0,1}, number, ss_none, wad_yes, + "1 to enable extra gibbing for Berserk Fist" + }, + + { + "extra_gibbing_csaw", + (config_t *) &extra_gibbing[EXGIB_CSAW], NULL, + {1}, {0,1}, number, ss_none, wad_yes, + "1 to enable extra gibbing for Chainsaw" + }, + + { + "extra_gibbing_ssg", + (config_t *) &extra_gibbing[EXGIB_SSG], NULL, + {1}, {0,1}, number, ss_none, wad_yes, + "1 to enable extra gibbing for SSG" }, { diff --git a/src/p_inter.c b/src/p_inter.c index 0021b9809..8a34b8111 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -703,18 +703,23 @@ static boolean P_NuggetExtraGibbing(mobj_t *source, mobj_t *target) extern fixed_t P_AproxDistance(); extern void A_Punch(), A_Saw(), A_FireShotgun2(); - if (casual_play && extra_gibbing && source && source->player - && - ( (source->player->psprites->state->action.p2 == (actionf_p2)A_Punch - && source->player->powers[pw_strength] - && (P_AproxDistance(target->x - source->x, target->y - source->y) - < ((64*FRACUNIT) + target->info->radius))) - ||(source->player->psprites->state->action.p2 == (actionf_p2)A_Saw - && (P_AproxDistance(target->x - source->x, target->y - source->y) - < ((65*FRACUNIT) + target->info->radius))) - ||(source->player->psprites->state->action.p2 == (actionf_p2)A_FireShotgun2 - && (P_AproxDistance(target->x - source->x, target->y - source->y) - < ((128*FRACUNIT) + target->info->radius))) + if (casual_play && extra_gibbing_on && source && source->player + && ( + (extra_gibbing[EXGIB_FIST] + && source->player->psprites->state->action.p2 == (actionf_p2)A_Punch + && source->player->powers[pw_strength] + && (P_AproxDistance(target->x - source->x, target->y - source->y) + < ((64*FRACUNIT) + target->info->radius))) + + || (extra_gibbing[EXGIB_CSAW] + && source->player->psprites->state->action.p2 == (actionf_p2)A_Saw + && (P_AproxDistance(target->x - source->x, target->y - source->y) + < ((65*FRACUNIT) + target->info->radius))) + + || (extra_gibbing[EXGIB_SSG] + && source->player->psprites->state->action.p2 == (actionf_p2)A_FireShotgun2 + && (P_AproxDistance(target->x - source->x, target->y - source->y) + < ((128*FRACUNIT) + target->info->radius))) ) ) { return true; }