Skip to content

Commit

Permalink
Merge pull request #325 from mtaku3/patch-11
Browse files Browse the repository at this point in the history
Add support for v2022.6.21s and v2022.6.22e
  • Loading branch information
denverquane authored Jun 22, 2022
2 parents f9a9901 + 744a696 commit 942dc75
Show file tree
Hide file tree
Showing 2 changed files with 115 additions and 2 deletions.
3 changes: 1 addition & 2 deletions AmongUsCapture/Memory/GameMemReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,7 @@ private void DetectPlayerChanges(ProcessMemory memInstance, Dictionary<string, P
private string? GetGameCode(ProcessMemory memInstance) {
var gameCode = memInstance.ReadString(ProcessMemory.getInstance().Read<IntPtr>(GameAssemblyPtr, CurrentOffsets.GameCodeOffsets), CurrentOffsets.StringOffsets[0], CurrentOffsets.StringOffsets[1]);
if (string.IsNullOrEmpty(gameCode)) return null;
var split = gameCode.Split("\n");
return split.Length == 2 ? split[1] : null;
return gameCode;
}

private PlayRegion GetPlayRegion(ProcessMemory memInstance) {
Expand Down
114 changes: 114 additions & 0 deletions Offsets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2771,5 +2771,119 @@
"PreCensorNameOffset": 0x28,
"PostCensorNameOffset": 0x2C,
}
},
"243DA1D34E2E18A1B9C256861360C3553CA997DD1B793B916306EBA69A39F266": {
"Description": "v2022.6.21s (build num: 2007)",
"AmongUsClientOffset": 0x1d111e0,
"GameDataOffset": 0x1d2baf4,
"MeetingHudOffset": 0x1d07d24,
"GameStartManagerOffset": 0x1cf6e24,
"HudManagerOffset": 0x1cf705c,
"ServerManagerOffset": 0x1cf7804,
"TempDataOffset": 0x1d27294,
"GameOptionsOffset": 0x1d14064,
"MeetingHudPtr": [0x1d07d24, 0x5c, 0x0],
"MeetingHudCachePtrOffsets": [0x8],
"MeetingHudStateOffsets": [0x78],
"GameStateOffsets": [0x1d111e0, 0x5c, 0x0, 0x7c],
"AllPlayerPtrOffsets": [0x1d2baf4, 0x5c, 0x0, 0x24],
"AllPlayersOffsets": [0x8],
"PlayerCountOffsets": [0xc],
"ExiledPlayerIdOffsets": [0x1d07d24, 0x5c, 0x0, 0x84, 0x8],
"RawGameOverReasonOffsets": [0x1d27294, 0x5c, 0x4],
"WinningPlayersPtrOffsets": [0x1d27294, 0x5c, 0xc],
"WinningPlayersOffsets": [0x8],
"WinningPlayerCountOffsets": [0xc],
"GameCodeOffsets": [0x1cf6e24, 0x5c, 0x0, 0x28, 0x80],
"PlayRegionOffsets": [0x1cf7804, 0x5c, 0x0, 0x10, 0x8, 0x8],
"PlayMapOffsets": [0x1d14064, 0x5c, 0x4, 0x30],
"StringOffsets": [0x8, 0xc],
"AddPlayerPtr": 0x4,
"PlayerListPtr": 0x10,
"PlayerInfoStructOffsets": {
"PlayerIDOffset": 0x8,
"OutfitsOffset": [0x18, 0xc, 0x1c],
"PlayerLevelOffset": 0x1c,
"DisconnectedOffset": 0x20,
"RoleTypeOffset": [0x24, 0xc],
"RoleTeamTypeOffset": [0x24, 0x3c],
"TasksOffset": 0x28,
"IsDeadOffset": 0x2c,
"ObjectOffset": 0x30
},
"WinningPlayerDataStructOffsets": {
"IsYouOffset": 0x2c,
"IsImposterOffset": 0x2d,
"IsDeadOffset": 0x2e
},
"PlayerOutfitStructOffsets": {
"dontCensorNameOffset": 0x8,
"ColorIDOffset": 0xc,
"HatIDOffset": 0x10,
"PetIDOffset": 0x14,
"SkinIDOffset": 0x18,
"VisorIDOffset": 0x1c,
"NamePlateIDOffset": 0x20,
"PlayerNameOffset": 0x24,
"PreCensorNameOffset": 0x24,
"PostCensorNameOffset": 0x28
}
},
"CF858292EE15EDBFF0968441D5EDF4E6AB5EC60E66AA1ED82E0AFCC44C6FCF49": {
"Description": "v2022.6.22e (build num: 2108)",
"AmongUsClientOffset": 0x1c85a48,
"GameDataOffset": 0x1c9f7b8,
"MeetingHudOffset": 0x1c7b928,
"GameStartManagerOffset": 0x1c5c984,
"HudManagerOffset": 0x1cf705c,
"ServerManagerOffset": 0x1c5cbc4,
"TempDataOffset": 0x1c9a2c4,
"GameOptionsOffset": 0x1c87d74,
"MeetingHudPtr": [0x1c7b928, 0x5c, 0x0],
"MeetingHudCachePtrOffsets": [0x8],
"MeetingHudStateOffsets": [0x78],
"GameStateOffsets": [0x1c85a48, 0x5c, 0x0, 0x7c],
"AllPlayerPtrOffsets": [0x1c9f7b8, 0x5c, 0x0, 0x24],
"AllPlayersOffsets": [0x8],
"PlayerCountOffsets": [0xc],
"ExiledPlayerIdOffsets": [0x1c7b928, 0x5c, 0x0, 0x84, 0x8],
"RawGameOverReasonOffsets": [0x1c9a2c4, 0x5c, 0x4],
"WinningPlayersPtrOffsets": [0x1c9a2c4, 0x5c, 0xc],
"WinningPlayersOffsets": [0x8],
"WinningPlayerCountOffsets": [0xc],
"GameCodeOffsets": [0x1c5c984, 0x5c, 0x0, 0x28, 0x80],
"PlayRegionOffsets": [0x1c5cbc4, 0x5c, 0x0, 0x10, 0x8, 0x8],
"PlayMapOffsets": [0x1c87d74, 0x5c, 0x4, 0x30],
"StringOffsets": [0x8, 0xc],
"AddPlayerPtr": 0x4,
"PlayerListPtr": 0x10,
"PlayerInfoStructOffsets": {
"PlayerIDOffset": 0x8,
"OutfitsOffset": [0x18, 0xc, 0x1c],
"PlayerLevelOffset": 0x1c,
"DisconnectedOffset": 0x20,
"RoleTypeOffset": [0x24, 0xc],
"RoleTeamTypeOffset": [0x24, 0x3c],
"TasksOffset": 0x28,
"IsDeadOffset": 0x2c,
"ObjectOffset": 0x30
},
"WinningPlayerDataStructOffsets": {
"IsYouOffset": 0x2c,
"IsImposterOffset": 0x2d,
"IsDeadOffset": 0x2e
},
"PlayerOutfitStructOffsets": {
"dontCensorNameOffset": 0x8,
"ColorIDOffset": 0xc,
"HatIDOffset": 0x10,
"PetIDOffset": 0x14,
"SkinIDOffset": 0x18,
"VisorIDOffset": 0x1c,
"NamePlateIDOffset": 0x20,
"PlayerNameOffset": 0x24,
"PreCensorNameOffset": 0x24,
"PostCensorNameOffset": 0x28
}
}
}

0 comments on commit 942dc75

Please sign in to comment.