this is sort of an informal bug report as it doesn't have a solid test case, but i have done an experiment to validate my statements. Please allow me to try and reason it out with a logical argument.
From my incomplete readings of the forum, and the current source code,
I've found that TUs spent firing weapons don't /actually/ increase experience towards ABILITY_SPEED, when it is supposed to.
I've read on the forum,
http://ufoai.ninex.info/forum/index.php/topic,2254.msg13542.html#msg13542Speed: 1 point for every space moved. 2 points for every space moved while crouched. 1 point for every 10 TUs spent using weapons.
I've noticed the TUs are stored by skill, and thus the aforementioned calculation must include a loop to sum the TUs spent over the array of skills. The current code does have such a loop statement.
The current source code under src/game/g_match.c in the method static int G_GetEarnedExperience (abilityskills_t skill, character_t *chr)
https://github.com/ufoai/ufoai/blob/master/src/game/g_match.ccase ABILITY_SPEED:
experience = chr->scoreMission->movedNormal / 2 + chr->scoreMission->movedCrouched + (chr->scoreMission->firedTUs[skill] + chr->scoreMission->firedSplashTUs[skill]) / 10;
break;
the variable being switched upon is skill, and its value is implicitly ABILITY_SPEED, so it only adds values from firedTUs and firedSplashTUs at the index ABILITY_SPEED, which in my source greping and readings, is never actually written to.
the fix is to add a loop to iterate over the array, summing over each index, in a similar fashion as the next case, ABILITY_ACCURACY.
this should provide the functionality of adding a tenth of all TUs spent firing weapons to the experience for ABILITY_SPEED.
(at first i thought firedTUs[ABILITY_SPEED] was used (or could be) to track TUs spent on reaction fire, but it doesn't seem the case from what i've read.)
I'd be willing to do the work, after this is verified and whatnot. I'm new to contributing to open source projects, and would like the opportunity to help. I still have a lot of reading to do, and observations to make. I have some other ideas to present at a later time related to the concepts and code, but one topic per topic seems a good start.
By the way, not that it should matter, but for completeness sake...
I first noticed this in the 2.4-dev debug version for Mac OS X. I just built the source from the git repo today, and that is when I did my last validation experiment.
If anyone could verify this for me, that would be outstanding. I don't think i'm crazy, but i could be...