+ double speed = max_speed * glm::clamp(max_speed * haste * haste, 0.25, 1.0);
+ double accel = max_speed * glm::clamp(max_accel * haste * haste, 0.5, 1.0);
+ glm::dvec3 result(0.0);
+ if (separating) {
+ // TODO: off surface situation
+ glm::dvec3 repulse(0.0);
+ const Situation &s = c.GetSituation();
+ for (auto &other : s.GetPlanet().Creatures()) {
+ if (&*other == &c) continue;
+ glm::dvec3 diff = s.Position() - other->GetSituation().Position();
+ if (length2(diff) > max_look * max_look) continue;
+ double sep = length(diff) - other->Size() * 0.707 - c.Size() * 0.707;
+ if (sep < min_dist) {
+ repulse += normalize(diff) * (1.0 - sep / min_dist);
+ }
+ }
+ SumForce(result, repulse, accel);
+ }