diff --git a/fred2/management.cpp b/fred2/management.cpp index 462b408b1c0..885e561d861 100644 --- a/fred2/management.cpp +++ b/fred2/management.cpp @@ -616,7 +616,17 @@ int create_ship(matrix *orient, vec3d *pos, int ship_type) } Ai_info[shipp->ai_index].kamikaze_damage = (int) std::min(1000.0f, 200.0f + (temp_max_hull_strength / 4.0f)); - + auto replacements = sip->replacement_textures; + for (auto& tr : replacements) { + if (!stricmp(tr.new_texture, "invisible")) { + // invisible is a special case + tr.new_texture_id = REPLACE_WITH_INVISIBLE; + } else { + // try to load texture or anim as normal + tr.new_texture_id = bm_load_either(tr.new_texture); + } + } + shipp->apply_replacement_textures(replacements); return obj; } diff --git a/qtfred/src/mission/Editor.cpp b/qtfred/src/mission/Editor.cpp index 8fd9ec659b2..161dd798aef 100644 --- a/qtfred/src/mission/Editor.cpp +++ b/qtfred/src/mission/Editor.cpp @@ -767,7 +767,17 @@ int Editor::create_ship(matrix* orient, vec3d* pos, int ship_type) { } Ai_info[shipp->ai_index].kamikaze_damage = (int) std::min(1000.0f, 200.0f + (temp_max_hull_strength / 4.0f)); - + auto replacements = sip->replacement_textures; + for (auto& tr : replacements) { + if (!stricmp(tr.new_texture, "invisible")) { + // invisible is a special case + tr.new_texture_id = REPLACE_WITH_INVISIBLE; + } else { + // try to load texture or anim as normal + tr.new_texture_id = bm_load_either(tr.new_texture); + } + } + shipp->apply_replacement_textures(replacements); missionChanged(); return obj;