From e68b73482c6f9f03ee16fff98d4e962988725efc Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Mon, 14 Dec 2020 10:41:05 -0600 Subject: [PATCH] Remove sync workaround for IV --- scripts/client/sync.js | 4 ++-- scripts/server/client.js | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/scripts/client/sync.js b/scripts/client/sync.js index 6f33b13d..fa98952c 100644 --- a/scripts/client/sync.js +++ b/scripts/client/sync.js @@ -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)); diff --git a/scripts/server/client.js b/scripts/server/client.js index f6805c9d..fe01b718 100644 --- a/scripts/server/client.js +++ b/scripts/server/client.js @@ -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); });