Granted this suggestion isn't a priority, perhaps not even necessary, yet I thought I'd suggest adding in a timeout fail safe in the nextplayer proc. Perhaps I'm misunderstanding the login.simba file too, so if that's the case, ignore / close this suggestion; just trying to offer help ^.^
Simba Code:
procedure NextPlayer(Active: Boolean);
var
srl_PlayerIndexFunc: function: Integer;
cP: Integer;
begin
if (RandomPlayer) then
srl_PlayerIndexFunc := @RandomPlayerIndex
else
srl_PlayerIndexFunc := @NextPlayerIndex;
WriteLn('NextPlayer(' + BoolToStr(Active) + ')');
LogOut;
cP := srl_PlayerIndexFunc();
while (cP = -1) do
begin
cP := srl_PlayerIndexFunc();
if (SRL_Procs[srl_InNextPlayerLoop] <> nil) then
SRL_Procs[srl_InNextPlayerLoop]();
Wait(5000);//Endless loop
end;
SwitchToPlayer(cP, Active);
end;
to include a failsafe?
Simba Code:
procedure NextPlayer(Active: Boolean);
var
srl_PlayerIndexFunc: function: Integer;
cP, t: Integer;
begin
if (RandomPlayer) then
srl_PlayerIndexFunc := @RandomPlayerIndex
else
srl_PlayerIndexFunc := @NextPlayerIndex;
WriteLn('NextPlayer(' + BoolToStr(Active) + ')');
LogOut;
cP := srl_PlayerIndexFunc();
while (cP = -1) do
begin
cP := srl_PlayerIndexFunc();
if (SRL_Procs[srl_InNextPlayerLoop] <> nil) then
SRL_Procs[srl_InNextPlayerLoop]();
Wait(5000);
if (timefrommark(t)>120000) then
srl_Warn('NextPlayer', 'Failure in switching to the next player', warn_AllVersions);
end;
SwitchToPlayer(cP, Active);
end;
cheers,
Lj