|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0004830||Spring engine||General||public||2015-06-20 20:08||2015-06-21 17:01|
|Priority||normal||Severity||minor||Reproducibility||have not tried|
|Target Version||Fixed in Version|
|Summary||0004830: units without specific attack target given flip between targets|
|Description||this can lead to the unit is always retargeting but doesn't shoot|
|Steps To Reproduce||/cheat|
/give 10 aafus
and then create two enemy units with big distance to each other
/give armpw 1
/give armpw 1
|Tags||No tags attached.|
|Checked infolog.txt for lua Errors|
I think it's caused by https://github.com/spring/spring/blob/develop/rts/Sim/Weapons/Weapon.cpp#L642
Where the current target is either avoided or entirely ignored.
Weapons should not ignore their current target in AutoTarget because AutoTarget should be used to decide whether to change target. I say this because units without an attack command should switch to a higher priority target if it enters range. It is just smart behaviour. This means that fairly frequent calling of AutoTarget is required. It's not a waste of performance to do this because this because it increases unit intelligence.
Turrets auto target unless players give them an attack command. This is good behaviour. Also, in practice, units auto target most of the time because they almost always have a move command (this is good usage); they don't get a chance to have an attack command. With the bug in the ticket all units switch between their best two targets which makes aiming quite frustrating.
Removing ignorUnit fixes the problem.
These examples are shown in "ZKv188.8.131.52_ScorpioBattleground_98.0.1-857-gfdb9ac1 develop.sdf".
|Fix ed3804b7602a267f1723a849447ee39a4a85e835 committed to develop branch: fix 0004830: weapon target flipping, repo: spring changeset id: 5195|
spring: develop ed3804b7
Timestamp: 2015-06-21 16:59:33
|fix 0004830: weapon target flipping|
|mod - rts/Sim/Weapons/Weapon.cpp|
|2015-06-20 20:08||abma||New Issue|
|2015-06-20 20:12||abma||Steps to Reproduce Updated||View Revisions|
|2015-06-20 20:14||abma||File Added: 20150620_201255_DeltaSiegeDry_98.0.1-857-gfdb9ac1 develop.sdf|
|2015-06-20 20:14||abma||Product Version||=> 98.0.1+git|
|2015-06-20 23:15||hokomoko||Note Added: 0014664|
|2015-06-21 06:19||Google_Frog||File Added: ZKv184.108.40.206_ScorpioBattleground_98.0.1-857-gfdb9ac1 develop.sdf|
|2015-06-21 06:51||Google_Frog||Note Added: 0014665|
|2015-06-21 17:01||jK||Changeset attached||=> spring develop ed3804b7|
|2015-06-21 17:01||jK||Note Added: 0014677|
|2015-06-21 17:01||jK||Assigned To||=> jK|
|2015-06-21 17:01||jK||Status||new => resolved|
|2015-06-21 17:01||jK||Resolution||open => fixed|