client_prethink & posthink - clear explanation on proble
I dont particularly understand what prethink means... I know its a function but I dont understand what exactly its forward means... the documentation doesn't make sense to me... I am still tryin to understand it.
So you can see why I am confused how/when to use client_prethink because the other stuff is self explanatory.. but this is not really to me.. could someone explain what exactly is happening when postthink and prethink occur? is it before or after an action or something? its kind of confusing without understanding that. A clear and simple response would be something in the form of... "client_prethink basically is called when .......... happens" or "client_prethink is triggered every time ....... occurs" My only guess is that client_prethink means it reads the function and prethink triggers on its own based upon what is in the function but... im not completely sure... please only people who definetly know what they are talking about respond... like v3x or black rose... or brad... somebody with experience please. |
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. |
ty very much that was like the most awesome explanation... now I can actually do stuff I couldn't do before cause I understand that :) ty
|
Just keep in mind that since they are called so frequently, that you want to limit the amount of processing that gets done there.
|
Quote:
|
Quote:
Code:
Code:
Code:
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). |
So the fakemeta hooks would be the next step down from pre/postthink? I am asking because I run runemod and it is a big hog of pre/posthink. If I used the fakemeta forwards, say in twisteds multijump, would I just register the forwards, rename the pre/posthink publics, and point the forwards to the newly named publics? Or if not, could you please post an example....Thanks and much appreciated :lol: :lol: :lol:
|
The fakemeta hooks are essentially the same as using client_pre/postthink except you don't have to have engine enabled. If you have engine enabled anyway, there's no need to use the fakemeta forwards.
If you did use fakemeta for this, the way you described of implementing it is accurate. |
Quote:
|
Quote:
Fakemeta however does not do this, which makes it favorable for optimization. The functions for Pre/PostThink are slightly less abstracted though. As Brad said, if you're running Engine anyways, you'd might as well use it. |
| All times are GMT -4. The time now is 16:30. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.