[1.1.104] Laser turret shoots at out of range target repeatedly doing no damage

Post Reply
BurninSun
Inserter
Inserter
Posts: 45
Joined: Fri Mar 16, 2018 4:54 am
Contact:

[1.1.104] Laser turret shoots at out of range target repeatedly doing no damage

Post by BurninSun »

Laser turrets will shoot at targets that are slightly out of range and do no damage to them, resulting in the turret repeatedly toggling its fire. It should either not fire, or apply the damage.
laser.png
laser.png (551.36 KiB) Viewed 354 times
Stripped down save file attached.
Broken laser.zip
(10.22 MiB) Downloaded 16 times

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

Re: [1.1.104] Laser turret shoots at out of range target repeatedly doing no damage

Post by Rseding91 »

Thanks for the report. This is due to a combination of things:

* The laser turret has no idea if after it "fires" that the beam it will create (if it will even create a beam) is within the valid distance from the source (laser) to the target (asteroid). The laser simply has attack_parameters with a max range set and a trigger to run when a target is within that range. What the trigger does is outside the scope of the laser shooting logic.

* The beam created checks the distance from the source-center (laser in this instance) to the target-rotated-bounding-box.

* The laser attack_parameters are configured to use the "range mode" of "center to center" (the default) instead of "bounding box to bounding box"

It looks like the laser is using the same definitions as the base game laser so the changes will end up being in base game to most likely slightly extend the laser beam max distance.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Fixed for 2.0”