|
Author
|
Message
|
|
Member
|

01-06-2010
, 03:03
Re: OnPlayerRunCmd tip
|
#1
|
Prediction was created for clients, that lag. For example if player pressed forward button, there is very big chance, that player will walk forward, so client's game become to update world with client's prediction with out server world update and permission. If server returned another world state (for example some plugin blocked walking forward) client's world will be updated again, but player will be returned to the old position.
Both OnPreThink and OnPlayerRunCmd are fired when server received client's data (if prediction is ON, clients have already walked forward) and ready to update world with client's command "forward".
For example to force client to do taunt when attack fired, the right way is to force bind "mouse1" "taunt" (this wont cause any lags) and then block any attack using SDKHooks or OnPlayerRunCmd.
I have felt lags connected with prediction, while fire was blocked without binding, ever on local server with ping 5, 200 client's fps and 500 server's fps.
There is no better way.
Last edited by G@ngst@r; 01-06-2010 at 03:18.
|
|
|
|