Fixed minor warnings.
This commit is contained in:
parent
b66722f735
commit
eabb88eb74
@ -19,7 +19,6 @@ void cMobCensus::CollectMob(cMonster & a_Monster, cChunk & a_Chunk, double a_Dis
|
|||||||
|
|
||||||
bool cMobCensus::IsCapped(cMonster::eFamily a_MobFamily)
|
bool cMobCensus::IsCapped(cMonster::eFamily a_MobFamily)
|
||||||
{
|
{
|
||||||
bool toReturn = true;
|
|
||||||
const int ratio = 319; // this should be 256 as we are only supposed to take account from chunks that are in 17x17 from a player
|
const int ratio = 319; // this should be 256 as we are only supposed to take account from chunks that are in 17x17 from a player
|
||||||
// but for now, we use all chunks loaded by players. that means 19 x 19 chunks. That's why we use 256 * (19*19) / (17*17) = 319
|
// but for now, we use all chunks loaded by players. that means 19 x 19 chunks. That's why we use 256 * (19*19) / (17*17) = 319
|
||||||
// MG TODO : code the correct count
|
// MG TODO : code the correct count
|
||||||
@ -42,9 +41,12 @@ int cMobCensus::GetCapMultiplier(cMonster::eFamily a_MobFamily)
|
|||||||
case cMonster::mfPassive: return 11;
|
case cMonster::mfPassive: return 11;
|
||||||
case cMonster::mfAmbient: return 16;
|
case cMonster::mfAmbient: return 16;
|
||||||
case cMonster::mfWater: return 5;
|
case cMonster::mfWater: return 5;
|
||||||
}
|
default:
|
||||||
|
{
|
||||||
ASSERT(!"Unhandled mob family");
|
ASSERT(!"Unhandled mob family");
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -188,7 +188,7 @@ void cProtocol132::DataReceived(const char * a_Data, int a_Size)
|
|||||||
byte Decrypted[512];
|
byte Decrypted[512];
|
||||||
while (a_Size > 0)
|
while (a_Size > 0)
|
||||||
{
|
{
|
||||||
int NumBytes = (a_Size > sizeof(Decrypted)) ? sizeof(Decrypted) : a_Size;
|
int NumBytes = (a_Size > (int)sizeof(Decrypted)) ? (int)sizeof(Decrypted) : a_Size;
|
||||||
m_Decryptor.ProcessData(Decrypted, (byte *)a_Data, NumBytes);
|
m_Decryptor.ProcessData(Decrypted, (byte *)a_Data, NumBytes);
|
||||||
super::DataReceived((const char *)Decrypted, NumBytes);
|
super::DataReceived((const char *)Decrypted, NumBytes);
|
||||||
a_Size -= NumBytes;
|
a_Size -= NumBytes;
|
||||||
@ -705,7 +705,7 @@ void cProtocol132::Flush(void)
|
|||||||
byte Encrypted[8192]; // Larger buffer, we may be sending lots of data (chunks)
|
byte Encrypted[8192]; // Larger buffer, we may be sending lots of data (chunks)
|
||||||
while (a_Size > 0)
|
while (a_Size > 0)
|
||||||
{
|
{
|
||||||
int NumBytes = (a_Size > sizeof(Encrypted)) ? sizeof(Encrypted) : a_Size;
|
int NumBytes = (a_Size > (int)sizeof(Encrypted)) ? (int)sizeof(Encrypted) : a_Size;
|
||||||
m_Encryptor.ProcessData(Encrypted, (byte *)a_Data, NumBytes);
|
m_Encryptor.ProcessData(Encrypted, (byte *)a_Data, NumBytes);
|
||||||
super::SendData((const char *)Encrypted, NumBytes);
|
super::SendData((const char *)Encrypted, NumBytes);
|
||||||
a_Size -= NumBytes;
|
a_Size -= NumBytes;
|
||||||
|
Loading…
Reference in New Issue
Block a user