canvasScale set for client when connected

This commit is contained in:
Yousef Khadadeh 2025-10-02 12:21:30 +03:00
parent b0ecf7896f
commit e1314de3a9
2 changed files with 3 additions and 1 deletions

View file

@ -57,4 +57,5 @@ enum ClientCommands : MessageCommandType {
#define VERSION_STRING "0.2.0"
// Arbitrary value. Higher scale up values lead to less scale up events (which can cause stuttering), but leads to larger numbers overall, which can cause a tiny bit of lag and increased memory usage
#define CANVAS_SCALE_UP_STEP WorldScalar("100000000000000000000000000000000000000000000000000")
//#define CANVAS_SCALE_UP_STEP WorldScalar("100000000000000000000000000000000000000000000000000")
#define CANVAS_SCALE_UP_STEP WorldScalar(2)

View file

@ -49,6 +49,7 @@ MainServer::MainServer(World& initWorld, const std::string& serverLocalID):
hsv[1] = Random::get().real_range(0.3f, 0.7f);
hsv[2] = 1.0;
newClient.cursorColor = hsv_to_rgb<Vector3f>(hsv);
newClient.canvasScale = data.canvasScale;
message(newClient.displayName, isDirectConnect);
ensure_display_name_unique(newClient.displayName);