Skip to content

Commit

Permalink
Northstar custom named modes support (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
IncPlusPlus committed Jan 13, 2022
1 parent 7204808 commit 301e268
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion titanfall2-rp/Titanfall2API.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ public string GetGameModeName()
public string GetGameModeCodeName()
{
_ensureInit();
return _sharp!.Memory.Read(EngineDllBaseAddress + 0x13984088, Encoding.UTF8, 15);
// Northstar has a more specific codename for stuff like turbo_lts. The other offset would only display lts.
return _sharp!.Memory.Read(EngineDllBaseAddress + (IsNorthstarClient ? 0x139840A8 : 0x13984088),
Encoding.UTF8, 15);
}

public GameMode GetGameMode()
Expand Down

0 comments on commit 301e268

Please sign in to comment.