Adds multiple entity selection to Atlas (including move/delete). Fixes #678.

Makes all actors selectable in Atlas and gives them selection rings (an
EditorOnly flag is used in the template for Atlas-only selectables).
Adds player colors to Atlas selection rings.
Fixes decal selection by falling back to old-style AABBs. Refs #1032.
Replaces UnitManager selections with EntitySelection helpers.
Adds DrawOverlays to Atlas views, for Atlas-specific rendering.
Fixes bug where selection rings conflicted with Move/rotate tool in
Atlas simulation test.

This was SVN commit r11177.
This commit is contained in:
historic_bruno
2012-02-27 05:32:35 +00:00
parent 8651452d33
commit 7d9e98b00e
26 changed files with 632 additions and 186 deletions
+3 -3
View File
@@ -128,17 +128,17 @@ void PostNetworkCommand(void* cbdata, CScriptVal cmd)
std::vector<entity_id_t> PickEntitiesAtPoint(void* UNUSED(cbdata), int x, int y)
{
return EntitySelection::PickEntitiesAtPoint(*g_Game->GetSimulation2(), *g_Game->GetView()->GetCamera(), x, y, g_Game->GetPlayerID());
return EntitySelection::PickEntitiesAtPoint(*g_Game->GetSimulation2(), *g_Game->GetView()->GetCamera(), x, y, g_Game->GetPlayerID(), false);
}
std::vector<entity_id_t> PickFriendlyEntitiesInRect(void* UNUSED(cbdata), int x0, int y0, int x1, int y1, int player)
{
return EntitySelection::PickEntitiesInRect(*g_Game->GetSimulation2(), *g_Game->GetView()->GetCamera(), x0, y0, x1, y1, player);
return EntitySelection::PickEntitiesInRect(*g_Game->GetSimulation2(), *g_Game->GetView()->GetCamera(), x0, y0, x1, y1, player, false);
}
std::vector<entity_id_t> PickSimilarFriendlyEntities(void* UNUSED(cbdata), std::string templateName, bool includeOffScreen, bool matchRank)
{
return EntitySelection::PickSimilarEntities(*g_Game->GetSimulation2(), *g_Game->GetView()->GetCamera(), templateName, g_Game->GetPlayerID(), includeOffScreen, matchRank);
return EntitySelection::PickSimilarEntities(*g_Game->GetSimulation2(), *g_Game->GetView()->GetCamera(), templateName, g_Game->GetPlayerID(), includeOffScreen, matchRank, false);
}
CFixedVector3D GetTerrainAtPoint(void* UNUSED(cbdata), int x, int y)