mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-04 14:30:35 +00:00
intra:: fixed wrongly rotating portals
This commit is contained in:
parent
30a99f762f
commit
6920382634
15
intra.cpp
15
intra.cpp
@ -195,14 +195,17 @@ EX void switch_to(int id) {
|
|||||||
|
|
||||||
void connect_portal_1(cellwalker cw1, cellwalker cw2, int spin) {
|
void connect_portal_1(cellwalker cw1, cellwalker cw2, int spin) {
|
||||||
auto& p = connections[cw1];
|
auto& p = connections[cw1];
|
||||||
p.source_world = intra_id[cw1.at];
|
p.source_world = intra_id.at(cw1.at);
|
||||||
p.target_world = intra_id[cw2.at];
|
p.target_world = intra_id.at(cw2.at);
|
||||||
p.scw = cw1;
|
p.scw = cw1;
|
||||||
p.tcw = cw2;
|
p.tcw = cw2;
|
||||||
switch_to(intra_id[cw1.at]);
|
switch_to(intra_id.at(cw1.at));
|
||||||
p.id1 = make_portal(cw1, 0);
|
int pspin = 0, nspin = 0;
|
||||||
switch_to(intra_id[cw2.at]);
|
if(spin > 0) pspin = spin; else nspin = -spin;
|
||||||
p.id2 = make_portal(cw2, spin);
|
p.id1 = make_portal(cw1, nspin);
|
||||||
|
switch_to(intra_id.at(cw2.at));
|
||||||
|
p.id2 = make_portal(cw2, pspin);
|
||||||
|
p.spin_value = spin;
|
||||||
|
|
||||||
if(1) {
|
if(1) {
|
||||||
dynamicval<eGeometry> g(geometry, gCubeTiling);
|
dynamicval<eGeometry> g(geometry, gCubeTiling);
|
||||||
|
Loading…
Reference in New Issue
Block a user