public Vec3D ReadVec3D(Address adr) { byte[] bufferX = API_ReadProcessMemory(adr, sizeof(float)); byte[] bufferY = API_ReadProcessMemory(adr.OffsetBy(4), sizeof(float)); byte[] bufferZ = API_ReadProcessMemory(adr.OffsetBy(8), sizeof(float)); Vec3D res = new Vec3D(); res.x = BitConverter.ToSingle(bufferX, 0); res.y = BitConverter.ToSingle(bufferY, 0); res.z = BitConverter.ToSingle(bufferZ, 0); return(res); }
public void WriteVec3D(Vec3D val) { callback.WriteVec3D(address, val); }
public void WriteVec3D(Address adr, Vec3D val) { API_WriteProcessMemory(adr, BitConverter.GetBytes(val.x)); API_WriteProcessMemory(adr.OffsetBy(4), BitConverter.GetBytes(val.y)); API_WriteProcessMemory(adr.OffsetBy(8), BitConverter.GetBytes(val.z)); }