void splitExp(LivingThing thnStore, int exp)
	{
		if (thnStore.popup)
		{
			thnStore.send(""+(char)33+"You have lost "+exp+" exp.\n");
		} else
		{
			thnStore.chatMessage("You have lost "+exp+" exp.");
		}
		thnStore.exp -= exp;
		Vector vctStore;
		double tp,
				sidepoints=0;
		LivingThing thnFront;
		if (thnStore.bytSide == 1)
		{
			vctStore = vctSide2;
			thnFront = thnFront1;
		}else
		{
			vctStore = vctSide1;
			thnFront = thnFront2;
		}
		int i,
			i2=0;
		LivingThing thnStore2;

		tp=thnFront.getTotalPoints();
		thnFront.lngDamDone = 0;
		for (i=0;i<vctStore.size();i++)
		{
			thnStore2 = (LivingThing)vctStore.elementAt(i);
// added  "|| thnStore2.isPet()"
// and changed "thnStore.getTotalPoints()" to "thnStore2.getTotalPoints()"
//			if (thnStore2.isPlayer() || thnStore2.isPet())
//			{
				sidepoints += thnStore2.getTotalPoints();
//			}
		}
		try
		{
			for (i=0;i<vctStore.size();i++)
			{
				i2 = 0;
				thnStore2 = (LivingThing)vctStore.elementAt(i);
				if (!thnStore2.isMob())
				{
					if (thnStore2.lngDamDone > thnFront.maxhp)
					{
						thnStore2.lngDamDone = thnFront.maxhp;
					}
					i2 = (int)
					(engGame.expgainmod*
					((
					(tp/sidepoints)+
					(2*(thnStore2.lngDamDone/(double)thnFront.maxhp)*(tp/(double)thnStore2.getTotalPoints()))
					)/3));
					thnStore2.chatMessage("You get "+i2+" exp.");
					thnStore2.exp += i2;
				}
				thnStore2.lngDamDone = 0;
			}
		}catch(Exception e)
		{
			engGame.log.printError("splitExp()", e);
		}
	}