1
0

Suggestions

This commit is contained in:
Tiger Wang 2014-07-04 17:42:40 +01:00
parent f4e3c01a71
commit 79e558be34
7 changed files with 20 additions and 11 deletions

View File

@ -22,7 +22,7 @@ void cThrownEggEntity::OnHitSolidBlock(const Vector3d & a_HitPos, eBlockFace a_H
{ {
TrySpawnChicken(a_HitPos); TrySpawnChicken(a_HitPos);
m_DestroyTimer = 5; m_DestroyTimer = 2;
} }

View File

@ -41,7 +41,10 @@ protected:
return; return;
} }
} }
else { super::Tick(a_Dt, a_Chunk); } else
{
super::Tick(a_Dt, a_Chunk);
}
} }
// Randomly decides whether to spawn a chicken where the egg lands. // Randomly decides whether to spawn a chicken where the egg lands.

View File

@ -22,7 +22,7 @@ void cThrownEnderPearlEntity::OnHitSolidBlock(const Vector3d & a_HitPos, eBlockF
// TODO: Tweak a_HitPos based on block face. // TODO: Tweak a_HitPos based on block face.
TeleportCreator(a_HitPos); TeleportCreator(a_HitPos);
m_DestroyTimer = 5; m_DestroyTimer = 2;
} }

View File

@ -41,7 +41,10 @@ protected:
return; return;
} }
} }
else { super::Tick(a_Dt, a_Chunk); } else
{
super::Tick(a_Dt, a_Chunk);
}
} }
/** Teleports the creator where the ender pearl lands */ /** Teleports the creator where the ender pearl lands */

View File

@ -20,7 +20,7 @@ cThrownSnowballEntity::cThrownSnowballEntity(cEntity * a_Creator, double a_X, do
void cThrownSnowballEntity::OnHitSolidBlock(const Vector3d & a_HitPos, eBlockFace a_HitFace) void cThrownSnowballEntity::OnHitSolidBlock(const Vector3d & a_HitPos, eBlockFace a_HitFace)
{ {
m_DestroyTimer = 5; m_DestroyTimer = 2;
} }

View File

@ -41,7 +41,10 @@ protected:
return; return;
} }
} }
else { super::Tick(a_Dt, a_Chunk); } else
{
super::Tick(a_Dt, a_Chunk);
}
} }
private: private:

View File

@ -135,12 +135,12 @@ public:
} }
/** Runs each value of the vector through std::floor() */ /** Runs each value of the vector through std::floor() */
inline Vector3<T> Floor(void) const inline Vector3<int> Floor(void) const
{ {
return Vector3<T>( return Vector3i(
(T)floor(x), (int)floor(x),
(T)floor(y), (int)floor(y),
(T)floor(z) (int)floor(z)
); );
} }