Fixed compilation error

This commit is contained in:
Dander7BD 2014-02-12 12:11:23 +01:00
parent d21a03f621
commit 134994447f
2 changed files with 8 additions and 4 deletions

View File

@ -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
{

View File

@ -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);
}
}