[1.1.65] clamp_position ignores range_modifier for bullets

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

[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 (7.53 MiB) Viewed 181 times
special-ammo.png (7.51 MiB) Viewed 181 times
special-ammo-after-fire.png (7.34 MiB) Viewed 181 times
(4.95 KiB) Downloaded 27 times

Post Reply

Return to “Bug Reports”