Engine Hooks

From QuakeQEWiki
Jump to navigation Jump to search

Engine hooks are the functions that the quake engine calls in quake-c. With the exception of level initialization, virtually all quake-c code is executed starting from in of these functions

function name brief description
main() "only for testing"
StartFrame()
PlayerPreThink() "Called every frame before physics are run"
PlayerPostThink() "Called every frame after physics are run"
ClientKill() "Player entered the suicide command"
ClientConnect() "called when a player connects to a server"
ClientDisconnect() "called when a player disconnects from a server"
SetChangeParms() "call to set parms for self so they can be saved for a level transition"
SetNewParms() "called when a client first connects to a server. sets parms so they can be saved off for restarts"
entity function name brief description
.think() called for each entity in the world as soon as global time becomes larger than the specific .nextthink timestamp
.touch() called for entities which have collided with each other per physics rules