591 |
|
|
592 |
void actor_inside(Actor *a) {SendMessage(a, "shatter");} |
void actor_inside(Actor *a) {SendMessage(a, "shatter");} |
593 |
|
|
594 |
|
void message(const string& msg, const Value &val) { |
595 |
|
if (msg == "direction" && val.get_type() == Value::DOUBLE) { |
596 |
|
Direction dir = static_cast<Direction>(val.get_double()); |
597 |
|
set_dir(dir); |
598 |
|
init_model(); |
599 |
|
} |
600 |
|
} |
601 |
}; |
}; |
602 |
} |
} |
603 |
|
|
1223 |
// warning("received 'scramble'. dir=%s size=%i", to_suffix(dir).c_str(), size); |
// warning("received 'scramble'. dir=%s size=%i", to_suffix(dir).c_str(), size); |
1224 |
|
|
1225 |
if (size >= 2) { |
if (size >= 2) { |
1226 |
int count = IntegerRand(1, size-1); |
int count = IntegerRand(0, size-1); |
1227 |
while (count--) |
while (count--) |
1228 |
rotate_cluster(c); |
rotate_cluster(c); |
1229 |
} |
} |