Skip to content

Commit

Permalink
Add an option in Combat Simulator to disable the blur effect from mel…
Browse files Browse the repository at this point in the history
…ee damage

This effect might be annoyning or eye straining for some people so i believe it's a good idea to implement this option. There is still some free space in the MP Options bitfield for future expansion.
  • Loading branch information
throwaway29292 committed Apr 24, 2024
1 parent b4f7f46 commit 5b1d03c
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/game/lv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1127,6 +1127,13 @@ Gfx *lvRender(Gfx *gdl)
chr->blurdrugamount = 0;
chr->blurnumtimesdied = 0;
}
#ifndef PLATFORM_N64 //set the drug blur to 0 if it's disabled in MP settings. There might be a better way to block it from occuring, but this one works just fine

if(g_Vars.mplayerisrunning && (g_MpSetup.options & MPOPTION_NODRUGBLUR))
{
bluramount = 0;
}
#endif
}
}

Expand Down
8 changes: 8 additions & 0 deletions src/game/mplayer/scenarios/capturethecase.inc
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ struct menuitem g_CtcOptionsMenuItems[] = {
MPOPTION_SPAWNWITHWEAPON,
menuhandlerMpCheckboxOption,
},
{
MENUITEMTYPE_CHECKBOX,
0,
MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT,
(uintptr_t)"No melee/tranquilizer blur",
MPOPTION_NODRUGBLUR,
menuhandlerMpCheckboxOption,
},
#endif
{
MENUITEMTYPE_CHECKBOX,
Expand Down
8 changes: 8 additions & 0 deletions src/game/mplayer/scenarios/combat.inc
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ struct menuitem g_MpCombatOptionsMenuItems[] = {
MPOPTION_SPAWNWITHWEAPON,
menuhandlerMpCheckboxOption,
},
{
MENUITEMTYPE_CHECKBOX,
0,
MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT,
(uintptr_t)"No melee/tranquilizer blur",
MPOPTION_NODRUGBLUR,
menuhandlerMpCheckboxOption,
},
#endif
{
MENUITEMTYPE_SEPARATOR,
Expand Down
8 changes: 8 additions & 0 deletions src/game/mplayer/scenarios/hackthatmac.inc
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ struct menuitem g_HtmOptionsMenuItems[] = {
MPOPTION_SPAWNWITHWEAPON,
menuhandlerMpCheckboxOption,
},
{
MENUITEMTYPE_CHECKBOX,
0,
MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT,
(uintptr_t)"No melee/tranquilizer blur",
MPOPTION_NODRUGBLUR,
menuhandlerMpCheckboxOption,
},
#endif
{
MENUITEMTYPE_CHECKBOX,
Expand Down
8 changes: 8 additions & 0 deletions src/game/mplayer/scenarios/holdthebriefcase.inc
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ struct menuitem g_HtbOptionsMenuItems[] = {
MPOPTION_SPAWNWITHWEAPON,
menuhandlerMpCheckboxOption,
},
{
MENUITEMTYPE_CHECKBOX,
0,
MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT,
(uintptr_t)"No melee/tranquilizer blur",
MPOPTION_NODRUGBLUR,
menuhandlerMpCheckboxOption,
},
#endif
{
MENUITEMTYPE_CHECKBOX,
Expand Down
8 changes: 8 additions & 0 deletions src/game/mplayer/scenarios/kingofthehill.inc
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@ struct menuitem g_KohOptionsMenuItems[] = {
MPOPTION_SPAWNWITHWEAPON,
menuhandlerMpCheckboxOption,
},
{
MENUITEMTYPE_CHECKBOX,
0,
MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT,
(uintptr_t)"No melee/tranquilizer blur",
MPOPTION_NODRUGBLUR,
menuhandlerMpCheckboxOption,
},
#endif
{
MENUITEMTYPE_CHECKBOX,
Expand Down
8 changes: 8 additions & 0 deletions src/game/mplayer/scenarios/popacap.inc
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@ struct menuitem g_PacOptionsMenuItems[] = {
MPOPTION_SPAWNWITHWEAPON,
menuhandlerMpCheckboxOption,
},
{
MENUITEMTYPE_CHECKBOX,
0,
MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT,
(uintptr_t)"No melee/tranquilizer blur",
MPOPTION_NODRUGBLUR,
menuhandlerMpCheckboxOption,
},
#endif
{
MENUITEMTYPE_CHECKBOX,
Expand Down
1 change: 1 addition & 0 deletions src/include/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -2890,6 +2890,7 @@
#define MPOPTION_PAC_HIGHLIGHTTARGET 0x00080000
#define MPOPTION_PAC_SHOWONRADAR 0x00100000
#define MPOPTION_SPAWNWITHWEAPON 0x00200000
#define MPOPTION_NODRUGBLUR 0x00400000

#define MPPAUSEMODE_UNPAUSED 0
#define MPPAUSEMODE_PAUSED 1
Expand Down

0 comments on commit 5b1d03c

Please sign in to comment.