Fixed data length issues
This commit is contained in:
parent
124fc8bc66
commit
a2fb28dd08
@ -939,7 +939,7 @@ void cClientHandle::HandleRightClick(int a_BlockX, int a_BlockY, int a_BlockZ, e
|
|||||||
|
|
||||||
if (!CheckBlockInteractionsRate())
|
if (!CheckBlockInteractionsRate())
|
||||||
{
|
{
|
||||||
Kick("Too many blocks were destroyed per unit time - hacked client?");
|
Kick("Too many blocks were placed/interacted with per unit time - hacked client?");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,7 +89,8 @@ void cFireworkItem::ParseFromNBT(cFireworkItem & a_FireworkItem, const cParsedNB
|
|||||||
|
|
||||||
if (ExplosionName == "Colors")
|
if (ExplosionName == "Colors")
|
||||||
{
|
{
|
||||||
int DataLength = a_NBT.GetDataLength(explosiontag);
|
// Divide by four as data length returned in bytes
|
||||||
|
int DataLength = a_NBT.GetDataLength(explosiontag) / 4;
|
||||||
if (DataLength == 0)
|
if (DataLength == 0)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
@ -103,7 +104,7 @@ void cFireworkItem::ParseFromNBT(cFireworkItem & a_FireworkItem, const cParsedNB
|
|||||||
}
|
}
|
||||||
else if (ExplosionName == "FadeColors")
|
else if (ExplosionName == "FadeColors")
|
||||||
{
|
{
|
||||||
int DataLength = a_NBT.GetDataLength(explosiontag);
|
int DataLength = a_NBT.GetDataLength(explosiontag) / 4;
|
||||||
if (DataLength == 0)
|
if (DataLength == 0)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user