Fixes and bugtraps
This commit is contained in:
parent
3218e7b847
commit
996f660990
|
@ -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( NetEvent<NetworkClient*, NetworkClient::ClientEven
|
|||
}
|
||||
|
||||
C_DynamicObj *object = (*this->privData->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 */
|
||||
|
|
|
@ -101,13 +101,17 @@ void NetLoadState::DataRecieved( NetEvent<NetworkClient*, NetworkClient::ClientE
|
|||
this->ChangeState( 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;
|
||||
|
|
Loading…
Reference in New Issue