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

[INFO] Think workflow


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 12-01-2009 , 09:52   [INFO] Think workflow
Reply With Quote #1

I posting this here because I think I'm right with my conclussions.
Anyway, I can fix any error i've made.

Because I didn't knew exactly how the things go inside the engine, I've read hlsdk to understand it.
Here's the flow of calls in PreThink and PostThink (see the attach)

So, as I understand, every call to PreThink implies (in order) calling PlayerPreThink, ItemPreFrame and UpdateClientData and after that, PreThink will return.

I only show that calls who can be used with hamsandwitch but there some other calls that we can't use in an amxx plugin (but yes for modules).

I think this is usefull to people who doesn't know the order of each call and when it's used.

If anyone know that I'm missing something or I'm wrong, please let me know.
Thanks

EDIT:

Here's the updated workflow (made by Connor, updated by me)

Code:
SV_Frame
{
        looped SV_ExecuteClientMessage ->      
        {
                pfnCmdStart (FM_CmdStart)
                pfnPlayerPreThink (client_PreThink , FM_PlayerPreThink)
                pfnThink (pfnThink, FM_Think)
                pfnPM_Move
                pfnPlayerPostThink (client_PostThink, FM_PlayerPostThink)
                pfnCmdEnd (FM_CmdEnt)
        }
 
        SV_Physics
        {
                pfnStartFrame (server_frame, FM_StartFrame)
                loop for each entity ->
                 {
                        if movetype ->
                        {
                                SV_Physics_* 
                                if touch => pfnTouch (pfnTouch, FM_Touch)
                        }
                        pfnThink (pfnThink, FM_Think) // entities only
                 }
        }
 
        SV_SendClientMessages (looping)
        {
                SV_WriteClientdataToMessage -> gEntityInterface.pfnUpdateClientData (FM_UpdateClientData)
                SV_WriteEntitiesToClient -> gEntityInterface.pfnAddToFullPack (FM_AddToFullPack)
        }
}
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.

Last edited by joropito; 07-31-2013 at 08:03.
joropito is offline
Send a message via MSN to joropito
 



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 14:46.


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