Cube  Diff

Differences From Artifact [ef18048f8b]:

To Artifact [1561f54e4a]:


91
92
93
94
95
96
97
98
99
100
101



102
103
104
105



106
107
108
109
110
111
112
113
91
92
93
94
95
96
97




98
99
100




101
102
103

104
105
106
107
108
109
110







-
-
-
-
+
+
+
-
-
-
-
+
+
+
-







			toservermap = @"";
			clientnum = cn; // we are now fully connected
			if (!getint(p))
				// we are the first client on this server, set
				// map
				toservermap = getclientmap();
			sgetstr();
			@autoreleasepool {
				if (text[0] &&
				    strcmp(text, clientpassword.UTF8String)) {
					conoutf(@"you need to set the correct "
			if (text[0] &&
			    strcmp(text, clientpassword.UTF8String)) {
				conoutf(@"you need to set the correct password "
					        @"password "
					        @"to join this server!");
					disconnect();
					return;
				        @"to join this server!");
				disconnect();
				return;
				}
			}
			if (getint(p) == 1)
				conoutf(@"server is FULL, disconnecting..");
			break;
		}

		case SV_POS: {
146
147
148
149
150
151
152
153
154

155
156
157
158
159
160
161
162
143
144
145
146
147
148
149


150

151
152
153
154
155
156
157







-
-
+
-







		case SV_TEXT:
			sgetstr();
			conoutf(@"%@:\f %s", d.name, text);
			break;

		case SV_MAPCHANGE:
			sgetstr();
			@autoreleasepool {
				changemapserv(@(text), getint(p));
			changemapserv(@(text), getint(p));
			}
			mapchanged = true;
			break;

		case SV_ITEMLIST: {
			int n;
			if (mapchanged) {
				senditemstoserver = false;
374
375
376
377
378
379
380
381
382
383
384
385




386
387
388
389
390
391
392
393
369
370
371
372
373
374
375





376
377
378
379

380
381
382
383
384
385
386







-
-
-
-
-
+
+
+
+
-







			break;

		case SV_RECVMAP: {
			sgetstr();
			conoutf(@"received map \"%s\" from server, reloading..",
			    text);
			int mapsize = getint(p);
			@autoreleasepool {
				OFString *string = @(text);
				writemap(string, mapsize, p);
				p += mapsize;
				changemapserv(string, gamemode);
			OFString *string = @(text);
			writemap(string, mapsize, p);
			p += mapsize;
			changemapserv(string, gamemode);
			}
			break;
		}

		case SV_SERVMSG:
			sgetstr();
			conoutf(@"%s", text);
			break;