Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
6 changes: 5 additions & 1 deletion src/game/mplayer/mplayer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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
Expand Down
16 changes: 16 additions & 0 deletions src/game/mplayer/scenarios/capturethecase.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
16 changes: 16 additions & 0 deletions src/game/mplayer/scenarios/combat.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
16 changes: 16 additions & 0 deletions src/game/mplayer/scenarios/hackthatmac.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
16 changes: 16 additions & 0 deletions src/game/mplayer/scenarios/holdthebriefcase.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
16 changes: 16 additions & 0 deletions src/game/mplayer/scenarios/kingofthehill.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
16 changes: 16 additions & 0 deletions src/game/mplayer/scenarios/popacap.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/game/music.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
21 changes: 21 additions & 0 deletions src/game/player.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions src/include/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down