Many new settings to support the new state machine functionality.
This commit is contained in:
parent
908bdbba35
commit
47822bbdec
11 changed files with 84 additions and 21 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue