Skip to content

Commit

Permalink
Remove 'f' suffix from numbers in lua (#2164)
Browse files Browse the repository at this point in the history
  • Loading branch information
kzsh authored Sep 19, 2024
1 parent 4243c13 commit 02f556a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions scripts/api/entity/planet.lua
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function Entity:setPlanetRadius(size)
pr.size = size
pr.cloud_size = size*1.05
pr.atmosphere_size = size*1.2
local collision_size = math.sqrt((pr.size * pr.size) - (pr.distance_from_movement_plane * pr.distance_from_movement_plane)) * 1.1f;
local collision_size = math.sqrt((pr.size * pr.size) - (pr.distance_from_movement_plane * pr.distance_from_movement_plane)) * 1.1;
self.components.physics = {type="static", size=collision_size}
end
return self
Expand Down Expand Up @@ -106,7 +106,7 @@ function Entity:setDistanceFromMovementPlane(z)
local pr = self.components.planet_render
if pr then
pr.distance_from_movement_plane = z
local collision_size = math.sqrt((pr.size * pr.size) - (pr.distance_from_movement_plane * pr.distance_from_movement_plane)) * 1.1f;
local collision_size = math.sqrt((pr.size * pr.size) - (pr.distance_from_movement_plane * pr.distance_from_movement_plane)) * 1.1;
self.components.physics = {type="static", size=collision_size}
end
return self
Expand Down
3 changes: 2 additions & 1 deletion scripts/scenario_10_empty.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
-- @script scenario_10_empty



function init()
local a = Asteroid()
a:setPosition(500, 1000)

p = PlayerSpaceship()
p:setTemplate("Atlantis")
p:setPosition(0, 0)
Expand Down

0 comments on commit 02f556a

Please sign in to comment.