void GAMECLIENT::on_game_restart() { if(!demorec_isplaying() && config.tc_autodemo && demorec_isrecording()) { demorec_record_stop(); teecomp_demo_start(); } for(int i=0; i<MAX_CLIENTS; i++) stats[i].reset(); }
void GAMECLIENT::on_statechange(int new_state, int old_state) { if(demorec_isrecording()) demorec_record_stop(); // reset everything on_reset(); // then change the state for(int i = 0; i < all.num; i++) all.components[i]->on_statechange(new_state, old_state); }
void GAMECLIENT::on_statechange(int new_state, int old_state) { if(demorec_isrecording()) demorec_record_stop(); // reset everything on_reset(); // then change the state for(int i = 0; i < all.num; i++) all.components[i]->on_statechange(new_state, old_state); if(new_state == CLIENTSTATE_ONLINE && config.tc_autodemo) teecomp_demo_start(); }