Cleanup LoadManager
This commit is contained in:
@@ -28,10 +28,7 @@ namespace reallife_gamemode.Server.Managers
|
|||||||
b.Color, b.Name, b.Alpha, b.DrawDistance, b.ShortRange, (short) b.Rotation, b.Dimension);
|
b.Color, b.Name, b.Alpha, b.DrawDistance, b.ShortRange, (short) b.Rotation, b.Dimension);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
foreach (Saves.SavedVehicle v in loadData.Vehicles)
|
||||||
using (var loadVehicles = new DatabaseContext())
|
|
||||||
{
|
|
||||||
foreach (Saves.SavedVehicle v in loadVehicles.Vehicles)
|
|
||||||
{
|
{
|
||||||
if (v.Active == true)
|
if (v.Active == true)
|
||||||
{
|
{
|
||||||
@@ -39,15 +36,12 @@ namespace reallife_gamemode.Server.Managers
|
|||||||
v.SecondaryColor, v.NumberPlate, v.Alpha, v.Locked, v.Engine = false, v.Dimension);
|
v.SecondaryColor, v.NumberPlate, v.Alpha, v.Locked, v.Engine = false, v.Dimension);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
foreach (FactionVehicle v in loadData.FactionVehicles)
|
||||||
using (var loadFVehicles = new DatabaseContext())
|
|
||||||
{
|
|
||||||
foreach (FactionVehicle v in loadFVehicles.FactionVehicles)
|
|
||||||
{
|
{
|
||||||
if (v.Active == true)
|
if (v.Active == true)
|
||||||
{
|
{
|
||||||
NAPI.Vehicle.CreateVehicle((uint)v.Model, new Vector3(v.PositionX, v.PositionY, v.PositionZ), v.Heading, (v.PrimaryColor),
|
NAPI.Vehicle.CreateVehicle((uint)v.Model, new Vector3(v.PositionX, v.PositionY, v.PositionZ), v.Heading, (v.PrimaryColor),
|
||||||
v.SecondaryColor, v.NumberPlate, v.Alpha, v.Locked, v.Engine = false, v.Dimension);
|
v.SecondaryColor, v.NumberPlate, v.Alpha, v.Locked, v.Engine = false, v.Dimension);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user