Skip to content

Commit

Permalink
Doom|Heretic: Added compatibility menu option for monsters floating o…
Browse files Browse the repository at this point in the history
…ver obstacles

Also, player mobjs must be exempt from the check or it would hinder melee fights.
  • Loading branch information
skyjake committed Apr 19, 2012
1 parent 1ec0264 commit 1a47e53
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions doomsday/plugins/common/src/hu_menu.c
Expand Up @@ -167,6 +167,7 @@ cvarbutton_t mnCVarButtons[] = {
#endif
#if __JDOOM__ || __JHERETIC__ || __JDOOM64__
{ 0, "game-monsters-stuckindoors" },
{ 0, "game-monsters-floatoverblocking" },
{ 0, "game-objects-clipping" },
{ 0, "game-objects-falloff" },
{ 0, "game-objects-neverhangoverledges" },
Expand Down Expand Up @@ -1067,6 +1068,7 @@ mndata_text_t txt_gameplay_painelemental_limit_lostsouls = { "PE Limited To 21 L
mndata_text_t txt_gameplay_lostsouls_stuck = { "LS Can Get Stuck Inside Walls" };
# endif
mndata_text_t txt_gameplay_monsters_stuck_in_doors = { "Monsters Can Get Stuck In Doors" };
mndata_text_t txt_gameplay_monsters_float_over_blocking = { "Monsters Fly Over Obstacles" };
mndata_text_t txt_gameplay_never_hang_over_ledges = { "Some Objects Never Hang Over Ledges" };
mndata_text_t txt_gameplay_fall_under_own_weight = { "Objects Fall Under Own Weight" };
mndata_text_t txt_gameplay_corpse_stair_slide = { "Corpses Slide Down Stairs" };
Expand All @@ -1089,6 +1091,7 @@ mndata_button_t btn_gameplay_allow_jumping = { true, "player-jump" };
mndata_button_t btn_gameplay_weapon_recoil = { true, "player-weapon-recoil" };
#endif
#if __JDOOM__ || __JHERETIC__ || __JDOOM64__
mndata_button_t btn_gameplay_monsters_float_over_blocking = { true, "game-monsters-floatoverblocking" };
# if __JDOOM__ || __JDOOM64__
mndata_button_t btn_gameplay_any_boss_trigger_666 = { true, "game-anybossdeath666" };
# if !__JDOOM64__
Expand Down Expand Up @@ -1140,6 +1143,8 @@ static mn_object_t GameplayMenuObjects[] = {
{ MN_TEXT, 1, 0, { 0, 0 }, 0, MENU_FONT1, MENU_COLOR1, MNText_Ticker, MNText_UpdateGeometry, MNText_Drawer, { NULL }, NULL, NULL, NULL, &txt_gameplay_lostsouls_stuck },
{ MN_BUTTON, 1, 0, { 0, 0 }, 0, MENU_FONT1, MENU_COLOR3, MNButton_Ticker, MNButton_UpdateGeometry, MNButton_Drawer, { Hu_MenuCvarButton, NULL, NULL, NULL, NULL, Hu_MenuDefaultFocusAction }, MNButton_CommandResponder, NULL, NULL, &btn_gameplay_lostsouls_stuck },
# endif
{ MN_TEXT, 1, 0, { 0, 0 }, 0, MENU_FONT1, MENU_COLOR1, MNText_Ticker, MNText_UpdateGeometry, MNText_Drawer, { NULL }, NULL, NULL, NULL, &txt_gameplay_monsters_float_over_blocking },
{ MN_BUTTON, 1, 0, { 0, 0 }, 0, MENU_FONT1, MENU_COLOR3, MNButton_Ticker, MNButton_UpdateGeometry, MNButton_Drawer, { Hu_MenuCvarButton, NULL, NULL, NULL, NULL, Hu_MenuDefaultFocusAction }, MNButton_CommandResponder, NULL, NULL, &btn_gameplay_monsters_float_over_blocking },
{ MN_TEXT, 1, 0, { 0, 0 }, 0, MENU_FONT1, MENU_COLOR1, MNText_Ticker, MNText_UpdateGeometry, MNText_Drawer, { NULL }, NULL, NULL, NULL, &txt_gameplay_monsters_stuck_in_doors },
{ MN_BUTTON, 1, 0, { 0, 0 }, 'd',MENU_FONT1, MENU_COLOR3, MNButton_Ticker, MNButton_UpdateGeometry, MNButton_Drawer, { Hu_MenuCvarButton, NULL, NULL, NULL, NULL, Hu_MenuDefaultFocusAction }, MNButton_CommandResponder, NULL, NULL, &btn_gameplay_monsters_stuck_in_doors },
{ MN_TEXT, 1, 0, { 0, 0 }, 0, MENU_FONT1, MENU_COLOR1, MNText_Ticker, MNText_UpdateGeometry, MNText_Drawer, { NULL }, NULL, NULL, NULL, &txt_gameplay_never_hang_over_ledges },
Expand Down
2 changes: 1 addition & 1 deletion doomsday/plugins/common/src/p_map.c
Expand Up @@ -949,7 +949,7 @@ int PIT_CheckThing(mobj_t* thing, void* data)
else if(!tmThing->player && solid)
{
// A non-player object is contacting a solid object.
if(cfg.allowMonsterFloatOverBlocking && (tmThing->flags & MF_FLOAT))
if(cfg.allowMonsterFloatOverBlocking && (tmThing->flags & MF_FLOAT) && !thing->player)
{
float top = thing->pos[VZ] + thing->height;
tmThing->onMobj = thing;
Expand Down

0 comments on commit 1a47e53

Please sign in to comment.