Change copyright, consts, and net events prefix
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
// ===========================================================================
|
||||
// Asshat Gaming Roleplay
|
||||
// https://github.com/VortrexFTW/agrp_main
|
||||
// (c) 2022 Asshat Gaming
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/v-roleplay
|
||||
// ===========================================================================
|
||||
// FILE: animation.js
|
||||
// DESC: Provides animation functions and usage
|
||||
@@ -27,7 +26,7 @@ function makePedPlayAnimation(pedId, animationSlot, positionOffset) {
|
||||
|
||||
let freezePlayer = false;
|
||||
switch (animationData.moveType) {
|
||||
case AGRP_ANIMMOVE_FORWARD: {
|
||||
case V_ANIMMOVE_FORWARD: {
|
||||
setElementCollisionsEnabled(ped, false);
|
||||
if (ped.isSyncer) {
|
||||
setElementPosition(ped, getPosInFrontOfPos(getElementPosition(pedId), fixAngle(getElementHeading(pedId)), positionOffset));
|
||||
@@ -36,7 +35,7 @@ function makePedPlayAnimation(pedId, animationSlot, positionOffset) {
|
||||
break;
|
||||
}
|
||||
|
||||
case AGRP_ANIMMOVE_BACK: {
|
||||
case V_ANIMMOVE_BACK: {
|
||||
setElementCollisionsEnabled(pedId, false);
|
||||
if (ped.isSyncer) {
|
||||
setElementPosition(pedId, getPosBehindPos(getElementPosition(pedId), fixAngle(getElementHeading(pedId)), positionOffset));
|
||||
@@ -45,7 +44,7 @@ function makePedPlayAnimation(pedId, animationSlot, positionOffset) {
|
||||
break;
|
||||
}
|
||||
|
||||
case AGRP_ANIMMOVE_LEFT: {
|
||||
case V_ANIMMOVE_LEFT: {
|
||||
setElementCollisionsEnabled(pedId, false);
|
||||
if (ped.isSyncer) {
|
||||
setElementPosition(pedId, getPosToLeftOfPos(getElementPosition(pedId), fixAngle(getElementHeading(pedId)), positionOffset));
|
||||
@@ -54,7 +53,7 @@ function makePedPlayAnimation(pedId, animationSlot, positionOffset) {
|
||||
break;
|
||||
}
|
||||
|
||||
case AGRP_ANIMMOVE_RIGHT: {
|
||||
case V_ANIMMOVE_RIGHT: {
|
||||
setElementCollisionsEnabled(pedId, false);
|
||||
if (ped.isSyncer) {
|
||||
setElementPosition(pedId, getPosToRightOfPos(getElementPosition(pedId), fixAngle(getElementHeading(pedId)), positionOffset));
|
||||
@@ -68,9 +67,9 @@ function makePedPlayAnimation(pedId, animationSlot, positionOffset) {
|
||||
}
|
||||
}
|
||||
|
||||
if (getGame() < AGRP_GAME_GTA_IV) {
|
||||
if (animationData.animType == AGRP_ANIMTYPE_NORMAL || animationData.animType == AGRP_ANIMTYPE_SURRENDER) {
|
||||
if (getGame() == AGRP_GAME_GTA_VC || getGame() == AGRP_GAME_GTA_SA) {
|
||||
if (getGame() < V_GAME_GTA_IV) {
|
||||
if (animationData.animType == V_ANIMTYPE_NORMAL || animationData.animType == V_ANIMTYPE_SURRENDER) {
|
||||
if (getGame() == V_GAME_GTA_VC || getGame() == V_GAME_GTA_SA) {
|
||||
ped.clearAnimations();
|
||||
} else {
|
||||
ped.clearObjective();
|
||||
@@ -82,7 +81,7 @@ function makePedPlayAnimation(pedId, animationSlot, positionOffset) {
|
||||
setLocalPlayerControlState(false, false);
|
||||
localPlayer.collisionsEnabled = false;
|
||||
}
|
||||
} else if (animationData.animType == AGRP_ANIMTYPE_BLEND) {
|
||||
} else if (animationData.animType == V_ANIMTYPE_BLEND) {
|
||||
ped.position = ped.position;
|
||||
ped.blendAnimation(animationData.groupId, animationData.animId, animationData.animSpeed);
|
||||
}
|
||||
@@ -103,7 +102,7 @@ function forcePedAnimation(pedId, animSlot) {
|
||||
|
||||
let animationData = getAnimationData(animSlot);
|
||||
|
||||
if (getGame() < AGRP_GAME_GTA_IV) {
|
||||
if (getGame() < V_GAME_GTA_IV) {
|
||||
ped.position = ped.position;
|
||||
ped.addAnimation(animationData.groupId, animationData.animId);
|
||||
|
||||
@@ -127,8 +126,8 @@ function makePedStopAnimation(pedId) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (getGame() != AGRP_GAME_GTA_IV) {
|
||||
if (getGame() == AGRP_GAME_GTA_VC || getGame() == AGRP_GAME_GTA_SA) {
|
||||
if (getGame() != V_GAME_GTA_IV) {
|
||||
if (getGame() == V_GAME_GTA_VC || getGame() == V_GAME_GTA_SA) {
|
||||
ped.clearAnimations();
|
||||
} else {
|
||||
ped.clearObjective();
|
||||
@@ -136,7 +135,7 @@ function makePedStopAnimation(pedId) {
|
||||
}
|
||||
|
||||
if (ped == localPlayer) {
|
||||
if (getGame() != AGRP_GAME_GTA_IV) {
|
||||
if (getGame() != V_GAME_GTA_IV) {
|
||||
localPlayer.collisionsEnabled = true;
|
||||
}
|
||||
setLocalPlayerControlState(true, false);
|
||||
|
||||
Reference in New Issue
Block a user