Page 1 of 1

[kovarex] [1.1.0] Power pole not placing in gap when dragging fast

Posted: Tue Nov 24, 2020 1:17 am
by AntiElitz
Power pole not placing in gap when dragging fast.

See Video:
https://www.youtube.com/watch?v=aoClknpAmaE

Re: [Twinsen][1.1.0] Power pole not placing in gap when dragging fast

Posted: Tue Nov 24, 2020 2:22 pm
by Twinsen
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}

Re: [kovarex] [1.1.0] Power pole not placing in gap when dragging fast

Posted: Wed Jan 06, 2021 1:06 am
by kovarex
Thanks for the report, this is now fixed for the next release.