ThorHammerz
zzz
- Joined
- Jul 31, 2014
- Messages
- 836
In the base game, every time a player clicks on a unit, it's range of movement (usually delineated with a blue-ish border) appears on the tile map, and from what I can gather, this requires some expensive (and hidden/abstracted) pathfinder calls with
Has anyone tried to compute a "list of all plots that this unit can move into this turn" (e.g. with a Lua mod)?
My current plan is to modify the pathfinder and make it return (or cache) a vector/stack of CvPlot* pointers (this is the most straightforward way I can think of), but I wonder if there may be a more efficient way that someone else may have already tried.
Code:
Events.ShowMovementRange( iPlayerID, unit:GetID() );
UI.SendPathfinderUpdate();
Events.DisplayMovementIndicator( true );
Spoiler :
These events are not in the C++ source.
Has anyone tried to compute a "list of all plots that this unit can move into this turn" (e.g. with a Lua mod)?
My current plan is to modify the pathfinder and make it return (or cache) a vector/stack of CvPlot* pointers (this is the most straightforward way I can think of), but I wonder if there may be a more efficient way that someone else may have already tried.