Code: Select all
function gadget:UnitFinished(unitID, unitDefID, teamID)
if(unitName(unitID)=="mnanoforge") then --test
local unitx,unity,unitz = Spring.GetUnitPosition(unitID)
unitx = math.floor((unitx+4)/8)*8
unitz = math.floor((unitz+4)/8)*8
Spring.SetHeightMapFunc(function()
for z=0,Game.mapSizeZ, Game.squareSize do
for x=0,Game.mapSizeX, Game.squareSize do
currentAlt = Spring.GetGroundHeight(x,z)
Spring.AdjustHeightMap( x, z, 200 )
end
end
end)
--Spring.LevelHeightMap(unitx-1000,unitz-1000,unitx+1000,unitz+1000,unity)
end
end
All of the stuff on the map gets raised up, including the trees. If I build a tank, the tank can drive around on the "invisible ground" 200m up. But the map itself doesn't move up like it should! Bug?