doc/html/newapi_notes.html
author darope
Tue Dec 20 15:43:08 2005 +0000 (2005-12-20)
branchB-work
changeset 176 9a743aab6b3d
parent 144 8f8565e045a0
permissions -rw-r--r--
Added documentation of new QueryClientCvarValue2() and CvarValue2() API
functions. Marked old functions as obsolete and helper function as
deprecated.
Added info on patched SDK version new API functions are available from.
darope@0
     1
<!-- vi: set ts=4 sw=4 : -->
darope@0
     2
<!-- vim: set tw=75 : -->
darope@0
     3
darope@0
     4
<HTML>
darope@0
     5
<head>
darope@0
     6
<title>HLSDK NEWAPI Notes</title>
darope@0
     7
</head>
darope@0
     8
<body>
darope@0
     9
darope@0
    10
<h1>HLSDK NEWAPI Notes
darope@0
    11
</h1>
darope@0
    12
darope@0
    13
<hr>
darope@0
    14
<ul>
darope@0
    15
   <li><a href=#OnFreeEntPrivateData>OnFreeEntPrivateData</a>
darope@0
    16
   <li><a href=#GameShutdown>GameShutdown</a>
darope@0
    17
   <li><a href=#ShouldCollide>ShouldCollide</a>
bailopan@144
    18
   <li><a href=#CvarValue>CvarValue</a>
darope@176
    19
   <li><a href=#CvarValue2>CvarValue2</a>
darope@0
    20
</ul>
darope@0
    21
darope@0
    22
<b>NOTE</b>: No examples of these found in SDK...
darope@0
    23
darope@0
    24
<p>
darope@0
    25
darope@0
    26
<hr><h3><tt><a name="OnFreeEntPrivateData">OnFreeEntPrivateData</a></tt></h3>
darope@0
    27
<dd><tt>void OnFreeEntPrivateData(edict_t pEnt);</tt><p>
darope@0
    28
<i>from engine/eiface.h:</i><br>
darope@0
    29
<blockquote><tt>
darope@0
    30
	Called right before the object's memory is freed.  Calls its destructor.
darope@0
    31
</tt></blockquote>
darope@0
    32
<p><i>comments:</i><br>
darope@0
    33
<blockquote>
darope@0
    34
	See also <a
darope@0
    35
	href="http://list.valvesoftware.com/pipermail/hlcoders/2002-January/001397.html"
darope@0
    36
	>Ken Birdwell on constructors</a>, from the HLCoders list.
darope@0
    37
	<br>Added in SDK 2.0.  
darope@0
    38
</blockquote>
darope@0
    39
darope@0
    40
<hr><h3><tt><a name="GameShutdown">GameShutdown</a></tt></h3>
darope@0
    41
<dd><tt>void GameShutdown(void);</tt><p>
darope@0
    42
<p><i>comments:</i><br>
darope@0
    43
<blockquote>
darope@0
    44
	Added in SDK 2.0.
darope@0
    45
</blockquote>
darope@0
    46
darope@0
    47
<hr><h3><tt><a name="ShouldCollide">ShouldCollide</a></tt></h3>
darope@0
    48
<dd><tt>int ShouldCollide(edict_t *pentTouched, edict_t *pentOther);</tt><p>
darope@0
    49
<i>from [email protected], via HLCoders:</i><br>
darope@0
    50
<blockquote><tt>
darope@0
    51
	..a hook that can override if any two entities should collide  
darope@0
    52
	when they try to pass through each other.
darope@0
    53
</tt></blockquote>
darope@0
    54
<p><i>comments:</i><br>
darope@0
    55
<blockquote>
darope@0
    56
	Mugsy from DoD indicates that the return value for normal operation is 1.
darope@0
    57
	<br>Added in SDK 2.0.  
darope@0
    58
</blockquote>
darope@0
    59
bailopan@144
    60
<hr><h3><tt><a name="CvarValue">CvarValue</a></tt></h3>
bailopan@144
    61
<dd><tt>void (*pfnCvarValue)( const edict_t *pEnt, const char *value );</tt><p>
bailopan@144
    62
<i>from [email protected], via HLCoders:</i><br>
bailopan@144
    63
<blockquote><tt>
bailopan@144
    64
When the client responds to the cvar request you will get a callback to pfnCvarValue() 
bailopan@144
    65
with the edict of the player who is responding and the cvars values.
bailopan@144
    66
</tt></blockquote>
bailopan@144
    67
<p><i>comments:</i><br>
bailopan@144
    68
<blockquote>
darope@176
    69
	Added 2005-08-11, no SDK update.  (Available in patched SDK as of hlsdk-2.3-p2.)
darope@176
    70
</blockquote>
darope@176
    71
<blockquote>
darope@176
    72
	<b>Use of this function is DEPRECATED. It has been obsoleted by the
darope@176
    73
		pfnCvarValue2() function. See below.</b>
darope@176
    74
</blockquote>
darope@176
    75
darope@176
    76
<hr><h3><tt><a name="CvarValue2">CvarValue2</a></tt></h3>
darope@176
    77
<dd><tt>void (*pfnCvarValue2)( const edict_t *pEnt, int requestID, const char *cvarName, const char *value );</tt><p>
darope@176
    78
<i>from [email protected], via HLCoders:</i><br>
darope@176
    79
<blockquote><tt>
darope@176
    80
		When the pfnQueryClientCvarValue2() completes it will call
darope@176
    81
		pfnCvarValue2() with the request ID you supplied earlier, the name
darope@176
    82
		of the cvar you requested and the value of that cvar. On failure (i.e
darope@176
    83
		that user is not connected or the cvar does not exist) the value of the
darope@176
    84
		returned cvar will be "Bad CVAR request". If you specify an invalid
darope@176
    85
		player edict you will get "Bad Player" as the value response.<br>
darope@176
    86
		If a client has a cvar value set to "Bad CVAR request" it cannot be
darope@176
    87
		differentiated from a bad request for a cvar. This is considered
darope@176
    88
		okay because that value is not considered to be useful as a valid
darope@176
    89
		cvar value.
darope@176
    90
</tt></blockquote>
darope@176
    91
<p><i>comments:</i><br>
darope@176
    92
<blockquote>
darope@176
    93
	Added 2005-11-22, no SDK update.  (Available in patched SDK as of hlsdk-2.3-p3.)
bailopan@144
    94
</blockquote>
bailopan@144
    95
darope@0
    96
<p>
darope@0
    97
<hr>
darope@0
    98
darope@0
    99
</body>
darope@0
   100
</HTML>