Beispiel #1
0
void ClientPage::PositionChanged(const Renderable& r)
{
    Packet p;
    p.write(PacketType::set_entity_position);
    p.write(r.getID());
    p.write(r.getPosition());
    sendUdpPacket(p);
}
Beispiel #2
0
void ClosestHud::check(const Renderable& r, Vector pos)
{
    double dist = (pos - r.getPosition()).magnitudeSquared();
    if (m_dDistSquared > dist || !m_bValid) {
        m_dDistSquared = dist;
        m_bValid = true;
        m_vecPos = r.getPosition();
        m_ID = r.getID();
    }
}