[1.1.65] clamp_position ignores range_modifier for bullets

Post your bugs and problems so we can fix them.
Post Reply
BicycleEater
Long Handed Inserter
Long Handed Inserter
Posts: 89
Joined: Sun Jul 26, 2020 4:05 pm
Contact:

[1.1.65] clamp_position ignores range_modifier for bullets

Post by BicycleEater »

When modding in a new type of ammunition for the machine gun, if the range_modifier is set (e.g. to 2), it normally works fine, but if you set

Code: Select all

clamp_position = true
(with target_type = "position") then the firing range is clamped to the original range, rather than the modified range.

I've also tried setting

Code: Select all

ammo_type.action.action_delivery.max_range = 36
like in the cannon-shell, but this didn't work and wouldn't solve the problem as it would force incompatibility with mods adding different range machine guns.

I'd expect the clamping to use the final effective range, as that's the range that the targetting highlight changes to green, and with clamp_position = true, there is no other way of telling where you'll shoot.

I don't have a simple mod which gives the bug, although I could construct one fairly easily.
normal-ammo.png
normal-ammo.png (7.53 MiB) Viewed 174 times
special-ammo.png
special-ammo.png (7.51 MiB) Viewed 174 times
special-ammo-after-fire.png
special-ammo-after-fire.png (7.34 MiB) Viewed 174 times
Attachments
factorio-current.log
(4.95 KiB) Downloaded 27 times

Post Reply

Return to “Bug Reports”