1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-22 16:20:26 +00:00

raycaster fix continued

This commit is contained in:
Zeno Rogue 2021-08-06 15:38:54 +02:00
parent dfa682ea8a
commit 610d5cc399

View File

@ -1744,7 +1744,7 @@ struct raycast_map {
void generate_connections() {
int id = 0;
for(cell* c: lst)
for(cell* c: lst) if(!reset_rmap)
generate_connections(c, id++);
}
@ -1803,7 +1803,7 @@ struct raycast_map {
};
unique_ptr<raycast_map> rmap;
bool reset_rmap = false;
EX bool reset_rmap = false;
EX void reset_raycaster() {
our_raycaster = nullptr;
@ -2008,6 +2008,11 @@ EX void cast() {
if(rmap->need_to_create(cs)) {
rmap->create_all(cs);
if(reset_rmap) {
reset_raycaster();
cast();
return;
}
if(rmap->gms_exceeded()) {
if(isize(rmap->ms) > gms_limit || can_via_texture) {
m_via_texture = true;