the Game freeze at the end of the game (Free For All BUG)
Posted: Mon May 18, 2020 4:08 am
Official forum site of LovattoStudio
https://www.lovattostudio.com/forum/
Code: Select all
public BotsStats GetBotWithMoreKills()
{
if(BotsStatistics == null || BotsStatistics.Count <= 0)
{
BotsStats bs = new BotsStats()
{
Name = "None",
Kills = 0,
Team = Team.None,
Score = 0,
};
return bs;
}
int high = 0;
int id = 0;
for (int i = 0; i < BotsStatistics.Count; i++)
{
if (BotsStatistics[i].Kills > high)
{
high = BotsStatistics[i].Kills;
id = i;
}
}
return BotsStatistics[id];
}