Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function OnInit()
- g_disabled_selection_visuals = {}
- Rule_Add(System_DisableSelectionVisualsTick)
- end
- function Entity_GetUniqueKey(entity)
- return "entity_" .. Entity_GetGameID(entity)
- end
- function System_DisableSelectionVisualsTick()
- for i = 1, World_GetPlayerCount() do
- local player = World_GetPlayerAt(i)
- local sg_squads = Player_GetSquads(player)
- local eg_entities = Player_GetEntities(player)
- SGroup_ForEach(sg_squads, function(sgid, idx, squad)
- for j = 1, Squad_Count(squad) do
- local entity = Squad_EntityAt(squad, j-1)
- local entityKey = Entity_GetUniqueKey(entity)
- if not g_disabled_selection_visuals[entityKey] then
- UI_EnableEntitySelectionVisuals(entity, false)
- g_disabled_selection_visuals[entityKey] = true
- end
- end
- end)
- EGroup_ForEach(eg_entities, function(egid, idx, entity)
- local entityKey = Entity_GetUniqueKey(entity)
- if not g_disabled_selection_visuals[entityKey] then
- UI_EnableEntitySelectionVisuals(entity, false)
- g_disabled_selection_visuals[entityKey] = true
- end
- end)
- end
- end
- Scar_AddInit(OnInit)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement