Raised This Month: $51 Target: $400
 12% 

Huge lag spike on new round


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 09-23-2019 , 12:38   Huge lag spike on new round
Reply With Quote #1

I don't know why but I got a huge lag on round start.
When I remove the CustomForward, there ain't any lag at all. Did I do something wrong?

On LAN Server, the ping went from 0 to 1-2 but in HLDS, it went from ~30 to 120+ for few seconds.

PHP Code:
public fw_Player_Spawn(id)
{
    if(!
g_AllowInfection)
        
CurePlayer(id0)
}

public 
CurePlayer(victimattacker)
{
    
ExecuteForward(g_Forwards[FW_USER_CURE_PRE], g_ForwardResultvictimattacker)
    if(
g_ForwardResult >= PLUGIN_HANDLED)
        return

    if(!
is_user_alive(victim))
        return    

    
UnSet_BitVar(g_IsZombievictim)

    
ExecuteForward(g_Forwards[FW_USER_CURE_POST], g_ForwardResultvictimattacker)

Edit: Even when the CustomForward hasn't been used in any plugin, the lag still occurred
Edit2: File attached.
Attached Files
File Type: sma Get Plugin or Get Source (zz_core_beta.sma - 311 views - 7.6 KB)
__________________
My plugin:

Last edited by Celena Luna; 09-23-2019 at 13:46.
Celena Luna is offline
LearninG
Senior Member
Join Date: Apr 2019
Location: Iran
Old 09-23-2019 , 13:08   Re: Huge lag spike on new round
Reply With Quote #2

show the entire plugin
LearninG is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 09-23-2019 , 13:44   Re: Huge lag spike on new round
Reply With Quote #3

Quote:
Originally Posted by LearninG View Post
show the entire plugin
I upload the file.
__________________
My plugin:
Celena Luna is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 09-29-2019 , 15:39   Re: Huge lag spike on new round
Reply With Quote #4

Possibly...

Code:
public fw_Player_Spawn(id) {         if(!g_AllowInfection) {         CurePlayer(id, 0)         }         if(Get_BitVar(g_IsZombie, id) && g_AllowRespawn) {         InfectPlayer(id, 0)         } }
__________________
DJEarthQuake is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:06.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode