Cube  Diff

Differences From Artifact [8bc911d5e6]:

To Artifact [69be55db81]:


60
61
62
63
64
65
66
67

68
69

70
71
72
73
74


75
76
77
78
79
80
81
60
61
62
63
64
65
66

67
68

69
70
71
72


73
74
75
76
77
78
79
80
81






-
+

-
+



-
-
+
+







		d.lag = (d.lag * 5 + lagtime) / 6;
		d.lastUpdate = lastmillis;
	}
}

// processes any updates from the server
void
localservertoclient(uchar *buf, int len)
localservertoclient(unsigned char *buf, int len)
{
	if (ENET_NET_TO_HOST_16(*(ushort *)buf) != len)
	if (ENET_NET_TO_HOST_16(*(unsigned short *)buf) != len)
		neterr(@"packet length");
	incomingdemodata(buf, len, false);

	uchar *end = buf + len;
	uchar *p = buf + 2;
	unsigned char *end = buf + len;
	unsigned char *p = buf + 2;
	char text[MAXTRANS];
	int cn = -1, type;
	DynamicEntity *d = nil;
	bool mapchanged = false;

	while (p < end)
		switch (type = getint(&p)) {
280
281
282
283
284
285
286
287

288
289

290
291
292
293
294
295
296
280
281
282
283
284
285
286

287
288

289
290
291
292
293
294
295
296






-
+

-
+







		case SV_ITEMPICKUP:
			setspawn(getint(&p), false);
			getint(&p);
			break;

		case SV_ITEMSPAWN: {
			uint i = getint(&p);
			unsigned int i = getint(&p);
			setspawn(i, true);
			if (i >= (uint)ents.count)
			if (i >= ents.count)
				break;
			OFVector3D v =
			    OFMakeVector3D(ents[i].x, ents[i].y, ents[i].z);
			playsound(S_ITEMSPAWN, &v);
			break;
		}
		// server acknowledges that I picked up this item
328
329
330
331
332
333
334
335

336
337

338
339
340
341
342
343
344
328
329
330
331
332
333
334

335
336

337
338
339
340
341
342
343
344






-
+

-
+







				break;
			}
			break;
		}

		case SV_EDITENT: // coop edit of ent
		{
			uint i = getint(&p);
			unsigned int i = getint(&p);

			while ((uint)ents.count <= i) {
			while (ents.count <= i) {
				Entity *e = [Entity entity];
				e.type = NOTUSED;
				[ents addObject:e];
			}

			int to = ents[i].type;
			ents[i].type = getint(&p);