if(left)
FlansModClient.shootTimeLeft = type.reloadTime;
else FlansModClient.shootTimeRight = type.reloadTime;
//Apply animations
GunAnimations animations = null;
if(left)
{
if(FlansModClient.gunAnimationsLeft.containsKey(clientPlayer))
animations = FlansModClient.gunAnimationsLeft.get(clientPlayer);
else
{
animations = new GunAnimations();
FlansModClient.gunAnimationsLeft.put(clientPlayer, animations);
}
}
else
{
if(FlansModClient.gunAnimationsRight.containsKey(clientPlayer))
animations = FlansModClient.gunAnimationsRight.get(clientPlayer);
else
{
animations = new GunAnimations();
FlansModClient.gunAnimationsRight.put(clientPlayer, animations);
}
}
int pumpDelay = type.model == null ? 0 : type.model.pumpDelayAfterReload;
int pumpTime = type.model == null ? 1 : type.model.pumpTime;
animations.doReload(type.reloadTime, pumpDelay, pumpTime);
//Iterate over all inventory slots and find the magazine / bullet item with the most bullets
int bestSlot = -1;
int bulletsInBestSlot = 0;
for (int j = 0; j < clientPlayer.inventory.getSizeInventory(); j++)