Fix ped anim sync + remove object prop sync
This commit is contained in:
@@ -246,8 +246,9 @@ function syncCivilianProperties(civilian) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(doesEntityDataExist(civilian, "vrr.anim")) {
|
if(doesEntityDataExist(civilian, "vrr.anim")) {
|
||||||
let animData = getEntityData(civilian, "vrr.anim");
|
let animationSlot = getEntityData(civilian, "vrr.anim");
|
||||||
civilian.addAnimation(animData[0], animData[1]);
|
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) {
|
function syncElementProperties(element) {
|
||||||
if(!areServerElementsSupported()) {
|
if(!areServerElementsSupported()) {
|
||||||
return false;
|
return false;
|
||||||
@@ -428,10 +409,6 @@ function syncElementProperties(element) {
|
|||||||
syncPlayerProperties(element);
|
syncPlayerProperties(element);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ELEMENT_OBJECT:
|
|
||||||
syncObjectProperties(element);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user