Bug Tracker – Attachment #342: Patch for bug #792

View | Details | Raw Unified | Return to bug 792
Collapse All | Expand All

(-)server/src/sv_main.cpp (-5 / +18 lines)
Lines 1465-1477 Link Here
1465
		return;
1465
		return;
1466
1466
1467
	MSG_WriteMarker(&cl->reliablebuf, svc_spawnmobj);
1467
	MSG_WriteMarker(&cl->reliablebuf, svc_spawnmobj);
1468
	MSG_WriteLong(&cl->reliablebuf, mo->x);
1469
	MSG_WriteLong(&cl->reliablebuf, mo->y);
1470
	MSG_WriteLong(&cl->reliablebuf, mo->z);
1471
	MSG_WriteLong(&cl->reliablebuf, mo->angle);
1472
1473
	MSG_WriteShort(&cl->reliablebuf, mo->type);
1468
	MSG_WriteShort(&cl->reliablebuf, mo->type);
1474
	MSG_WriteShort(&cl->reliablebuf, mo->netid);
1469
	MSG_WriteShort(&cl->reliablebuf, mo->netid);
1470
1471
	// [SL] 2012-02-25 - Send the position for a bullet/blood puff as 16 bits
1472
	// instead of 32-bit fixed-point.  This is done kind of hacky and should
1473
	// be revised in the future.
1474
	if (mo->type == MT_PUFF || mo->type == MT_BLOOD)
1475
	{
1476
		MSG_WriteShort(&cl->reliablebuf, mo->x >> FRACBITS);
1477
		MSG_WriteShort(&cl->reliablebuf, mo->y >> FRACBITS);
1478
		MSG_WriteShort(&cl->reliablebuf, mo->z >> FRACBITS);
1479
	}
1480
	else
1481
	{
1482
		MSG_WriteLong(&cl->reliablebuf, mo->x);
1483
		MSG_WriteLong(&cl->reliablebuf, mo->y);
1484
		MSG_WriteLong(&cl->reliablebuf, mo->z);
1485
		MSG_WriteLong(&cl->reliablebuf, mo->angle);
1486
	}
1487
1475
	MSG_WriteByte(&cl->reliablebuf, mo->rndindex);
1488
	MSG_WriteByte(&cl->reliablebuf, mo->rndindex);
1476
	MSG_WriteShort(&cl->reliablebuf, (mo->state - states)); // denis - sending state fixes monster ghosts appearing under doors
1489
	MSG_WriteShort(&cl->reliablebuf, (mo->state - states)); // denis - sending state fixes monster ghosts appearing under doors
1477
1490
(-)client/src/cl_main.cpp (-5 / +19 lines)
Lines 1569-1582 Link Here
1569
{
1569
{
1570
	fixed_t  x = 0, y = 0, z = 0;
1570
	fixed_t  x = 0, y = 0, z = 0;
1571
	AActor  *mo;
1571
	AActor  *mo;
1572
	angle_t angle = 0;
1572
1573
1573
	x = MSG_ReadLong();
1574
	y = MSG_ReadLong();
1575
	z = MSG_ReadLong();
1576
	angle_t angle = MSG_ReadLong();
1577
1578
	unsigned short type = MSG_ReadShort();
1574
	unsigned short type = MSG_ReadShort();
1579
	unsigned short netid = MSG_ReadShort();
1575
	unsigned short netid = MSG_ReadShort();
1576
1577
	// [SL] 2012-02-25 - The position for a bullet/blood puff is sent as 16 bits
1578
	// instead of 32-bit fixed-point.  This is done kind of hacky and should
1579
	// be revised in the future.
1580
	if (type == MT_PUFF || type == MT_BLOOD)
1581
	{
1582
		x = MSG_ReadShort() << FRACBITS;
1583
		y = MSG_ReadShort() << FRACBITS;
1584
		z = MSG_ReadShort() << FRACBITS;
1585
	}
1586
	else
1587
	{
1588
		x = MSG_ReadLong();
1589
		y = MSG_ReadLong();
1590
		z = MSG_ReadLong();
1591
		angle = MSG_ReadLong();
1592
	}
1593
1580
	byte rndindex = MSG_ReadByte();
1594
	byte rndindex = MSG_ReadByte();
1581
	SWORD state = MSG_ReadShort();
1595
	SWORD state = MSG_ReadShort();
1582
1596

Return to bug 792