Respond to instigation whenever possible.

This commit is contained in:
Joe Kearney 2025-08-31 20:47:55 -05:00
parent c034427c3c
commit 26cb24dfe1
6 changed files with 16 additions and 6 deletions

View file

@ -54,8 +54,6 @@ static void Ready_Entry(StateMachineContext_T * context)
}
AudioAction_T audio_action = {.ID = AUDIO_PLAY_GAME_ON, .Data = (void *)0x00};
Perform_Audio_Action(&audio_action);
Set_Health(Get_Max_Health());
}
//! Executes the Ready state.
@ -91,6 +89,7 @@ static void Ready_Do(StateMachineContext_T * context)
if (((BLE_Packet_T *)Event.Data)->Generic.type == BLE_PACKET_TYPE_INSTIGATE_GAME)
{
Transition_For_Event(context, STATE_STARTING_GAME__RESPONDING, &Event);
// Don't free the packet buffer here; it will be freed in Starting_Game__Responding_Entry().
}
else if (((BLE_Packet_T *)Event.Data)->Generic.type == BLE_PACKET_TYPE_EVENT)
{