View Single Post
Paimon
Member
Join Date: Jul 2021
Location: Zootopia
Old 07-24-2023 , 06:59   Re: [L4D/L4D2] Hunter high pounce survivor by flying sky ceil
Reply With Quote #10

Quote:
Originally Posted by eyal282 View Post
You're asking for the wrong thing. Error logs will not indicate lag.

I read your code, and use of TR_TraceRayFilter is the first suspect of lag within OnPlayerRunCmd, a function that runs over 100 times per second, maybe even 1000 times per second.
First, for local server, errors will output to server console, which means too much errors will case lag too.

Second, As you say, if no limit for this function, it will run more than 100 time per second.
But, I do limit it. With g_iLastRayTick array and TRACE_TICK(100), I had limited it to be called once per 100 ticks for a hunter.

And on my servers, both linux and windows with no lags.
I will test this function call times later.
In my test, this function only calls once or twice per second(under 100tick/s server) for a client(hunter).
__________________

Last edited by Paimon; 02-08-2024 at 07:08.
Paimon is offline