From 6986e315fcdeb7f1c2cb08bd87ee125526dea2f2 Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Sat, 9 Jan 2021 22:34:04 -0600 Subject: [PATCH] Changed death process trigger to <= 1 HP --- scripts/client/sync.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/client/sync.js b/scripts/client/sync.js index 05ab63aa..3bc5c175 100644 --- a/scripts/client/sync.js +++ b/scripts/client/sync.js @@ -12,7 +12,7 @@ addEventHandler("onProcess", function(event, deltaTime) { if(localPlayer != null && isSpawned) { - if(localPlayer.health <= 0) { + if(localPlayer.health <= 1) { localPlayer.clearWeapons(); triggerNetworkEvent("ag.player.death", localPlayer.position); } @@ -92,7 +92,7 @@ addNetworkHandler("ag.veh.sync", syncVehicleProperties); // --------------------------------------------------------------------------- function syncCivilianProperties(civilian) { - if(doesEntityDataExist(civilian, "ag.scale") != null) { + if(doesEntityDataExist(civilian, "ag.scale")) { let scaleFactor = getEntityData(civilian, "ag.scale"); let tempMatrix = civilian.matrix; tempMatrix.setScale(toVector3(scaleFactor.x, scaleFactor.y, scaleFactor.z));