Skip to content

Commit

Permalink
Doom: Added compatibility option "game-objects-gibcrushednonbleeders"
Browse files Browse the repository at this point in the history
In the original game any crushed object will be turned into a pile of
gibs irrespective of whether said object is a monster or some other
entirely non-fleshy entity, such as a barrel.

Doomsday fixes this bug/oversight by default and will only gib mobjs
whose Thing definition does not specify the MF_NOBLOOD flag.

This behavior is now compatibility optioned (also modifiable from the
Options > Gameplay menu).
  • Loading branch information
danij-deng committed Sep 21, 2013
1 parent fa7d1fd commit 0226533
Show file tree
Hide file tree
Showing 9 changed files with 84 additions and 33 deletions.
@@ -0,0 +1,3 @@
@summary{
1=Turn any crushed object into a pile of gibs (disables DOOM bug fix).
}
42 changes: 40 additions & 2 deletions doomsday/plugins/common/src/hu_menu.c
Expand Up @@ -162,6 +162,11 @@ cvarbutton_t mnCVarButtons[] = {
{ 0, "game-monsters-floatoverblocking" },
{ 0, "game-objects-clipping" },
{ 0, "game-objects-falloff" },
#endif
#if __JDOOM__ || __JDOOM64__
{ 0, "game-objects-gibcrushednonbleeders" },
#endif
#if __JDOOM__ || __JHERETIC__ || __JDOOM64__
{ 0, "game-objects-neverhangoverledges" },
{ 0, "game-player-wallrun-northonly" },
#endif
Expand Down Expand Up @@ -2269,9 +2274,9 @@ void Hu_MenuInitGameplayOptionsPage(void)
#endif
mn_object_t* objects, *ob;
#if __JDOOM64__
const uint numObjects = 38;
#elif __JDOOM__
const uint numObjects = 40;
#elif __JDOOM__
const uint numObjects = 42;
#elif __JHERETIC__
const uint numObjects = 24;
#elif __JHEXEN__
Expand Down Expand Up @@ -2734,6 +2739,39 @@ void Hu_MenuInitGameplayOptionsPage(void)
}
ob++;

#if __JDOOM__ || __JDOOM64__
ob->_type = MN_TEXT;
ob->_group = 1;
ob->_pageFontIdx = MENU_FONT1;
ob->_pageColorIdx = MENU_COLOR1;
ob->ticker = MNText_Ticker;
ob->updateGeometry = MNText_UpdateGeometry;
ob->drawer = MNText_Drawer;
ob->_typedata = Z_Calloc(sizeof(mndata_text_t), PU_GAMESTATIC, 0);
{ mndata_text_t* text = (mndata_text_t*)ob->_typedata;
text->text = "All Crushed Objects Become A Pile Of Gibs";
}
ob++;

ob->_type = MN_BUTTON;
ob->_group = 1;
ob->_shortcut = 'g';
ob->_pageFontIdx = MENU_FONT1;
ob->_pageColorIdx = MENU_COLOR3;
ob->ticker = MNButton_Ticker;
ob->updateGeometry = MNButton_UpdateGeometry;
ob->drawer = MNButton_Drawer;
ob->actions[MNA_MODIFIED].callback = Hu_MenuCvarButton;
ob->actions[MNA_FOCUS].callback = Hu_MenuDefaultFocusAction;
ob->cmdResponder = MNButton_CommandResponder;
ob->_typedata = Z_Calloc(sizeof(mndata_button_t), PU_GAMESTATIC, 0);
{ mndata_button_t* btn = (mndata_button_t*)ob->_typedata;
btn->staydownMode = true;
btn->data = "game-objects-gibcrushednonbleeders";
}
ob++;
#endif

ob->_type = MN_TEXT;
ob->_group = 1;
ob->_pageFontIdx = MENU_FONT1;
Expand Down
2 changes: 1 addition & 1 deletion doomsday/plugins/common/src/p_map.c
Expand Up @@ -2752,7 +2752,7 @@ int PIT_ChangeSector(mobj_t* thing, void* data)

// Crunch bodies to giblets.
#if __JDOOM__ || __JDOOM64__
if(thing->health <= 0 && !(thing->flags & MF_NOBLOOD))
if(thing->health <= 0 && (cfg.gibCrushedNonBleeders || !(thing->flags & MF_NOBLOOD)))
#elif __JHEXEN__
if(thing->health <= 0 && (thing->flags & MF_CORPSE))
#else
Expand Down
3 changes: 3 additions & 0 deletions doomsday/plugins/doom/data/conhelp.txt
Expand Up @@ -742,6 +742,9 @@ desc = 1=Use EXACTLY DOOM's clipping code (disables DOOM bug fix).
[game-objects-falloff]
desc = 1=Objects fall under their own weight (enables DOOM bug fix).

[game-objects-gibcrushednonbleeders]
desc = 1=Turn any crushed object into a pile of gibs (disables DOOM bug fix).

[game-objects-hangoverledges]
desc = 1=Only some objects can hang over tall ledges (enables DOOM bug fix).

Expand Down
1 change: 1 addition & 0 deletions doomsday/plugins/doom/include/d_config.h
Expand Up @@ -169,6 +169,7 @@ typedef struct jdoom_config_s {
byte wallRunNorthOnly; // If handle large make exception for wallrunning
byte zombiesCanExit; // Zombie players can exit levels.
byte fallOff; // Objects fall under their own weight.
byte gibCrushedNonBleeders;
byte fixOuchFace;
byte fixStatusbarOwnedWeapons;

Expand Down
33 changes: 17 additions & 16 deletions doomsday/plugins/doom/src/d_console.c
Expand Up @@ -140,28 +140,29 @@ cvartemplate_t gameCVars[] = {
{"player-weapon-order7", 0, CVT_INT, &cfg.weaponOrder[7], 0, NUM_WEAPON_TYPES},
{"player-weapon-order8", 0, CVT_INT, &cfg.weaponOrder[8], 0, NUM_WEAPON_TYPES},

{"player-weapon-nextmode", 0, CVT_BYTE, &cfg.weaponNextMode, 0, 1},
{"player-weapon-nextmode", 0, CVT_BYTE, &cfg.weaponNextMode, 0, 1},
{"player-weapon-cycle-sequential", 0, CVT_BYTE, &cfg.weaponCycleSequential, 0, 1},

// Misc
{"player-camera-noclip", 0, CVT_INT, &cfg.cameraNoClip, 0, 1},
{"player-death-lookup", 0, CVT_BYTE, &cfg.deathLookUp, 0, 1},
{"player-death-lookup", 0, CVT_BYTE, &cfg.deathLookUp, 0, 1},

// Compatibility options
{"game-raiseghosts", 0, CVT_BYTE, &cfg.raiseGhosts, 0, 1},
{"game-vilechase-usevileradius", 0, CVT_BYTE, &cfg.vileChaseUseVileRadius, 0, 1},
{"game-maxskulls", 0, CVT_BYTE, &cfg.maxSkulls, 0, 1},
{"game-skullsinwalls", 0, CVT_BYTE, &cfg.allowSkullsInWalls, 0, 1},
{"game-anybossdeath666", 0, CVT_BYTE, &cfg.anyBossDeath, 0, 1},
{"game-monsters-stuckindoors", 0, CVT_BYTE, &cfg.monstersStuckInDoors, 0, 1},
{"game-objects-neverhangoverledges", 0, CVT_BYTE, &cfg.avoidDropoffs, 0, 1},
{"game-objects-clipping", 0, CVT_BYTE, &cfg.moveBlock, 0, 1},
{"game-zombiescanexit", 0, CVT_BYTE, &cfg.zombiesCanExit, 0, 1},
{"game-player-wallrun-northonly", 0, CVT_BYTE, &cfg.wallRunNorthOnly, 0, 1},
{"game-objects-falloff", 0, CVT_BYTE, &cfg.fallOff, 0, 1},
{"game-zclip", 0, CVT_BYTE, &cfg.moveCheckZ, 0, 1},
{"game-monsters-floatoverblocking", 0, CVT_BYTE, &cfg.allowMonsterFloatOverBlocking, 0, 1},
{"game-corpse-sliding", 0, CVT_BYTE, &cfg.slidingCorpses, 0, 1},
{"game-anybossdeath666", 0, CVT_BYTE, &cfg.anyBossDeath, 0, 1},
{"game-corpse-sliding", 0, CVT_BYTE, &cfg.slidingCorpses, 0, 1},
{"game-maxskulls", 0, CVT_BYTE, &cfg.maxSkulls, 0, 1},
{"game-monsters-floatoverblocking", 0, CVT_BYTE, &cfg.allowMonsterFloatOverBlocking, 0, 1},
{"game-monsters-stuckindoors", 0, CVT_BYTE, &cfg.monstersStuckInDoors, 0, 1},
{"game-objects-clipping", 0, CVT_BYTE, &cfg.moveBlock, 0, 1},
{"game-objects-falloff", 0, CVT_BYTE, &cfg.fallOff, 0, 1},
{"game-objects-gibcrushednonbleeders", 0, CVT_BYTE, &cfg.gibCrushedNonBleeders, 0, 1},
{"game-objects-neverhangoverledges", 0, CVT_BYTE, &cfg.avoidDropoffs, 0, 1},
{"game-player-wallrun-northonly", 0, CVT_BYTE, &cfg.wallRunNorthOnly, 0, 1},
{"game-raiseghosts", 0, CVT_BYTE, &cfg.raiseGhosts, 0, 1},
{"game-skullsinwalls", 0, CVT_BYTE, &cfg.allowSkullsInWalls, 0, 1},
{"game-vilechase-usevileradius", 0, CVT_BYTE, &cfg.vileChaseUseVileRadius, 0, 1},
{"game-zclip", 0, CVT_BYTE, &cfg.moveCheckZ, 0, 1},
{"game-zombiescanexit", 0, CVT_BYTE, &cfg.zombiesCanExit, 0, 1},

// Game state
{"game-fastmonsters", 0, CVT_BYTE, &cfg.fastMonsters, 0, 1},
Expand Down
3 changes: 3 additions & 0 deletions doomsday/plugins/doom64/data/conhelp.txt
Expand Up @@ -875,6 +875,9 @@ desc = 1=The death of ANY boss monster triggers a 666 special (on applicable map
[game-monsters-stuckindoors]
desc = 1=Monsters can get stuck in doortracks (disables DOOM bug fix).

[game-objects-gibcrushednonbleeders]
desc = 1=Turn any crushed object into a pile of gibs (disables DOOM bug fix).

[game-objects-hangoverledges]
desc = 1=Only some objects can hang over tall ledges (enables DOOM bug fix).

Expand Down
1 change: 1 addition & 0 deletions doomsday/plugins/doom64/include/d_config.h
Expand Up @@ -166,6 +166,7 @@ typedef struct jdoom64_config_s {
byte wallRunNorthOnly; // If handle large make exception for wallrunning
byte zombiesCanExit; // Zombie players can exit maps.
byte fallOff; // Objects fall under their own weight.
byte gibCrushedNonBleeders;

byte hudShownCheatCounters;
float hudCheatCounterScale;
Expand Down
29 changes: 15 additions & 14 deletions doomsday/plugins/doom64/src/d_console.c
Expand Up @@ -160,26 +160,27 @@ cvartemplate_t gameCVars[] = {
{"player-weapon-order8", 0, CVT_INT, &cfg.weaponOrder[8], 0, NUM_WEAPON_TYPES},
{"player-weapon-order9", 0, CVT_INT, &cfg.weaponOrder[9], 0, NUM_WEAPON_TYPES},

{"player-weapon-nextmode", 0, CVT_BYTE, &cfg.weaponNextMode, 0, 1},
{"player-weapon-nextmode", 0, CVT_BYTE, &cfg.weaponNextMode, 0, 1},
{"player-weapon-cycle-sequential", 0, CVT_BYTE, &cfg.weaponCycleSequential, 0, 1},

// Misc
{"player-camera-noclip", 0, CVT_INT, &cfg.cameraNoClip, 0, 1},
{"player-death-lookup", 0, CVT_BYTE, &cfg.deathLookUp, 0, 1},
{"player-death-lookup", 0, CVT_BYTE, &cfg.deathLookUp, 0, 1},

// Compatibility options
{"game-maxskulls", 0, CVT_BYTE, &cfg.maxSkulls, 0, 1},
{"game-skullsinwalls", 0, CVT_BYTE, &cfg.allowSkullsInWalls, 0, 1},
{"game-anybossdeath666", 0, CVT_BYTE, &cfg.anyBossDeath, 0, 1},
{"game-monsters-stuckindoors", 0, CVT_BYTE, &cfg.monstersStuckInDoors, 0, 1},
{"game-objects-neverhangoverledges", 0, CVT_BYTE, &cfg.avoidDropoffs, 0, 1},
{"game-objects-clipping", 0, CVT_BYTE, &cfg.moveBlock, 0, 1},
{"game-zombiescanexit", 0, CVT_BYTE, &cfg.zombiesCanExit, 0, 1},
{"game-player-wallrun-northonly", 0, CVT_BYTE, &cfg.wallRunNorthOnly, 0, 1},
{"game-objects-falloff", 0, CVT_BYTE, &cfg.fallOff, 0, 1},
{"game-zclip", 0, CVT_BYTE, &cfg.moveCheckZ, 0, 1},
{"game-corpse-sliding", 0, CVT_BYTE, &cfg.slidingCorpses, 0, 1},
{"game-monsters-floatoverblocking", 0, CVT_BYTE, &cfg.allowMonsterFloatOverBlocking, 0, 1},
{"game-anybossdeath666", 0, CVT_BYTE, &cfg.anyBossDeath, 0, 1},
{"game-corpse-sliding", 0, CVT_BYTE, &cfg.slidingCorpses, 0, 1},
{"game-maxskulls", 0, CVT_BYTE, &cfg.maxSkulls, 0, 1},
{"game-monsters-floatoverblocking", 0, CVT_BYTE, &cfg.allowMonsterFloatOverBlocking, 0, 1},
{"game-monsters-stuckindoors", 0, CVT_BYTE, &cfg.monstersStuckInDoors, 0, 1},
{"game-objects-clipping", 0, CVT_BYTE, &cfg.moveBlock, 0, 1},
{"game-objects-falloff", 0, CVT_BYTE, &cfg.fallOff, 0, 1},
{"game-objects-gibcrushednonbleeders", 0, CVT_BYTE, &cfg.gibCrushedNonBleeders, 0, 1},
{"game-objects-neverhangoverledges", 0, CVT_BYTE, &cfg.avoidDropoffs, 0, 1},
{"game-player-wallrun-northonly", 0, CVT_BYTE, &cfg.wallRunNorthOnly, 0, 1},
{"game-skullsinwalls", 0, CVT_BYTE, &cfg.allowSkullsInWalls, 0, 1},
{"game-zclip", 0, CVT_BYTE, &cfg.moveCheckZ, 0, 1},
{"game-zombiescanexit", 0, CVT_BYTE, &cfg.zombiesCanExit, 0, 1},

// Game state
{"game-fastmonsters", 0, CVT_BYTE, &fastParm, 0, 1},
Expand Down

0 comments on commit 0226533

Please sign in to comment.