DeckerdJames
Warlord
- Joined
- Nov 1, 2019
- Messages
- 235
Is this a bug in SelectedUnit.lua in the Base/Assets/UI/Worldview folder?
In the UnitSimPositionChanged function:
Is the missing semi-colon after the first return statement a bug and do you have the same thing in your file or did I inadvertently do this while looking at the file? If this is a bug, what is it causing?
In the UnitSimPositionChanged function:
Is the missing semi-colon after the first return statement a bug and do you have the same thing in your file or did I inadvertently do this while looking at the file? If this is a bug, what is it causing?
Code:
-- ===========================================================================
-- Game Engine Event
-- ===========================================================================
function UnitSimPositionChanged( playerID:number, unitID:number, worldX:number, worldY:number, worldZ:number, bVisible:boolean, isComplete:boolean )
if playerID ~= Game.GetLocalPlayer() then
return
end
local kUnit:table = nil;
if isComplete then
local pPlayer:table = Players[ playerID ];
if pPlayer ~= nil then
-- If the unit that just finished moving is STILL the selected unit,
-- then it has more moves to make, update the move radius...
kUnit = pPlayer:GetUnits():FindID(unitID);
if kUnit == UI.GetHeadSelectedUnit() then
RealizeMoveRadius( kUnit );
RealizeGreatPersonLens( kUnit );
end
end
end
end
Last edited: