Skip to content

Commit

Permalink
Make Extra Gibbing configurable, and more
Browse files Browse the repository at this point in the history
Additionally, some text changes.
  • Loading branch information
MrAlaux committed Sep 1, 2023
1 parent afc7d20 commit 6548eaf
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 22 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/doomstat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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];

Expand Down
10 changes: 9 additions & 1 deletion src/doomstat.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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 {
Expand Down
9 changes: 7 additions & 2 deletions src/m_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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();
}

Expand Down
25 changes: 23 additions & 2 deletions src/m_misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},

{
Expand Down
29 changes: 17 additions & 12 deletions src/p_inter.c
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down

0 comments on commit 6548eaf

Please sign in to comment.