1
0
mirror of https://github.com/blawar/ooot.git synced 2024-06-28 07:24:04 +00:00

implemented invincibility cheat

This commit is contained in:
Blake Warner 2022-04-05 19:51:23 -04:00
parent b144dd318b
commit a31f51245c

View File

@ -15,6 +15,7 @@
#include "z_parameter.h"
#include "kaleido_macros.h"
#include "gfx_align.h"
#include "port/options.h"
#include "textures/parameter_static/parameter_static.h"
#include "textures/do_action_static/do_action_static.h"
@ -2819,7 +2820,10 @@ s32 Health_ChangeBy(GlobalContext* globalCtx, s16 healthChange)
}
// clang-format on
gSaveContext.health += healthChange;
if(!oot::config().cheats().invincible() || healthChange > 0)
{
gSaveContext.health += healthChange;
}
if(gSaveContext.health > gSaveContext.healthCapacity)
{