From 951e00531bda19ab0c8d9b2caeecab95fb6a3556 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Fri, 6 Apr 2018 00:34:09 +0200 Subject: [PATCH] fixed texture remapping (was buggy -- texture_map_orig did not know tvertices --- textures.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/textures.cpp b/textures.cpp index 285359ec..4e259bf9 100644 --- a/textures.cpp +++ b/textures.cpp @@ -429,17 +429,18 @@ void texture_config::perform_mapping() { } } - computeCgroup(); - texture::cgroup = patterns::cgroup; - texture_map_orig = texture_map; - orig_texture_parameters = current_texture_parameters; - // printf("texture_map has %d elements (S%d)\n", size(texture_map), config.tstate); } void texture_config::finish_mapping() { if(config.tstate == tsActive) for(auto& mi: texture_map) mapTexture2(mi.second); + + patterns::computeCgroup(); + texture::cgroup = patterns::cgroup; + texture_map_orig = texture_map; + orig_texture_parameters = current_texture_parameters; + // printf("texture_map has %d elements (S%d)\n", size(texture_map), config.tstate); } void texture_config::saveFullTexture(string tn) {