Package com.flansmod.common.network

Examples of com.flansmod.common.network.PacketPlaneControl


    }
   
    //Calculate movement on the client and then send position, rotation etc to the server
    if(thePlayerIsDrivingThis)
    {
      FlansMod.getPacketHandler().sendToServer(new PacketPlaneControl(this));
      serverPosX = posX;
      serverPosY = posY;
      serverPosZ = posZ;
      serverYaw = axes.getYaw();
    }
   
    //If this is the server, send position updates to everyone, having received them from the driver
    float updateSpeed = 0.01F;
    if(!worldObj.isRemote)// && (Math.abs(posX - prevPosX) > updateSpeed || Math.abs(posY - prevPosY) > updateSpeed || Math.abs(posZ - prevPosZ) > updateSpeed))
    {
      FlansMod.getPacketHandler().sendToAllAround(new PacketPlaneControl(this), posX, posY, posZ, FlansMod.driveableUpdateRange, dimension);
    }
    }
View Full Code Here

TOP

Related Classes of com.flansmod.common.network.PacketPlaneControl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.