Skip to content

Commit

Permalink
Bug fix to scout lens
Browse files Browse the repository at this point in the history
  • Loading branch information
astog committed Sep 22, 2019
1 parent 9eec583 commit ed57374
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Lenses/ModLens_Scout.lua
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ end

local function OnUnitMoveComplete( playerID:number, unitID:number )
if playerID == Game.GetLocalPlayer() then
local pPlayer = Game.Players[playerID]
local pPlayer = Players[playerID]
local pUnit = pPlayer:GetUnits():FindID(unitID)
-- Ensure the unit is selected. Scout could be exploring automated
if UI.IsUnitSelected(pUnit) then
local unitType = GetUnitTypeFromIDs(playerID, unitID)
local unitType = getUnitType(pUnit)
local promotionClass = GameInfo.Units[unitType].PromotionClass
if unitType and promotionClass == "PROMOTION_CLASS_RECON" and AUTO_APPLY_SCOUT_LENS then
RefreshScoutLens()
Expand Down

0 comments on commit ed57374

Please sign in to comment.