]> git.seodisparate.com - jumpartifact.com_demo_0/commitdiff
Minor fixes
authorStephen Seo <seo.disparate@gmail.com>
Fri, 18 Aug 2023 06:50:37 +0000 (15:50 +0900)
committerStephen Seo <seo.disparate@gmail.com>
Fri, 18 Aug 2023 06:50:37 +0000 (15:50 +0900)
src/screen_trunner.cc
src/walker.h

index 79a196da70cac9b63f59837d4fe7caa1099e0c69..22f17bdd753f6ba02a3e8429812a77cc4269ef21 100644 (file)
@@ -287,8 +287,7 @@ bool TRunnerScreen::update(float dt) {
 
     // 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);
         }
@@ -345,8 +344,7 @@ bool TRunnerScreen::update(float dt) {
         }
       };
 
-      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);
index f26a915e08eee7fe86dacb453fd8c1cae0b8e593..fbb8e8dc23eeed7420c9aa92a60dfefce60a5168 100644 (file)
@@ -98,7 +98,7 @@ class Walker {
 
 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) {