Answer the question
In order to leave comments, you need to log in
How to properly generate an economical player data package?
typedef struct
{
int id;
std::string name;
float pos[3];
float eye[3];
} PacketMultiPlayer;
PacketMultiPlayer serverMuPacket[10];
//вот так отсылает сервер -> клиенту
send(sock,(char*)serverMuPacket,sizeof(serverMuPacket),0);
for(int np = 0; np < 11; np++)
{
if(serverMuPacket[np].name != name && serverMuPacket[np].id != 0 && serverMuPacket[np].name != "")
{
//устанавливаю позицию и поворот на клиенте
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question