- w -= WEP_FIRST;
- int b = accuracy_byte(a.accuracy_hit[w], a.accuracy_fired[w]);
- if (hit) a.accuracy_hit [w] += hit;
- if (fired) a.accuracy_fired[w] += fired;
-
- if (hit && a.hit_time != time) { // only run this once per frame
- a.accuracy_cnt_hit[w] += 1;
- a.hit_time = time;
+ if (w == WEP_Null) return;
+ int wepid = w.m_id;
+ wepid -= WEP_FIRST;
+ int b = accuracy_byte(a.accuracy_hit[wepid], a.accuracy_fired[wepid]);
+ if (hit) a.accuracy_hit [wepid] += hit;
+ if (fired) a.accuracy_fired[wepid] += fired;
+
+ if (hit && STAT(HIT_TIME, a) != time) { // only run this once per frame
+ a.accuracy_cnt_hit[wepid] += 1;
+ STAT(HIT_TIME, a) = time;