Added map improvements, begin tuning sync for turbo and headlights, fix error on disconnect when crash
This commit is contained in:
@@ -1043,8 +1043,7 @@ namespace reallife_gamemode.Server.Commands
|
||||
return;
|
||||
}
|
||||
|
||||
if (mod == -1) player.Vehicle.RemoveMod(slot);
|
||||
else player.Vehicle.SetMod(slot, mod);
|
||||
player.Vehicle.SetMod(slot, mod);
|
||||
}
|
||||
|
||||
[Command("aneon", "~m~Benutzung: ~s~/aneon [R][G][B]")]
|
||||
|
||||
@@ -36,19 +36,17 @@ namespace reallife_gamemode.Server.Events
|
||||
using (var saveUser = new Model.DatabaseContext())
|
||||
{
|
||||
var user = player.GetUser(saveUser);
|
||||
Vector3 pos = player.Position;
|
||||
|
||||
if(user == null)
|
||||
if(!float.IsNaN(pos.X) && !float.IsNaN(pos.Y) && !float.IsNaN(pos.Z))
|
||||
{
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
user.PositionX = player.Position.X;
|
||||
user.PositionY = player.Position.Y;
|
||||
user.PositionZ = player.Position.Z;
|
||||
user.Dead = player.GetData("isDead");
|
||||
user.PositionX = pos.X;
|
||||
user.PositionY = pos.Y;
|
||||
user.PositionZ = pos.Z;
|
||||
saveUser.SaveChanges();
|
||||
}
|
||||
}
|
||||
|
||||
user.Dead = player.HasData("isDead") ? player.GetData("isDead") : false;
|
||||
}
|
||||
player.SetData("isLoggedIn", false);
|
||||
}
|
||||
|
||||
@@ -46,8 +46,6 @@ namespace reallife_gamemode.Server.Managers
|
||||
tLabel.AttachTo(current, "chassis", new Vector3(0, 0, 1.5), new Vector3(0, 0, 0));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace reallife_gamemode.Server.Managers
|
||||
{
|
||||
private static readonly List<string> _enabledMods = new List<string>()
|
||||
{
|
||||
|
||||
"polamggtr"
|
||||
};
|
||||
|
||||
private static Dictionary<int, NetHandle> _serverVehicles = new Dictionary<int, NetHandle>();
|
||||
|
||||
Reference in New Issue
Block a user