__interrupt void Timer_A3(void){ switch( TAIV ){ case 2: UpdateMsec(); TACCR1=TAR+TACCR_1; break; case 4: CheckButton(&ButtonLeft); CheckButton(&ButtonRight); CheckButton(&ButtonEnter); TACCR2=TAR+TACCR_2; break; } }
void CServer::Think() { int i; UpdateMsec(); // calculate the msec value CheckClients(); // check and update our client list BotManager()->Think(); World()->Think(); for (i = 0; i < GetMaxClients(); i++) { if (m_rgpClients[i] != NULL) { // check if this client is a bot CBaseBot *pBot = m_rgpClients[i]->GetBotPointer(); if (pBot) { // this is a bot... pBot->BotThink(); // call its think function to make it run } } } }