Hotfix for #83.

Do not tick the player while their chunk is invalid.
master
madmaxoft 2013-08-20 21:17:33 +02:00
parent 654c34705c
commit e8f7b72f1b
1 changed files with 6 additions and 0 deletions

View File

@ -200,6 +200,12 @@ void cPlayer::Tick(float a_Dt, cChunk & a_Chunk)
} }
} }
if (!a_Chunk.IsValid())
{
// This may happen if the cPlayer is created before the chunks have the chance of being loaded / generated (#83)
return;
}
super::Tick(a_Dt, a_Chunk); super::Tick(a_Dt, a_Chunk);
// Set player swimming state // Set player swimming state