diff --git a/libopenage/main/demo/pong/aicontroller.cpp b/libopenage/main/demo/pong/aicontroller.cpp index bdd1b7df3a..fd635d2a21 100644 --- a/libopenage/main/demo/pong/aicontroller.cpp +++ b/libopenage/main/demo/pong/aicontroller.cpp @@ -34,7 +34,7 @@ std::vector get_ai_inputs(const std::shared_ptr &player, time::time_t ty_hit = 0, tx_hit = 0; if (speed[0] == 0) { - tx_hit = std::numeric_limits::max(); + tx_hit = time::TIME_MAX; } else if (speed[0] > 0) { tx_hit = time::time_t::from_double((area_width - ball_pos[0]) / speed[0]); @@ -44,7 +44,7 @@ std::vector get_ai_inputs(const std::shared_ptr &player, } if (speed[1] == 0) { - ty_hit = std::numeric_limits::max(); + ty_hit = time::TIME_MAX; } else if (speed[1] > 0) { ty_hit = time::time_t::from_double((area_height - ball_pos[1]) / speed[1]); diff --git a/libopenage/main/demo/pong/physics.cpp b/libopenage/main/demo/pong/physics.cpp index 72a1f65c96..e2aa12e28e 100644 --- a/libopenage/main/demo/pong/physics.cpp +++ b/libopenage/main/demo/pong/physics.cpp @@ -75,7 +75,7 @@ class BallReflectWall : public event::DependencyEventHandler { auto screen_size = state->area_size->get(now); if (speed[1] == 0) { - return std::numeric_limits::max(); + return time::TIME_MAX; } time::time_t ty = 0; @@ -199,7 +199,7 @@ class BallReflectPanel : public event::DependencyEventHandler { auto screen_size = state->area_size->get(now); if (speed[0] == 0) - return std::numeric_limits::max(); + return time::TIME_MAX; time::time_t ty = 0;