diff --git a/src/game/lv.c b/src/game/lv.c index 1c746b77d3..1762b2af2c 100644 --- a/src/game/lv.c +++ b/src/game/lv.c @@ -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 } } diff --git a/src/game/mplayer/mplayer.c b/src/game/mplayer/mplayer.c index 20270b1edc..efbc098e86 100644 --- a/src/game/mplayer/mplayer.c +++ b/src/game/mplayer/mplayer.c @@ -1312,7 +1312,8 @@ Gfx *mpRenderModalText(Gfx *gdl) && g_Vars.currentplayer->deathanimfinished && !(g_Vars.coopplayernum >= 0 && ((g_Vars.bond->isdead && g_Vars.coop->isdead) || !g_Vars.currentplayer->coopcanrestart || g_InCutscene)) && !(g_Vars.antiplayernum >= 0 && ((g_Vars.currentplayer != g_Vars.anti || g_InCutscene))) - && g_NumReasonsToEndMpMatch == 0) { + && g_NumReasonsToEndMpMatch == 0 + && playerIsFadeComplete()) { //make the game display the press start text only when the start button can actually be pressed. otherwise it will show during the fade to black despite the fact, that player cannot yet respawn // Render "Press START" text gdl = text0f153628(gdl); @@ -2727,6 +2728,9 @@ struct mptrack g_MpTracks[] = { /*0x29*/ { MUSIC_CREDITS, 120, L_MISC_165, SOLOSTAGEINDEX_SKEDARRUINS }, // "End Credits" #if VERSION < VERSION_PAL_BETA /*0x2a*/ { MUSIC_SKEDARRUINS_KING,120, L_MISC_261, SOLOSTAGEINDEX_SKEDARRUINS }, // "Skedar Warrior" (Skedar Leader) + /*0x2b*/ { MUSIC_DEEPSEA_BETA,120, L_MISC_440, SOLOSTAGEINDEX_SKEDARRUINS }, // Cool deep sea beta music + //{ MUSIC_MISSION_SUCCESS,120, L_MISC_086, SOLOSTAGEINDEX_SKEDARRUINS }, + //{ MUSIC_MAINMENU,120, L_MISC_087, SOLOSTAGEINDEX_SKEDARRUINS }, #else /*0x2a*/ { MUSIC_SKEDARRUINS_KING,120, L_MISC_041, SOLOSTAGEINDEX_SKEDARRUINS }, // "E R R O R" (can't find a good approximation for Skedar Leader) #endif diff --git a/src/game/mplayer/scenarios/capturethecase.inc b/src/game/mplayer/scenarios/capturethecase.inc index 0e82d542a4..eb0ba4898b 100644 --- a/src/game/mplayer/scenarios/capturethecase.inc +++ b/src/game/mplayer/scenarios/capturethecase.inc @@ -69,6 +69,22 @@ struct menuitem g_CtcOptionsMenuItems[] = { MPOPTION_SPAWNWITHWEAPON, menuhandlerMpCheckboxOption, }, + { + MENUITEMTYPE_CHECKBOX, + 0, + MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT, + (uintptr_t)"No melee/tranquilizer blur", + MPOPTION_NODRUGBLUR, + menuhandlerMpCheckboxOption, + }, + { + MENUITEMTYPE_CHECKBOX, + 0, + MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT, + (uintptr_t)"Instant Respawn", + MPOPTION_INSTANTRESPAWN, + menuhandlerMpCheckboxOption, + }, #endif { MENUITEMTYPE_CHECKBOX, diff --git a/src/game/mplayer/scenarios/combat.inc b/src/game/mplayer/scenarios/combat.inc index 7d096a55c0..e5a7c88310 100644 --- a/src/game/mplayer/scenarios/combat.inc +++ b/src/game/mplayer/scenarios/combat.inc @@ -64,6 +64,22 @@ struct menuitem g_MpCombatOptionsMenuItems[] = { MPOPTION_SPAWNWITHWEAPON, menuhandlerMpCheckboxOption, }, + { + MENUITEMTYPE_CHECKBOX, + 0, + MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT, + (uintptr_t)"No melee/tranquilizer blur", + MPOPTION_NODRUGBLUR, + menuhandlerMpCheckboxOption, + }, + { + MENUITEMTYPE_CHECKBOX, + 0, + MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT, + (uintptr_t)"Instant Respawn", + MPOPTION_INSTANTRESPAWN, + menuhandlerMpCheckboxOption, + }, #endif { MENUITEMTYPE_SEPARATOR, diff --git a/src/game/mplayer/scenarios/hackthatmac.inc b/src/game/mplayer/scenarios/hackthatmac.inc index 1ca58458a5..3e47a39e44 100644 --- a/src/game/mplayer/scenarios/hackthatmac.inc +++ b/src/game/mplayer/scenarios/hackthatmac.inc @@ -67,6 +67,22 @@ struct menuitem g_HtmOptionsMenuItems[] = { MPOPTION_SPAWNWITHWEAPON, menuhandlerMpCheckboxOption, }, + { + MENUITEMTYPE_CHECKBOX, + 0, + MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT, + (uintptr_t)"No melee/tranquilizer blur", + MPOPTION_NODRUGBLUR, + menuhandlerMpCheckboxOption, + }, + { + MENUITEMTYPE_CHECKBOX, + 0, + MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT, + (uintptr_t)"Instant Respawn", + MPOPTION_INSTANTRESPAWN, + menuhandlerMpCheckboxOption, + }, #endif { MENUITEMTYPE_CHECKBOX, diff --git a/src/game/mplayer/scenarios/holdthebriefcase.inc b/src/game/mplayer/scenarios/holdthebriefcase.inc index fe9cc0bd67..82f506d3db 100644 --- a/src/game/mplayer/scenarios/holdthebriefcase.inc +++ b/src/game/mplayer/scenarios/holdthebriefcase.inc @@ -67,6 +67,22 @@ struct menuitem g_HtbOptionsMenuItems[] = { MPOPTION_SPAWNWITHWEAPON, menuhandlerMpCheckboxOption, }, + { + MENUITEMTYPE_CHECKBOX, + 0, + MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT, + (uintptr_t)"No melee/tranquilizer blur", + MPOPTION_NODRUGBLUR, + menuhandlerMpCheckboxOption, + }, + { + MENUITEMTYPE_CHECKBOX, + 0, + MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT, + (uintptr_t)"Instant Respawn", + MPOPTION_INSTANTRESPAWN, + menuhandlerMpCheckboxOption, + }, #endif { MENUITEMTYPE_CHECKBOX, diff --git a/src/game/mplayer/scenarios/kingofthehill.inc b/src/game/mplayer/scenarios/kingofthehill.inc index 120024f197..e392c4821a 100644 --- a/src/game/mplayer/scenarios/kingofthehill.inc +++ b/src/game/mplayer/scenarios/kingofthehill.inc @@ -88,6 +88,22 @@ struct menuitem g_KohOptionsMenuItems[] = { MPOPTION_SPAWNWITHWEAPON, menuhandlerMpCheckboxOption, }, + { + MENUITEMTYPE_CHECKBOX, + 0, + MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT, + (uintptr_t)"No melee/tranquilizer blur", + MPOPTION_NODRUGBLUR, + menuhandlerMpCheckboxOption, + }, + { + MENUITEMTYPE_CHECKBOX, + 0, + MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT, + (uintptr_t)"Instant Respawn", + MPOPTION_INSTANTRESPAWN, + menuhandlerMpCheckboxOption, + }, #endif { MENUITEMTYPE_CHECKBOX, diff --git a/src/game/mplayer/scenarios/popacap.inc b/src/game/mplayer/scenarios/popacap.inc index 7da8ed521c..91690efcf0 100644 --- a/src/game/mplayer/scenarios/popacap.inc +++ b/src/game/mplayer/scenarios/popacap.inc @@ -65,6 +65,22 @@ struct menuitem g_PacOptionsMenuItems[] = { MPOPTION_SPAWNWITHWEAPON, menuhandlerMpCheckboxOption, }, + { + MENUITEMTYPE_CHECKBOX, + 0, + MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT, + (uintptr_t)"No melee/tranquilizer blur", + MPOPTION_NODRUGBLUR, + menuhandlerMpCheckboxOption, + }, + { + MENUITEMTYPE_CHECKBOX, + 0, + MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT, + (uintptr_t)"Instant Respawn", + MPOPTION_INSTANTRESPAWN, + menuhandlerMpCheckboxOption, + }, #endif { MENUITEMTYPE_CHECKBOX, diff --git a/src/game/music.c b/src/game/music.c index a3c3840f07..d7e748f306 100644 --- a/src/game/music.c +++ b/src/game/music.c @@ -521,7 +521,7 @@ void _musicStartMpDeath(f32 arg0) void musicStartMpDeath(void) { #ifndef PLATFORM_N64 - if (g_MusicDisableMpDeath) { + if (g_MusicDisableMpDeath || (g_Vars.mplayerisrunning && (g_MpSetup.options & MPOPTION_INSTANTRESPAWN))) { return; } #endif diff --git a/src/game/player.c b/src/game/player.c index 36c10511b0..0a9c2c2a53 100644 --- a/src/game/player.c +++ b/src/game/player.c @@ -2355,6 +2355,12 @@ void playerSetFadeFrac(f32 maxfadetime, f32 frac) bool playerIsFadeComplete(void) { +/*#ifndef PLATFORM_N64 //quick hack of the function to ignore waiting for fade complete + if(g_Vars.mplayerisrunning && (g_MpSetup.options & MPOPTION_INSTANTRESPAWN)) + { + return 1; + } +#endif*/ return g_Vars.currentplayer->colourfadetimemax60 < 0; } @@ -4665,9 +4671,24 @@ Gfx *playerRenderHud(Gfx *gdl) } } } +#ifndef PLATFORM_N64 + if(g_Vars.mplayerisrunning && (g_MpSetup.options & MPOPTION_INSTANTRESPAWN)) + { + //Set the color to red to quickly indicate a death + playerSetFadeColour(0x96, 0, 0, 0.70588237f); + //Setting these two variables will immediatelly display the "Press START" text. This is purely visual as instant respawn works even without it + g_Vars.currentplayer->redbloodfinished = true; + modelSetAnimFrame(&g_Vars.currentplayer->model, modelGetAnimEndFrame(&g_Vars.currentplayer->model)); + //g_Vars.currentplayer->deathanimfinished = true; + } + //modify the conditions to always trigger if player sets the "instant respawn" option + if (modelGetCurAnimFrame(&g_Vars.currentplayer->model) >= modelGetAnimEndFrame(&g_Vars.currentplayer->model) + ){//&& g_Vars.currentplayer->redbloodfinished || (g_Vars.mplayerisrunning && (g_MpSetup.options & MPOPTION_INSTANTRESPAWN))) { +#else //preserve old conditions if compiled for n64 if (modelGetCurAnimFrame(&g_Vars.currentplayer->model) >= modelGetAnimEndFrame(&g_Vars.currentplayer->model) && g_Vars.currentplayer->redbloodfinished) { +#endif if (g_Vars.currentplayer->deathanimfinished == false) { g_Vars.currentplayer->deathanimfinished = true; playerAdjustFade(60, 0, 0, 0, 1); diff --git a/src/include/constants.h b/src/include/constants.h index e51ec894ab..0d4d4a2ffc 100644 --- a/src/include/constants.h +++ b/src/include/constants.h @@ -2890,6 +2890,8 @@ #define MPOPTION_PAC_HIGHLIGHTTARGET 0x00080000 #define MPOPTION_PAC_SHOWONRADAR 0x00100000 #define MPOPTION_SPAWNWITHWEAPON 0x00200000 +#define MPOPTION_NODRUGBLUR 0x00400000 +#define MPOPTION_INSTANTRESPAWN 0x00800000 #define MPPAUSEMODE_UNPAUSED 0 #define MPPAUSEMODE_PAUSED 1