https://github.com/dreamstalker/rehl....cpp#L777-L808
This is the difference in code. CmdStart is called at line 777, PlayerPreThink is called at 808.
The order is: CmdStart -> PlayerPreThink -> Think -> PlayerPostThink -> CmdEnd.
HLSDK Says:
Code:
CmdStart
We're about to run this usercmd for the specified player. We can set up groupinfo and masking here, etc.
This is the time to examine the usercmd for anything extra. This call happens even if think does not.
Code:
PlayerPreThink
Called every frame before physics are run
Code:
PlayerPostThink
Called every frame after physics are run
Code:
CmdEnd
Each cmdstart is exactly matched with a cmd end, clean up any group trace flags, etc. here
Only Think (Not PreThink and PostThink) may not happen every frame.
Looks like game dll inspects button presses and does physics stuff in PreThink and advances animations and such on PostThink. My best guess is to do whatever you want related to button presses/physics in PlayerPreThink post-hook and totally avoid CmdStart, unless you need that usercmd_t pointer.