components/prboom/g_game.c
// killough 4/10/98: New function to fix bug which caused Doom
// lockups when idclev was used in conjunction with -fast.
killough 4/10/98: New function to fix bug which caused Doom
lockups when idclev was used in conjunction with -fast.
killough 4 / 10 / 98 : New function to fix bug which caused Doom lockups when idclev was used in conjunction with - fast .
void G_SetFastParms(int fast_pending)
{
  static int fast = 0;            
  int i;
  if (fast != fast_pending) {     
    if ((fast = fast_pending))
      {
        for (i=S_SARG_RUN1; i<=S_SARG_PAIN2; i++)
          if (states[i].tics != 1 || demo_compatibility) 
            states[i].tics >>= 1;  
        mobjinfo[MT_BRUISERSHOT].speed = 20*FRACUNIT;
        mobjinfo[MT_HEADSHOT].speed = 20*FRACUNIT;
        mobjinfo[MT_TROOPSHOT].speed = 20*FRACUNIT;
      }
    else
      {
        for (i=S_SARG_RUN1; i<=S_SARG_PAIN2; i++)
          states[i].tics <<= 1;
        mobjinfo[MT_BRUISERSHOT].speed = 15*FRACUNIT;
        mobjinfo[MT_HEADSHOT].speed = 10*FRACUNIT;
        mobjinfo[MT_TROOPSHOT].speed = 10*FRACUNIT;
      }
  }
}
void G_SetFastParms ( int fast_pending ) { static int fast = 0 ; int i ; if ( fast != fast_pending ) { if ( ( fast = fast_pending ) ) { for ( i = S_SARG_RUN1 ; i <= S_SARG_PAIN2 ; i ++ ) if ( states [ i ] . tics != 1 || demo_compatibility ) states [ i ] . tics >>= 1 ; mobjinfo [ MT_BRUISERSHOT ] . speed = 20 * FRACUNIT ; mobjinfo [ MT_HEADSHOT ] . speed = 20 * FRACUNIT ; mobjinfo [ MT_TROOPSHOT ] . speed = 20 * FRACUNIT ; } else { for ( i = S_SARG_RUN1 ; i <= S_SARG_PAIN2 ; i ++ ) states [ i ] . tics <<= 1 ; mobjinfo [ MT_BRUISERSHOT ] . speed = 15 * FRACUNIT ; mobjinfo [ MT_HEADSHOT ] . speed = 10 * FRACUNIT ; mobjinfo [ MT_TROOPSHOT ] . speed = 10 * FRACUNIT ; } } }
killough 4/10/98: New function to fix bug which caused Doom
lockups when idclev was used in conjunction with -fast.
killough 4 / 10 / 98 : New function to fix bug which caused Doom lockups when idclev was used in conjunction with - fast .
// remembers fast state /* only change if necessary */ // killough 4/10/98 // don't change 1->0 since it causes cycles