// Check if clicked on a Walker.
for (unsigned int idx = 0; idx < walkers.size(); ++idx) {
- if (auto walker_bb = walkers[idx].get_body_bb();
- GetRayCollisionBox(ray, walker_bb).hit) {
+ if (GetRayCollisionBox(ray, walkers[idx].get_body_bb()).hit) {
if (controlled_walker_idx.has_value()) {
walkers[controlled_walker_idx.value()].set_player_controlled(false);
}
}
};
- if (auto bb_collision = GetRayCollisionBox(ray, surface_bbs[idx]);
- bb_collision.hit) {
+ if (GetRayCollisionBox(ray, surface_bbs[idx]).hit) {
if (auto collision = GetRayCollisionTriangle(ray, nw, sw, ne);
collision.hit) {
on_collide_fn(collision.point);
template <std::size_t BBCount>
void Walker::update(float dt, const std::array<BoundingBox, BBCount> &bbs,
- unsigned int width, unsigned int height) {
+ unsigned int width, unsigned int /*height*/) {
if ((flags & 8) == 0 && (flags & 4) != 0 && (flags & 3) == 0) {
roaming_timer += dt;
if (roaming_timer > roaming_time) {