TRiLeZ
2010-02-20 19:11:36
procedure NextPlayer(Active: Boolean);
var
srl_PlayerIndexFunc: function: Integer;
cP: Integer;
begin
if (RandomPlayer) then
srl_PlayerIndexFunc := @RandomPlayerIndex
else
srl_PlayerIndexFunc := @NextPlayerIndex;
WriteLn('NextPlayer');
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;
What does the loop even do?
This has froze scripts a lot of times for me… it needs to be fixed.