Skip to content

Commit

Permalink
Fixed heli flights.
Browse files Browse the repository at this point in the history
  • Loading branch information
nanderv committed Apr 23, 2018
1 parent a866398 commit bc9ad4c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ STATE = {
properties = { population = 0, money = 40 },
buildings = {
{ x = 1, y = 1, building = "small_park" },

},
hand = {},
discardPile = { "small_office", "small_generator", "small_residential"},
Expand Down
6 changes: 3 additions & 3 deletions scripts/rendering/renderMapView.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ local function addHeli(buildingId)
car.y = car.y + dt * 0.3
end
if car.direction == 2 then
car.x = car.x + dt * 0.3
car.x = car.x - dt * 0.3
end
if car.direction == 3 then
car.y = car.y - dt * 0.3
end
if car.direction == 4 then
car.x = car.x - dt * 0.3
if car.direction == 0 then
car.x = car.x + dt * 0.3
end
helis[buildingId] = car
end
Expand Down
6 changes: 3 additions & 3 deletions scripts/rendering/renderUI.lua
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,13 @@ R.updateMove = function(dt)
car.y = car.y + dt * 0.3
end
if car.direction == 2 then
car.x = car.x + dt * 0.3
car.x = car.x - dt * 0.3
end
if car.direction == 3 then
car.y = car.y - dt * 0.3
end
if car.direction == 4 then
car.x = car.x - dt * 0.3
if car.direction == 0 then
car.x = car.x + dt * 0.3
end
car.lifetime = car.lifetime - dt
if car.lifetime < 0 then
Expand Down

0 comments on commit bc9ad4c

Please sign in to comment.