It has these lines:
This widget should detect that I am not a spectator and select my commander when game started.local t = Spring.GetGameSeconds()
_, _, spectator = Spring.GetPlayerInfo(Spring.GetMyTeamID())
if (spectator or t > 10) then
... remove this widget...
BUT for some people it works and for some people - it does not work! For me it does not.
I logged "spectator" variable and it contains "true". So widget removed and did not selects my commander at game start.
I removed this "spectator" variable from this "if" statement and my commander selected on game start.
So.. Why Spring.GetPlayerInfo(Spring.GetMyTeamID()) function returns that I am a spectator? I guess that my spring running too fast.. Other people connected to game after me and they are not "spectators" in this case.
I tested it on BA 7.68