Skip to content

Commit

Permalink
fix(ReDeathmatch): fix round mode switch condition
Browse files Browse the repository at this point in the history
Fixes an issue where the round mode switch condition was not working as intended in the ReDeathmatch script. The previous condition only checked if the `redm_modes_switch` variable was equal to "disable", but it should also exclude cases where `redm_modes_switch` is a non-zero value. This fix adds an additional check to exclude non-zero values of `redm_modes_switch`.
  • Loading branch information
SergeyShorokhov committed Jan 30, 2024
1 parent ac9d6ff commit 1ebb5bf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ RoundModes_ReadModes() {
* Handles mode voting and mode switching.
*/
RoundModes_RoundEnd() {
if (strcmp(redm_modes_switch, "disable") == 0)
if (strcmp(redm_modes_switch, "disable") == 0 || strtol(redm_modes_switch) == 0)
return

new count
Expand Down

1 comment on commit 1ebb5bf

@SergeyShorokhov
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.