//Poison Mummy v1.0 by Renounce4
for(var m = 0;m <spawnedEntities.length;m++) {
	var ent = spawnedEntities[m]
	var epos = ent.getPosition()
	var elokvec = ent.getLookVec()
	var poicx = epos.x+(elokvec.x*PoisonMummy_Range)
	var poicy = epos.y+(elokvec.y*PoisonMummy_Range)
	var poicz = epos.z+(elokvec.z*PoisonMummy_Range)
	rand = Math.random()*100
	if((rand <= PoisonMummy_Chance && plength <= 0) || plength > 0) {
		if(plength <= 0) {
			pchange()
		}
		plength--
		PoisonSpray(poicx,poicy,poicz,PoisonMummy_Range,ent,PoisonMummy_Poison)
	}
}