doc/html/dllapi_notes.html
changeset 0 d15304fcb7a7
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/doc/html/dllapi_notes.html	Tue Apr 06 07:36:14 2004 +0000
     1.3 @@ -0,0 +1,569 @@
     1.4 +<!-- vi: set ts=4 sw=4 : -->
     1.5 +<!-- vim: set tw=75 : -->
     1.6 +
     1.7 +<HTML>
     1.8 +<head>
     1.9 +<title>HLSDK DLLAPI Notes</title>
    1.10 +</head>
    1.11 +<body>
    1.12 +
    1.13 +<h1>HLSDK DLLAPI Notes
    1.14 +</h1>
    1.15 +
    1.16 +<hr>
    1.17 +<ul>
    1.18 +   <li><a href=#GameDLLInit>GameDLLInit</a>
    1.19 +   <li><a href=#DispatchSpawn>DispatchSpawn</a>
    1.20 +   <li><a href=#DispatchThink>DispatchThink</a>
    1.21 +   <li><a href=#DispatchUse>DispatchUse</a>
    1.22 +   <li><a href=#DispatchTouch>DispatchTouch</a>
    1.23 +   <li><a href=#DispatchBlocked>DispatchBlocked</a>
    1.24 +   <li><a href=#DispatchKeyValue>DispatchKeyValue</a>
    1.25 +   <li><a href=#DispatchSave>DispatchSave</a>
    1.26 +   <li><a href=#DispatchRestore>DispatchRestore</a>
    1.27 +   <li><a href=#DispatchObjectCollsionBox>DispatchObjectCollsionBox</a>
    1.28 +   <li><a href=#SaveWriteFields>SaveWriteFields</a>
    1.29 +   <li><a href=#SaveReadFields>SaveReadFields</a>
    1.30 +   <li><a href=#SaveGlobalState>SaveGlobalState</a>
    1.31 +   <li><a href=#RestoreGlobalState>RestoreGlobalState</a>
    1.32 +   <li><a href=#ResetGlobalState>ResetGlobalState</a>
    1.33 +   <li><a href=#ClientConnect>ClientConnect</a>
    1.34 +   <li><a href=#ClientDisconnect>ClientDisconnect</a>
    1.35 +   <li><a href=#ClientKill>ClientKill</a>
    1.36 +   <li><a href=#ClientPutInServer>ClientPutInServer</a>
    1.37 +   <li><a href=#ClientCommand>ClientCommand</a>
    1.38 +   <li><a href=#ClientUserInfoChanged>ClientUserInfoChanged</a>
    1.39 +   <li><a href=#ServerActivate>ServerActivate</a>
    1.40 +   <li><a href=#ServerDeactivate>ServerDeactivate</a>
    1.41 +   <li><a href=#PlayerPreThink>PlayerPreThink</a>
    1.42 +   <li><a href=#PlayerPostThink>PlayerPostThink</a>
    1.43 +   <li><a href=#StartFrame>StartFrame</a>
    1.44 +   <li><a href=#ParmsNewLevel>ParmsNewLevel</a>
    1.45 +   <li><a href=#ParmsChangeLevel>ParmsChangeLevel</a>
    1.46 +   <li><a href=#GetGameDescription>GetGameDescription</a>
    1.47 +   <li><a href=#PlayerCustomization>PlayerCustomization</a>
    1.48 +   <li><a href=#SpectatorConnect>SpectatorConnect</a>
    1.49 +   <li><a href=#SpectatorDisconnect>SpectatorDisconnect</a>
    1.50 +   <li><a href=#SpectatorThink>SpectatorThink</a>
    1.51 +   <li><a href=#Sys_Error>Sys_Error</a>
    1.52 +   <li><a href=#PM_Move>PM_Move</a>
    1.53 +   <li><a href=#PM_Init>PM_Init</a>
    1.54 +   <li><a href=#PM_FindTextureType>PM_FindTextureType</a>
    1.55 +   <li><a href=#SetupVisibility>SetupVisibility</a>
    1.56 +   <li><a href=#UpdateClientData>UpdateClientData</a>
    1.57 +   <li><a href=#AddToFullPack>AddToFullPack</a>
    1.58 +   <li><a href=#CreateBaseline>CreateBaseline</a>
    1.59 +   <li><a href=#RegisterEncoders>RegisterEncoders</a>
    1.60 +   <li><a href=#GetWeaponData>GetWeaponData</a>
    1.61 +   <li><a href=#CmdStart>CmdStart</a>
    1.62 +   <li><a href=#CmdEnd>CmdEnd</a>
    1.63 +   <li><a href=#ConnectionlessPacket>ConnectionlessPacket</a>
    1.64 +   <li><a href=#GetHullBounds>GetHullBounds</a>
    1.65 +   <li><a href=#CreateInstancedBaselines>CreateInstancedBaselines</a>
    1.66 +   <li><a href=#InconsistentFile>InconsistentFile</a>
    1.67 +   <li><a href=#AllowLagCompensation>AllowLagCompensation</a>
    1.68 +</ul>
    1.69 +   
    1.70 +<hr><h3><tt><a name="GameDLLInit">GameDLLInit</a></tt></h3>
    1.71 +<i>from dlls/game.cpp:</i><br>
    1.72 +<dd><tt>void GameDLLInit(void);</tt><p>
    1.73 +<blockquote><tt>
    1.74 +	Register your console variables here.<br>
    1.75 +	This gets called one time when the game is initialied.<br>
    1.76 +	Initialize the game (one-time call after loading of game .dll)<br>
    1.77 +</tt></blockquote>
    1.78 +<p><i>comments:</i><br>
    1.79 +<blockquote>
    1.80 +	Called just after hlds reports "Dll loaded for mod Half-Life".
    1.81 +</blockquote>
    1.82 +
    1.83 +<hr><h3><tt><a name="DispatchSpawn">DispatchSpawn</a></tt></h3>
    1.84 +<i>from dlls/cbase.cpp</I>
    1.85 +<dd><tt>int DispatchSpawn(edict_t *pent);</tt><p>
    1.86 +<p><i>comments:</i><br>
    1.87 +<blockquote>
    1.88 +	0==Success, -1==Failure ?
    1.89 +</blockquote>
    1.90 +
    1.91 +<hr><h3><tt><a name="DispatchThink">DispatchThink</a></tt></h3>
    1.92 +<i>from dlls/cbase.cpp</i><br>
    1.93 +<dd><tt>void DispatchThink(edict_t *pent);</tt><p>
    1.94 +
    1.95 +<hr><h3><tt><a name="DispatchUse">DispatchUse</a></tt></h3>
    1.96 +<i>from dlls/cbase.cpp</i><br>
    1.97 +<dd><tt>void DispatchUse(edict_t *pentUsed, edict_t *pentOther);</tt><p>
    1.98 +
    1.99 +<hr><h3><tt><a name="DispatchTouch">DispatchTouch</a></tt></h3>
   1.100 +<i>from dlls/cbase.cpp</i><br>
   1.101 +<dd><tt>void DispatchTouch(edict_t *pentTouched, edict_t *pentOther);</tt><p>
   1.102 +
   1.103 +<hr><h3><tt><a name="DispatchBlocked">DispatchBlocked</a></tt></h3>
   1.104 +<i>from dlls/cbase.cpp</i><br>
   1.105 +<dd><tt>void DispatchBlocked(edict_t *pentBlocked, edict_t *pentOther);</tt><p>
   1.106 +
   1.107 +<hr><h3><tt><a name="DispatchKeyValue">DispatchKeyValue</a></tt></h3>
   1.108 +<i>from dlls/cbase.cpp</i><br>
   1.109 +<dd><tt>void DispatchKeyValue(edict_t *pentKeyvalue, KeyValueData *pkvd);</tt><p>
   1.110 +
   1.111 +<hr><h3><tt><a name="DispatchSave">DispatchSave</a></tt></h3>
   1.112 +<i>from dlls/cbase.cpp</i><br>
   1.113 +<dd><tt>void DispatchSave(edict_t *pent, SAVERESTOREDATA *pSaveData);</tt><p>
   1.114 +
   1.115 +<hr><h3><tt><a name="DispatchRestore">DispatchRestore</a></tt></h3>
   1.116 +<i>from dlls/cbase.cpp</i><br>
   1.117 +<dd><tt>int DispatchRestore(edict_t *pent, SAVERESTOREDATA *pSaveData, int globalEntity);</tt><p>
   1.118 +<p><i>comments:</i><br>
   1.119 +<blockquote>
   1.120 +	0==Success, -1==Failure ?
   1.121 +</blockquote>
   1.122 +
   1.123 +<hr><h3><tt><a name="DispatchObjectCollsionBox">DispatchObjectCollsionBox</a></tt></h3>
   1.124 +<i>from dlls/cbase.cpp</i><br>
   1.125 +<dd><tt>void DispatchObjectCollsionBox(edict_t *pent);</tt><p>
   1.126 +
   1.127 +<hr><h3><tt><a name="SaveWriteFields">SaveWriteFields</a></tt></h3>
   1.128 +<i>from dlls/cbase.cpp</i><br>
   1.129 +<dd><tt>void SaveWriteFields(SAVERESTOREDATA *pSaveData, const char *pname, void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCount);</tt><p>
   1.130 +
   1.131 +<hr><h3><tt><a name="SaveReadFields">SaveReadFields</a></tt></h3>
   1.132 +<i>from dlls/cbase.cpp</i><br>
   1.133 +<dd><tt>void SaveReadFields(SAVERESTOREDATA *pSaveData, const char *pname, void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCount);</tt><p>
   1.134 +
   1.135 +<hr><h3><tt><a name="SaveGlobalState">SaveGlobalState</a></tt></h3>
   1.136 +<i>from dlls/world.cpp</i><br>
   1.137 +<dd><tt>void SaveGlobalState(SAVERESTOREDATA *pSaveData);</tt><p>
   1.138 +
   1.139 +<hr><h3><tt><a name="RestoreGlobalState">RestoreGlobalState</a></tt></h3>
   1.140 +<i>from dlls/world.cpp</i><br>
   1.141 +<dd><tt>void RestoreGlobalState(SAVERESTOREDATA *pSaveData);</tt><p>
   1.142 +
   1.143 +<hr><h3><tt><a name="ResetGlobalState">ResetGlobalState</a></tt></h3>
   1.144 +<i>from dlls/world.cpp</i><br>
   1.145 +<dd><tt>void ResetGlobalState(void);</tt><p>
   1.146 +
   1.147 +<hr><h3><tt><a name="ClientConnect">ClientConnect</a></tt></h3>
   1.148 +<i>from dlls/client.cpp:</i><br>
   1.149 +<dd><tt>BOOL ClientConnect(edict_t *pEntity, const char *pszName, const char *pszAddress, char szRejectReason[128]);</tt><p>
   1.150 +<blockquote><tt>
   1.151 +	Called when a player connects to a server.
   1.152 +</tt></blockquote>
   1.153 +<p><i>comments:</i><br>
   1.154 +<blockquote>
   1.155 +	Called on initial connect, just after hlds reports "connected", ie:
   1.156 +	<pre>    <tt>"John&lt;1&gt;&lt;WON:9856723&gt;" connected, address "127.0.0.1:27005"</tt></pre>
   1.157 +	This is before the user begins downloading, or anything else.
   1.158 +</blockquote>
   1.159 +
   1.160 +<hr><h3><tt><a name="ClientDisconnect">ClientDisconnect</a></tt></h3>
   1.161 +<i>from dlls/client.cpp:</i><br>
   1.162 +<dd><tt>void ClientDisconnect(edict_t *pEntity);</tt><p>
   1.163 +<blockquote><tt>
   1.164 +	Called when a player disconnects from a server.<br>
   1.165 +	GLOBALS ASSUMED SET:  g_fGameOver
   1.166 +</tt></blockquote>
   1.167 +<p><i>comments:</i><br>
   1.168 +<blockquote>
   1.169 +	This is not the opposite of <tt><b>ClientConnect</b></tt>, despite the similar name.
   1.170 +	It appears to only be called if the client was <tt><b>PutInServer</b></tt> first.  If
   1.171 +	the client disconnects before being <tt><b>PutInServer</b></tt>, no API routine is
   1.172 +	called.  This would be more appropriately named <tt><i><b>ClientRemoveFromServer</i></b></tt>.
   1.173 +</blockquote>
   1.174 +
   1.175 +<hr><h3><tt><a name="ClientKill">ClientKill</a></tt></h3>
   1.176 +<i>from dlls/client.cpp:</i><br>
   1.177 +<dd><tt>void ClientKill(edict_t *pEntity);</tt><p>
   1.178 +<blockquote><tt>
   1.179 +	Player entered the suicide command.<br>
   1.180 +	GLOBALS ASSUMED SET:  g_ulModelIndexPlayer
   1.181 +</tt></blockquote>
   1.182 +<p><i>comments:</i><br>
   1.183 +<blockquote>
   1.184 +	When the client typed "kill" in the console?
   1.185 +</blockquote>
   1.186 +
   1.187 +<hr><h3><tt><a name="ClientPutInServer">ClientPutInServer</a></tt></h3>
   1.188 +<i>from dlls/client.cpp:</i><br>
   1.189 +<dd><tt>void ClientPutInServer(edict_t *pEntity);</tt><p>
   1.190 +<blockquote><tt>
   1.191 +	Called each time a player is spawned.
   1.192 +</tt></blockquote>
   1.193 +<p><i>comments:</i><br>
   1.194 +<blockquote>
   1.195 +	Called after the client has uploaded/download all necessary resources,
   1.196 +	just after hlds reports "entered the game", ie:
   1.197 +	<pre>   "John&lt;1&gt;" has entered the game</pre>
   1.198 +</blockquote>
   1.199 +
   1.200 +<hr><h3><tt><a name="ClientCommand">ClientCommand</a></tt></h3>
   1.201 +<i>from dlls/client.cpp:</i><br>
   1.202 +<dd><tt>void ClientCommand(edict_t *pEntity);</tt><p>
   1.203 +<blockquote><tt>
   1.204 +	Called each time a player uses a "cmd" command.
   1.205 +	Use CMD_ARGS, CMD_ARGV, and CMD_ARGC to get pointers to the character
   1.206 +	string command.
   1.207 +</tt></blockquote>
   1.208 +
   1.209 +<hr><h3><tt><a name="ClientUserInfoChanged">ClientUserInfoChanged</a></tt></h3>
   1.210 +<i>from dlls/client.cpp:</i><br>
   1.211 +<dd><tt>void ClientUserInfoChanged(edict_t *pEntity, char *infobuffer);</tt><p>
   1.212 +<blockquote><tt>
   1.213 +	Called after the player changes userinfo - gives dll a chance to modify
   1.214 +	it before it gets sent into the rest of the engine.
   1.215 +</tt></blockquote>
   1.216 +<p><i>comments:</i><br>
   1.217 +<blockquote>
   1.218 +	Called when user issues <tt>"<b>setinfo</b>"</tt> from the console.  Also appears to be
   1.219 +	called whenever the user returns to the game from the ESC menu.
   1.220 +</blockquote>
   1.221 +
   1.222 +<hr><h3><tt><a name="ServerActivate">ServerActivate</a></tt></h3>
   1.223 +<i>from dlls/client.cpp:</i><br>
   1.224 +<dd><tt>void ServerActivate(edict_t *pEdictList, int edictCount, int clientMax);</tt><p>
   1.225 +<blockquote><tt>
   1.226 +	Every call to ServerActivate should be matched by a call to
   1.227 +	ServerDeactivate.
   1.228 +</tt></blockquote>
   1.229 +<p><i>comments:</i><br>
   1.230 +<blockquote>
   1.231 +	Added in SDK 2.0.
   1.232 +	Apparently called when the server has loaded the map, but before it
   1.233 +	precaches from the <tt><b>.res</b></tt> file.
   1.234 +</blockquote>
   1.235 +
   1.236 +<hr><h3><tt><a name="ServerDeactivate">ServerDeactivate</a></tt></h3>
   1.237 +<i>from dlls/client.cpp:</i><br>
   1.238 +<dd><tt>void ServerDeactivate(void);</tt><p>
   1.239 +<blockquote><tt>
   1.240 +	Peform any shutdown operations here.<br>
   1.241 +	It's possible that the engine will call this function more times than
   1.242 +	is necessary.  Therefore, only run it one time for each call to
   1.243 +	ServerActivate.<br>
   1.244 +</tt></blockquote>
   1.245 +<p><i>comments:</i><br>
   1.246 +<blockquote>
   1.247 +	Called upon <tt>"<b>quit</b>"</tt> or <tt>"<b>changelevel</b>"</tt> .
   1.248 +</blockquote>
   1.249 +
   1.250 +<hr><h3><tt><a name="PlayerPreThink">PlayerPreThink</a></tt></h3>
   1.251 +<i>from dlls/client.cpp:</i><br>
   1.252 +<dd><tt>void PlayerPreThink(edict_t *pEntity);</tt><p>
   1.253 +<blockquote><tt>
   1.254 +	Called every frame before physics are run.
   1.255 +</tt></blockquote>
   1.256 +
   1.257 +<hr><h3><tt><a name="PlayerPostThink">PlayerPostThink</a></tt></h3>
   1.258 +<i>from dlls/client.cpp:</i><br>
   1.259 +<dd><tt>void PlayerPostThink(edict_t *pEntity);</tt><p>
   1.260 +<blockquote><tt>
   1.261 +	Called every frame after physics are run.
   1.262 +</tt></blockquote>
   1.263 +
   1.264 +<hr><h3><tt><a name="StartFrame">StartFrame</a></tt></h3>
   1.265 +<i>from dlls/client.cpp:</i><br>
   1.266 +<dd><tt>void StartFrame(void);</tt><p>
   1.267 +<blockquote><tt>
   1.268 +	GLOBALS ASSUMED SET:  g_ulFrameCount
   1.269 +</tt></blockquote>
   1.270 +
   1.271 +<hr><h3><tt><a name="ParmsNewLevel">ParmsNewLevel</a></tt></h3>
   1.272 +<i>from dlls/client.cpp</i><br>
   1.273 +<dd><tt>void ParmsNewLevel(void);</tt><p>
   1.274 +
   1.275 +<hr><h3><tt><a name="ParmsChangeLevel">ParmsChangeLevel</a></tt></h3>
   1.276 +<i>from dlls/client.cpp</i><br>
   1.277 +<dd><tt>void ParmsChangeLevel(void);</tt><p>
   1.278 +
   1.279 +<hr><h3><tt><a name="GetGameDescription">GetGameDescription</a></tt></h3>
   1.280 +<i>from dlls/client.cpp:</i><br>
   1.281 +<dd><tt>const char *GetGameDescription(void);</tt><p>
   1.282 +<blockquote><tt>
   1.283 +	Returns string describing current .dll game.<br>
   1.284 +	Returns the descriptive name of this .dll.  E.g., Half-Life, or Team
   1.285 +	Fortress 2.<br>
   1.286 +	This function might be called before the world has spawned, and the game
   1.287 +	rules initialized.<br>
   1.288 +</tt></blockquote>
   1.289 +
   1.290 +<hr><h3><tt><a name="PlayerCustomization">PlayerCustomization</a></tt></h3>
   1.291 +<i>from dlls/client.cpp:</i><br>
   1.292 +<dd><tt>void PlayerCustomization(edict_t *pEntity, customization_t *pCust);</tt><p>
   1.293 +<blockquote><tt>
   1.294 +	Notifies .dll of new customization for player.<br>
   1.295 +	A new player customization has been registered on the server. 
   1.296 +	UNDONE: This only sets the # of frames of the spray can logo animation
   1.297 +	right now.<br>
   1.298 +</tt></blockquote>
   1.299 +
   1.300 +<hr><h3><tt><a name="SpectatorConnect">SpectatorConnect</a></tt></h3>
   1.301 +<i>from dlls/client.cpp:</i><br>
   1.302 +<dd><tt>void SpectatorConnect(edict_t *pEntity);</tt><p>
   1.303 +<blockquote><tt>
   1.304 +	Called when spectator joins server.<br>
   1.305 +	A spectator has joined the game.<br>
   1.306 +</tt></blockquote>
   1.307 +
   1.308 +<hr><h3><tt><a name="SpectatorDisconnect">SpectatorDisconnect</a></tt></h3>
   1.309 +<i>from dlls/client.cpp:</i><br>
   1.310 +<dd><tt>void SpectatorDisconnect(edict_t *pEntity);</tt><p>
   1.311 +<blockquote><tt>
   1.312 +	Called when spectator leaves the server.<br>
   1.313 +	A spectator has left the game.<br>
   1.314 +</tt></blockquote>
   1.315 +
   1.316 +<hr><h3><tt><a name="SpectatorThink">SpectatorThink</a></tt></h3>
   1.317 +<i>from dlls/client.cpp:</i><br>
   1.318 +<dd><tt>void SpectatorThink(edict_t *pEntity);</tt><p>
   1.319 +<blockquote><tt>
   1.320 +	Called when spectator sends a command packet (usercmd_t).<br>
   1.321 +	A spectator has sent a usercmd.<br>
   1.322 +</tt></blockquote>
   1.323 +
   1.324 +<hr><h3><tt><a name="Sys_Error">Sys_Error</a></tt></h3>
   1.325 +<i>from dlls/client.cpp:</i><br>
   1.326 +<dd><tt>void Sys_Error(const char *error_string);</tt><p>
   1.327 +<blockquote><tt>
   1.328 +	Called when engine has encountered an error.<br>
   1.329 +	Notify game .dll that engine is going to shut down.<br>
   1.330 +	Engine is going to shut down, allows setting a breakpoint in game dll
   1.331 +	to catch that occasion.<br>
   1.332 +	Add code ( e.g., _asm { int 3 }; here to cause a breakpoint for
   1.333 +	debugging your game .dlls.<br>
   1.334 +</tt></blockquote>
   1.335 +<p><i>comments:</i><br>
   1.336 +<blockquote>
   1.337 +	Added in SDK 2.0.
   1.338 +</blockquote>
   1.339 +
   1.340 +<hr><h3><tt><a name="PM_Move">PM_Move</a></tt></h3>
   1.341 +<i>from pm_shared/pm_shared.c:</i><br>
   1.342 +<dd><tt>void PM_Move(struct playermove_s *ppmove, int server);</tt><p>
   1.343 +<blockquote><tt>
   1.344 +	This modume implements the shared player physics code between
   1.345 +	any particular game and the engine.  The same PM_Move routine is built
   1.346 +	into the game .dll and the client .dll and is invoked by each side as
   1.347 +	appropriate.  There should be no distinction, internally, between server
   1.348 +	and client.  This will ensure that prediction behaves appropriately.
   1.349 +</tt></blockquote>
   1.350 +<p><i>comments:</i><br>
   1.351 +<blockquote>
   1.352 +	Added in SDK 2.0.
   1.353 +</blockquote>
   1.354 +
   1.355 +<hr><h3><tt><a name="PM_Init">PM_Init</a></tt></h3>
   1.356 +<i>from pm_shared/pm_shared.c:</i>
   1.357 +<dd><tt>void PM_Init(struct playermove_s *ppmove);</tt><p>
   1.358 +<blockquote><tt>
   1.359 +	Server version of player movement initialization.
   1.360 +</tt></blockquote>
   1.361 +<p><i>comments:</i><br>
   1.362 +<blockquote>
   1.363 +	Added in SDK 2.0.
   1.364 +</blockquote>
   1.365 +
   1.366 +<hr><h3><tt><a name="PM_FindTextureType">PM_FindTextureType</a></tt></h3>
   1.367 +<i>from pm_shared/pm_shared.c</i><br>
   1.368 +<dd><tt>char PM_FindTextureType(char *name);</tt><p>
   1.369 +<p><i>comments:</i><br>
   1.370 +<blockquote>
   1.371 +	Added in SDK 2.0.
   1.372 +</blockquote>
   1.373 +
   1.374 +<hr><h3><tt><a name="SetupVisibility">SetupVisibility</a></tt></h3>
   1.375 +<i>from dlls/client.cpp:</i><br>
   1.376 +<dd><tt>void SetupVisibility(edict_t *pViewEntity, edict_t *pClient, unsigned char **pvs, unsigned char **pas);</tt><p>
   1.377 +<i>from dlls/client.cpp:</i>
   1.378 +<blockquote><tt>
   1.379 +	Set up PVS and PAS for networking for this client.
   1.380 +	<p>
   1.381 +	A client can have a separate "view entity" indicating
   1.382 +	that his/her view should depend on the origin of that view entity.  If
   1.383 +	that's the case, then pViewEntity will be non-NULL and will be used.
   1.384 +	Otherwise, the current entity's origin is used.  Either is offset by the
   1.385 +	view_ofs to get the eye position.
   1.386 +	<p>
   1.387 +	From the eye position, we set up the PAS and PVS to use for filtering
   1.388 +	network messages to the client.  At this point, we could override the
   1.389 +	actual PAS or PVS values, or use a different origin.
   1.390 +	<p>
   1.391 +	NOTE:  Do not cache the values of pas and pvs, as they depend on
   1.392 +	reusable memory in the engine, they are only good for this one frame
   1.393 +</tt></blockquote>
   1.394 +<p><i>comments:</i><br>
   1.395 +<blockquote>
   1.396 +	Added in SDK 2.0.
   1.397 +</blockquote>
   1.398 +
   1.399 +<hr><h3><tt><a name="UpdateClientData">UpdateClientData</a></tt></h3>
   1.400 +<i>from dlls/client.cpp:</i><br>
   1.401 +<dd><tt>void UpdateClientData (const struct edict_s *ent, int sendweapons, struct clientdata_s *cd);</tt><p>
   1.402 +<blockquote><tt>
   1.403 +	Set up data sent only to specific client.<br>
   1.404 +	Data sent to current client only.<br>
   1.405 +	Engine sets argument 'cd' to 0 before calling.<br>
   1.406 +</tt></blockquote>
   1.407 +<p><i>comments:</i><br>
   1.408 +<blockquote>
   1.409 +	Added in SDK 2.0.
   1.410 +</blockquote>
   1.411 +
   1.412 +<hr><h3><tt><a name="AddToFullPack">AddToFullPack</a></tt></h3>
   1.413 +<i>from dlls/client.cpp:</i><br>
   1.414 +<dd><tt>int AddToFullPack(struct entity_state_s *state, int e, edict_t *ent, edict_t *host, int hostflags, int player, unsigned char *pSet);</tt><p>
   1.415 +<blockquote><tt>
   1.416 +	Return 1 if the entity state has been filled in for the ent and the
   1.417 +	entity will be propagated to the client, 0 otherwise.
   1.418 +	<p>
   1.419 +	State is the server maintained copy of the state info that is
   1.420 +	transmitted to the client.  A MOD could alter values copied into state
   1.421 +	to send the "host" a different look for a particular entity update,
   1.422 +	etc.  
   1.423 +	<p>
   1.424 +	Arguments 'e' and 'ent' are the entity that is being added to the
   1.425 +	update, if 1 is returneds.  Host is the player's edict of the player
   1.426 +	whom we are sending the update to.  Player is 1 if the ent/e is a
   1.427 +	player and 0 otherwise.  Argument 'pSet' is either the PAS or PVS that
   1.428 +	we previous set up.  We can use it to ask the engine to filter the
   1.429 +	entity against the PAS or PVS.  
   1.430 +	<p>
   1.431 +	We could also use the pas/ pvs that we set in SetupVisibility, if we
   1.432 +	wanted to.  Caching the value is valid in that case, but still only for
   1.433 +	the current frame.
   1.434 +</tt></blockquote>
   1.435 +<p><i>comments:</i><br>
   1.436 +<blockquote>
   1.437 +	Added in SDK 2.0.
   1.438 +</blockquote>
   1.439 +
   1.440 +<hr><h3><tt><a name="CreateBaseline">CreateBaseline</a></tt></h3>
   1.441 +<i>from dlls/client.cpp:</i><br>
   1.442 +<dd><tt>void CreateBaseline(int player, int eindex, struct entity_state_s *baseline, struct edict_s *entity, int playermodelindex, vec3_t player_mins, vec3_t player_maxs);</tt><p>
   1.443 +<blockquote><tt>
   1.444 +	Tweak entity baseline for network encoding, allows setup of player
   1.445 +	baselines, too.<br>
   1.446 +	Creates baselines used for network encoding, especially for player data
   1.447 +	since players are not spawned until connect time.<br>
   1.448 +</tt></blockquote>
   1.449 +<p><i>comments:</i><br>
   1.450 +<blockquote>
   1.451 +	Added in SDK 2.0.
   1.452 +</blockquote>
   1.453 +
   1.454 +<hr><h3><tt><a name="RegisterEncoders">RegisterEncoders</a></tt></h3>
   1.455 +<i>from dlls/client.cpp:</i><br>
   1.456 +<dd><tt>void RegisterEncoders(void);</tt><p>
   1.457 +<blockquote><tt>
   1.458 +	Callbacks for network encoding.<br>
   1.459 +	Allows game .dll to override network encoding of certain types of
   1.460 +	entities and tweak values, etc.<br>
   1.461 +</tt></blockquote>
   1.462 +<p><i>comments:</i><br>
   1.463 +<blockquote>
   1.464 +	Added in SDK 2.0.
   1.465 +</blockquote>
   1.466 +
   1.467 +<hr><h3><tt><a name="GetWeaponData">GetWeaponData</a></tt></h3>
   1.468 +<i>from dlls/client.cpp</i><br>
   1.469 +<dd><tt>int GetWeaponData(struct edict_s *player, struct weapon_data_s *info);</tt><p>
   1.470 +<p><i>comments:</i><br>
   1.471 +<blockquote>
   1.472 +	Added in SDK 2.0.
   1.473 +</blockquote>
   1.474 +
   1.475 +<hr><h3><tt><a name="CmdStart">CmdStart</a></tt></h3>
   1.476 +<i>from dlls/client.cpp:</i><br>
   1.477 +<dd><tt>void CmdStart(const edict_t *player, const struct usercmd_s *cmd, unsigned int random_seed);</tt><p>
   1.478 +<blockquote><tt>
   1.479 +	We're about to run this usercmd for the specified player.  We can set
   1.480 +	up groupinfo and masking here, etc.  This is the time to examine the
   1.481 +	usercmd for anything extra.  This call happens even if think does not.
   1.482 +</tt></blockquote>
   1.483 +<p><i>comments:</i><br>
   1.484 +<blockquote>
   1.485 +	Added in SDK 2.0.
   1.486 +</blockquote>
   1.487 +
   1.488 +<hr><h3><tt><a name="CmdEnd">CmdEnd</a></tt></h3>
   1.489 +<i>from dlls/client.cpp:</i><br>
   1.490 +<dd><tt>void CmdEnd (const edict_t *player);</tt><p>
   1.491 +<blockquote><tt>
   1.492 +	Each cmdstart is exactly matched with a cmd end, clean up any
   1.493 +	group trace flags, etc. here.
   1.494 +</tt></blockquote>
   1.495 +<p><i>comments:</i><br>
   1.496 +<blockquote>
   1.497 +	Added in SDK 2.0.
   1.498 +</blockquote>
   1.499 +
   1.500 +<hr><h3><tt><a name="ConnectionlessPacket">ConnectionlessPacket</a></tt></h3>
   1.501 +<i>from dlls/client.cpp:</i><br>
   1.502 +<dd><tt>int	ConnectionlessPacket(const struct netadr_s *net_from, const char *args, char *response_buffer, int *response_buffer_size);</tt>
   1.503 +<blockquote><tt>
   1.504 +	Return 1 if the packet is valid.  Set response_buffer_size if you want
   1.505 +	to send a response packet.  Incoming, it holds the max size of the
   1.506 +	response_buffer, so you must zero it out if you choose not to respond.
   1.507 +</tt></blockquote>
   1.508 +<p><i>comments:</i><br>
   1.509 +<blockquote>
   1.510 +	Added in SDK 2.0.
   1.511 +</blockquote>
   1.512 +
   1.513 +<hr><h3><tt><a name="GetHullBounds">GetHullBounds</a></tt></h3>
   1.514 +<i>from dlls/client.cpp:</i><br>
   1.515 +<dd><tt>int GetHullBounds(int hullnumber, float *mins, float *maxs);</tt><p>
   1.516 +<blockquote><tt>
   1.517 +	Engine calls this to enumerate player collision hulls,
   1.518 +	for prediction.  Return 0 if the hullnumber doesn't exist.
   1.519 +</tt></blockquote>
   1.520 +<p><i>comments:</i><br>
   1.521 +<blockquote>
   1.522 +	Added in SDK 2.0.
   1.523 +</blockquote>
   1.524 +
   1.525 +<hr><h3><tt><a name="CreateInstancedBaselines">CreateInstancedBaselines</a></tt></h3>
   1.526 +<i>from dlls/client.cpp:</i><br>
   1.527 +<dd><tt>void CreateInstancedBaselines (void);</tt><p>
   1.528 +<blockquote><tt>
   1.529 +	Tweak entity baseline for network encoding, allows setup of player baselines, too.<br>
   1.530 +	Create pseudo-baselines for items that aren't placed in the map at
   1.531 +	spawn time, but which are likely to be created during play (e.g.,
   1.532 +	grenades, ammo packs, projectiles, corpses, etc.).<br>
   1.533 +</tt></blockquote>
   1.534 +<p><i>comments:</i><br>
   1.535 +<blockquote>
   1.536 +	Added in SDK 2.0.
   1.537 +</blockquote>
   1.538 +
   1.539 +<hr><h3><tt><a name="InconsistentFile">InconsistentFile</a></tt></h3>
   1.540 +<i>from dlls/client.cpp:</i><br>
   1.541 +<dd><tt>int	InconsistentFile(const edict_t *player, const char *filename, char *disconnect_message);</tt>
   1.542 +<blockquote><tt>
   1.543 +	One of the ENGINE_FORCE_UNMODIFIED files failed the consistency check
   1.544 +	for the specified player Return 0 to allow the client to continue, 1 to
   1.545 +	force immediate disconnection (with an optional disconnect message of
   1.546 +	up to 256 characters).
   1.547 +</tt></blockquote>
   1.548 +<p><i>comments:</i><br>
   1.549 +<blockquote>
   1.550 +	Added in SDK 2.0.
   1.551 +</blockquote>
   1.552 +
   1.553 +<hr><h3><tt><a name="AllowLagCompensation">AllowLagCompensation</a></tt></h3>
   1.554 +<i>from dlls/client.cpp:</i><br>
   1.555 +<dd><tt>int AllowLagCompensation(void);</tt><p>
   1.556 +<blockquote><tt>
   1.557 +	The game .dll should return 1 if lag compensation should be allowed
   1.558 +	(could also just set the sv_unlag cvar.  Most games right now should
   1.559 +	return 0, until client-side weapon prediction code is written and
   1.560 +	tested for them (note you can predict weapons, but not do lag
   1.561 +	compensation, too, if you want.
   1.562 +</tt></blockquote>
   1.563 +<p><i>comments:</i><br>
   1.564 +<blockquote>
   1.565 +	Added in SDK 2.0.
   1.566 +</blockquote>
   1.567 +
   1.568 +<p>
   1.569 +<hr>
   1.570 +
   1.571 +</body>
   1.572 +</HTML>