Skip to content

Commit ecfea38

Browse files
author
Stefan
committed
Enabled substitution buttons after goal is scored
1 parent 8a59320 commit ecfea38

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

mslrb2015/RefreshButon.pde

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,11 @@ void refreshbutton_game_stopped()
202202
buttonCdisable();
203203
bTeamBcmds[CMDID_TEAM_KICKOFF].enable();
204204
bTeamBcmds[CMDID_TEAM_GOAL].disable();
205-
bCommoncmds[CMDID_COMMON_HALFTIME].enable();
205+
bCommoncmds[CMDID_COMMON_HALFTIME].enable();
206+
if ((teamA.nOfSubstitutions + teamB.nOfSubstitutions) < 6)
207+
bCommoncmds[CMDID_COMMON_SUBS].enable();
208+
else
209+
bCommoncmds[CMDID_COMMON_SUBS].disable();
206210
}
207211
else if(bTeamBcmds[CMDID_TEAM_GOAL].isActive()) {
208212
buttonAdisable();
@@ -211,6 +215,10 @@ void refreshbutton_game_stopped()
211215
bTeamAcmds[CMDID_TEAM_KICKOFF].enable();
212216
bTeamAcmds[CMDID_TEAM_GOAL].disable();
213217
bCommoncmds[CMDID_COMMON_HALFTIME].enable();
218+
if ((teamA.nOfSubstitutions + teamB.nOfSubstitutions) < 6)
219+
bCommoncmds[CMDID_COMMON_SUBS].enable();
220+
else
221+
bCommoncmds[CMDID_COMMON_SUBS].disable();
214222
}
215223
else {
216224
if(!StateMachine.setpiece) {

0 commit comments

Comments
 (0)