1
0

Fixed double to float conversions.

This commit is contained in:
madmaxoft 2014-03-16 22:00:28 +01:00
parent 260d13c7a4
commit 89027cb675
4 changed files with 57 additions and 56 deletions

View File

@ -219,7 +219,7 @@ bool cHopperEntity::MovePickupsIn(cChunk & a_Chunk, Int64 a_CurrentTick)
Vector3f EntityPos = a_Entity->GetPosition();
Vector3f BlockPos(m_Pos.x + 0.5f, (float)m_Pos.y + 1, m_Pos.z + 0.5f); // One block above hopper, and search from center outwards
float Distance = (EntityPos - BlockPos).Length();
double Distance = (EntityPos - BlockPos).Length();
if (Distance < 0.5)
{

View File

@ -1794,12 +1794,13 @@ void cChunkMap::DoExplosionAt(double a_ExplosionSize, double a_BlockX, double a_
case E_BLOCK_TNT:
{
// Activate the TNT, with a random fuse between 10 to 30 game ticks
double FuseTime = (double)(10 + m_World->GetTickRandomNumber(20)) / 20;
int FuseTime = 10 + m_World->GetTickRandomNumber(20);
m_World->SpawnPrimedTNT(a_BlockX + x + 0.5, a_BlockY + y + 0.5, a_BlockZ + z + 0.5, FuseTime);
area.SetBlockType(bx + x, by + y, bz + z, E_BLOCK_AIR);
a_BlocksAffected.push_back(Vector3i(bx + x, by + y, bz + z));
break;
}
case E_BLOCK_OBSIDIAN:
case E_BLOCK_BEDROCK:
case E_BLOCK_WATER:

View File

@ -82,11 +82,11 @@ cMonster::cMonster(const AString & a_ConfigName, eType a_MobType, const AString
, m_AttackRange(2)
, m_AttackInterval(0)
, m_SightDistance(25)
, m_DropChanceWeapon(0.085)
, m_DropChanceHelmet(0.085)
, m_DropChanceChestplate(0.085)
, m_DropChanceLeggings(0.085)
, m_DropChanceBoots(0.085)
, m_DropChanceWeapon(0.085f)
, m_DropChanceHelmet(0.085f)
, m_DropChanceChestplate(0.085f)
, m_DropChanceLeggings(0.085f)
, m_DropChanceBoots(0.085f)
, m_CanPickUpLoot(true)
, m_BurnsInDaylight(false)
{

View File

@ -1062,7 +1062,7 @@ void cIncrementalRedstoneSimulator::HandlePressurePlate(int a_BlockX, int a_Bloc
{
Vector3f EntityPos = a_Entity->GetPosition();
Vector3f BlockPos(m_X + 0.5f, (float)m_Y, m_Z + 0.5f);
float Distance = (EntityPos - BlockPos).Length();
double Distance = (EntityPos - BlockPos).Length();
if (Distance <= 0.7)
{