From 02f556a1eaa2035973a86f164a48bf99bdce262f Mon Sep 17 00:00:00 2001 From: kzsh Date: Thu, 19 Sep 2024 04:05:00 -0400 Subject: [PATCH] Remove 'f' suffix from numbers in lua (#2164) --- scripts/api/entity/planet.lua | 4 ++-- scripts/scenario_10_empty.lua | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/api/entity/planet.lua b/scripts/api/entity/planet.lua index b34c4626d..2058ca89f 100644 --- a/scripts/api/entity/planet.lua +++ b/scripts/api/entity/planet.lua @@ -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 @@ -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 diff --git a/scripts/scenario_10_empty.lua b/scripts/scenario_10_empty.lua index 6a40b02a1..814c3f3f5 100644 --- a/scripts/scenario_10_empty.lua +++ b/scripts/scenario_10_empty.lua @@ -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)