mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-10-31 19:36:16 +00:00
refactored toggle_radius as a separate function
This commit is contained in:
parent
075d9002c2
commit
48e8d15042
@ -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) {
|
||||
playSound(ct, "click");
|
||||
numgates = 0;
|
||||
if(type == waClosePlate && PURE)
|
||||
toggleGates(ct, type, 2);
|
||||
else
|
||||
toggleGates(ct, type, (GOLDBERG && !sphere && !a4) ? gp::dist_3() : 3);
|
||||
toggleGates(ct, type, toggle_radius(type));
|
||||
if(numgates && type == waClosePlate)
|
||||
playSound(ct, "closegate");
|
||||
if(numgates && type == waOpenPlate)
|
||||
|
Loading…
Reference in New Issue
Block a user