View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0005157 | Spring engine | AI | public | 2016-03-09 17:53 | 2016-03-09 18:24 | ||||
Reporter | lamer | ||||||||
Assigned To | |||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Product Version | 101.0+git | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0005157: skirmishAiCallback_Unit_getPos, skirmishAiCallback_Unit_getVel is broken | ||||||||
Description | Mentioned functions doesn't work with cheats anymore. | ||||||||
Additional Information | Malicious commit: $ git log -L 4030,4035:rts/ExternalAI/SSkirmishAICallbackImpl.cpp commit 10283ad041d2d0b61fbdea7572b6e8c07948092c Author: rtri <none@none> Date: Fri Jan 8 02:40:29 2016 +0100 improve code style/readability/quality in a few parts of rts/ExternalAI/ diff --git a/rts/ExternalAI/SSkirmishAICallbackImpl.cpp b/rts/ExternalAI/SSkirmishAICallbackImpl.cpp --- a/rts/ExternalAI/SSkirmishAICallbackImpl.cpp +++ b/rts/ExternalAI/SSkirmishAICallbackImpl.cpp @@ -3740,8 +3716,6 @@ } EXPORT(void) skirmishAiCallback_Unit_getPos(int skirmishAIId, int unitId, float* return_posF3_out) { - if (skirmishAiCallback_Cheats_isEnabled(skirmishAIId)) { + if (skirmishAiCallback_Cheats_isEnabled(skirmishAIId)) skirmishAIId_cheatCallback[skirmishAIId]->GetUnitPos(unitId).copyInto(return_posF3_out); - } else { - skirmishAIId_callback[skirmishAIId]->GetUnitPos(unitId).copyInto(return_posF3_out); - } + Stop hating braces. {}'s are good for dev's health! | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | |||||||||
Attached Files |
|
![]() |
|
Anonymous (viewer) 2016-03-09 18:24 |
Fix 932c5889a99f8565657beeb2017795e96a4a42c1 committed to develop branch: fix 0005157, repo: spring changeset id: 6805 |