DLL - Modifying conditions for which pathing stops?

Decker87

Chieftain
Joined
Oct 28, 2010
Messages
46
I have a simple Mod in mind which I am trying to implement. Typically when a unit's path is blocked and it cannot complete the route-to, it stops and the player is asked to give the unit new orders. One example is if you give a worker a mission to go to a particular tile, but another civilian unit gets there first. What I'd like to do is add a simple "timeout" where the unit will wait up to 5 turns for the path to be valid again.

My question is, where in the world is this final step actually done? Where is the path marked as invalid and the player told to give the unit new orders?

I've looked through CvUnitMission::ContinueMission, but I can't actually figure out what the outputs of this function are. It's a void and doesn't take any argument by reference, and I can't find a place where it actually marks the mission as "non-continue-able".

Any tips on where this logic might live?
 
Back
Top Bottom