void () HomerPrecache = {

   precache_sound ("awwcrap.wav");
   precache_sound ("crap!.wav");
   precache_sound ("boogie.wav");
   precache_sound ("eesh!.wav");
   
   //remove these sounds for dmsp2
/*
   precache_sound ("aaaahh.wav");
   precache_sound ("baddonut.wav");
   precache_sound ("beernut.wav");
   precache_sound ("goo.wav");
   precache_sound ("dohnuts.wav");
   precache_sound ("cookies.wav");
   precache_sound ("chicken.wav");
*/

   precache_sound ("hehe.wav");
   precache_sound ("huhu.wav");
   precache_sound ("curvy.wav");
   precache_sound ("goodbye.wav");
   precache_sound ("johnny.wav");
   precache_sound ("doh!.wav");
   precache_sound ("scream.wav");
   precache_sound ("stupid.wav");
   precache_sound ("youlittl.wav");
   precache_sound ("blubber.wav");
   precache_sound ("yabba.wav");
   precache_sound ("woohoo.wav");
   precache_sound ("thatsbad.wav");
   precache_sound ("thtsgood.wav");
   precache_sound ("canigo.wav");

};


void (entity homer) HomerTaunt = {

   local float rsnd;
   
   rsnd = ceil(random() * 10);   //pick a number between 1 and 10. ceil returns an integer. if 0.3 is passed
   										//to it, 1 is returned. if 3.4, 4, and so on.
   if (rsnd == 1.0)
      sound (homer,CHAN_VOICE,"woohoo.wav",TRUE,ATTN_NORM);
   else if (rsnd == 2.0)
      sound (homer,CHAN_VOICE,"curvy.wav",TRUE,ATTN_NORM);
   else if (rsnd == 3.0)
      sound (homer,CHAN_VOICE,"goodbye.wav",TRUE,ATTN_NORM);
   else if (rsnd == 4.0)
      sound (homer,CHAN_VOICE,"hehe.wav",TRUE,ATTN_NORM);
   else if (rsnd == 5.0)
      sound (homer,CHAN_VOICE,"blubber.wav",TRUE,ATTN_NORM);
   else if (rsnd == 6.0)
      sound (homer,CHAN_VOICE,"yabba.wav",TRUE,ATTN_NORM);
   else if (rsnd == 7.0)
      sound (homer,CHAN_VOICE,"huhu.wav",TRUE,ATTN_NORM);
   else if (rsnd == 8.0)
      sound (homer,CHAN_VOICE,"johnny.wav",TRUE,ATTN_NORM);
   else if (rsnd == 9.0)
      sound (self,CHAN_VOICE,"thtsgood.wav",TRUE,ATTN_NORM);
   else
      sound (homer,CHAN_VOICE,"stupid.wav",TRUE,ATTN_NORM);

};

//no need to eat gibs. health regenerates +5 per second
/*
void () HomerEat = {

   local float rsnd;
   
   rsnd = ceil(random() * 7.0);   
   if (rsnd == 1.0)
      sound (self,CHAN_VOICE,"cookies.wav",TRUE,ATTN_NORM);
   else if (rsnd == 2.0)
      sound (self,CHAN_VOICE,"dohnuts.wav",TRUE,ATTN_NORM);
   else if (rsnd == 3.0)
      sound (self,CHAN_VOICE,"chicken.wav",TRUE,ATTN_NORM);
   else if (rsnd == 4.0)
      sound (self,CHAN_VOICE,"aaaahh.wav",TRUE,ATTN_NORM);
   else if (rsnd == 5.0)
      sound (self,CHAN_VOICE,"baddonut.wav",TRUE,ATTN_NORM);
   else if (rsnd == 6.0)
      sound (self,CHAN_VOICE,"beernut.wav",TRUE,ATTN_NORM);
   else
      sound (self,CHAN_VOICE,"goo.wav",TRUE,ATTN_NORM);
   
};
*/

void () HomerPain = {

   local float rsnd;
   
   rsnd = ceil(random() * 6.0);   
   if (rsnd == 1.0)
      sound (self,CHAN_VOICE,"doh!.wav",TRUE,ATTN_NORM);
   else if (rsnd == 2.0)
      sound (self,CHAN_VOICE,"youlittl.wav",TRUE,ATTN_NORM);
   else if (rsnd == 3.0)
      sound (self,CHAN_VOICE,"boogie.wav",TRUE,ATTN_NORM);
   else if (rsnd == 4.0)
      sound (self,CHAN_VOICE,"eesh!.wav",TRUE,ATTN_NORM);
   else if (rsnd == 5.0)
      sound (self,CHAN_VOICE,"thatsbad.wav",TRUE,ATTN_NORM);
   else
      sound (self,CHAN_VOICE,"scream.wav",TRUE,ATTN_NORM);

};

void () HomerDie = {

   local float rsnd;
   
   rsnd = ceil(random() * 7.0);   
   if (rsnd == 1.0)
      sound (self,CHAN_VOICE,"doh!.wav",TRUE,ATTN_NORM);
   else if (rsnd == 2.0)
      sound (self,CHAN_VOICE,"crap!.wav",TRUE,ATTN_NORM);
   else if (rsnd == 3.0)
      sound (self,CHAN_VOICE,"awwcrap.wav",TRUE,ATTN_NORM);
   else if (rsnd == 4.0)
      sound (self,CHAN_VOICE,"boogie.wav",TRUE,ATTN_NORM);
   else if (rsnd == 5.0)
      sound (self,CHAN_VOICE,"eesh!.wav",TRUE,ATTN_NORM);
   else if (rsnd == 6.0)
      sound (self,CHAN_VOICE,"thatsbad.wav",TRUE,ATTN_NORM);
   else 
      sound (self,CHAN_VOICE,"scream.wav",TRUE,ATTN_NORM);

};

