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();
|
auto dynamicObject = this->privData->dynamicObjects->begin();
|
||||||
for( ; dynamicObject != this->privData->dynamicObjects->end(); ++dynamicObject )
|
for( ; dynamicObject != this->privData->dynamicObjects->end(); ++dynamicObject )
|
||||||
{
|
{
|
||||||
dynamicObject->second->Render();
|
if( dynamicObject->second )
|
||||||
|
dynamicObject->second->Render();
|
||||||
}
|
}
|
||||||
|
|
||||||
Oyster::Graphics::API::EndFrame();
|
Oyster::Graphics::API::EndFrame();
|
||||||
|
@ -366,8 +367,11 @@ void GameState::DataRecieved( NetEvent<NetworkClient*, NetworkClient::ClientEven
|
||||||
}
|
}
|
||||||
|
|
||||||
C_DynamicObj *object = (*this->privData->dynamicObjects)[decoded.object_ID];
|
C_DynamicObj *object = (*this->privData->dynamicObjects)[decoded.object_ID];
|
||||||
object->setPos( position );
|
if( object )
|
||||||
object->setRot( rotation );
|
{
|
||||||
|
object->setPos( position );
|
||||||
|
object->setRot( rotation );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case protocol_Gameplay_ObjectEnabled: break; /** @todo TODO: implement */
|
case protocol_Gameplay_ObjectEnabled: break; /** @todo TODO: implement */
|
||||||
|
|
|
@ -101,13 +101,17 @@ void NetLoadState::DataRecieved( NetEvent<NetworkClient*, NetworkClient::ClientE
|
||||||
this->ChangeState( ClientState_Game );
|
this->ChangeState( ClientState_Game );
|
||||||
this->privData->loading = false;
|
this->privData->loading = false;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{ // HACK: Debug trap
|
||||||
|
const char *breakPoint = "Being greedy.";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void NetLoadState::LoadGame( const ::std::string &fileName )
|
void NetLoadState::LoadGame( const ::std::string &fileName )
|
||||||
{
|
{
|
||||||
this->privData->loading = true;
|
this->privData->loading = true;
|
||||||
|
|
||||||
LevelLoader loader;
|
LevelLoader loader( "..\\Content\\Worlds\\" );
|
||||||
auto objects = loader.LoadLevel( fileName );
|
auto objects = loader.LoadLevel( fileName );
|
||||||
auto object = objects.begin();
|
auto object = objects.begin();
|
||||||
ObjectTypeHeader *oth;
|
ObjectTypeHeader *oth;
|
||||||
|
|
Loading…
Reference in New Issue