Remove sync workaround for IV
This commit is contained in:
@@ -10,7 +10,6 @@
|
|||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
let syncPosition = false;
|
|
||||||
let inVehicle = null;
|
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) {
|
if(localPlayer.health <= 0) {
|
||||||
|
localPlayer.clearWeapons();
|
||||||
triggerNetworkEvent("ag.player.death", localPlayer.position, localPlayer.heading.toFixed(2));
|
triggerNetworkEvent("ag.player.death", localPlayer.position, localPlayer.heading.toFixed(2));
|
||||||
} else {
|
} else {
|
||||||
triggerNetworkEvent("ag.player.sync", localPlayer.position, localPlayer.heading.toFixed(2));
|
triggerNetworkEvent("ag.player.sync", localPlayer.position, localPlayer.heading.toFixed(2));
|
||||||
|
|||||||
@@ -132,9 +132,6 @@ addNetworkHandler("ag.player.sync", function(client, position, heading) {
|
|||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
addNetworkHandler("ag.player.death", 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);
|
processPlayerDeath(client);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user