示例#1
0
void cMinecart::SpawnOn(cClientHandle & a_ClientHandle)
{
	char SubType = 0;
	switch (m_Payload)
	{
		case mpNone:    SubType = 0; break;
		case mpChest:   SubType = 1; break;
		case mpFurnace: SubType = 2; break;
		case mpTNT:     SubType = 3; break;
		case mpHopper:  SubType = 5; break;
		default:
		{
			ASSERT(!"Unknown payload, cannot spawn on client");
			return;
		}
	}
	a_ClientHandle.SendSpawnVehicle(*this, 10, SubType); // 10 = Minecarts, SubType = What type of Minecart
}
示例#2
0
void cMinecart::SpawnOn(cClientHandle & a_ClientHandle)
{
	char Type = 0;
	switch (m_Payload) //Wiki.vg is outdated on this!!
	{
		case mpNone:    Type =  9; break; //?
		case mpChest:   Type = 10; break;
		case mpFurnace: Type = 11; break; //?
		case mpTNT:     Type = 12; break; //?
		case mpHopper:  Type = 13; break; //?
		default:
		{
			ASSERT(!"Unknown payload, cannot spawn on client");
			return;
		}
	}
	a_ClientHandle.SendSpawnVehicle(*this, Type);
}
示例#3
0
void cMinecart::SpawnOn(cClientHandle & a_ClientHandle)
{
    a_ClientHandle.SendSpawnVehicle(*this, 10, (char)m_Payload);  // 10 = Minecarts
    a_ClientHandle.SendEntityMetadata(*this);
}
示例#4
0
void cBoat::SpawnOn(cClientHandle & a_ClientHandle)
{
	a_ClientHandle.SendSpawnVehicle(*this, 1);
}
示例#5
0
void cMinecart::SpawnOn(cClientHandle & a_ClientHandle)
{
	a_ClientHandle.SendSpawnVehicle(*this, 10, static_cast<char>(m_Payload));  // 10 = Minecarts
	a_ClientHandle.SendEntityMetadata(*this);
}