EDIT: SDW thinks he might have found something here. I can't read code worth a damn, but if someone can confirm/deny?
Code: Select all
1 CString GetReferenceFireRate (int iFireRate)
2 {
3 if (iFireRate <= 0)
4 return NULL_STR;
5
6 int iRate = (int)((10.0 * g_TicksPerSecond / iFireRate) + 0.5);
7 if (iRate == 0)
8 return CONSTLIT(" @ <0.1 shots/sec");
9 else if ((iRate % 10) == 0)
10 {
11 if ((iRate / 10) == 1)
12 return strPatternSubst(CONSTLIT(" @ %d shot/sec"), iRate / 10);
13 else
14 return strPatternSubst(CONSTLIT(" @ %d shots/sec"), iRate / 10);
15 }
16 else
17 return strPatternSubst(CONSTLIT(" @ %d.%d shots/sec"), iRate / 10, iRate % 10);
18 }