View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0005278 | Spring engine | AI | public | 2016-06-13 14:46 | 2016-06-13 15:52 | ||||
Reporter | lamer | ||||||||
Assigned To | hokomoko | ||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Product Version | 101.0+git | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0005278: Unit::GetPos returns different values with and without cheats | ||||||||
Description | Unit::GetPos returns different values with and without cheats. Yet i can't tell which behaviour is better: with midPos offset (so i don't need to apply it everytime inside AI) or without. | ||||||||
Steps To Reproduce | With own unit execute Unit* u = ...; AIFloat3 pos1 = u->GetPos(); callback->GetCheats->SetEnabled(true); AIFloat3 pos2 = u->GetPos(); if (pos1 != pos2) fail miserably; | ||||||||
Additional Information | Without cheats: CAICallback::GetUnitPos - position without midPos offset. With cheats: CAICheats::GetUnitPos - position with midPos offset applied. | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | |||||||||
Attached Files |
|
![]() |
|
abma (administrator) 2016-06-13 14:54 |
is the unit within LOS? outside of LOS i guess its the radar wobble... |
lamer (reporter) 2016-06-13 14:57 Last edited: 2016-06-13 15:01 |
own unit -> within los Unit::pos and Unit::midPos are different things. For some reason Unit::pos accounts for midPosOffset and i don't have to apply offset inside AI to that value to get center of the unit. And with Unit::midPos AI has to apply midPosOffset to get center of the unit. Can't understand logic... |
silentwings (reporter) 2016-06-13 15:08 |
Not strictly relevant, but units can have 0 LOS. |
lamer (reporter) 2016-06-13 15:17 Last edited: 2016-06-13 15:49 |
The difference is not some random value, it's constant midPosOffset for own in los unit (but only for units that have midPosOffset). Going to make more descriptive example (ZK + factoryamph unit). Replace CppTestAI.cpp with this: http://paste.springfiles.com/view/c5322841 |
hokomoko (developer) 2016-06-13 15:52 |
Fix 3a55a470c90c0ed9d23ff1987fcd8796784687a0 committed to develop branch: fix 0005278, repo: spring changeset id: 7124 |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2016-06-13 14:46 | lamer | New Issue | |
2016-06-13 14:54 | abma | Note Added: 0016432 | |
2016-06-13 14:57 | lamer | Note Added: 0016433 | |
2016-06-13 15:00 | lamer | Note Edited: 0016433 | View Revisions |
2016-06-13 15:01 | lamer | Note Edited: 0016433 | View Revisions |
2016-06-13 15:08 | silentwings | Note Added: 0016434 | |
2016-06-13 15:17 | lamer | Note Added: 0016435 | |
2016-06-13 15:41 | lamer | File Added: midPos.jpg | |
2016-06-13 15:43 | hokomoko | Assigned To | => hokomoko |
2016-06-13 15:43 | hokomoko | Status | new => assigned |
2016-06-13 15:49 | lamer | Note Edited: 0016435 | View Revisions |
2016-06-13 15:52 | hokomoko | Changeset attached | => spring develop 3a55a470 |
2016-06-13 15:52 | hokomoko | Note Added: 0016436 | |
2016-06-13 15:52 | hokomoko | Status | assigned => resolved |
2016-06-13 15:52 | hokomoko | Resolution | open => fixed |