Changed death process trigger to <= 1 HP

This commit is contained in:
Vortrex
2021-01-09 22:34:04 -06:00
parent 2a8ae5052b
commit 6986e315fc

View File

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