shooter icon indicating copy to clipboard operation
shooter copied to clipboard

Syncing the map with the server by FTP

Open KingoCor opened this issue 2 years ago • 2 comments

I swapped network work and map loading so that the game would first try to request a map from the server, and then only draw it.

The FTP server is configured separately, for example using vsftpd. The server should be configured so that anonymous users are directed to a directory that has a folder "current_map", in this folder there should be a file of the current map

KingoCor avatar Jul 23 '22 11:07 KingoCor

Гляну ревест, как буду у компьютера. Идея хорошая, но использовать сишные указатели я бы не стал. Посмотрим, что с этим можно сделать :)

vectozavr avatar Jul 24 '22 16:07 vectozavr

Я всё не мог понять о каком указателе речь... Для такого же есть передача по ссылке.

client->requestMap(clientIp, current_map);
//...
void ShooterClient::requestMap(std::string clientIp, std::string &current_map)
//...
current_map = map_path;
//...
void requestMap(std::string clientIp, std::string &current_map);

Neirokan avatar Jul 25 '22 17:07 Neirokan