From e2f1cf51c759f0c70bc1dc9f1db3a8575e1db10f Mon Sep 17 00:00:00 2001 From: faketruth Date: Mon, 31 Oct 2011 00:52:20 +0000 Subject: Prepared some parts of the code for multi world support, I created lots of TODO's git-svn-id: http://mc-server.googlecode.com/svn/trunk@29 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cWorld.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/cWorld.cpp') diff --git a/source/cWorld.cpp b/source/cWorld.cpp index c5dfc683e..29115d15e 100644 --- a/source/cWorld.cpp +++ b/source/cWorld.cpp @@ -179,7 +179,7 @@ cWorld::cWorld() m_SpawnMonsterRate = (float)IniFile2.GetValueF("Monsters", "AnimalSpawnInterval", 10 ); } - m_ChunkMap = new cChunkMap( 32, 32 ); + m_ChunkMap = new cChunkMap( 32, 32, this ); m_Time = 0; m_WorldTimeFraction = 0.f; @@ -388,7 +388,7 @@ void cWorld::Tick(float a_Dt) if( Monster ) { - Monster->Initialize(); + Monster->Initialize( this ); Monster->TeleportTo( SpawnPos.x, (double)(Height)+2, SpawnPos.z ); Monster->SpawnOn( 0 ); } @@ -475,7 +475,7 @@ cChunk* cWorld::GetChunk( int a_X, int a_Y, int a_Z ) } // Found nothing, create a chunk - Chunk = new cChunk( a_X, a_Y, a_Z ); + Chunk = new cChunk( a_X, a_Y, a_Z, this ); if(Chunk) { LOGWARN("Created new chunk! %i %i", a_X, a_Z); @@ -570,7 +570,7 @@ bool cWorld::DigBlock( int a_X, int a_Y, int a_Z, cItem & a_PickupItem ) if( !a_PickupItem.IsEmpty() ) { cPickup* Pickup = new cPickup( a_X*32 + 16 + (int)fRadRand(16.f), a_Y*32 + 16 + (int)fRadRand(16.f), a_Z*32 + 16 + (int)fRadRand(16.f), a_PickupItem ); - Pickup->Initialize(); + Pickup->Initialize( this ); } } -- cgit v1.2.3