Problem: 'picking' (selecting via cursor) units doesn't work as expected because the bounding box is calculated from the primary geometry of the entity and doesn't include props.
Example: celt trader; clicking on either horse or rider should select the unit but currently doesn't.
(Jason's brief explanation of actor and props:)
The way most of our actors in the game works is... there is geometry and there are various 'nodes' that are throughout the model - they can be parented to a bone, or in the cases of most static meshes - parented to the 0,0,0 coordinate. These nodes have a name and in the actor xml file it says.. associate this prop point (node) to display this actor (then it points to another actor)
Example: <prop actor="props/units/heads/rome_monte_a.xml" attachpoint="helmet"/>
The prop actor also has a model; for example.. within that prop actor it defines: <mesh>props/helmet/rome_helmet_d.pmd</mesh>
To solve this, I'd first recommend using Atlas to create an otherwise empty map with a celt trader to serve as a test. The picking/selection code itself is ok, what we need to do is change the bounding box to include props and then the selection will be as desired.
"props" are in turn actors containing a CModel, which again can have props. In this case (trader) I think the rider is a prop.
CModel has a CalcBounds which constructs bounds from all model vertices (possibly also looping over the animation). What we need to do is also recurse over m_Props and expand the parent's bounds to that of the child prop. these "bounds" (m_ObjectBounds) are CBound objects, which are expanded via operator+= (allowing both bounds or a vector as argument).
suggestion for what to do:
1) make CalcObjectBounds and CalcAnimatedObjectBound take a parameter of the bounding box to calculate (or expand.. in that case, no longer do SetEmpty there)
2) CalcBounds (the master function that dispatches to one of the above impl functions) must be recursive, expanding the bounds for each prop's bound (m_Props[i].m_Model->ObjectBounds)
Milestone Alpha deleted