Added map improvements, begin tuning sync for turbo and headlights, fix error on disconnect when crash

This commit is contained in:
hydrant
2018-12-08 21:48:58 +01:00
parent d3f026630a
commit ee183d8d2d
8 changed files with 19 additions and 15 deletions

1
.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
*.rpf filter=lfs diff=lfs merge=lfs -text

4
Client/Tuning/sync.js Normal file
View File

@@ -0,0 +1,4 @@
mp.events.add('entityStreamIn', (entity) => {
mp.gui.chat.push("streamed in:");
mp.gui.chat.push(entity.Model);
});

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4583d08eb98355d8640aac132b305e16504c9886fbd319aa44f10c3b7b099987
size 13824

View File

@@ -34,5 +34,6 @@ require('./Save/main.js');
require('./Speedometer/index.js');
require('./Tuning/main.js');
require('./Tuning/sync.js');
require('./Business/main.js');

View File

@@ -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]")]

View File

@@ -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);
}

View File

@@ -46,8 +46,6 @@ namespace reallife_gamemode.Server.Managers
tLabel.AttachTo(current, "chassis", new Vector3(0, 0, 1.5), new Vector3(0, 0, 0));
}
}
}
}
}

View File

@@ -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>();