diff --git a/Code/Game/GameClient/GameClientState/GameState.cpp b/Code/Game/GameClient/GameClientState/GameState.cpp index 7118191e..3576ae65 100644 --- a/Code/Game/GameClient/GameClientState/GameState.cpp +++ b/Code/Game/GameClient/GameClientState/GameState.cpp @@ -146,7 +146,8 @@ bool GameState::Render() auto dynamicObject = this->privData->dynamicObjects->begin(); for( ; dynamicObject != this->privData->dynamicObjects->end(); ++dynamicObject ) { - dynamicObject->second->Render(); + if( dynamicObject->second ) + dynamicObject->second->Render(); } Oyster::Graphics::API::EndFrame(); @@ -366,8 +367,11 @@ void GameState::DataRecieved( NetEventprivData->dynamicObjects)[decoded.object_ID]; - object->setPos( position ); - object->setRot( rotation ); + if( object ) + { + object->setPos( position ); + object->setRot( rotation ); + } } break; case protocol_Gameplay_ObjectEnabled: break; /** @todo TODO: implement */ diff --git a/Code/Game/GameClient/GameClientState/NetLoadState.cpp b/Code/Game/GameClient/GameClientState/NetLoadState.cpp index d120cac2..9a88072c 100644 --- a/Code/Game/GameClient/GameClientState/NetLoadState.cpp +++ b/Code/Game/GameClient/GameClientState/NetLoadState.cpp @@ -101,13 +101,17 @@ void NetLoadState::DataRecieved( NetEventChangeState( ClientState_Game ); this->privData->loading = false; } + else + { // HACK: Debug trap + const char *breakPoint = "Being greedy."; + } } void NetLoadState::LoadGame( const ::std::string &fileName ) { this->privData->loading = true; - LevelLoader loader; + LevelLoader loader( "..\\Content\\Worlds\\" ); auto objects = loader.LoadLevel( fileName ); auto object = objects.begin(); ObjectTypeHeader *oth;