Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
Use enemy force's evolution factor, not player's
Browse files Browse the repository at this point in the history
Per the discussion at
feafb3e#commitcomment-22005141
  • Loading branch information
narc0tiq committed May 3, 2017
1 parent feafb3e commit 3e5697f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.4.201
0.4.202
2 changes: 1 addition & 1 deletion value_sensors/evolution_factor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ local sensor = ValueSensor.new("evolution_factor")
sensor.extra_precision = sensor:make_on_click_checkbox_handler("extra_precision")

function sensor:get_line(player)
local percent_evo_factor = player.force.evolution_factor * 100
local percent_evo_factor = game.forces.enemy.evolution_factor * 100
-- this nonsense is because string.format(%.4f) is not safe in MP across platforms, but integer math is
local whole_number = math.floor(percent_evo_factor)
local fractional_component = math.floor((percent_evo_factor - whole_number) * 10)
Expand Down

0 comments on commit 3e5697f

Please sign in to comment.