Implemented xoft's suggestions [SEE DESC]
Rail metas are now in BlockID and exported to LUA Minecart now does a SetMass, instead of m_Mass Minecarts use SubType instead of TypeTypemaster
parent
1e91002229
commit
7056992d0d
|
@ -27567,6 +27567,16 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S)
|
|||
tolua_constant(tolua_S,"E_META_SNOW_LAYER_SIX",E_META_SNOW_LAYER_SIX);
|
||||
tolua_constant(tolua_S,"E_META_SNOW_LAYER_SEVEN",E_META_SNOW_LAYER_SEVEN);
|
||||
tolua_constant(tolua_S,"E_META_SNOW_LAYER_EIGHT",E_META_SNOW_LAYER_EIGHT);
|
||||
tolua_constant(tolua_S,"E_RAIL_ZM_ZP",E_RAIL_ZM_ZP);
|
||||
tolua_constant(tolua_S,"E_RAIL_XM_XP",E_RAIL_XM_XP);
|
||||
tolua_constant(tolua_S,"E_RAIL_ASCEND_XP",E_RAIL_ASCEND_XP);
|
||||
tolua_constant(tolua_S,"E_RAIL_ASCEND_XM",E_RAIL_ASCEND_XM);
|
||||
tolua_constant(tolua_S,"E_RAIL_ASCEND_ZM",E_RAIL_ASCEND_ZM);
|
||||
tolua_constant(tolua_S,"E_RAIL_ASCEND_ZP",E_RAIL_ASCEND_ZP);
|
||||
tolua_constant(tolua_S,"E_RAIL_CURVED_ZP_XP",E_RAIL_CURVED_ZP_XP);
|
||||
tolua_constant(tolua_S,"E_RAIL_CURVED_ZP_XM",E_RAIL_CURVED_ZP_XM);
|
||||
tolua_constant(tolua_S,"E_RAIL_CURVED_ZM_XM",E_RAIL_CURVED_ZM_XM);
|
||||
tolua_constant(tolua_S,"E_RAIL_CURVED_ZM_XP",E_RAIL_CURVED_ZM_XP);
|
||||
tolua_constant(tolua_S,"E_META_COAL_NORMAL",E_META_COAL_NORMAL);
|
||||
tolua_constant(tolua_S,"E_META_COAL_CHARCOAL",E_META_COAL_CHARCOAL);
|
||||
tolua_constant(tolua_S,"E_META_DYE_BLACK",E_META_DYE_BLACK);
|
||||
|
|
|
@ -558,6 +558,18 @@ enum
|
|||
E_META_SNOW_LAYER_SEVEN = 6,
|
||||
E_META_SNOW_LAYER_EIGHT = 7,
|
||||
|
||||
// E_BLOCK_RAIL metas
|
||||
E_RAIL_ZM_ZP = 0,
|
||||
E_RAIL_XM_XP = 1,
|
||||
E_RAIL_ASCEND_XP = 2,
|
||||
E_RAIL_ASCEND_XM = 3,
|
||||
E_RAIL_ASCEND_ZM = 4,
|
||||
E_RAIL_ASCEND_ZP = 5,
|
||||
E_RAIL_CURVED_ZP_XP = 6,
|
||||
E_RAIL_CURVED_ZP_XM = 7,
|
||||
E_RAIL_CURVED_ZM_XM = 8,
|
||||
E_RAIL_CURVED_ZM_XP = 9,
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Item metas:
|
||||
|
||||
|
|
|
@ -8,37 +8,6 @@
|
|||
|
||||
|
||||
|
||||
/// Meta values for the rail
|
||||
enum ENUM_RAIL_DIRECTIONS
|
||||
{
|
||||
E_RAIL_NORTH_SOUTH = 0,
|
||||
E_RAIL_EAST_WEST = 1,
|
||||
E_RAIL_ASCEND_EAST = 2,
|
||||
E_RAIL_ASCEND_WEST = 3,
|
||||
E_RAIL_ASCEND_NORTH = 4,
|
||||
E_RAIL_ASCEND_SOUTH = 5,
|
||||
E_RAIL_CURVED_SOUTH_EAST = 6,
|
||||
E_RAIL_CURVED_SOUTH_WEST = 7,
|
||||
E_RAIL_CURVED_NORTH_WEST = 8,
|
||||
E_RAIL_CURVED_NORTH_EAST = 9,
|
||||
|
||||
// Some useful synonyms:
|
||||
E_RAIL_DIR_X = E_RAIL_EAST_WEST,
|
||||
E_RAIL_DIR_Z = E_RAIL_NORTH_SOUTH,
|
||||
E_RAIL_ASCEND_XP = E_RAIL_ASCEND_EAST,
|
||||
E_RAIL_ASCEND_XM = E_RAIL_ASCEND_WEST,
|
||||
E_RAIL_ASCEND_ZM = E_RAIL_ASCEND_NORTH,
|
||||
E_RAIL_ASCEND_ZP = E_RAIL_ASCEND_SOUTH,
|
||||
E_RAIL_CURVED_XPZP = E_RAIL_CURVED_SOUTH_EAST,
|
||||
E_RAIL_CURVED_XMZP = E_RAIL_CURVED_SOUTH_WEST,
|
||||
E_RAIL_CURVED_XMZM = E_RAIL_CURVED_NORTH_WEST,
|
||||
E_RAIL_CURVED_XPZM = E_RAIL_CURVED_NORTH_EAST,
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
enum ENUM_PURE
|
||||
{
|
||||
E_PURE_UPDOWN = 0,
|
||||
|
@ -96,13 +65,13 @@ public:
|
|||
NIBBLETYPE Meta = a_Chunk.GetMeta(a_RelX, a_RelY, a_RelZ);
|
||||
switch (Meta)
|
||||
{
|
||||
case E_RAIL_ASCEND_EAST:
|
||||
case E_RAIL_ASCEND_WEST:
|
||||
case E_RAIL_ASCEND_NORTH:
|
||||
case E_RAIL_ASCEND_SOUTH:
|
||||
case E_RAIL_ASCEND_XP:
|
||||
case E_RAIL_ASCEND_XM:
|
||||
case E_RAIL_ASCEND_ZM:
|
||||
case E_RAIL_ASCEND_ZP:
|
||||
{
|
||||
// Mapping between the meta and the neighbors that need checking
|
||||
Meta -= E_RAIL_ASCEND_EAST; // Base index at zero
|
||||
Meta -= E_RAIL_ASCEND_XP; // Base index at zero
|
||||
static const struct
|
||||
{
|
||||
int x, z;
|
||||
|
@ -157,12 +126,12 @@ public:
|
|||
}
|
||||
if (RailsCnt == 1)
|
||||
{
|
||||
if (Neighbors[7]) return E_RAIL_ASCEND_SOUTH;
|
||||
else if (Neighbors[6]) return E_RAIL_ASCEND_NORTH;
|
||||
else if (Neighbors[5]) return E_RAIL_ASCEND_WEST;
|
||||
else if (Neighbors[4]) return E_RAIL_ASCEND_EAST;
|
||||
else if (Neighbors[0] || Neighbors[1]) return E_RAIL_EAST_WEST;
|
||||
else if (Neighbors[2] || Neighbors[3]) return E_RAIL_NORTH_SOUTH;
|
||||
if (Neighbors[7]) return E_RAIL_ASCEND_ZP;
|
||||
else if (Neighbors[6]) return E_RAIL_ASCEND_ZM;
|
||||
else if (Neighbors[5]) return E_RAIL_ASCEND_XM;
|
||||
else if (Neighbors[4]) return E_RAIL_ASCEND_XP;
|
||||
else if (Neighbors[0] || Neighbors[1]) return E_RAIL_XM_XP;
|
||||
else if (Neighbors[2] || Neighbors[3]) return E_RAIL_ZM_ZP;
|
||||
ASSERT(!"Weird neighbor count");
|
||||
return Meta;
|
||||
}
|
||||
|
@ -175,16 +144,16 @@ public:
|
|||
}
|
||||
if (RailsCnt > 1)
|
||||
{
|
||||
if (Neighbors[3] && Neighbors[0]) return E_RAIL_CURVED_SOUTH_EAST;
|
||||
else if (Neighbors[3] && Neighbors[1]) return E_RAIL_CURVED_SOUTH_WEST;
|
||||
else if (Neighbors[2] && Neighbors[0]) return E_RAIL_CURVED_NORTH_EAST;
|
||||
else if (Neighbors[2] && Neighbors[1]) return E_RAIL_CURVED_NORTH_WEST;
|
||||
else if (Neighbors[7] && Neighbors[2]) return E_RAIL_ASCEND_SOUTH;
|
||||
else if (Neighbors[3] && Neighbors[6]) return E_RAIL_ASCEND_NORTH;
|
||||
else if (Neighbors[5] && Neighbors[0]) return E_RAIL_ASCEND_WEST;
|
||||
else if (Neighbors[4] && Neighbors[1]) return E_RAIL_ASCEND_EAST;
|
||||
else if (Neighbors[0] && Neighbors[1]) return E_RAIL_EAST_WEST;
|
||||
else if (Neighbors[2] && Neighbors[3]) return E_RAIL_NORTH_SOUTH;
|
||||
if (Neighbors[3] && Neighbors[0]) return E_RAIL_CURVED_ZP_XP;
|
||||
else if (Neighbors[3] && Neighbors[1]) return E_RAIL_CURVED_ZP_XM;
|
||||
else if (Neighbors[2] && Neighbors[0]) return E_RAIL_CURVED_ZM_XP;
|
||||
else if (Neighbors[2] && Neighbors[1]) return E_RAIL_CURVED_ZM_XM;
|
||||
else if (Neighbors[7] && Neighbors[2]) return E_RAIL_ASCEND_ZP;
|
||||
else if (Neighbors[3] && Neighbors[6]) return E_RAIL_ASCEND_ZM;
|
||||
else if (Neighbors[5] && Neighbors[0]) return E_RAIL_ASCEND_XM;
|
||||
else if (Neighbors[4] && Neighbors[1]) return E_RAIL_ASCEND_XP;
|
||||
else if (Neighbors[0] && Neighbors[1]) return E_RAIL_XM_XP;
|
||||
else if (Neighbors[2] && Neighbors[3]) return E_RAIL_ZM_ZP;
|
||||
ASSERT(!"Weird neighbor count");
|
||||
}
|
||||
return Meta;
|
||||
|
@ -200,7 +169,7 @@ public:
|
|||
NIBBLETYPE Meta = a_World->GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ);
|
||||
switch (Meta)
|
||||
{
|
||||
case E_RAIL_NORTH_SOUTH:
|
||||
case E_RAIL_ZM_ZP:
|
||||
{
|
||||
if (
|
||||
IsNotConnected(a_World, a_BlockX, a_BlockY, a_BlockZ, BLOCK_FACE_NORTH, E_PURE_DOWN) ||
|
||||
|
@ -212,7 +181,7 @@ public:
|
|||
break;
|
||||
}
|
||||
|
||||
case E_RAIL_EAST_WEST:
|
||||
case E_RAIL_XM_XP:
|
||||
{
|
||||
if (
|
||||
IsNotConnected(a_World, a_BlockX, a_BlockY, a_BlockZ, BLOCK_FACE_EAST, E_PURE_DOWN) ||
|
||||
|
@ -224,7 +193,7 @@ public:
|
|||
break;
|
||||
}
|
||||
|
||||
case E_RAIL_ASCEND_EAST:
|
||||
case E_RAIL_ASCEND_XP:
|
||||
{
|
||||
if (
|
||||
IsNotConnected(a_World, a_BlockX, a_BlockY + 1, a_BlockZ, BLOCK_FACE_EAST) ||
|
||||
|
@ -236,7 +205,7 @@ public:
|
|||
break;
|
||||
}
|
||||
|
||||
case E_RAIL_ASCEND_WEST:
|
||||
case E_RAIL_ASCEND_XM:
|
||||
{
|
||||
if (
|
||||
IsNotConnected(a_World, a_BlockX, a_BlockY, a_BlockZ, BLOCK_FACE_EAST) ||
|
||||
|
@ -248,7 +217,7 @@ public:
|
|||
break;
|
||||
}
|
||||
|
||||
case E_RAIL_ASCEND_NORTH:
|
||||
case E_RAIL_ASCEND_ZM:
|
||||
{
|
||||
if (
|
||||
IsNotConnected(a_World, a_BlockX, a_BlockY + 1, a_BlockZ, BLOCK_FACE_NORTH) ||
|
||||
|
@ -260,7 +229,7 @@ public:
|
|||
break;
|
||||
}
|
||||
|
||||
case E_RAIL_ASCEND_SOUTH:
|
||||
case E_RAIL_ASCEND_ZP:
|
||||
{
|
||||
if (
|
||||
IsNotConnected(a_World, a_BlockX, a_BlockY, a_BlockZ, BLOCK_FACE_NORTH) ||
|
||||
|
@ -272,7 +241,7 @@ public:
|
|||
break;
|
||||
}
|
||||
|
||||
case E_RAIL_CURVED_SOUTH_EAST:
|
||||
case E_RAIL_CURVED_ZP_XP:
|
||||
{
|
||||
if (
|
||||
IsNotConnected(a_World, a_BlockX, a_BlockY, a_BlockZ, BLOCK_FACE_SOUTH) ||
|
||||
|
@ -284,7 +253,7 @@ public:
|
|||
break;
|
||||
}
|
||||
|
||||
case E_RAIL_CURVED_SOUTH_WEST:
|
||||
case E_RAIL_CURVED_ZP_XM:
|
||||
{
|
||||
if (
|
||||
IsNotConnected(a_World, a_BlockX, a_BlockY, a_BlockZ, BLOCK_FACE_SOUTH) ||
|
||||
|
@ -296,7 +265,7 @@ public:
|
|||
break;
|
||||
}
|
||||
|
||||
case E_RAIL_CURVED_NORTH_WEST:
|
||||
case E_RAIL_CURVED_ZM_XM:
|
||||
{
|
||||
if (
|
||||
IsNotConnected(a_World, a_BlockX, a_BlockY, a_BlockZ, BLOCK_FACE_NORTH) ||
|
||||
|
@ -308,7 +277,7 @@ public:
|
|||
break;
|
||||
}
|
||||
|
||||
case E_RAIL_CURVED_NORTH_EAST:
|
||||
case E_RAIL_CURVED_ZM_XP:
|
||||
{
|
||||
if (
|
||||
IsNotConnected(a_World, a_BlockX, a_BlockY, a_BlockZ, BLOCK_FACE_NORTH) ||
|
||||
|
@ -356,11 +325,11 @@ public:
|
|||
case BLOCK_FACE_NORTH:
|
||||
{
|
||||
if (
|
||||
(Meta == E_RAIL_NORTH_SOUTH) ||
|
||||
(Meta == E_RAIL_ASCEND_NORTH) ||
|
||||
(Meta == E_RAIL_ASCEND_SOUTH) ||
|
||||
(Meta == E_RAIL_CURVED_SOUTH_EAST) ||
|
||||
(Meta == E_RAIL_CURVED_SOUTH_WEST)
|
||||
(Meta == E_RAIL_ZM_ZP) ||
|
||||
(Meta == E_RAIL_ASCEND_ZM) ||
|
||||
(Meta == E_RAIL_ASCEND_ZP) ||
|
||||
(Meta == E_RAIL_CURVED_ZP_XP) ||
|
||||
(Meta == E_RAIL_CURVED_ZP_XM)
|
||||
)
|
||||
{
|
||||
return false;
|
||||
|
@ -371,11 +340,11 @@ public:
|
|||
case BLOCK_FACE_SOUTH:
|
||||
{
|
||||
if (
|
||||
(Meta == E_RAIL_NORTH_SOUTH) ||
|
||||
(Meta == E_RAIL_ASCEND_NORTH) ||
|
||||
(Meta == E_RAIL_ASCEND_SOUTH) ||
|
||||
(Meta == E_RAIL_CURVED_NORTH_EAST) ||
|
||||
(Meta == E_RAIL_CURVED_NORTH_WEST)
|
||||
(Meta == E_RAIL_ZM_ZP) ||
|
||||
(Meta == E_RAIL_ASCEND_ZM) ||
|
||||
(Meta == E_RAIL_ASCEND_ZP) ||
|
||||
(Meta == E_RAIL_CURVED_ZM_XP) ||
|
||||
(Meta == E_RAIL_CURVED_ZM_XM)
|
||||
)
|
||||
{
|
||||
return false;
|
||||
|
@ -386,11 +355,11 @@ public:
|
|||
case BLOCK_FACE_EAST:
|
||||
{
|
||||
if (
|
||||
(Meta == E_RAIL_EAST_WEST) ||
|
||||
(Meta == E_RAIL_ASCEND_EAST) ||
|
||||
(Meta == E_RAIL_ASCEND_WEST) ||
|
||||
(Meta == E_RAIL_CURVED_SOUTH_WEST) ||
|
||||
(Meta == E_RAIL_CURVED_NORTH_WEST)
|
||||
(Meta == E_RAIL_XM_XP) ||
|
||||
(Meta == E_RAIL_ASCEND_XP) ||
|
||||
(Meta == E_RAIL_ASCEND_XM) ||
|
||||
(Meta == E_RAIL_CURVED_ZP_XM) ||
|
||||
(Meta == E_RAIL_CURVED_ZM_XM)
|
||||
)
|
||||
{
|
||||
return false;
|
||||
|
@ -400,11 +369,11 @@ public:
|
|||
case BLOCK_FACE_WEST:
|
||||
{
|
||||
if (
|
||||
(Meta == E_RAIL_EAST_WEST) ||
|
||||
(Meta == E_RAIL_ASCEND_EAST) ||
|
||||
(Meta == E_RAIL_ASCEND_WEST) ||
|
||||
(Meta == E_RAIL_CURVED_SOUTH_EAST) ||
|
||||
(Meta == E_RAIL_CURVED_NORTH_EAST)
|
||||
(Meta == E_RAIL_XM_XP) ||
|
||||
(Meta == E_RAIL_ASCEND_XP) ||
|
||||
(Meta == E_RAIL_ASCEND_XM) ||
|
||||
(Meta == E_RAIL_CURVED_ZP_XP) ||
|
||||
(Meta == E_RAIL_CURVED_ZM_XP)
|
||||
)
|
||||
{
|
||||
return false;
|
||||
|
|
|
@ -1901,9 +1901,9 @@ void cClientHandle::SendSpawnObject(const cEntity & a_Entity, char a_ObjectType,
|
|||
|
||||
|
||||
|
||||
void cClientHandle::SendSpawnVehicle(const cEntity & a_Vehicle, char a_VehicleType, char a_VehicleTypeType) // VehicleTypeType is specific to Minecarts
|
||||
void cClientHandle::SendSpawnVehicle(const cEntity & a_Vehicle, char a_VehicleType, char a_VehicleSubType) // VehicleTypeType is specific to Minecarts
|
||||
{
|
||||
m_Protocol->SendSpawnVehicle(a_Vehicle, a_VehicleType, a_VehicleTypeType);
|
||||
m_Protocol->SendSpawnVehicle(a_Vehicle, a_VehicleType, a_VehicleSubType);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -125,7 +125,7 @@ public:
|
|||
void SendSpawnFallingBlock (const cFallingBlock & a_FallingBlock);
|
||||
void SendSpawnMob (const cMonster & a_Mob);
|
||||
void SendSpawnObject (const cEntity & a_Entity, char a_ObjectType, int a_ObjectData, Byte a_Yaw, Byte a_Pitch);
|
||||
void SendSpawnVehicle (const cEntity & a_Vehicle, char a_VehicleType, char a_VehicleTypeType);
|
||||
void SendSpawnVehicle (const cEntity & a_Vehicle, char a_VehicleType, char a_VehicleSubType);
|
||||
void SendTabCompletionResults(const AStringVector & a_Results);
|
||||
void SendTeleportEntity (const cEntity & a_Entity);
|
||||
void SendThunderbolt (int a_BlockX, int a_BlockY, int a_BlockZ);
|
||||
|
|
|
@ -352,9 +352,6 @@ protected:
|
|||
bool m_bOnGround;
|
||||
float m_Gravity;
|
||||
|
||||
// Measured in Kilograms (Kg)
|
||||
double m_Mass;
|
||||
|
||||
// Last Position.
|
||||
double m_LastPosX, m_LastPosY, m_LastPosZ;
|
||||
|
||||
|
@ -402,6 +399,9 @@ private:
|
|||
// Measured in meter / second
|
||||
Vector3d m_WaterSpeed;
|
||||
|
||||
// Measured in Kilograms (Kg)
|
||||
double m_Mass;
|
||||
|
||||
/// Width of the entity, in the XZ plane. Since entities are represented as cylinders, this is more of a diameter.
|
||||
double m_Width;
|
||||
|
||||
|
|
|
@ -41,50 +41,32 @@ bool cMinecart::Initialize(cWorld * a_World)
|
|||
|
||||
void cMinecart::SpawnOn(cClientHandle & a_ClientHandle)
|
||||
{
|
||||
char TypeType = 0;
|
||||
char SubType = 0;
|
||||
switch (m_Payload)
|
||||
{
|
||||
case mpNone: TypeType = 0; break;
|
||||
case mpChest: TypeType = 1; break;
|
||||
case mpFurnace: TypeType = 2; break;
|
||||
case mpTNT: TypeType = 3; break;
|
||||
case mpHopper: TypeType = 5; break;
|
||||
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, TypeType); // 10 = Minecarts, TypeType = What type of Minecart
|
||||
a_ClientHandle.SendSpawnVehicle(*this, 10, SubType); // 10 = Minecarts, TypeType = What type of Minecart
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
enum ENUM_RAIL_DIRECTIONS
|
||||
{
|
||||
E_RAIL_NORTH_SOUTH = 0,
|
||||
E_RAIL_EAST_WEST = 1,
|
||||
E_RAIL_ASCEND_EAST = 2,
|
||||
E_RAIL_ASCEND_WEST = 3,
|
||||
E_RAIL_ASCEND_NORTH = 4,
|
||||
E_RAIL_ASCEND_SOUTH = 5,
|
||||
E_RAIL_CURVED_SOUTH_EAST = 6,
|
||||
E_RAIL_CURVED_SOUTH_WEST = 7,
|
||||
E_RAIL_CURVED_NORTH_WEST = 8,
|
||||
E_RAIL_CURVED_NORTH_EAST = 9,
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void cMinecart::Tick(float a_Dt, cChunk & a_Chunk)
|
||||
{
|
||||
/*
|
||||
NOTE: Please bear in mind that taking away from negatives make them even more negative,
|
||||
adding to negatives make them positive, etc. Also remember that - North is -Z, South +Z, West -X, and East +Z
|
||||
adding to negatives make them positive, etc.
|
||||
*/
|
||||
|
||||
super::Tick(a_Dt, a_Chunk);
|
||||
|
@ -101,7 +83,7 @@ void cMinecart::Tick(float a_Dt, cChunk & a_Chunk)
|
|||
switch (BelowMeta)
|
||||
{
|
||||
|
||||
case E_RAIL_NORTH_SOUTH:
|
||||
case E_RAIL_ZM_ZP:
|
||||
{
|
||||
SpeedY = 0; // Don't move vertically as on ground
|
||||
|
||||
|
@ -125,7 +107,7 @@ void cMinecart::Tick(float a_Dt, cChunk & a_Chunk)
|
|||
break;
|
||||
}
|
||||
|
||||
case E_RAIL_EAST_WEST:
|
||||
case E_RAIL_XM_XP:
|
||||
{
|
||||
SpeedY = 0;
|
||||
SetPosY(ceil(GetPosY()) + 0.05);
|
||||
|
@ -144,7 +126,7 @@ void cMinecart::Tick(float a_Dt, cChunk & a_Chunk)
|
|||
break;
|
||||
}
|
||||
|
||||
case E_RAIL_ASCEND_NORTH:
|
||||
case E_RAIL_ASCEND_ZM:
|
||||
{
|
||||
if (SpeedZ >= 0)
|
||||
{
|
||||
|
@ -169,7 +151,7 @@ void cMinecart::Tick(float a_Dt, cChunk & a_Chunk)
|
|||
break;
|
||||
}
|
||||
|
||||
case E_RAIL_ASCEND_SOUTH:
|
||||
case E_RAIL_ASCEND_ZP:
|
||||
{
|
||||
if (SpeedX > 0)
|
||||
{
|
||||
|
@ -194,7 +176,7 @@ void cMinecart::Tick(float a_Dt, cChunk & a_Chunk)
|
|||
break;
|
||||
}
|
||||
|
||||
case E_RAIL_ASCEND_WEST:
|
||||
case E_RAIL_ASCEND_XM:
|
||||
{
|
||||
if (SpeedX >= 0)
|
||||
{
|
||||
|
@ -217,7 +199,7 @@ void cMinecart::Tick(float a_Dt, cChunk & a_Chunk)
|
|||
break;
|
||||
}
|
||||
|
||||
case E_RAIL_ASCEND_EAST:
|
||||
case E_RAIL_ASCEND_XP:
|
||||
{
|
||||
if (SpeedX > 0)
|
||||
{
|
||||
|
|
|
@ -89,7 +89,7 @@ public:
|
|||
virtual void SendSpawnFallingBlock (const cFallingBlock & a_FallingBlock) = 0;
|
||||
virtual void SendSpawnMob (const cMonster & a_Mob) = 0;
|
||||
virtual void SendSpawnObject (const cEntity & a_Entity, char a_ObjectType, int a_ObjectData, Byte a_Yaw, Byte a_Pitch) = 0;
|
||||
virtual void SendSpawnVehicle (const cEntity & a_Vehicle, char a_VehicleType, char a_VehicleTypeType) = 0;
|
||||
virtual void SendSpawnVehicle (const cEntity & a_Vehicle, char a_VehicleType, char a_VehicleSubType) = 0;
|
||||
virtual void SendTabCompletionResults(const AStringVector & a_Results) = 0;
|
||||
virtual void SendTeleportEntity (const cEntity & a_Entity) = 0;
|
||||
virtual void SendThunderbolt (int a_BlockX, int a_BlockY, int a_BlockZ) = 0;
|
||||
|
|
|
@ -747,7 +747,7 @@ void cProtocol125::SendSpawnObject(const cEntity & a_Entity, char a_ObjectType,
|
|||
|
||||
|
||||
|
||||
void cProtocol125::SendSpawnVehicle(const cEntity & a_Vehicle, char a_VehicleType, char a_VehicleTypeType)
|
||||
void cProtocol125::SendSpawnVehicle(const cEntity & a_Vehicle, char a_VehicleType, char a_VehicleSubType)
|
||||
{
|
||||
cCSLock Lock(m_CSPacket);
|
||||
WriteByte (PACKET_SPAWN_OBJECT);
|
||||
|
@ -758,8 +758,8 @@ void cProtocol125::SendSpawnVehicle(const cEntity & a_Vehicle, char a_VehicleTyp
|
|||
WriteInt ((int)(a_Vehicle.GetPosZ() * 32));
|
||||
WriteByte ((Byte)((a_Vehicle.GetPitch() / 360.f) * 256));
|
||||
WriteByte ((Byte)((a_Vehicle.GetRotation() / 360.f) * 256));
|
||||
WriteInt (a_VehicleTypeType);
|
||||
if (a_VehicleTypeType != 0)
|
||||
WriteInt (a_VehicleSubType);
|
||||
if (a_VehicleSubType != 0)
|
||||
{
|
||||
WriteShort((short)(a_Vehicle.GetSpeedX() * 400));
|
||||
WriteShort((short)(a_Vehicle.GetSpeedY() * 400));
|
||||
|
|
|
@ -66,7 +66,7 @@ public:
|
|||
virtual void SendSpawnFallingBlock (const cFallingBlock & a_FallingBlock) override;
|
||||
virtual void SendSpawnMob (const cMonster & a_Mob) override;
|
||||
virtual void SendSpawnObject (const cEntity & a_Entity, char a_ObjectType, int a_ObjectData, Byte a_Yaw, Byte a_Pitch) override;
|
||||
virtual void SendSpawnVehicle (const cEntity & a_Vehicle, char a_VehicleType, char a_VehicleTypeType) override;
|
||||
virtual void SendSpawnVehicle (const cEntity & a_Vehicle, char a_VehicleType, char a_VehicleSubType) override;
|
||||
virtual void SendTabCompletionResults(const AStringVector & a_Results) override;
|
||||
virtual void SendTeleportEntity (const cEntity & a_Entity) override;
|
||||
virtual void SendThunderbolt (int a_BlockX, int a_BlockY, int a_BlockZ) override;
|
||||
|
|
|
@ -229,7 +229,7 @@ void cProtocol146::SendSpawnObject(const cEntity & a_Entity, char a_ObjectType,
|
|||
|
||||
|
||||
|
||||
void cProtocol146::SendSpawnVehicle(const cEntity & a_Vehicle, char a_VehicleType, char a_VehicleTypeType)
|
||||
void cProtocol146::SendSpawnVehicle(const cEntity & a_Vehicle, char a_VehicleType, char a_VehicleSubType)
|
||||
{
|
||||
cCSLock Lock(m_CSPacket);
|
||||
WriteByte (PACKET_SPAWN_OBJECT);
|
||||
|
@ -240,8 +240,8 @@ void cProtocol146::SendSpawnVehicle(const cEntity & a_Vehicle, char a_VehicleTyp
|
|||
WriteInt ((int)(a_Vehicle.GetPosZ() * 32));
|
||||
WriteByte ((Byte)((a_Vehicle.GetPitch() / 360.f) * 256));
|
||||
WriteByte ((Byte)((a_Vehicle.GetRotation() / 360.f) * 256));
|
||||
WriteInt (a_VehicleTypeType);
|
||||
if (a_VehicleTypeType != 0)
|
||||
WriteInt (a_VehicleSubType);
|
||||
if (a_VehicleSubType != 0)
|
||||
{
|
||||
WriteShort((short)(a_Vehicle.GetSpeedX() * 400));
|
||||
WriteShort((short)(a_Vehicle.GetSpeedY() * 400));
|
||||
|
|
|
@ -55,7 +55,7 @@ public:
|
|||
virtual void SendPickupSpawn (const cPickup & a_Pickup) override;
|
||||
virtual void SendSpawnFallingBlock(const cFallingBlock & a_FallingBlock) override;
|
||||
virtual void SendSpawnObject (const cEntity & a_Entity, char a_ObjectType, int a_ObjectData, Byte a_Yaw, Byte a_Pitch) override;
|
||||
virtual void SendSpawnVehicle (const cEntity & a_Vehicle, char a_VehicleType, char a_VehicleTypeType) override;
|
||||
virtual void SendSpawnVehicle (const cEntity & a_Vehicle, char a_VehicleType, char a_VehicleSubType) override;
|
||||
} ;
|
||||
|
||||
|
||||
|
|
|
@ -502,10 +502,10 @@ void cProtocolRecognizer::SendSpawnObject(const cEntity & a_Entity, char a_Objec
|
|||
|
||||
|
||||
|
||||
void cProtocolRecognizer::SendSpawnVehicle(const cEntity & a_Vehicle, char a_VehicleType, char a_VehicleTypeType)
|
||||
void cProtocolRecognizer::SendSpawnVehicle(const cEntity & a_Vehicle, char a_VehicleType, char a_VehicleSubType)
|
||||
{
|
||||
ASSERT(m_Protocol != NULL);
|
||||
m_Protocol->SendSpawnVehicle(a_Vehicle, a_VehicleType, a_VehicleTypeType);
|
||||
m_Protocol->SendSpawnVehicle(a_Vehicle, a_VehicleType, a_VehicleSubType);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ public:
|
|||
virtual void SendSpawnFallingBlock (const cFallingBlock & a_FallingBlock) override;
|
||||
virtual void SendSpawnMob (const cMonster & a_Mob) override;
|
||||
virtual void SendSpawnObject (const cEntity & a_Entity, char a_ObjectType, int a_ObjectData, Byte a_Yaw, Byte a_Pitch) override;
|
||||
virtual void SendSpawnVehicle (const cEntity & a_Vehicle, char a_VehicleType, char a_VehicleTypeType) override;
|
||||
virtual void SendSpawnVehicle (const cEntity & a_Vehicle, char a_VehicleType, char a_VehicleSubType) override;
|
||||
virtual void SendTabCompletionResults(const AStringVector & a_Results) override;
|
||||
virtual void SendTeleportEntity (const cEntity & a_Entity) override;
|
||||
virtual void SendThunderbolt (int a_BlockX, int a_BlockY, int a_BlockZ) override;
|
||||
|
|
Loading…
Reference in New Issue