| 1157 | |
| 1158 | void MissionHistory::AddWeapons(RString name, int count) |
| 1159 | { |
| 1160 | for (int j = 0; j < weapons.Size(); j++) |
| 1161 | { |
| 1162 | if (stricmp(weapons[j].name, name) == 0) |
| 1163 | { |
| 1164 | weapons[j].count += count; |
| 1165 | if (weapons[j].count <= 0) |
| 1166 | { |
| 1167 | weapons.Delete(j); |
| 1168 | } |
| 1169 | return; |
| 1170 | } |
| 1171 | } |
| 1172 | if (count <= 0) |
| 1173 | { |
| 1174 | return; |
| 1175 | } |
| 1176 | int index = weapons.Add(); |
| 1177 | weapons[index].name = name; |
| 1178 | weapons[index].count = count; |
| 1179 | } |
| 1180 | |
| 1181 | void MissionHistory::AddMagazines(RString name, int count) |
| 1182 | { |
| 1183 | for (int j = 0; j < magazines.Size(); j++) |
no test coverage detected