mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-02 12:19:18 +00:00
a reference to vector in elec::connect fixed
This commit is contained in:
parent
f82c07e5a6
commit
c12f682d63
10
complex.cpp
10
complex.cpp
@ -279,9 +279,11 @@ namespace elec {
|
|||||||
else {
|
else {
|
||||||
int id = size(charges);
|
int id = size(charges);
|
||||||
charges.push_back(chargedata());
|
charges.push_back(chargedata());
|
||||||
chargedata& ch(charges[id]);
|
|
||||||
|
{chargedata& ch(charges[id]);
|
||||||
ch.c = c; ch.otmp = c->aitmp; ch.lowlink = id; c->aitmp = id;
|
ch.c = c; ch.otmp = c->aitmp; ch.lowlink = id; c->aitmp = id;
|
||||||
ch.instack = true; ch.fire = false;
|
ch.instack = true; ch.fire = false;
|
||||||
|
}
|
||||||
// c->landparam = id;
|
// c->landparam = id;
|
||||||
|
|
||||||
// printf("edge %d-%d [%s]\n", from, id, dnameof(c->wall));
|
// printf("edge %d-%d [%s]\n", from, id, dnameof(c->wall));
|
||||||
@ -292,11 +294,11 @@ namespace elec {
|
|||||||
|
|
||||||
if(chh == ecGrounded) {
|
if(chh == ecGrounded) {
|
||||||
xstack.push_back(make_pair(id, 0));
|
xstack.push_back(make_pair(id, 0));
|
||||||
ch.lowlink = 0;
|
charges[id].lowlink = 0;
|
||||||
}
|
}
|
||||||
else if(chh == ecCharged) {
|
else if(chh == ecCharged) {
|
||||||
xstack.push_back(make_pair(id, 1));
|
xstack.push_back(make_pair(id, 1));
|
||||||
if(from != 1) ch.lowlink = 1;
|
if(from != 1) charges[id].lowlink = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int i=0; i<c->type; i++) {
|
for(int i=0; i<c->type; i++) {
|
||||||
@ -322,7 +324,7 @@ namespace elec {
|
|||||||
// printf("\n");
|
// printf("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
ch.instack = false;
|
charges[id].instack = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user