GameClient - fixed render RB

This commit is contained in:
lindaandersson 2014-02-19 13:41:05 +01:00
parent d6d45392d3
commit 3fe0221342
1 changed files with 12 additions and 9 deletions

View File

@ -122,7 +122,7 @@ void GameState::InitiatePlayer( int id, const std::string &modelName, const floa
RBInitData RBData; RBInitData RBData;
RBData.position = position; RBData.position = position;
RBData.rotation = ArrayToQuaternion( rotation ); RBData.rotation = ArrayToQuaternion( rotation );
RBData.scale = Float3( 1 ); RBData.scale = scale;
// !RB DEBUG // !RB DEBUG
if( isMyPlayer ) if( isMyPlayer )
{ {
@ -215,6 +215,8 @@ bool GameState::Render()
dynamicObject = this->privData->dynamicObjects->begin(); dynamicObject = this->privData->dynamicObjects->begin();
for( ; dynamicObject != this->privData->dynamicObjects->end(); ++dynamicObject ) for( ; dynamicObject != this->privData->dynamicObjects->end(); ++dynamicObject )
{
if( dynamicObject->second )
{ {
if( dynamicObject->second->getBRtype() == RB_Type_Cube) if( dynamicObject->second->getBRtype() == RB_Type_Cube)
{ {
@ -226,6 +228,7 @@ bool GameState::Render()
} }
} }
} }
}
// !RB DEBUG // !RB DEBUG
Oyster::Graphics::API::EndFrame(); Oyster::Graphics::API::EndFrame();
@ -479,8 +482,8 @@ const GameClientState::NetEvent & GameState::DataRecieved( const GameClientState
// if is this player. Remember to change camera // if is this player. Remember to change camera
if( this->privData->myId == decoded.object_ID ) if( this->privData->myId == decoded.object_ID )
{ {
//this->privData->camera.SetPosition( position ); this->privData->camera.SetPosition( position );
//this->privData->camera.SetRotation( rotation ); this->privData->camera.SetRotation( rotation );
this->privData->player.setPos( position ); this->privData->player.setPos( position );
//this->privData->player.setRot( rotation ); //this->privData->player.setRot( rotation );
} }