public Lazer(int mousex, int mousey, Player player, int selectedweapon)
	{
		switch(selectedweapon)
		{
			case Player.Pistol:
				waittime = 8;
				damage = 5;
				accuracymodifier = pistolaccuracymodifier;
				break;
			case Player.SMG:
				waittime = 2;
				damage = 3;
				accuracymodifier = smgaccuracymodifier;
				break;
			case Player.Assault_rifle:
				waittime = 2;
				damage = 8;
				accuracymodifier = assaultriflepistolaccuracymodifier;
				break;
			case Player.Machine_gun:
				waittime = 1;
				damage = 5;
				accuracymodifier = 	machinegunaccuracymodifier;
				break;
			case Player.Bolt_action_rifle:
				waittime = 25;
				damage = 100;
				accuracymodifier = boltactionrifleaccuracymodifier;
				break;
			case Player.Semi_Auto_Sniper:
				waittime =  12;
				damage = 60;
				accuracymodifier = semiautosniperaccuracymodifier;
				break;
		}
		
		
		startx = player.centerx;
		starty = player.centery;
		int xchange = startx - mousex;
		int ychange = starty - mousey;
		distance = Math.sqrt(Math.pow(Math.abs(xchange), 2.0)+Math.pow(Math.abs(ychange), 2.0));
		int xerror = rand.nextInt(((int) distance/accuracymodifier)+1);
		int yerror = rand.nextInt(((int) distance/accuracymodifier)+1);
		if(rand.nextBoolean())
			endx = mousex + xerror;
		else
			endx = mousex - xerror;			
		if(rand.nextBoolean())
			endy = mousey + yerror;
		else
			endy = mousey - yerror;			
	}