Raised This Month: $ Target: $400
 0% 

OnPlayerRunCmd tip


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Greyscale
SourceMod Plugin Approver
Join Date: Dec 2007
Location: strYoMommasHouse[you];
Old 01-05-2010 , 21:29   OnPlayerRunCmd tip
Reply With Quote #1

If you use OnPlayerRunCmd to block certain actions, like attacking or jumping, the client will experience the start of the action before the server can tell them to stop.

This is because Valve made our clients "predict" what we want to do. For example when our client sees +attack it starts the weapon fire animations, plays the gunshot sound and then resets. While the only one seeing this effect is the client, it can freak the client out and probably cause them to complain.

I found a server cvar that actually forces the client to turn prediction off. The cvar is sv_client_predict. Any client that joins after setting this cvar to 0 (-1 to disable it) will have prediction turned off. Unfortunately this forces us to disable an important feature to reduce the lagged feeling.

cl_predict is the client cvar, unfortunately it is flagged as a cheat. I haven't experimented with it much, but maybe we can use this to toggle prediction per-client.
__________________
Greyscale 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 18:15.


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