From 7a2a866ef3f3c536161ad8518bc68add77d1b47d Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Thu, 26 May 2022 17:31:06 -0500 Subject: [PATCH] Fix ped anim sync + remove object prop sync --- scripts/client/sync.js | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/scripts/client/sync.js b/scripts/client/sync.js index 9de7ce12..4c727cec 100644 --- a/scripts/client/sync.js +++ b/scripts/client/sync.js @@ -246,8 +246,9 @@ function syncCivilianProperties(civilian) { } if(doesEntityDataExist(civilian, "vrr.anim")) { - let animData = getEntityData(civilian, "vrr.anim"); - civilian.addAnimation(animData[0], animData[1]); + let animationSlot = getEntityData(civilian, "vrr.anim"); + let animationData = getAnimationData(animationSlot); + civilian.addAnimation(animationData.groupId, animationData.animId); } } @@ -366,26 +367,6 @@ function syncPlayerProperties(player) { // =========================================================================== -function syncObjectProperties(object) { - if(!areServerElementsSupported()) { - return false; - } - - if(getGame() == VRR_GAME_GTA_III || getGame() == VRR_GAME_GTA_VC) { - if(doesEntityDataExist(object, "vrr.scale")) { - let scaleFactor = getEntityData(object, "vrr.scale"); - let tempMatrix = object.matrix; - tempMatrix.setScale(toVector3(scaleFactor.x, scaleFactor.y, scaleFactor.z)); - let tempPosition = object.position; - object.matrix = tempMatrix; - tempPosition.z += scaleFactor.z; - object.position = tempPosition; - } - } -} - -// =========================================================================== - function syncElementProperties(element) { if(!areServerElementsSupported()) { return false; @@ -428,10 +409,6 @@ function syncElementProperties(element) { syncPlayerProperties(element); break; - case ELEMENT_OBJECT: - syncObjectProperties(element); - break; - default: break; }