Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
823 B
1
Indexable
Never
void get_connection(ENetPeer* peer, std::string& data) {
	rtvar var = rtvar::parse(data);
	replaceAll(data, "\n", "|");
	pi(peer)->temporary_tankIDName = var.get("tankIDName");
	pi(peer)->player_device = var.get("platformID");
	pi(peer)->game_version = var.get("game_version");
	pi(peer)->protocol = stoi(var.get("protocol"));
	pi(peer)->klv = var.get("klv");
	pi(peer)->meta = var.get("meta");
	pi(peer)->rid = var.get("rid");
	pi(peer)->mac = var.get("mac");
	pi(peer)->requestedName = var.get("requestedName");
	pi(peer)->country = var.get("country");
	pi(peer)->tankIDPass = var.get("tankIDPass");
	pi(peer)->pc_player = (var.get("platformID") == "0,1,1" ? true : false);
	if (var.get("platformID") == "1" || var.get("platformID") == "2") pi(peer)->ios_player = true;
	pi(peer)->vid = var.get("vid");
}
Leave a Comment