ray:: use mapeditor::map_version to recreate the map

This commit is contained in:
Zeno Rogue 2022-10-27 00:02:35 +02:00
parent 3ce5597cc1
commit 1ac22f4be1
1 changed files with 3 additions and 0 deletions

View File

@ -2120,6 +2120,7 @@ transmatrix protect_prod(transmatrix T) {
struct raycast_map {
int saved_frameid;
int saved_map_version;
vector<cell*> lst;
map<cell*, int> ids;
@ -2415,6 +2416,7 @@ struct raycast_map {
void create_all(cell *cs) {
saved_frameid = frameid;
saved_map_version = mapeditor::map_version;
generate_initial_ms(cs);
generate_cell_listing(cs);
apply_shape();
@ -2423,6 +2425,7 @@ struct raycast_map {
bool need_to_create(cell *cs) {
if(!fixed_map && frameid != saved_frameid) return true;
if(saved_map_version != mapeditor::map_version) return true;
return !ids.count(cs);
}
};