1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-18 23:10:26 +00:00

refactored toggle_radius as a separate function

This commit is contained in:
Zeno Rogue 2020-12-25 00:04:05 +01:00
parent 075d9002c2
commit 48e8d15042

View File

@ -791,13 +791,17 @@ EX void toggleGates(cell *c, eWall type, int rad) {
} }
} }
EX int toggle_radius(eWall type) {
if(type == waClosePlate && PURE)
return 2;
else
return (GOLDBERG && !sphere && !a4) ? gp::dist_3() : 3;
}
EX void toggleGates(cell *ct, eWall type) { EX void toggleGates(cell *ct, eWall type) {
playSound(ct, "click"); playSound(ct, "click");
numgates = 0; numgates = 0;
if(type == waClosePlate && PURE) toggleGates(ct, type, toggle_radius(type));
toggleGates(ct, type, 2);
else
toggleGates(ct, type, (GOLDBERG && !sphere && !a4) ? gp::dist_3() : 3);
if(numgates && type == waClosePlate) if(numgates && type == waClosePlate)
playSound(ct, "closegate"); playSound(ct, "closegate");
if(numgates && type == waOpenPlate) if(numgates && type == waOpenPlate)