View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0006206 | Spring engine | General | public | 2019-04-18 06:14 | 2019-05-08 10:41 | ||||
Reporter | Google_Frog | ||||||||
Assigned To | |||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Product Version | 104.0 +git | ||||||||
Target Version | Fixed in Version | 104.0 +git | |||||||
Summary | 0006206: 104.0.1-1752-g139d66b develop Units move towards too-distant path waypoints | ||||||||
Description | I have some units that skip nearby path waypoints to move towards distant points in bad situations. This causes them to try to path over a steep cliff. | ||||||||
Additional Information | Game: https://github.com/GoogleFrog/SpringCraft/commit/67ab51434ebb267a830a9906bc93e6bbf2c3f04b Map: http://zero-k.info/Maps/Detail/55567 | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | Yes | ||||||||
Attached Files |
|
![]() |
|
Google_Frog (reporter) 2019-04-18 10:23 |
The issued goes away with avoidMobilesOnPath = false. When units are set to avoid mobiles they change their heading, which possibly makes this check fail more often: https://github.com/spring/spring/blob/develop/rts/Sim/MoveTypes/GroundMoveType.cpp#L1571 My current theory is that there is a typo on this line, that the 'and' should be an 'or': https://github.com/spring/spring/blob/develop/rts/Sim/MoveTypes/GroundMoveType.cpp#L1594 Changing the 'and' to an 'or' seems to resolve the issue without breaking the intended behaviour. I assume that the intended behaviour is for units to skip waypoints along unobstructed terrain without skipping over corners they they need to take. |
Google_Frog (reporter) 2019-04-18 10:28 |
The issue also occurs in ZK with 104.0.1-1156-gb72a9cc maintenance. I think it is a bit harder to notice on units with low turn rates. |
Kloot (developer) 2019-04-18 12:13 |
Does not smell like a typo: if the range-test fails but skipping the waypoint is still allowed (e.g. because cwp happens to be within SQUARE_SIZE elmos of pos), CanSetNextWayPoint should not return false. I may create a branch for this if you want to run ZK on it. |
Google_Frog (reporter) 2019-04-18 15:09 |
In that case perhaps the required check is: !((pos - cwp).SqLength() <= Square(SQUARE_SIZE)) && (!rangeTest || !(pos - cwp).dot(flatFrontDir) < 0.0f) Nobody has noticed this so far so I don't see the need to proliferate the branches. |
Google_Frog (reporter) 2019-05-07 05:08 |
I made a PR: https://github.com/spring/spring/pull/455/files |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2019-04-18 06:14 | Google_Frog | New Issue | |
2019-04-18 06:14 | Google_Frog | File Added: pathing.jpg | |
2019-04-18 10:23 | Google_Frog | File Added: andOrResolution.jpg | |
2019-04-18 10:23 | Google_Frog | Note Added: 0019946 | |
2019-04-18 10:28 | Google_Frog | File Added: zkTerrainTurnIssue.jpg | |
2019-04-18 10:28 | Google_Frog | Note Added: 0019947 | |
2019-04-18 12:13 | Kloot | Note Added: 0019948 | |
2019-04-18 15:09 | Google_Frog | Note Added: 0019949 | |
2019-05-07 05:08 | Google_Frog | Note Added: 0019984 | |
2019-05-08 10:41 | Kloot | Status | new => resolved |
2019-05-08 10:41 | Kloot | Resolution | open => fixed |
2019-05-08 10:41 | Kloot | Fixed in Version | => 104.0 +git |