Calculating correct powers for canvasScale, which also prevents infinite loops when hosting a server

This commit is contained in:
Yousef Khadadeh 2025-10-02 11:55:50 +03:00
parent c1045dcee7
commit b0ecf7896f
4 changed files with 11 additions and 10 deletions

View file

@ -81,6 +81,10 @@ void World::init_client_callbacks() {
message(canvasScale);
drawProg.initialize_draw_data(message);
message(bMan, gridMan);
if(!clients.empty()) {
auto& [randomClientServerID, randomClient] = *clients.begin();
drawData.cam.smooth_move_to(*main.world, randomClient.camCoords, randomClient.windowSize, true);
}
}
nextClientID = get_max_id(ownID);
clientStillConnecting = false;