Example #1
0
 public synchronized void sendClientData(String name, ObjectOutputStream out) throws IOException {
   for (ClientData cd : clientList)
     if (cd.getName().equals(name)) {
       out.writeObject(cd);
       return;
     }
 }
Example #2
0
  public void set(ClientData cd) {
    // System.out.println(cd);
    if (cd.left()) toggleRotate(-1);
    else if (cd.right()) toggleRotate(1);
    else toggleRotate(0);
    if (cd.forward()) toggleMove(1);
    else if (cd.backward()) toggleMove(-1);
    else toggleMove(0);
    // if(cd.mouseLoc()!=null)//i have no idea why this is null sometimes, but this works
    //	{
    if (cd.shoot()) shoot(cd.mouseLoc());
    else if (cd.specialShoot()) specialShoot(cd.mouseLoc());
    lookAt(cd.mouseLoc());
    //	}

  }