1
0

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
This commit is contained in:
faketruth
2011-10-31 00:52:20 +00:00
parent 940d36d8a1
commit e2f1cf51c7
42 changed files with 418 additions and 206 deletions

View File

@@ -130,7 +130,7 @@ void cPickup::Tick(float a_Dt)
MoveToCorrectChunk();
m_bReplicated = true;
m_bDirtyPosition = false;
cChunk* Chunk = cRoot::Get()->GetWorld()->GetChunkUnreliable( m_ChunkX, m_ChunkY, m_ChunkZ );
cChunk* Chunk = GetWorld()->GetChunkUnreliable( m_ChunkX, m_ChunkY, m_ChunkZ );
if( Chunk )
{
cPacket_TeleportEntity TeleportEntity( this );
@@ -145,7 +145,7 @@ void cPickup::HandlePhysics(float a_Dt)
{
if( m_bOnGround ) // check if it's still on the ground
{
cWorld* World = cRoot::Get()->GetWorld();
cWorld* World = GetWorld();
int BlockX = (int)m_Pos->x;
if( m_Pos->x < 0 ) BlockX--;
int BlockZ = (int)m_Pos->z;
@@ -172,7 +172,7 @@ void cPickup::HandlePhysics(float a_Dt)
float Gravity = -9.81f*a_Dt;
m_Speed->y += Gravity;
cTracer Tracer( cRoot::Get()->GetWorld() );
cTracer Tracer( GetWorld() );
int Ret = Tracer.Trace( *m_Pos, *m_Speed, 2 );
if( Ret ) // Oh noez! we hit something
{