1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 21:07:17 +00:00

ray:: reset_raycaster now resets rots::saved_matrices_ray

This commit is contained in:
Zeno Rogue 2021-04-07 02:32:38 +02:00
parent e887d9e0b8
commit 97ccc07be6
2 changed files with 5 additions and 2 deletions

View File

@ -2083,7 +2083,7 @@ EX namespace rots {
return spin(beta) * uxpush(distance/2) * spin(-beta+alpha);
}
std::map<int, transmatrix> saved_matrices_ray;
EX std::map<int, transmatrix> saved_matrices_ray;
EX transmatrix ray_iadj(cell *c1, int i) {
if(i == c1->type-1) return uzpush(-cgi.plevel) * spin(-2*cgi.plevel);

View File

@ -1675,7 +1675,10 @@ struct raycast_map {
unique_ptr<raycast_map> rmap;
EX void reset_raycaster() { our_raycaster = nullptr; rmap = nullptr; }
EX void reset_raycaster() {
our_raycaster = nullptr; rmap = nullptr;
rots::saved_matrices_ray = {};
}
EX void cast() {
// may call itself recursively in case of bugs -- just in case...