Exemplo n.º 1
0
//
// P_CeilingSequence
//
// haleyjd 09/27/06: Starts the appropriate sound sequence for a ceiling action.
//
void P_CeilingSequence(sector_t *s, int noiseLevel)
{
   if(silentmove(s))
      return;

   if(s->sndSeqID >= 0)
      S_StartSectorSequence(s, SEQ_CEILING);
   else
   {
      switch(noiseLevel)
      {
      case CNOISE_NORMAL:
         S_StartSectorSequenceName(s, "EECeilingNormal", SEQ_ORIGIN_SECTOR_C);
         break;
      case CNOISE_SEMISILENT:
         S_StartSectorSequenceName(s, "EECeilingSemiSilent", SEQ_ORIGIN_SECTOR_C);
         break;
      case CNOISE_SILENT:
         S_StartSectorSequenceName(s, "EECeilingSilent", SEQ_ORIGIN_SECTOR_C);
         break;
      }
   }
}
Exemplo n.º 2
0
//
// P_DoorSequence
//
// haleyjd 09/24/06: Plays the appropriate sound sequence for a door.
//
void P_DoorSequence(bool raise, bool turbo, bool bounced, sector_t *s)
{
   // haleyjd 09/25/06: apparently fraggle forgot silentmove for doors
   if(silentmove(s))
      return;

   if(s->sndSeqID >= 0)
   {
      if(bounced) // if the door bounced, replace the sequence
         S_ReplaceSectorSequence(s, SEQ_DOOR);
      else
         S_StartSectorSequence(s, SEQ_DOOR);
   }
   else
   {
      const char *seqName;
      if(raise)
         seqName = turbo ? "EEDoorOpenBlazing" : "EEDoorOpenNormal";
      else
      {
         if(turbo)
         {
            if(GameModeInfo->type == Game_DOOM && comp[comp_blazing])
               seqName = "EEDoorCloseBlazingComp";
            else
               seqName = "EEDoorCloseBlazing";
         }
         else
            seqName = "EEDoorCloseNormal";
      }

      if(bounced)
         S_ReplaceSectorSequenceName(s, seqName, SEQ_ORIGIN_SECTOR_C);
      else
         S_StartSectorSequenceName(s, seqName, SEQ_ORIGIN_SECTOR_C);
   }
}