LoneGazebo / Community-Patch-DLL

Community Patch for Civilization V - Brave New World
Other
286 stars 159 forks source link

AI doesn't build tile improvements #9878

Closed saamohod closed 1 year ago

saamohod commented 1 year ago

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

3. List of Other Mods

20230423192820_1

4. Describe the Issue No improvements seen built by AI workers. Its great persons are piled up in the cities doing nothing, too.

20230525003444_1 20230525003219_1

n-core commented 1 year ago

@seroperson Have you tested this commit of yours 95b579505201168b7568069728f5fae2e5b691cf & 578c0cb681b751e2eeba2555162c1e0221e26608 with AI gameplay?

It seems it has unintended side effects for AI worker tasking.

ZetaLambdaNinja commented 1 year ago

I was using only Vox Populi with EUI, and I too saw no worker improvements.

axatin commented 1 year ago

@seroperson It's not possible to directly pass a vector to a function and then edit it, as you did in AddRouteDirectives etc

see https://www.geeksforgeeks.org/passing-vector-function-cpp/ "When a vector is passed to a function, a copy of the vector is created. This new copy of the vector is then used in the function and thus, any changes made to the vector in the function do not affect the original vector."