OrionVeteran
Deity
I want to detect the movement of one or more units into a plot via SDK. In CvPlayer.cpp there is a function called:
void CvPlayer::doTurn()
In this function I believe I need the following:
My hope is that this checks to insure the game option for Mine Warfare is turned on and when a unit moves into a plot it triggers the doMineDetonation function, which would determine, whether or not to detonate a Mine, if one exists on the plot. Is my logic correct?
void CvPlayer::doTurn()
In this function I believe I need the following:
Code:
// OrionVeteran - Mine Warfare START
CvUnit* pLoopUnit;
if (GC.getGameINLINE().isOption(GAMEOPTION_MINE_WARFARE))
{
for (pLoopUnit = firstUnit(&iLoop); pLoopUnit != NULL; pLoopUnit = nextUnit(&iLoop))
{
pLoopUnit->doMineDetonation();
}
}
// OrionVeteran - Mine Warfare END
My hope is that this checks to insure the game option for Mine Warfare is turned on and when a unit moves into a plot it triggers the doMineDetonation function, which would determine, whether or not to detonate a Mine, if one exists on the plot. Is my logic correct?