Fix issue with MapPosition.energy

This commit is contained in:
Cooldude2606
2026-08-08 21:58:46 +01:00
parent d495a345d6
commit 1e861c5c0b
10 changed files with 15 additions and 15 deletions
@@ -26,7 +26,7 @@ local function on_entity_damaged(event)
-- Outputs the message as floating text
if message then
local entity_position = entity.position --[[@as MapPosition.struct]]
local entity_position = entity.position
local entity_radius = max(1, entity.get_radius())
local offset = (random() - 0.5) * entity_radius * config.damage_location_variance
local position = { x = entity_position.x + offset, y = entity_position.y - entity_radius }