
void () egg_die;

void () egg_stand1 = [ 0.000, egg_stand1 ] {

   ai_stand ();

};

void () egg_walk1 = [ 0.000, egg_walk2 ] {

   ai_stand ();

};

void () egg_walk2 = [ 1.000, egg_walk3 ] {

   ai_stand ();

};

void () egg_walk3 = [ 2.000, egg_walk4 ] {

   ai_stand ();

};

void () egg_walk4 = [ 3.000, egg_walk5 ] {

   ai_stand ();
   self.health = (self.health - TRUE);
   if ( (self.health < MOVETYPE_BOUNCE) ) {

      egg_die ();

   }

};

void () egg_walk5 = [ 4.000, egg_walk6 ] {

   ai_stand ();

};

void () egg_walk6 = [ 5.000, egg_walk7 ] {

   ai_stand ();

};

void () egg_walk7 = [ 6.000, egg_walk8 ] {

   ai_stand ();

};

void () egg_walk8 = [ 7.000, egg_walk1 ] {

   ai_walk (TRUE);

};

void () egg_run1 = [ 0.000, egg_run2 ] {

   ai_stand ();

};

void () egg_run2 = [ 1.000, egg_run3 ] {

   ai_stand ();

};

void () egg_run3 = [ 2.000, egg_run4 ] {

   ai_stand ();
   self.health = (self.health - TRUE);
   if ( (self.health < MOVETYPE_BOUNCE) ) {

      egg_die ();

   }

};

void () egg_run4 = [ 3.000, egg_run5 ] {

   ai_stand ();

};

void () egg_run5 = [ 4.000, egg_run6 ] {

   ai_stand ();

};

void () egg_run6 = [ 5.000, egg_run7 ] {

   ai_stand ();

};

void () egg_run7 = [ 6.000, egg_run8 ] {

   ai_stand ();

};

void () egg_run8 = [ 7.000, egg_run1 ] {

   ai_run (TRUE);

};

void () hatch = {

   self.classname = "monster_dog";
   self.solid = SOLID_SLIDEBOX;
   self.movetype = MOVETYPE_STEP;
   setmodel (self,"progs/face.mdl");
   setsize (self,VEC_HULL_MIN,'16.000 16.000 8.000');
   self.health = 25.000;
   self.velocity = '0.000 0.000 15.000';
   self.avelocity = VEC_ORIGIN;
   self.th_stand = dog2_stand1;
   self.th_walk = dog2_walk1;
   self.th_run = dog2_run1;
   self.th_pain = dog2_pain;
   self.th_die = dog2_die;
   self.th_melee = dog2_atta1;
   self.th_missile = dog2_leap1;
   self.origin = (self.origin + '0.000 0.000 32.000');
   self.attack_state = AS_MELEE;
   self.enemy = world;
   self.touch = SUB_Null;
   self.think = dog2_leap1;
   self.nextthink = (time + 0.100);
   walkmonster_start ();

};

void () egg_die = {

   if ( (self.health < MOVETYPE_BOUNCE) ) {

      ThrowHead ("progs/giba.mdl",self.health);
      ThrowGib ("progs/gibl.mdl",self.health);
      ThrowGib ("progs/giba.mdl",self.health);
      ThrowGib ("progs/gibl.mdl",self.health);
      ThrowGib ("progs/giba.mdl",self.health);
      sound (self,CHAN_VOICE,"egg/squish.wav",TRUE,ATTN_NORM);
      hatch ();

   }
   return ;

};

void () egg_jump1;

void () egg_JumpTouch = {

   self.touch = SUB_Null;
   self.think = egg_walk1;
   self.movetype = MOVETYPE_STEP;
   self.nextthink = (time + 0.100);

};

void () egg_jump1 = [ 0.000, egg_jump2 ] {

   ai_stand ();

};

void () egg_jump2 = [ 1.000, egg_jump3 ] {

   ai_face ();

};

void () egg_jump3 = [ 2.000, egg_jump4 ] {

   ai_stand ();
   self.health = (self.health - FL_SWIM);
   if ( (self.health < MOVETYPE_BOUNCE) ) {

      egg_die ();

   }

};

void () egg_jump4 = [ 3.000, egg_jump5 ] {

   ai_stand ();

};

void () egg_jump5 = [ 4.000, egg_jump6 ] {

   self.touch = egg_JumpTouch;

};

void () egg_jump6 = [ 5.000, egg_walk1 ] {


};

void () monster_knight = {

   self.solid = SOLID_SLIDEBOX;
   self.movetype = MOVETYPE_STEP;
   setmodel (self,"progs/egg.mdl");
   setsize (self,VEC_HULL_MIN,'16.000 16.000 40.000');
   self.health = 20.000;
   self.th_stand = egg_stand1;
   self.th_walk = egg_walk1;
   self.th_run = egg_run1;
   self.th_missile = egg_jump1;
   self.th_melee = egg_jump1;
   self.th_die = egg_die;
   walkmonster_start ();

};
