1
0

Small style changes

This commit is contained in:
jfhumann 2014-04-18 22:20:24 +02:00
parent 67344a3782
commit fde1555352
4 changed files with 9 additions and 9 deletions

View File

@ -684,7 +684,7 @@ void cMineShaftCorridor::ProcessChunk(cChunkDesc & a_ChunkDesc)
} }
if ((z2 >= 0) && (z2 < cChunkDef::Width)) if ((z2 >= 0) && (z2 < cChunkDef::Width))
{ {
a_ChunkDesc.SetBlockTypeMeta(x, y1, z2, E_BLOCK_FENCE, 0); //-V525 a_ChunkDesc.SetBlockTypeMeta(x, y1, z2, E_BLOCK_FENCE, 0);
a_ChunkDesc.SetBlockTypeMeta(x, y2, z2, E_BLOCK_FENCE, 0); a_ChunkDesc.SetBlockTypeMeta(x, y2, z2, E_BLOCK_FENCE, 0);
a_ChunkDesc.SetBlockTypeMeta(x, y3, z2, E_BLOCK_PLANKS, 0); a_ChunkDesc.SetBlockTypeMeta(x, y3, z2, E_BLOCK_PLANKS, 0);
} }

View File

@ -805,7 +805,7 @@ void cProtocol132::SendEncryptionKeyRequest(void)
WriteByte(0xfd); WriteByte(0xfd);
WriteString(Server->GetServerID()); WriteString(Server->GetServerID());
const AString & PublicKeyDER = Server->GetPublicKeyDER(); const AString & PublicKeyDER = Server->GetPublicKeyDER();
WriteShort((short) (PublicKeyDER.size())); WriteShort((short)(PublicKeyDER.size()));
SendData(PublicKeyDER.data(), PublicKeyDER.size()); SendData(PublicKeyDER.data(), PublicKeyDER.size());
WriteShort(4); WriteShort(4);
WriteInt((int)(intptr_t)this); // Using 'this' as the cryptographic nonce, so that we don't have to generate one each time :) WriteInt((int)(intptr_t)this); // Using 'this' as the cryptographic nonce, so that we don't have to generate one each time :)
@ -881,7 +881,7 @@ void cProtocol132::StartEncryption(const Byte * a_Key)
AString ServerID = Server->GetServerID(); AString ServerID = Server->GetServerID();
Checksum.Update((const Byte *)ServerID.c_str(), ServerID.length()); Checksum.Update((const Byte *)ServerID.c_str(), ServerID.length());
Checksum.Update(a_Key, 16); Checksum.Update(a_Key, 16);
Checksum.Update((const Byte *) Server->GetPublicKeyDER().data(), Server->GetPublicKeyDER().size()); Checksum.Update((const Byte *)Server->GetPublicKeyDER().data(), Server->GetPublicKeyDER().size());
Byte Digest[20]; Byte Digest[20];
Checksum.Finalize(Digest); Checksum.Finalize(Digest);
cSHA1Checksum::DigestToJava(Digest, m_AuthServerID); cSHA1Checksum::DigestToJava(Digest, m_AuthServerID);

View File

@ -103,9 +103,9 @@ void cProtocol142::SendPickupSpawn(const cPickup & a_Pickup)
WriteInt (a_Pickup.GetUniqueID()); WriteInt (a_Pickup.GetUniqueID());
WriteItem (a_Pickup.GetItem()); WriteItem (a_Pickup.GetItem());
WriteVectorI((Vector3i)(a_Pickup.GetPosition() * 32)); WriteVectorI((Vector3i)(a_Pickup.GetPosition() * 32));
WriteChar((char) (a_Pickup.GetSpeedX() * 8)); WriteChar((char)(a_Pickup.GetSpeedX() * 8));
WriteChar((char) (a_Pickup.GetSpeedY() * 8)); WriteChar((char)(a_Pickup.GetSpeedY() * 8));
WriteChar((char) (a_Pickup.GetSpeedZ() * 8)); WriteChar((char)(a_Pickup.GetSpeedZ() * 8));
Flush(); Flush();
} }
@ -171,8 +171,8 @@ void cProtocol146::SendPickupSpawn(const cPickup & a_Pickup)
WriteInt ((int)(a_Pickup.GetPosZ() * 32)); WriteInt ((int)(a_Pickup.GetPosZ() * 32));
WriteInt (1); WriteInt (1);
WriteShort((short)(a_Pickup.GetSpeedX() * 32)); WriteShort((short)(a_Pickup.GetSpeedX() * 32));
WriteShort((short) (a_Pickup.GetSpeedY() * 32)); WriteShort((short)(a_Pickup.GetSpeedY() * 32));
WriteShort((short) (a_Pickup.GetSpeedZ() * 32)); WriteShort((short)(a_Pickup.GetSpeedZ() * 32));
WriteByte(0); WriteByte(0);
WriteByte(0); WriteByte(0);