[General] Get rid Z axis in direction.pos

pull/249/merge
Koncord 8 years ago
parent a847d46984
commit dded330cc4

@ -27,12 +27,19 @@ void PacketPlayerPosition::Packet(RakNet::BitStream *bs, bool send)
}
RW(rot[0], send, 1);
RW(rot[1], send, 1);
RW(player->position.pos, send, 1);
RW(player->direction.pos[0], send, 1);
RW(player->direction.pos[1], send, 1);
if(!send)
{
player->position.rot[0] = rot[0] / 0.1f;
player->position.rot[2] = rot[1] / 0.1f;
}
RW(player->position.pos, send, 1);
RW(player->direction.pos, send, 1);
if(abs(player->direction.pos[0]) < 1)
player->direction.pos[0] = 0;
if(abs(player->direction.pos[1]) < 1)
player->direction.pos[1] = 0;
}
}

Loading…
Cancel
Save