Cube  Diff

Differences From Artifact [442e527d8e]:

To Artifact [a2f42f1499]:


239
240
241
242
243
244
245
246
247
248
249




250
251
252
253
254
255
256
257

258
259
260
261
262
263
264
239
240
241
242
243
244
245




246
247
248
249
250
251
252
253
254
255
256

257
258
259
260
261
262
263
264






-
-
-
-
+
+
+
+







-
+







				si.numplayers = getint(p);
				si.minremain = getint(p);
				sgetstr();
				strcpy_s(si.map, text);
				sgetstr();
				strcpy_s(si.sdesc, text);
				break;
			};
		};
	};
};
			}
		}
	}
}

int
sicompare(const serverinfo *a, const serverinfo *b)
{
	return a->ping > b->ping
	           ? 1
	           : (a->ping < b->ping ? -1 : strcmp(a->name, b->name));
};
}

void
refreshservers()
{
	checkresolver();
	checkpings();
	if (lastmillis - lastinfo >= 5000)
281
282
283
284
285
286
287

288


289
290
291
292


293
294
295
296
297
298
299
281
282
283
284
285
286
287
288

289
290
291
292


293
294
295
296
297
298
299
300
301






+
-
+
+


-
-
+
+







			sprintf_s(si.full)(
			    si.address.host != ENET_HOST_ANY
			        ? "%s [waiting for server response]"
			        : "%s [unknown host]\t",
			    si.name);
		}
		si.full[50] = 0; // cut off too long server descriptions
		@autoreleasepool {
		menumanual(1, i, si.full);
			menumanual(1, i, @(si.full));
		}
		if (!--maxmenu)
			return;
	};
};
	}
}

void
servermenu()
{
	if (pingsock == ENET_SOCKET_NULL) {
		pingsock = enet_socket_create(ENET_SOCKET_TYPE_DATAGRAM, NULL);
		resolverinit(1, 1000);