|
@ -39,9 +39,9 @@ websockets::TestProtocol<User> default_protocol{ |
|
|
user.update_lines = false; |
|
|
user.update_lines = false; |
|
|
} else { |
|
|
} else { |
|
|
if(app->uberclient){ |
|
|
if(app->uberclient){ |
|
|
ret["balls"] = vector_to_json(app->offline_sim.balls); |
|
|
ret["balls"] = vector_to_json(app->offline_sim.balls, Identity(), [&user](cheap_ball_type const & b){ return user.is_inside(b); }); |
|
|
} else { |
|
|
} else { |
|
|
ret["balls"] = vector_to_json(app->online_sim.sim.balls, [](ball_type const & b){return cheap_ball_type(b);}); |
|
|
ret["balls"] = vector_to_json(app->online_sim.sim.balls, [](ball_type const & b){return cheap_ball_type(b);}, [&user](ball_type const & b){ return user.is_inside(b); }); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
return write_json(ret); |
|
|
return write_json(ret); |
|
|