summaryrefslogtreecommitdiffstats
path: root/source/cWorld.cpp
diff options
context:
space:
mode:
authorfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-10-31 01:52:20 +0100
committerfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-10-31 01:52:20 +0100
commite2f1cf51c759f0c70bc1dc9f1db3a8575e1db10f (patch)
tree2519b9736038f7d5374719122b4ba7937d2e309c /source/cWorld.cpp
parentput the timer and quicksort functions into their own files. Made a few changes to the converter. Converter doesn't understand Entity tags and some chunks cause it to segfault for a currently unknown reason. (diff)
downloadcuberite-e2f1cf51c759f0c70bc1dc9f1db3a8575e1db10f.tar
cuberite-e2f1cf51c759f0c70bc1dc9f1db3a8575e1db10f.tar.gz
cuberite-e2f1cf51c759f0c70bc1dc9f1db3a8575e1db10f.tar.bz2
cuberite-e2f1cf51c759f0c70bc1dc9f1db3a8575e1db10f.tar.lz
cuberite-e2f1cf51c759f0c70bc1dc9f1db3a8575e1db10f.tar.xz
cuberite-e2f1cf51c759f0c70bc1dc9f1db3a8575e1db10f.tar.zst
cuberite-e2f1cf51c759f0c70bc1dc9f1db3a8575e1db10f.zip
Diffstat (limited to 'source/cWorld.cpp')
-rw-r--r--source/cWorld.cpp8
1 files changed, 4 insertions, 4 deletions
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 );
}
}