From 5a6652ca7b999244bb6dd33b88b5bedc00ec2355 Mon Sep 17 00:00:00 2001 From: ackimixs Date: Thu, 11 Apr 2024 16:12:48 +0200 Subject: [PATCH] cast to int to remove decimal --- MainWindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MainWindow.cpp b/MainWindow.cpp index 2417f02..d582b63 100644 --- a/MainWindow.cpp +++ b/MainWindow.cpp @@ -238,6 +238,6 @@ void MainWindow::handleMessage(const std::string& message) { std::vector msg = TCPSocket::split(list[3], ","); std::cout << "X : " << msg[0] << " Y : " << msg[1] << std::endl; - this->inGame->updatePos(msg[0], msg[1]); + this->inGame->updatePos(std::to_string(std::stoi(msg[0])), std::to_string(std::stoi(msg[1]))); } }