From 814514be846115717b484046e5aecea3b44747c2 Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Mon, 12 Jul 2021 17:42:01 -0500 Subject: [PATCH] Remove duplicate sync util funcs --- scripts/client/sync.js | 39 ++++++--------------------------------- 1 file changed, 6 insertions(+), 33 deletions(-) diff --git a/scripts/client/sync.js b/scripts/client/sync.js index cd10eaa7..80313fca 100644 --- a/scripts/client/sync.js +++ b/scripts/client/sync.js @@ -44,38 +44,6 @@ function repairVehicle(syncId) { // =========================================================================== -function syncVehicleProperties(vehicle) { - if(vehicle != null) { - syncVehicleProperties(vehicle); - } -} - -// =========================================================================== - -function syncCivilianProperties(civilian) { - if(civilian != null) { - syncCivilianProperties(civilian); - } -} - -// =========================================================================== - -function syncPlayerProperties(player) { - if(player != null) { - syncPlayerProperties(player); - } -} - -// =========================================================================== - -function syncObjectProperties(object) { - if(object != null) { - syncObjectProperties(object); - } -} - -// =========================================================================== - function syncVehicleProperties(vehicle) { if(doesEntityDataExist(vehicle, "ag.lights")) { let lightStatus = getEntityData(vehicle, "ag.lights"); @@ -216,6 +184,11 @@ function syncCivilianProperties(civilian) { civilian.changeBodyProp(1, bodyPropRightFoot[0], bodyPropRightFoot[1]); } } + + if(doesEntityDataExist(civilian, "ag.anim")) { + let animData = getEntityData(vehicle, "ag.anim"); + civilian.addAnimation(animData[0], animData[1]); + } } // =========================================================================== @@ -351,7 +324,7 @@ function syncElementProperties(element) { syncVehicleProperties(element); break; - case ELEMENT_CIVILIAN: + case ELEMENT_PED: syncCivilianProperties(element); break;