[INFO] Think workflow
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 |
Re: [INFO] Think Flow
Interesting
|
Re: [INFO] Think workflow
I think you are wrong with PreThink() (Ham_Think) called from PlayerPreThink (Ham_Player_PreThink)
Reading HLSDK it seems to be : PlayerPreThink (from client.cpp) I don't know if it's engine forward client_PreThink and fakemeta FM_PlayerPreThink but it sounds like it is correct. Code:
Then CBasePlayer::PreThink from player.cpp (Ham_Player_PreThink) Code:
And from that one are called * g_pGameRules->PlayerThink (CHalfLifeMultiplay :: PlayerThink in multiplayer that is hookable with orpheu module) * ItemPreFrame * UpdateClientData Also, ItemPreFrame is not Ham_Item_PreFrame, it's CBasePlayer::ItemPreFrame (not hookable with hamsandwich) from where m_pActiveItem->ItemPreFrame( ); (Ham_Item_PreFrame) is called. Code:
void CBasePlayer::ItemPreFrame() |
Re: [INFO] Think workflow
That's what I saw.
I don't mean each Ham_* where called directly but the sequence it's right. I'm trying to understand (and show) the order in which each function is called. I can put conditionals in the graphics to understand the difference you are talking about. |
Re: [INFO] Think workflow
You also forgot one thing for postthink, i guess it is like that :
Code:
PlayerPostThink (client_PreThink/FM_PlayerPostThink) |
Re: [INFO] Think workflow
Just to keep track how things are called I post this here (credits to Connor)
Code:
SV_Frame |
Re: [INFO] Think workflow
I wanted to post it and completly forgot.
Everybody will notice that server_frame is called in the middle of the routine, can have its importance. |
Re: [INFO] Think workflow
Small update in SV_Physics and moved updated workflow to first post
|
Re: [INFO] Think workflow
What have you updated ?
|
Re: [INFO] Think workflow
Quote:
Code:
loop for each entity -> |
All times are GMT -4. The time now is 22:19. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.