Power pole not placing in gap when dragging fast.
See Video:
https://www.youtube.com/watch?v=aoClknpAmaE
[kovarex] [1.1.0] Power pole not placing in gap when dragging fast
Re: [Twinsen][1.1.0] Power pole not placing in gap when dragging fast
Leaving this for kovarex:
For power pole dragging to work correctly in this case, the build input action needs to be called twice per tile. Which is probably not a reasonable requirement.
If build input action is called once per tile:
- build action is called on {-8.5, 2.5}. buildByMovingCheckCommon goes into the if (!lastDragBuildPosition.empty()) section. Pole is built at {-2.5, 2.5}, lastDragBuildPosition is cleared, no pole is built at {-8.5, 2.5} during this input action
- next input action is at different tile {-10.5, 2.5}. buildByMovingCheckCommon does nothing, since lastBuiltEntity is too far away({-2.5, 2.5}) and lastDragBuildPosition is empty. Pole is built at {-10.5, 2.5}
If build input action is called twice per tile:
- build action is called on {-8.5, 2.5}. buildByMovingCheckCommon goes into the if (!lastDragBuildPosition.empty()) section. Pole is built at {-2.5, 2.5}, lastDragBuildPosition is cleared, no pole is built at {-8.5, 2.5} during this input action
- next input action is on {-8.5, 2.5} again. buildByMovingCheckCommon is called again, but this time lastBuiltEntity({-2.5, 2.5}) is in range. lastDragBuildPosition is set to {-8.5, 2.5}
- next input action is a different tile {-10.5, 2.5}. buildByMovingCheckCommon goes into the if (!lastDragBuildPosition.empty()) section. Pole is built at {-8.5, 2.5}
For power pole dragging to work correctly in this case, the build input action needs to be called twice per tile. Which is probably not a reasonable requirement.
If build input action is called once per tile:
- build action is called on {-8.5, 2.5}. buildByMovingCheckCommon goes into the if (!lastDragBuildPosition.empty()) section. Pole is built at {-2.5, 2.5}, lastDragBuildPosition is cleared, no pole is built at {-8.5, 2.5} during this input action
- next input action is at different tile {-10.5, 2.5}. buildByMovingCheckCommon does nothing, since lastBuiltEntity is too far away({-2.5, 2.5}) and lastDragBuildPosition is empty. Pole is built at {-10.5, 2.5}
If build input action is called twice per tile:
- build action is called on {-8.5, 2.5}. buildByMovingCheckCommon goes into the if (!lastDragBuildPosition.empty()) section. Pole is built at {-2.5, 2.5}, lastDragBuildPosition is cleared, no pole is built at {-8.5, 2.5} during this input action
- next input action is on {-8.5, 2.5} again. buildByMovingCheckCommon is called again, but this time lastBuiltEntity({-2.5, 2.5}) is in range. lastDragBuildPosition is set to {-8.5, 2.5}
- next input action is a different tile {-10.5, 2.5}. buildByMovingCheckCommon goes into the if (!lastDragBuildPosition.empty()) section. Pole is built at {-8.5, 2.5}
Re: [kovarex] [1.1.0] Power pole not placing in gap when dragging fast
Thanks for the report, this is now fixed for the next release.