From 30b8400d86245bd16fa3d356897a358fb28d3988 Mon Sep 17 00:00:00 2001 From: fgsfds Date: Tue, 24 Oct 2023 11:14:33 +0200 Subject: [PATCH] port: fix drug blur not resetting on respawn fix taken from Graslu's decomp fork --- src/game/bot.c | 4 ++++ src/game/player.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/game/bot.c b/src/game/bot.c index 017405eec..0658a1ce3 100644 --- a/src/game/bot.c +++ b/src/game/bot.c @@ -88,6 +88,10 @@ void botReset(struct chrdata *chr, u8 respawning) chrSetShield(chr, 0); chr->cmnum = 0; chr->cmnum2 = 0; +#ifndef PLATFORM_N64 + chr->blurdrugamount = 0; + chr->poisoncounter = 0; +#endif #if VERSION >= VERSION_NTSC_1_0 bgunFreeFireslot(chr->fireslots[0]); diff --git a/src/game/player.c b/src/game/player.c index 7260312dc..351e6a7b8 100644 --- a/src/game/player.c +++ b/src/game/player.c @@ -530,6 +530,10 @@ void playerStartNewLife(void) g_Vars.currentplayer->damagetype = DAMAGETYPE_7; g_Vars.currentplayer->gunammooff = 0; g_Vars.currentplayer->gunsightoff = 2; +#ifndef PLATFORM_N64 + g_Vars.currentplayer->prop->chr->blurdrugamount = 0; + g_Vars.currentplayer->prop->chr->poisoncounter = 0; +#endif hudmsgsSetOn(0xffffffff);