Rewritten entities so that they are owned by individual chunks and ticked within their chunk's Tick()

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1385 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com
2013-04-13 21:02:10 +00:00
parent 58fb05980d
commit a49c004278
49 changed files with 691 additions and 582 deletions
+6 -4
View File
@@ -288,11 +288,11 @@ void cPawn::TeleportTo(double a_PosX, double a_PosY, double a_PosZ)
void cPawn::Tick(float a_Dt, MTRand & a_TickRandom)
void cPawn::Tick(float a_Dt, cChunk & a_Chunk)
{
CheckMetaDataBurn(); // Check to see if pawn should burn based on block they are on
CheckMetaDataBurn(a_Chunk); // Check to see if pawn should burn based on block they are on
if (GetMetaData() == BURNING)
if (IsBurning())
{
InStateBurning(a_Dt);
}
@@ -315,8 +315,10 @@ void cPawn::SetMetaData(MetaData a_MetaData)
//----Change Entity MetaData
void cPawn::CheckMetaDataBurn(void)
void cPawn::CheckMetaDataBurn(cChunk & a_Chunk)
{
// TODO: Rewrite this function to use a_Chunk instead of m_World
if ((GetPosY() < 1) || (GetPosY() >= 254))
{
// Y coord out of range