Skip to content

Commit

Permalink
Fix worldtomlo
Browse files Browse the repository at this point in the history
  • Loading branch information
indilo53 committed Jul 14, 2019
1 parent da35490 commit e19fdc2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gtautil/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut
// en utilisant '*', comme indiqué ci-dessous :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.2.5.0")]
[assembly: AssemblyVersion("2.2.6.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
4 changes: 2 additions & 2 deletions gtautil/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@ public static Tuple<Vector3, Vector4> World2Mlo(Vector3 position, Vector4 rotati

rotationDiff.Normalize();

newPos -= mloWorldPosition; // Substract mlo world coords from entity world coords
newPos = Utils.RotateTransform(Quaternion.Invert(mloWorldRotation), position, Vector3.Zero); // Rotate entity around center of mlo instance (mlo entities rotations in space are inverted)
newPos -=mloWorldPosition; // Substract mlo world coords from entity world coords
newPos = Utils.RotateTransform(Quaternion.Invert(mloWorldRotation), newPos, Vector3.Zero); // Rotate entity around center of mlo instance (mlo entities rotations in space are inverted)

var newRot = new Vector4(rotationDiff.X, rotationDiff.Y, rotationDiff.Z, rotationDiff.W);

Expand Down

0 comments on commit e19fdc2

Please sign in to comment.