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

Solved trying to decrease "client_preThink" CPU usage


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
kww
Senior Member
Join Date: Feb 2021
Location: Russia
Old 02-24-2021 , 23:56   trying to decrease "client_preThink" CPU usage
Reply With Quote #1

Is there any way to decrease CPU load as much as possible?
(bhop as usual)
PHP Code:
public client_PreThink(id
{
    if(
get_pcvar_num(mp_bhop_ban)) {
        if(
gBhop[id] == 1gBhop[id] = 0
    
}
    
    if(
gBhop[id] == 0)
        return 
PLUGIN_HANDLED
    
    entity_set_float
(idEV_FL_fuser20.0)        
    
    if (
entity_get_int(idEV_INT_button) & 2) {    
        new 
flags entity_get_int(idEV_INT_flags)
    
        if (
flags FL_WATERJUMP)
            return 
PLUGIN_CONTINUE
        
if ( entity_get_int(idEV_INT_waterlevel) >= )
            return 
PLUGIN_CONTINUE
        
if ( !(flags FL_ONGROUND) )
            return 
PLUGIN_CONTINUE
                    
        
if (gAutojump[id] == 1) {
            new 
Float:velocity[3]
            
            
entity_get_vector(idEV_VEC_velocityvelocity)
            
            
velocity[2] += 250.0
            
            entity_set_vector
(idEV_VEC_velocityvelocity)
        }
        
        
entity_set_int(idEV_INT_gaitsequence6)
    }
    
    return 
PLUGIN_HANDLED


Last edited by kww; 02-26-2021 at 10:03.
kww is offline
 



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 15:35.


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