void ClientSocket::sendState() { Unit* p = g.player; DataWriter w; w.writeByte(CLI_STATE); w.writeInt(p->movex); w.writeInt(p->movey); w.writeDouble(p->d); w.writeByte(p->shooting); w.writeInt(g.weapon); conn.write(w); }