mtasa-blue icon indicating copy to clipboard operation
mtasa-blue copied to clipboard

Fix #467 Ped animations don't sync for new players

Open FileEX opened this issue 1 year ago • 3 comments

Fixed #467

FileEX avatar Jun 29 '24 00:06 FileEX

bump

garryspins avatar May 09 '23 19:05 garryspins

I have the exact same issue on Final Fantasy VI (and other FF Pixel Remaster games) on BepInEx BE 691 and 577 :

The method in question :

// RVA: 0x34CE80 Offset: 0x34BE80 VA: 0x18034CE80
public static float GetFieldSpriteMoveSecondsPerCell(Nullable<FieldEntityConstants.FieldSpriteSpeedID> speedId, float entityMoveMagnification = 1) { }

My hook :

[HarmonyPatch(typeof(FieldEntityConstants), nameof(FieldEntityConstants.GetFieldSpriteMoveSecondsPerCell))]
[HarmonyPostfix]
static void SpriteMovespeed(ref float __result, Il2CppSystem.Nullable<FieldEntityConstants.FieldSpriteSpeedID> speedId, float entityMoveMagnification)
{
}

Error.log :

Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Repeat 2 times:
--------------------------------
  at Il2CppInterop.Runtime.IL2CPP.il2cpp_value_box(IntPtr, IntPtr)
--------------------------------
  at DynamicClass.(il2cpp -> managed) GetFieldSpriteMoveSecondsPerCell(il2cpp -> managed) GetFieldSpriteMoveSecondsPerCell(IntPtr, Single, Il2CppInterop.Runtime.Runtime.Il2CppMethodInfo*)

To reproduce : Move your character, that will call the method and crash.

d3xMachina avatar May 28 '24 11:05 d3xMachina

Still exist to this day, can confirm from 6.0.0-be.725

foxwhite25 avatar Dec 26 '24 12:12 foxwhite25