fix bus
This commit is contained in:
@@ -63,7 +63,7 @@ namespace ReallifeGamemode.Server.Job
|
|||||||
|
|
||||||
private readonly Dictionary<int, List<Vector3>> ROUTE_BEGINNER = new Dictionary<int, List<Vector3>>//Bus_Skill_1_Route_1
|
private readonly Dictionary<int, List<Vector3>> ROUTE_BEGINNER = new Dictionary<int, List<Vector3>>//Bus_Skill_1_Route_1
|
||||||
{
|
{
|
||||||
{ 1,
|
{ 0,
|
||||||
new List<Vector3>()
|
new List<Vector3>()
|
||||||
{
|
{
|
||||||
//new Vector3(-601.733, -2049.285, 6.090),
|
//new Vector3(-601.733, -2049.285, 6.090),
|
||||||
@@ -79,7 +79,7 @@ namespace ReallifeGamemode.Server.Job
|
|||||||
new Vector3(-647.2696533203125, -2215.64501953125, 2.989798069000244)
|
new Vector3(-647.2696533203125, -2215.64501953125, 2.989798069000244)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ 2,
|
{ 1,
|
||||||
new List<Vector3>()
|
new List<Vector3>()
|
||||||
{
|
{
|
||||||
//new Vector3(-601.733, -2049.285, 6.090),
|
//new Vector3(-601.733, -2049.285, 6.090),
|
||||||
@@ -95,7 +95,7 @@ namespace ReallifeGamemode.Server.Job
|
|||||||
new Vector3(-660.7366333007812, -2206.03662109375, 2.988998889923096),
|
new Vector3(-660.7366333007812, -2206.03662109375, 2.988998889923096),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ 3,
|
{ 2,
|
||||||
new List<Vector3>()
|
new List<Vector3>()
|
||||||
{
|
{
|
||||||
//new Vector3(-601.733, -2049.285, 6.090),
|
//new Vector3(-601.733, -2049.285, 6.090),
|
||||||
@@ -111,7 +111,7 @@ namespace ReallifeGamemode.Server.Job
|
|||||||
new Vector3(-644.0516967773438, -2218.673828125, 2.991928577423096),
|
new Vector3(-644.0516967773438, -2218.673828125, 2.991928577423096),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ 4,
|
{ 3,
|
||||||
new List<Vector3>()
|
new List<Vector3>()
|
||||||
{
|
{
|
||||||
//new Vector3(-601.733, -2049.285, 6.090),
|
//new Vector3(-601.733, -2049.285, 6.090),
|
||||||
@@ -132,7 +132,7 @@ namespace ReallifeGamemode.Server.Job
|
|||||||
|
|
||||||
private readonly Dictionary<int, List<Vector3>> ROUTE_INTERMEDIATE = new Dictionary<int, List<Vector3>>
|
private readonly Dictionary<int, List<Vector3>> ROUTE_INTERMEDIATE = new Dictionary<int, List<Vector3>>
|
||||||
{
|
{
|
||||||
{ 1,
|
{ 0,
|
||||||
new List<Vector3>()
|
new List<Vector3>()
|
||||||
{
|
{
|
||||||
//new Vector3(-601.733, -2049.285, 6.090),
|
//new Vector3(-601.733, -2049.285, 6.090),
|
||||||
@@ -147,7 +147,7 @@ namespace ReallifeGamemode.Server.Job
|
|||||||
new Vector3(-647.2696533203125, -2215.64501953125, 2.989798069000244),
|
new Vector3(-647.2696533203125, -2215.64501953125, 2.989798069000244),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ 2,
|
{ 1,
|
||||||
new List<Vector3>()
|
new List<Vector3>()
|
||||||
{
|
{
|
||||||
//new Vector3(-601.733, -2049.285, 6.090),
|
//new Vector3(-601.733, -2049.285, 6.090),
|
||||||
@@ -160,7 +160,7 @@ namespace ReallifeGamemode.Server.Job
|
|||||||
new Vector3(-567.5792846679688, -2212.6533203125, 5.859220504760742),
|
new Vector3(-567.5792846679688, -2212.6533203125, 5.859220504760742),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ 3,
|
{ 2,
|
||||||
new List<Vector3>()
|
new List<Vector3>()
|
||||||
{
|
{
|
||||||
//new Vector3(-601.733, -2049.285, 6.090),
|
//new Vector3(-601.733, -2049.285, 6.090),
|
||||||
@@ -173,7 +173,7 @@ namespace ReallifeGamemode.Server.Job
|
|||||||
new Vector3(-562.68, -2203.85, 4.5),
|
new Vector3(-562.68, -2203.85, 4.5),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ 4,
|
{ 3,
|
||||||
new List<Vector3>()
|
new List<Vector3>()
|
||||||
{
|
{
|
||||||
//new Vector3(-601.733, -2049.285, 6.090),
|
//new Vector3(-601.733, -2049.285, 6.090),
|
||||||
@@ -192,7 +192,7 @@ namespace ReallifeGamemode.Server.Job
|
|||||||
|
|
||||||
private readonly Dictionary<int, List<Vector3>> ROUTE_PROFESSIONAL = new Dictionary<int, List<Vector3>>
|
private readonly Dictionary<int, List<Vector3>> ROUTE_PROFESSIONAL = new Dictionary<int, List<Vector3>>
|
||||||
{
|
{
|
||||||
{ 1,
|
{ 0,
|
||||||
new List<Vector3>()
|
new List<Vector3>()
|
||||||
{
|
{
|
||||||
//new Vector3(-601.733, -2049.285, 6.090),
|
//new Vector3(-601.733, -2049.285, 6.090),
|
||||||
@@ -216,7 +216,7 @@ namespace ReallifeGamemode.Server.Job
|
|||||||
new Vector3(-569.0294189453125, -2210.80908203125, 5.571292877197266),
|
new Vector3(-569.0294189453125, -2210.80908203125, 5.571292877197266),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ 2,
|
{ 1,
|
||||||
new List<Vector3>()
|
new List<Vector3>()
|
||||||
{
|
{
|
||||||
//new Vector3(-601.733, -2049.285, 6.090),
|
//new Vector3(-601.733, -2049.285, 6.090),
|
||||||
@@ -234,7 +234,7 @@ namespace ReallifeGamemode.Server.Job
|
|||||||
new Vector3(-605.2278442382812, -2087.974853515625, 5.752280235290527),
|
new Vector3(-605.2278442382812, -2087.974853515625, 5.752280235290527),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ 3,
|
{ 2,
|
||||||
new List<Vector3>()
|
new List<Vector3>()
|
||||||
{
|
{
|
||||||
//new Vector3(-601.733, -2049.285, 6.090),
|
//new Vector3(-601.733, -2049.285, 6.090),
|
||||||
@@ -294,11 +294,11 @@ namespace ReallifeGamemode.Server.Job
|
|||||||
public int getPlayerRouteInex(Player player)
|
public int getPlayerRouteInex(Player player)
|
||||||
{
|
{
|
||||||
if (!playerRouteCurrent.ContainsKey(player.Name))
|
if (!playerRouteCurrent.ContainsKey(player.Name))
|
||||||
return 0;
|
return -1;
|
||||||
|
|
||||||
List<Vector3> selectedRoute = playerRouteCurrent[player.Name];
|
List<Vector3> selectedRoute = playerRouteCurrent[player.Name];
|
||||||
|
|
||||||
for (int i = 1; i < 100; i++)
|
for (int i = 0; i < 100; i++)
|
||||||
{
|
{
|
||||||
if (!ROUTE_BEGINNER.ContainsKey(i) && !ROUTE_INTERMEDIATE.ContainsKey(i) && !ROUTE_PROFESSIONAL.ContainsKey(i))
|
if (!ROUTE_BEGINNER.ContainsKey(i) && !ROUTE_INTERMEDIATE.ContainsKey(i) && !ROUTE_PROFESSIONAL.ContainsKey(i))
|
||||||
break;
|
break;
|
||||||
@@ -320,7 +320,7 @@ namespace ReallifeGamemode.Server.Job
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
private uint getPlayerJobVehicle(Player player)
|
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; }
|
if (type == PROFESSIONAL && user.BusSkill < SKILL_PROFESSIONAL) { player.TriggerEvent("MenuSelect:Error"); return; }
|
||||||
|
|
||||||
List<Vector3> selectedRoute = new List<Vector3>();
|
List<Vector3> selectedRoute = new List<Vector3>();
|
||||||
int index = 0;
|
int index = -1;
|
||||||
|
|
||||||
if (playerRouteCurrent.ContainsKey(player.Name))
|
if (playerRouteCurrent.ContainsKey(player.Name))
|
||||||
{
|
{
|
||||||
@@ -354,7 +354,7 @@ namespace ReallifeGamemode.Server.Job
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
Random random = new Random();
|
Random random = new Random();
|
||||||
index = random.Next(1, 8);
|
index = random.Next(0, 7);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type == BEGINNER)
|
if (type == BEGINNER)
|
||||||
@@ -405,7 +405,7 @@ namespace ReallifeGamemode.Server.Job
|
|||||||
|
|
||||||
if (selectedRoute is null || selectedRoute.Count is 0)
|
if (selectedRoute is null || selectedRoute.Count is 0)
|
||||||
{
|
{
|
||||||
Console.WriteLine($"[ERROR:BUSJOB] Player {player.Name} has empty route Vector3 List.");
|
Console.WriteLine($"[ERROR:BUSJOB] Player {player.Name} has empty route Vector3 List -BUSDATA TYPE: {type}, INDEX {index}.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -415,7 +415,7 @@ namespace ReallifeGamemode.Server.Job
|
|||||||
|
|
||||||
if (vehicle is null)
|
if (vehicle is null)
|
||||||
{
|
{
|
||||||
Console.WriteLine($"[ERROR:BUSJOB] Player {player.Name} got no Vehicle set.");
|
Console.WriteLine($"[ERROR:BUSJOB] Player {player.Name} got no Vehicle set -BUSDATA TYPE: {type}, INDEX {index}.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_CHANGING_VEHICLE.Add(player);
|
_CHANGING_VEHICLE.Add(player);
|
||||||
|
|||||||
Reference in New Issue
Block a user