Index: art/actors/fauna/deer.xml
===================================================================
--- art/actors/fauna/deer.xml	(revision 11206)
+++ art/actors/fauna/deer.xml	(working copy)
@@ -7,7 +7,9 @@
         <animation file="quadraped/deer_idle_01.dae" name="idle" speed="20"/>
         <animation file="quadraped/deer_idle_02.dae" name="idle" speed="20"/>
         <animation file="quadraped/deer_idle_03.dae" name="idle" speed="20"/>
+        <animation file="quadraped/deer_idle_04.dae" name="feeding" speed="20"/>
         <animation file="quadraped/deer_walk_01.dae" name="walk" speed="35"/>
+        <animation file="quadraped/deer_walk_02.dae" name="walk_feeding" speed="35"/>
         <animation file="quadraped/deer_run_01.dae" name="run" speed="20"/>
         <animation file="quadraped/deer_attack_01.dae" name="melee" speed="20"/>
       </animations>
@@ -31,15 +33,6 @@
     </variant>
   </group>
   <group>
-    <variant frequency="100" name="normal"/>
-    <variant frequency="0" name="feeding">
-      <animations>
-        <animation file="quadraped/deer_idle_04.dae" name="idle" speed="20"/>
-        <animation file="quadraped/deer_walk_02.dae" name="walk" speed="20"/>
-      </animations>
-    </variant>
-  </group>
-  <group>
     <variant frequency="100" name="Idle"/>
     <variant name="death">
       <props>
Index: art/actors/fauna/gazelle.xml
===================================================================
--- art/actors/fauna/gazelle.xml	(revision 11206)
+++ art/actors/fauna/gazelle.xml	(working copy)
@@ -7,10 +7,10 @@
         <animation file="quadraped/deer_idle_01.dae" name="idle" speed="20"/>
         <animation file="quadraped/deer_idle_02.dae" name="idle" speed="20"/>
         <animation file="quadraped/deer_idle_03.dae" name="idle" speed="20"/>
-        <animation file="quadraped/deer_idle_04.dae" name="idle" speed="20"/>
+        <animation file="quadraped/deer_idle_04.dae" name="feeding" speed="20"/>
         <animation file="quadraped/deer_death_01.dae" name="death" speed="40"/>
         <animation file="quadraped/deer_walk_01.dae" name="walk" speed="20"/>
-        <animation file="quadraped/deer_walk_02.dae" name="walk" speed="20"/>
+        <animation file="quadraped/deer_walk_02.dae" name="walk_feeding" speed="20"/>
         <animation file="quadraped/deer_run_01.dae" name="run" speed="15"/>
         <animation file="quadraped/deer_attack_01.dae" name="melee" speed="20"/>
       </animations>
@@ -25,13 +25,12 @@
         <animation file="quadraped/deer_idle_01.dae" name="idle" speed="5"/>
         <animation file="quadraped/deer_idle_02.dae" name="idle" speed="5"/>
         <animation file="quadraped/deer_idle_03.dae" name="idle" speed="5"/>
-        <animation file="quadraped/deer_idle_04.dae" name="idle" speed="5"/>
+        <animation file="quadraped/deer_idle_04.dae" name="feeding" speed="5"/>
         <animation file="quadraped/deer_death_02.dae" name="death" speed="40"/>
         <animation file="quadraped/deer_walk_01.dae" name="walk" speed="20"/>
-        <animation file="quadraped/deer_walk_02.dae" name="walk" speed="20"/>
+        <animation file="quadraped/deer_walk_02.dae" name="walk_feeding" speed="20"/>
         <animation file="quadraped/deer_run_01.dae" name="run" speed="15"/>
         <animation file="quadraped/deer_attack_01.dae" name="melee" speed="20"/>
-        <animation name=""/>
       </animations>
       <mesh>skeletal/deer_mesh.dae</mesh>
       <texture>skeletal/animal_gazelle_02.dds</texture>
Index: simulation/components/UnitAI.js
===================================================================
--- simulation/components/UnitAI.js	(revision 11206)
+++ simulation/components/UnitAI.js	(working copy)
@@ -39,6 +39,11 @@
 			"<element name='RoamTimeMax'>" +
 				"<ref name='positiveDecimal'/>" +
 			"</element>" +
+			"<optional>" +
+				"<element name='Feeds'>" +
+					"<data type='boolean'/>" +
+				"</element>" +
+			"</optional>" +
 			"<element name='FeedTimeMin'>" +
 				"<ref name='positiveDecimal'/>" +
 			"</element>" +
@@ -1279,36 +1284,44 @@
 		},
 
 		"IDLE": {
-			// (We need an IDLE state so that FinishOrder works)
-
 			"enter": function() {
-				// Start feeding immediately
-				this.SetNextState("FEEDING");
-				return true;
+				// Stop and stand for a while
+				this.SelectAnimation("idle");
+				this.StopMoving();
+				this.StartTimer(RandomInt(+this.template.FeedTimeMin, +this.template.FeedTimeMax));
 			},
-		},
 
-		"CORPSE": {
-			"enter": function() {
-				this.StopMoving();
+			"leave": function() {
+				this.StopTimer();
 			},
 
-			// Ignore all orders that animals might otherwise respond to
-			"Order.FormationWalk": function() { },
-			"Order.Walk": function() { },
-			"Order.WalkToTarget": function() { },
-			"Order.Attack": function() { },
-
-			"Attacked": function(msg) {
-				// Do nothing, because we're dead already
+			"LosRangeUpdate": function(msg) {
+				if (this.template.NaturalBehaviour == "skittish")
+				{
+					if (msg.data.added.length > 0)
+					{
+						this.Flee(msg.data.added[0], false);
+						return;
+					}
+				}
+				// Start attacking one of the newly-seen enemy (if any)
+				else if (this.template.NaturalBehaviour == "violent")
+				{
+					this.AttackVisibleEntity(msg.data.added);
+				}
 			},
 
-			"Order.LeaveFoundation": function(msg) {
-				// We can't walk away from the foundation (since we're dead),
-				// but we mustn't block its construction (since the builders would get stuck),
-				// and we don't want to trick gatherers into trying to reach us when
-				// we're stuck in the middle of a building, so just delete our corpse.
-				Engine.DestroyEntity(this.entity);
+			"MoveCompleted": function() { },
+
+			"Timer": function(msg) {
+				if (RandomInt(0, 2) == 0 && this.template.Feeds)
+				{
+					this.SetNextState("FEEDING");
+				}
+				else
+				{
+					this.SetNextState("ROAMING");
+				}
 			},
 		},
 
@@ -1349,7 +1362,14 @@
 			},
 
 			"Timer": function(msg) {
-				this.SetNextState("FEEDING");
+				if (RandomInt(0, 2) == 0 && this.template.Feeds)
+				{
+					this.SetNextState("FEEDING");
+				}
+				else
+				{
+					this.SetNextState("IDLE");
+				}
 			},
 
 			"MoveCompleted": function() {
@@ -1357,8 +1377,35 @@
 			},
 		},
 
+		"CORPSE": {
+			"enter": function() {
+				this.StopMoving();
+			},
+
+			// Ignore all orders that animals might otherwise respond to
+			"Order.FormationWalk": function() { },
+			"Order.Walk": function() { },
+			"Order.WalkToTarget": function() { },
+			"Order.Attack": function() { },
+
+			"Attacked": function(msg) {
+				// Do nothing, because we're dead already
+			},
+
+			"Order.LeaveFoundation": function(msg) {
+				// We can't walk away from the foundation (since we're dead),
+				// but we mustn't block its construction (since the builders would get stuck),
+				// and we don't want to trick gatherers into trying to reach us when
+				// we're stuck in the middle of a building, so just delete our corpse.
+				Engine.DestroyEntity(this.entity);
+			},
+		},
+
 		"FEEDING": {
 			"enter": function() {
+				if (!this.template.Feeds)
+					this.StartTimer(0);
+
 				// Stop and eat for a while
 				this.SelectAnimation("feeding");
 				this.StopMoving();
@@ -1388,10 +1435,72 @@
 			"MoveCompleted": function() { },
 
 			"Timer": function(msg) {
-				this.SetNextState("ROAMING");
+				if (RandomInt(0, 2) == 0 && this.template.Feeds)
+				{
+					this.SetNextState("ROAMINGFEEDING");
+				}
+				else
+				{
+					this.SetNextState("IDLE");
+				}
 			},
 		},
 
+		"ROAMINGFEEDING": {
+			"enter": function() {
+				if (!this.template.Feeds)
+					this.StartTimer(0);
+
+				// Walk in a random direction
+				this.SelectAnimation("walk_feeding", false, this.GetWalkSpeed());
+				this.MoveRandomly(+this.template.RoamDistance);
+				// Set a random timer to switch to feeding state
+				this.StartTimer(RandomInt(+this.template.RoamTimeMin, +this.template.RoamTimeMax));
+			},
+
+			"leave": function() {
+				this.StopTimer();
+			},
+
+			"LosRangeUpdate": function(msg) {
+				if (this.template.NaturalBehaviour == "skittish")
+				{
+					if (msg.data.added.length > 0)
+					{
+						this.Flee(msg.data.added[0], false);
+						return;
+					}
+				}
+				// Start attacking one of the newly-seen enemy (if any)
+				else if (this.template.NaturalBehaviour == "violent" ||
+				         this.template.NaturalBehaviour == "aggressive")
+				{
+					this.AttackVisibleEntity(msg.data.added);
+				}
+
+				// TODO: if two units enter our range together, we'll attack the
+				// first and then the second won't trigger another LosRangeUpdate
+				// so we won't notice it. Probably we should do something with
+				// ResetActiveQuery in ROAMING.enter/FEEDING.enter in order to
+				// find any units that are already in range.
+			},
+
+			"Timer": function(msg) {
+				if (RandomInt(0, 2) == 0 && this.template.Feeds)
+				{
+					this.SetNextState("FEEDING");
+				}
+				else
+				{
+					this.SetNextState("IDLE");
+				}
+			},
+
+			"MoveCompleted": function() {
+				this.MoveRandomly(+this.template.RoamDistance);
+			},
+		},
+
 		"FLEEING": "INDIVIDUAL.FLEEING", // reuse the same fleeing behaviour for animals
 
 		"COMBAT": "INDIVIDUAL.COMBAT", // reuse the same combat behaviour for animals
Index: simulation/templates/gaia/fauna_deer.xml
===================================================================
--- simulation/templates/gaia/fauna_deer.xml	(revision 11206)
+++ simulation/templates/gaia/fauna_deer.xml	(working copy)
@@ -13,6 +13,9 @@
       <RangeMin>5.0</RangeMin>
     </Run>
   </UnitMotion>
+  <UnitAI>
+	<Feeds>true</Feeds>
+  </UnitAI>
   <VisualActor>
     <Actor>fauna/deer.xml</Actor>
   </VisualActor>
Index: simulation/templates/gaia/fauna_gazelle.xml
===================================================================
--- simulation/templates/gaia/fauna_gazelle.xml	(revision 11206)
+++ simulation/templates/gaia/fauna_gazelle.xml	(working copy)
@@ -11,6 +11,9 @@
       <RangeMin>5.0</RangeMin>
     </Run>
   </UnitMotion>
+  <UnitAI>
+    <Feeds>true</Feeds>
+  </UnitAI>
   <VisualActor>
     <Actor>fauna/gazelle.xml</Actor>
   </VisualActor>
