Skip to content

Commit

Permalink
fix upgrades
Browse files Browse the repository at this point in the history
  • Loading branch information
FynnTW committed Sep 14, 2024
1 parent 5a98a1f commit 5cc1799
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions M2TWEOP Code/M2TWEOP library/Injects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5063,6 +5063,7 @@ void onCheckBuildUpgrade::SetNewCode()
a->mov(edx, eax);
a->mov(eax, reinterpret_cast<DWORD>(funcAddress));
a->call(eax);
a->mov(ebx, eax);
a->pop(edx);
a->pop(ecx);
a->ret();
Expand Down
2 changes: 1 addition & 1 deletion M2TWEOP Code/M2TWEOP library/patchesForGame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,7 @@ void patchesForGame::getPossibleConstructions(exportDescrBuildings* edb, settlem
int facId = sett->faction->factionID;
if (sett->faction->factionRecord->slave && sett->subFactionID < 31)
facId = sett->subFactionID;
edbEntry* entries[2048]; // NOLINT(clang-diagnostic-vla-extension)
edbEntry* entries[2048];
const int total = GAME_FUNC(int(__thiscall*)(exportDescrBuildings*, int8_t, edbEntry**), getEntriesByFaction)(edb, static_cast<int8_t>(facId), entries);
const DWORD context = techFuncs::allocateGameMem(0x840);
GAME_FUNC(void(__thiscall*)(DWORD, settlementStruct*, void*), createSettlementConditionContext)(context, sett, caps);
Expand Down

0 comments on commit 5cc1799

Please sign in to comment.