This commit is contained in:
2021-04-11 02:06:52 +02:00
parent aaaf86b92b
commit 478f903bef
2 changed files with 5 additions and 5 deletions

View File

@@ -294,7 +294,7 @@ namespace ReallifeGamemode.Server.Job
public int getPlayerRouteInex(Player player)
{
if (!playerRouteCurrent.ContainsKey(player.Name))
return -1;
return 0;
List<Vector3> selectedRoute = playerRouteCurrent[player.Name];
@@ -320,7 +320,7 @@ namespace ReallifeGamemode.Server.Job
}
}
return -1;
return 0;
}
private uint getPlayerJobVehicle(Player player)
@@ -345,7 +345,7 @@ namespace ReallifeGamemode.Server.Job
if (type == PROFESSIONAL && user.BusSkill < SKILL_PROFESSIONAL) { player.TriggerEvent("MenuSelect:Error"); return; }
List<Vector3> selectedRoute = new List<Vector3>();
int index = -1;
int index = 0;
if (playerRouteCurrent.ContainsKey(player.Name))
{
@@ -403,7 +403,7 @@ namespace ReallifeGamemode.Server.Job
playerRouteCurrent.Remove(player.Name);
playerRouteCurrent.Add(player.Name, selectedRoute);
if (selectedRoute.Count is 0)
if (selectedRoute is null || selectedRoute.Count is 0)
{
Console.WriteLine($"[ERROR:BUSJOB] Player {player.Name} has empty route Vector3 List.");
return;