mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-09-02 10:48:04 +00:00
map editor:: building mode
This commit is contained in:
@@ -546,13 +546,8 @@ EX void shift_view_portal(hyperpoint H) {
|
||||
|
||||
EX const connection_data* through_portal() {
|
||||
transmatrix iView = view_inverse(View);
|
||||
ld dist = hdist0(iView * C0);
|
||||
int nei = -1;
|
||||
for(int i=0; i<centerover->type; i++) {
|
||||
ld dist1 = hdist0(currentmap->ray_iadj(centerover, i) * iView * C0);
|
||||
if(dist1 < dist) nei = i, dist = dist1;
|
||||
}
|
||||
|
||||
int nei = through_wall(iView * C0);
|
||||
if(nei == -1) return nullptr;
|
||||
auto cw1 = cellwalker(centerover, nei);
|
||||
return at_or_null(connections, cw1);
|
||||
}
|
||||
|
Reference in New Issue
Block a user