Hi,
I'm recently having a lot of trouble with the FPS on my server. Some maps run at 700-950 FPS, some at ~500, and some at 20-50 FPS. I've been removing some of the maps that have a bad impact on the FPS, though I believe they're not the only problem occurring.
I write some scripts, but I'm not very experienced and I think it's somewhat me that caused the unstable FPS.
Now on to the question. I've made myself a task, which is repeated each second. It helps me with a lot of other delayed tasks.
Code:
public CommonCounter()
{
counter ++;
mp_timeleft = get_timeleft();
if(counter == get_pcvar_num(gTCCvar))
ban_team_change = true;
if(60*get_pcvar_num(g_pRoundTime)-get_pcvar_num(g_pNoRespTime) == counter)
no_respawn = true;
if(!award_given && mp_timeleft<15)
EndAward();
if(!f_saved && mp_timeleft<8)
MapendSaving();
if(bet_delay_counter > 0)
bet_delay_counter --;
}
Is it possible that this is ruining my FPS? That's the only code I suspect, since it's new and other stuff has been working properly for me quite a long time. Thanks in advance!