What exactly is a unit node?

LyTning94

Dragonborn
Joined
Nov 10, 2010
Messages
397
Location
Skyrim
Recently I have stumbled across multiple places in the SDK where the following code (or something similar) is used:

Code:
CLLNode<IDInfo>* pUnitNode;
CvUnit* pLoopUnit;

pUnitNode = headUnitNode();

while (pUnitNode != NULL)
{
	pLoopUnit = ::getUnit(pUnitNode->m_data);
	pUnitNode = nextUnitNode(pUnitNode);
             ...
}

What exactly is a unit node, and how is it different from a UnitTypes or CvUnit* unit instance? I did some research, and found CvSelectionGroup::headUnitNode() and CvPlot::headUnitNode(). Could this be a way to loop through all units on a specific plot or in a specific group?
 
Top Bottom