1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-25 01:20:37 +00:00

fixed gate continuity

This commit is contained in:
Zeno Rogue 2018-04-12 20:52:58 +02:00
parent fa36bc882a
commit 2ef7d61d36

View File

@ -3147,16 +3147,18 @@ void toggleGates(cell *c, eWall type, int rad) {
if(ct->mov[i] && ct->mov[i]->wall == waOpenGate && isWorm(ct->mov[i])) onWorm = true; if(ct->mov[i] && ct->mov[i]->wall == waOpenGate && isWorm(ct->mov[i])) onWorm = true;
if(!onWorm) { if(!onWorm) {
ct->wall = waClosedGate, numgates++; ct->wall = waClosedGate, numgates++;
if(rad<1) rad=1;
if(ct->item) { if(ct->item) {
playSound(ct, "hit-crush"+pick123()); playSound(ct, "hit-crush"+pick123());
addMessage(XLAT("%The1 is crushed!", ct->item)); addMessage(XLAT("%The1 is crushed!", ct->item));
ct->item = itNone; ct->item = itNone;
} }
toggleGates(ct, type, 1);
} }
} }
if(ct->wall == waClosedGate && type == waOpenPlate) if(ct->wall == waClosedGate && type == waOpenPlate) {
ct->wall = waOpenGate, rad = 1, numgates++; ct->wall = waOpenGate, numgates++;
toggleGates(ct, type, 1);
}
} }
} }