mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-26 08:56:59 +00:00
ray:: use mapeditor::map_version to recreate the map
This commit is contained in:
parent
3ce5597cc1
commit
1ac22f4be1
@ -2120,6 +2120,7 @@ transmatrix protect_prod(transmatrix T) {
|
|||||||
struct raycast_map {
|
struct raycast_map {
|
||||||
|
|
||||||
int saved_frameid;
|
int saved_frameid;
|
||||||
|
int saved_map_version;
|
||||||
|
|
||||||
vector<cell*> lst;
|
vector<cell*> lst;
|
||||||
map<cell*, int> ids;
|
map<cell*, int> ids;
|
||||||
@ -2415,6 +2416,7 @@ struct raycast_map {
|
|||||||
|
|
||||||
void create_all(cell *cs) {
|
void create_all(cell *cs) {
|
||||||
saved_frameid = frameid;
|
saved_frameid = frameid;
|
||||||
|
saved_map_version = mapeditor::map_version;
|
||||||
generate_initial_ms(cs);
|
generate_initial_ms(cs);
|
||||||
generate_cell_listing(cs);
|
generate_cell_listing(cs);
|
||||||
apply_shape();
|
apply_shape();
|
||||||
@ -2423,6 +2425,7 @@ struct raycast_map {
|
|||||||
|
|
||||||
bool need_to_create(cell *cs) {
|
bool need_to_create(cell *cs) {
|
||||||
if(!fixed_map && frameid != saved_frameid) return true;
|
if(!fixed_map && frameid != saved_frameid) return true;
|
||||||
|
if(saved_map_version != mapeditor::map_version) return true;
|
||||||
return !ids.count(cs);
|
return !ids.count(cs);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user