Remove sync workaround for IV

This commit is contained in:
Vortrex
2020-12-14 10:41:05 -06:00
parent 9699c512f5
commit e68b73482c
2 changed files with 2 additions and 5 deletions

View File

@@ -10,7 +10,6 @@
// ---------------------------------------------------------------------------
let syncPosition = false;
let inVehicle = null;
// ---------------------------------------------------------------------------
@@ -24,8 +23,9 @@ addEventHandler("onProcess", function(event, deltaTime) {
// }
//});
if(localPlayer != null && syncPosition) {
if(localPlayer != null && localPlayer.getData("ag.spawned") != null) {
if(localPlayer.health <= 0) {
localPlayer.clearWeapons();
triggerNetworkEvent("ag.player.death", localPlayer.position, localPlayer.heading.toFixed(2));
} else {
triggerNetworkEvent("ag.player.sync", localPlayer.position, localPlayer.heading.toFixed(2));

View File

@@ -132,9 +132,6 @@ addNetworkHandler("ag.player.sync", function(client, position, heading) {
// ---------------------------------------------------------------------------
addNetworkHandler("ag.player.death", function(client, position, heading) {
//console.log(`POS: ${position}, X: ${position.x}, Y: ${position.y}, Z: ${position.z}`);
setEntityData(client, "ag.position", position, true);
setEntityData(client, "ag.heading", heading, true);
processPlayerDeath(client);
});