[1.1.72] Combat shotgun can be fired in 2 directions simultaneously

We are aware of them, but they have low priority. We have more important things to do. They go here in order not to take space in the main bug thread list.
Post Reply
root
Burner Inserter
Burner Inserter
Posts: 11
Joined: Fri May 06, 2016 8:58 pm
Contact:

[1.1.72] Combat shotgun can be fired in 2 directions simultaneously

Post by root »

Сombat shotgun can shoot in 2 directions simultaneously if cursor in the exact place of origin of the pellets.
combat shotgun bizarre spread.png
combat shotgun bizarre spread.png (340.57 KiB) Viewed 1307 times

It is also possible shoot backwards if the cursor is between the character and the point of origin of the pellets.
combat shotgun shoot backwards.png
combat shotgun shoot backwards.png (316.85 KiB) Viewed 1307 times

I can't reproduce this behavior with normal shotgun, only works with combat shotgun.


Rseding91
Factorio Staff
Factorio Staff
Posts: 13171
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [1.1.72] Combat shotgun can be fired in 2 directions simultaneously

Post by Rseding91 »

Thanks for the report. I don't consider this worth changing since it isn't breaking anything and code wise there's no simple fix that won't likely break other things.

The root issue is: the direction the pellets shoot is not the orientation between the character and the mouse but a offset from the character (the "end of the barrel") and the mouse. So while the character may face a given direction it has nothing to do with the direction pellets will go.
If you want to get ahold of me I'm almost always on Discord.

root
Burner Inserter
Burner Inserter
Posts: 11
Joined: Fri May 06, 2016 8:58 pm
Contact:

Re: [1.1.72] Combat shotgun can be fired in 2 directions simultaneously

Post by root »

The strange thing is that this is done differently for a regular shotgun and a combat shotgun. For a regular shotgun, the direction of the pallets is calculated differently and the reported behavior cannot be repeated. After all, for the player, the difference between a regular shotgun and a combat shotgun is only in the rate of fire. Unless I'm missing something.

User avatar
Silari
Filter Inserter
Filter Inserter
Posts: 488
Joined: Sat Jan 27, 2018 10:04 pm
Contact:

Re: [1.1.72] Combat shotgun can be fired in 2 directions simultaneously

Post by Silari »

root wrote:
Mon Apr 17, 2023 4:20 pm
The strange thing is that this is done differently for a regular shotgun and a combat shotgun. For a regular shotgun, the direction of the pallets is calculated differently and the reported behavior cannot be repeated. After all, for the player, the difference between a regular shotgun and a combat shotgun is only in the rate of fire. Unless I'm missing something.
Shotgun has a min_range set as part of it's attack parameters, combat shotgun does not - that might be enough to prevent the issue, especially since it only happens with the cursor extremely close to the player. cooldown, damage_modifier, and movement_slow_down_factor are also different but those seem unlikely to affect this. Would be very easy to test with a simple mod that added the min_range to the combat shotgun.

So I did, and yeah with the min_range set to 1 the combat shotgun no longer displays any of that behavior. You can get some real wonky shooting angles (shooting almost straight down while your character still faces right) but the backward shooting goes away, and even vanilla gets some weird angles like that sometimes.
Red dot is where the cursor is
Red dot is where the cursor is
combshot.png (371.62 KiB) Viewed 799 times

This obviously won't fix the underlying cause so any modded shotguns could still have it if they don't specify a min range.

Post Reply

Return to “Minor issues”