diff --git a/Code/Game/GameProtocols/ObjectProtocols.h b/Code/Game/GameProtocols/ObjectProtocols.h index 1baf2654..70e24883 100644 --- a/Code/Game/GameProtocols/ObjectProtocols.h +++ b/Code/Game/GameProtocols/ObjectProtocols.h @@ -478,7 +478,7 @@ namespace GameLogic { /** @todo TODO: not implemented */ } - Protocol_ObjectCreate(float p[3], float r[4], int id, char *path) + Protocol_ObjectCreate(float p[3], float r[4], float s[3], int id, char *path) { this->protocol[0].value = protocol_Gameplay_ObjectCreate; this->protocol[0].type = Oyster::Network::NetAttributeType_Int; @@ -502,8 +502,9 @@ namespace GameLogic object_ID = id; this->name = path; - memset(this->position, 0, sizeof(float) * 3); - memset(this->rotationQ, 0, sizeof(float) * 4); + memcpy(this->position, p, sizeof(float) * 3); + memcpy(this->rotationQ, r, sizeof(float) * 4); + memcpy(this->scale, s, sizeof(float) * 3); } Oyster::Network::CustomNetProtocol GetProtocol() override { diff --git a/Code/Game/GameServer/Implementation/GameSession_General.cpp b/Code/Game/GameServer/Implementation/GameSession_General.cpp index f76428d8..cc15b9c1 100644 --- a/Code/Game/GameServer/Implementation/GameSession_General.cpp +++ b/Code/Game/GameServer/Implementation/GameSession_General.cpp @@ -157,7 +157,10 @@ namespace DanBias if((this->clients[k] && readyList[i]) && readyList[i]->GetClient()->GetID() != this->clients[k]->GetClient()->GetID()) { //Protocol_ObjectCreatePlayer - Protocol_ObjectCreate p(this->clients[k]->GetPlayer()->GetOrientation(), this->clients[k]->GetPlayer()->GetID(), "char_white.dan"); //The model name will be custom later.. + Protocol_ObjectCreate p( this->clients[k]->GetPlayer()->GetPosition(), + this->clients[k]->GetPlayer()->GetRotation(), + this->clients[k]->GetPlayer()->GetScale(), + this->clients[k]->GetPlayer()->GetID(), "char_white.dan"); //The model name will be custom later.. readyList[i]->GetClient()->Send(p); } }