View Single Post
Re: msec and slow bots
Old
  (#2)
bomberman
Guest
 
Status:
Posts: n/a
Default Re: msec and slow bots - 05-07-2004

Code:
   // TheFatal - START from Advanced Bot Framework (Thanks Rich!)

   // adjust the millisecond delay based on the frame rate interval...
   if (pBot->msecdel <= gpGlobals->time)
   {
      pBot->msecdel = gpGlobals->time + 0.5;
      if (pBot->msecnum > 0)
         pBot->msecval = 450.0/pBot->msecnum;
      pBot->msecnum = 0;
   }
   else
      pBot->msecnum++;

   if (pBot->msecval < 1)    // don't allow msec to be less than 1...
      pBot->msecval = 1;

   if (pBot->msecval > 100)  // ...or greater than 100
      pBot->msecval = 100;

// TheFatal - END

   pBot->f_frame_time = pBot->msecval / 1000;  // calculate frame time
Do you mean these stuff ?
  
Reply With Quote