// TODO: derive breathing ability
int gas = Assets().data.resources["air"].id;
// TODO: check if in compatible atmosphere
- double amount = GetCreature().GetStats().Breath().gain * -(1.5 + 0.5 * GetCreature().ExhaustionFactor());
+ double amount = GetCreature().GetStats().Breath().gain * -(1.0 + GetCreature().ExhaustionFactor());
GetCreature().GetStats().Breath().Add(amount * dt);
// maintain ~1% gas composition
double gas_amount = GetCreature().GetComposition().Get(gas);
}
} else {
// well, what now?
+ found = false;
+ searching = false;
}
}
target_pos = GetSituation().Position();
target_pos[(srf + 0) % 3] += Assets().random.SNorm();
target_pos[(srf + 1) % 3] += Assets().random.SNorm();
- // bias towards current direction
- target_pos += glm::normalize(GetSituation().Velocity()) * 0.5;
+ // bias towards current heading
+ target_pos += GetSituation().Heading() * 0.5;
target_pos = clamp(target_pos, -planet.Radius(), planet.Radius());
GetSteering().GoTo(target_pos);
}