Cube  Diff

Differences From Artifact [da4c60f968]:

To Artifact [89ff04e5c2]:


291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
			putint(p, SV_MAPCHANGE);
			sendstring(toservermap, p);
			toservermap = @"";
			putint(p, nextmode);
		} else {
			putint(p, SV_POS);
			putint(p, clientnum);
			putint(
			    p, (int)(d->o.x *
			             DMF)); // quantize coordinates to 1/16th
			                    // of a cube, between 1 and 3 bytes
			putint(p, (int)(d->o.y * DMF));
			putint(p, (int)(d->o.z * DMF));
			putint(p, (int)(d->yaw * DAF));
			putint(p, (int)(d->pitch * DAF));
			putint(p, (int)(d->roll * DAF));
			putint(
			    p, (int)(d->vel.x * DVF)); // quantize to 1/100,
			                               // almost always 1 byte
			putint(p, (int)(d->vel.y * DVF));
			putint(p, (int)(d->vel.z * DVF));
			// pack rest in 1 byte: strafe:2, move:2, onfloor:1,
			// state:3
			putint(
			    p, (d->strafe & 3) | ((d->move & 3) << 2) |
			           (((int)d->onfloor) << 4) |
			           ((editmode ? CS_EDITING : d->state) << 5));

			if (senditemstoserver) {
				packet->flags = ENET_PACKET_FLAG_RELIABLE;
				putint(p, SV_ITEMLIST);
				if (!m_noitems)
					putitems(p);
				putint(p, -1);







|
|
|
|












|
|
|
|







291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
			putint(p, SV_MAPCHANGE);
			sendstring(toservermap, p);
			toservermap = @"";
			putint(p, nextmode);
		} else {
			putint(p, SV_POS);
			putint(p, clientnum);
			putint(p,
			    (int)(d->o.x *
			        DMF)); // quantize coordinates to 1/16th
			               // of a cube, between 1 and 3 bytes
			putint(p, (int)(d->o.y * DMF));
			putint(p, (int)(d->o.z * DMF));
			putint(p, (int)(d->yaw * DAF));
			putint(p, (int)(d->pitch * DAF));
			putint(p, (int)(d->roll * DAF));
			putint(
			    p, (int)(d->vel.x * DVF)); // quantize to 1/100,
			                               // almost always 1 byte
			putint(p, (int)(d->vel.y * DVF));
			putint(p, (int)(d->vel.z * DVF));
			// pack rest in 1 byte: strafe:2, move:2, onfloor:1,
			// state:3
			putint(p,
			    (d->strafe & 3) | ((d->move & 3) << 2) |
			        (((int)d->onfloor) << 4) |
			        ((editmode ? CS_EDITING : d->state) << 5));

			if (senditemstoserver) {
				packet->flags = ENET_PACKET_FLAG_RELIABLE;
				putint(p, SV_ITEMLIST);
				if (!m_noitems)
					putitems(p);
				putint(p, -1);
408
409
410
411
412
413
414
415

		case ENET_EVENT_TYPE_DISCONNECT:
			if (disconnecting)
				disconnect();
			else
				server_err();
			return;
		}
};








<
>
408
409
410
411
412
413
414

415
		case ENET_EVENT_TYPE_DISCONNECT:
			if (disconnecting)
				disconnect();
			else
				server_err();
			return;
		}

}