Difference between revisions of "Engine Hooks"

From QuakeQEWiki
Jump to navigation Jump to search
(Created page with "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 {| class="wikitable" |+ !function name !brief description |- |.think() |called for each entity in the world as soon as time becomes larger than the specific .nextthink |- |.touch() |called for entities that collide with each other subject to physics |- | colspan="2"...")
 
 
Line 4: Line 4:
!function name
!function name
!brief description
!brief description
|-
|.think()
|called for each entity in the world as soon as [[time]] becomes larger than the specific [[Nextthink|.nextthink]]
|-
|.touch()
|called for entities that collide with each other subject to physics
|-
| colspan="2" |
|-
|-
|main()
|main()
Line 39: Line 31:
|SetNewParms()
|SetNewParms()
|"called when a client first connects to a server. sets parms so they can be saved off for restarts"
|"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|.nextthink]] timestamp
|-
|.touch()
|called for entities which have collided with each other per physics rules
|}
|}

Latest revision as of 06:31, 24 March 2022

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