Function flora()
	
	If e_flora\visible=1
		
		ob_y=EntityY(ob_h)
		ob_typ=e_flora\typ
		ob_timer=e_flora\timer
				
		Select ob_typ
			
			;Bäume
			Case 1,2,3,4,5,6,7,8,9
				If e_flora\health<=0 Then
					EntityType ob_h, 0
					TranslateEntity ob_h, 0,-1.5, 0
					TurnEntity ob_h, -1.5,0,0
					If ob_y>-25 Then
						effect_puff(ob_x+Rnd(-3,3),TerrainY(terrain,ob_x,0,ob_z)+Rnd(0,3),ob_z+Rnd(-3,3),Rnd(0.2,0.6),200,150,150,Rnd(0.1,0.5))
					ElseIf ob_y<-50 Then
						item_set(ob_x, ob_z, 7)
						mapfree(Int(EntityX(ob_h)/15),Int(EntityZ(ob_h)/15))=0
						FreeEntity ob_h
						Delete e_flora
						scantile()
						e_flora.flora = First flora
					EndIf
				Else
					;TurnEntity ob_h,Sin(MilliSecs()/30+EntityX(ob_h)*100+EntityY(ob_h)*20)/2,0,0
				EndIf
			
			;Büsche
			Case 30,31,32,33, 40,41,42,43
				If e_flora\health<=0 Then
					EntityType ob_h, 0
					TranslateEntity ob_h, 0,-1.5, 0
					TurnEntity ob_h, -1.5,0,0
					If ob_y>-5 Then
						effect_puff(ob_x+Rnd(-3,3),TerrainY(terrain,ob_x,0,ob_z)+Rnd(0,3),ob_z+Rnd(-3,3),Rnd(0.2,0.6),200,150,150,Rnd(0.1,0.5))
					ElseIf ob_y<-20 Then
						item_set(ob_x, ob_z, 2)
						mapfree(Int(EntityX(ob_h)/15),Int(EntityZ(ob_h)/15))=0
						FreeEntity ob_h
						Delete e_flora
						scantile()
						e_flora.flora = First flora
					EndIf
				EndIf
			
			;Steine
			Case 50,51,52,53,54,55,56,57,58,59
				If e_flora\health<=0 Then
					EntityType ob_h, 0
					TranslateEntity ob_h, 0,-0.5, 0
					If ob_y<-20 Then
						item_set(ob_x, ob_z, 3)
						mapfree(Int(EntityX(ob_h)/15),Int(EntityZ(ob_h)/15))=0
						FreeEntity ob_h
						Delete e_flora
						scantile()
						e_flora.flora = First flora
					EndIf
				EndIf
				If ob_typ=52 Then
					For i=0 To 2
						effect_splatter(ob_x, ob_y, ob_z, Rnd(0.3,3), Rnd(-1,1),Rnd(2,3),Rnd(-1,1),65,Rand(85,150),255,0,Rnd(0.3,1))
					Next
				EndIf
						
		End Select

	EndIf		
		
End Function