That camera pick I posted was what I do on the terrain. It's how I select where I want a unit to move to. I have version 2.31.
The below code is what gets called every frame
TPick p;
p.entity = 0;
CameraPick(&p, camera, Vec3(MouseX(), MouseY(), 5000), 0, 1);
// we only care about the terrain
string cls = "";
if(p.entity != 0)
cls = GetEntityKey(p.entity, "classname", "");
if(cls == "Terrain")
{
ShowEntity(GetAoECursor()->GetPlane());
PositionEntity(GetAoECursor()->GetPlane(), Vec3(p.X - 10, p.Y, p.Z - 10)); // -10 is 1/2 the scale of the plane
GetAoECursor()->Update();
}