Skip to content

Commit

Permalink
Fix no team balance
Browse files Browse the repository at this point in the history
  • Loading branch information
Evtema3 committed Jun 15, 2022
1 parent 11fcb5f commit 3db27de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ execute if entity @s[scores={servermode=0},tag=!SMCustom] run function 2811iaj1:
execute if entity @s[tag=!EditedSettings] run tag @e[type=marker,tag=yellowjoinpad] add CancelJoin
execute if entity @s[tag=!EditedSettings] run tag @e[type=marker,tag=bluejoinpad] add CancelJoin
execute if entity @s[tag=!EditedSettings] run tag @e[type=marker,tag=specjoinpad] add CancelJoin
execute if entity @s[tag=noTeamBalance] run scoreboard players set @s largerTeam 0

#Hide tips automatically for 10+ games played
tag @a[scores={GamesPlayed=10..}] add hideTips
Expand Down
4 changes: 2 additions & 2 deletions rocketriders/data/game/functions/gamestart.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ execute if entity @s[tag=JustCleared] run tag @a remove JoinBlue
execute if entity @s[tag=!EditedSettings] run tag @a remove JoinBlue
execute if entity @s[tag=GameEnd] run tag @a remove JoinBlue
execute if entity @s[tag=BlueFull] run tag @a remove JoinBlue
execute if entity @s[tag=!noTeamBalance,tag=EditedSettings,scores={largerTeam=-1..0},tag=!BlueFull] as @e[type=marker,tag=bluejoinpad,tag=!CancelJoin] at @s run particle falling_dust minecraft:blue_concrete ~ ~1 ~ 0.5 1 0.5 0.1 5 force @a[predicate=!custom:belowroof]
execute if entity @s[tag=EditedSettings,scores={largerTeam=-1..0},tag=!BlueFull] as @e[type=marker,tag=bluejoinpad,tag=!CancelJoin] at @s run particle falling_dust minecraft:blue_concrete ~ ~1 ~ 0.5 1 0.5 0.1 5 force @a[predicate=!custom:belowroof]
execute if entity @s[tag=!noTeamBalance] unless entity @s[scores={largerTeam=-1..0},tag=!BlueFull,tag=EditedSettings] as @e[type=marker,tag=bluejoinpad,tag=!CancelJoin] at @s run particle block_marker barrier ~ ~1 ~ 0 0 0 0 1 force @a[predicate=!custom:belowroof]
execute if entity @s[tag=!noTeamBalance] run function everytick:team_balance
execute if entity @s[scores={largerTeam=-1..0},tag=!BlueFull,tag=EditedSettings,tag=!JustCleared] as @e[type=marker,tag=bluejoinpad,tag=!CancelJoin] at @s run tag @a[distance=..1,team=Lobby,limit=1,sort=random] add JoinBlue
Expand Down Expand Up @@ -80,7 +80,7 @@ execute if entity @s[tag=JustCleared] run tag @a remove JoinYellow
execute if entity @s[tag=!EditedSettings] run tag @a remove JoinYellow
execute if entity @s[tag=GameEnd] run tag @a remove JoinYellow
execute if entity @s[tag=YellowFull] run tag @a remove JoinYellow
execute if entity @s[tag=!noTeamBalance,tag=EditedSettings,scores={largerTeam=0..1},tag=!YellowFull] as @e[type=marker,tag=yellowjoinpad,tag=!CancelJoin] at @s run particle falling_dust minecraft:yellow_concrete ~ ~1 ~ 0.5 1 0.5 0.1 5 force @a[predicate=!custom:belowroof]
execute if entity @s[tag=EditedSettings,scores={largerTeam=0..1},tag=!YellowFull] as @e[type=marker,tag=yellowjoinpad,tag=!CancelJoin] at @s run particle falling_dust minecraft:yellow_concrete ~ ~1 ~ 0.5 1 0.5 0.1 5 force @a[predicate=!custom:belowroof]
execute if entity @s[tag=!noTeamBalance] unless entity @s[scores={largerTeam=0..1},tag=!YellowFull,tag=EditedSettings] as @e[type=marker,tag=yellowjoinpad,tag=!CancelJoin] at @s run particle block_marker barrier ~ ~1 ~ 0 0 0 0 1 force @a[predicate=!custom:belowroof]
execute if entity @s[tag=!noTeamBalance] run function everytick:team_balance
execute if entity @s[scores={largerTeam=0..1},tag=!YellowFull,tag=EditedSettings,tag=!JustCleared] as @e[type=marker,tag=yellowjoinpad,tag=!CancelJoin] at @s run tag @a[distance=..1,team=Lobby,limit=1,sort=random] add JoinYellow
Expand Down

0 comments on commit 3db27de

Please sign in to comment.