mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-22 01:46:34 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user