View Single Post
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