Package com.flansmod.common.network

Examples of com.flansmod.common.network.PacketMGMount


    {
      //If this is the player currently using this MG, dismount
      if(gunner == player)
      {
        mountGun(player, false);
        FlansMod.getPacketHandler().sendToAllAround(new PacketMGMount(player, this, false), posX, posY, posZ, FlansMod.driveableUpdateRange, dimension);
        return true;
      }
     
      //If this person is already mounting a gun, dismount it first
      if(PlayerHandler.getPlayerData(player).mountingGun != null && !PlayerHandler.getPlayerData(player).mountingGun.isDead)
      {
        PlayerHandler.getPlayerData(player).mountingGun.mountGun(player, false);
        return true;
      }
     
      //Spectators can't mount guns
      if(TeamsManager.instance.currentRound != null && PlayerHandler.getPlayerData(player).team == Team.spectators)
        return true;

      //None of the above applied, so mount the gun
      mountGun(player, true);
      FlansMod.getPacketHandler().sendToAllAround(new PacketMGMount(player, this, true), posX, posY, posZ, FlansMod.driveableUpdateRange, dimension);
      if (ammo == null)
      {
        int slot = findAmmo(player);
        if (slot >= 0)
        {
View Full Code Here

TOP

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

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.