Many new settings to support the new state machine functionality.

This commit is contained in:
Joe Kearney 2025-03-01 06:09:51 -06:00
parent 908bdbba35
commit 47822bbdec
11 changed files with 84 additions and 21 deletions

View file

@ -226,13 +226,11 @@ void HandleBLETagPacket(const BLE_TagPacket_T *const packet)
else if (packet->damage < 0)
{
Health_In_Percent -= packet->damage;
if (Health_In_Percent > MAX_HEALTH)
if (Health_In_Percent > Get_Max_Health())
{
Health_In_Percent = MAX_HEALTH;
Health_In_Percent = Get_Max_Health();
}
Health_In_Percent = MAX_HEALTH;
Set_Health(Health_In_Percent);
AudioAction_T audio_action = {.ID = AUDIO_PRONOUNCE_NUMBER_0_TO_100, .Play_To_Completion = true, .Data = (void *)&Health_In_Percent};
Perform_Audio_Action(&audio_action);