LoneGazebo / Community-Patch-DLL

Community Patch for Civilization V - Brave New World
Other
285 stars 158 forks source link

CTD during Barbarian turn #11077

Closed Punklife closed 3 months ago

Punklife commented 3 months ago

1. Mod Version (X.Y.Z). Current Version: 4.11.0

2. DirectX Version

3. List of Other Mods

4. Describe the Issue

CTD during Barbarian turn ______________________________________________________________________________________ _5. Save Game From 1 Turn Before (ALWAYS ATTACH THIS IF POSSIBLE)_

Sejong_0064 BC-0440.zip

6. Logs (ALWAYS ATTACH THESE IF POSSIBLE)

Logs.zip

7. CvMiniDump.dmp File (ATTACH IF REPORTING A GAME CRASH)

CvMiniDump.dmp

8. Steps to reproduce the Issue (Optional)

Pass the turn _9. Screenshots of the Issue (Optional)_
ilteroi commented 3 months ago

probably division by zero in GetTourismModifierSharedReligion()

            // Scales with percentage of followers of religion in population
            int iFollowers = GC.getGame().GetGameReligions()->GetNumFollowers(eMyReligion, eTargetPlayer);
            int iPopulation = GET_PLAYER(eTargetPlayer).getTotalPopulation();
            iModifier = iModifier * 100 * iFollowers / iPopulation;
            break;
RecursiveVision commented 3 months ago

Well that's easy to fix.

Punklife commented 3 months ago

@RecursiveVision @ilteroi Could you share the compiled dll? Thanks.