Skip to content

Commit f0ecd88

Browse files
Merge pull request #6934 from MjnMixael/qtfred_loadout_bug
Fix QtFRED weapon quantities
2 parents fe3dce0 + 9ecc158 commit f0ecd88

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

qtfred/src/mission/Editor.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,6 @@ void Editor::maybeUseAutosave(std::string& filepath)
186186
bool Editor::loadMission(const std::string& mission_name, int flags) {
187187
char name[512], * old_name;
188188
int i, j, k, ob;
189-
int used_pool[MAX_WEAPON_TYPES];
190189
object* objp;
191190

192191
// activate the localizer hash table
@@ -335,6 +334,10 @@ bool Editor::loadMission(const std::string& mission_name, int flags) {
335334
}
336335
}
337336

337+
int used_pool[MAX_WEAPON_TYPES] = {};
338+
for (auto& pool : used_pool)
339+
pool = 0;
340+
338341
for (i = 0; i < Num_teams; i++) {
339342
generate_team_weaponry_usage_list(i, _weapon_usage[i]);
340343
for (j = 0; j < Team_data[i].num_weapon_choices; j++) {

0 commit comments

Comments
 (0)