Quote:
|
Originally Posted by organizedKaoS
Quote:
|
Originally Posted by Hawk552
PreThink is called every time before a client renders a frame with physics. This means that if the client's FPS is 50, it will be called 50 times a second, just before each frame is actually rendered. This gives you a fraction of a second to change whatever you need to, before the client actually renders the frame.
PostThink works the same way, except it's a fraction of a second after.
|
Is prethink and posthink the only route to go as far as "changing" a clients actions? example is twisted's multijump plugin. Prethink checks if the player is jumping and pressing his jump button again while not on ground. Is pre/posthink the only way of achieving this kind of "client action modification"? Or is there any other possible way? Thanks 
|
Not really, although it's easily the most effective. There are a number of other ways I can think of.
Code:
register_forward(FM_PlayerPreThink,"my_func")
register_forward(FM_PlayerPostThink,"my_func")
Code:
register_think("player","my_func")
Code:
public server_frame()
{
//...
}
That's pretty much all I can think of. I think client_PreThink and PostThink are still the best though.
If you're going for optimization and can ommit Engine from the plugin, then I would go with the Fakemeta hooks (first example).
__________________