View Single Post
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 02-01-2021 , 13:14   Re: [CS:GO] What makes this function lag the server?
Reply With Quote #2

I would guess that is the CreateTimer part.

You are creating a timer every tick, that could run between 3~10 times per second if the logic enters in the CreateTimer all the timer.

You can try adding a comment // to it and check if it stops lagging.

PS: I didn't debug the whole code.
Also, there are some other "micro-optimizations" that could be done, but probably they aren't the real cause.
__________________

Last edited by Marttt; 02-01-2021 at 13:15.
Marttt is offline