|
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> |
|
darope@248
|
18 |
<li><a href=#CvarValue>CvarValue</a> |
|
darope@249
|
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 |
|
|
darope@248
|
60 |
<hr><h3><tt><a name="CvarValue">CvarValue</a></tt></h3> |
|
darope@248
|
61 |
<dd><tt>void (*pfnCvarValue)( const edict_t *pEnt, const char *value );</tt><p> |
|
darope@248
|
62 |
<i>from [email protected], via HLCoders:</i><br> |
|
darope@248
|
63 |
<blockquote><tt> |
|
darope@248
|
64 |
When the client responds to the cvar request you will get a callback to pfnCvarValue() |
|
darope@248
|
65 |
with the edict of the player who is responding and the cvars values. |
|
darope@248
|
66 |
</tt></blockquote> |
|
darope@248
|
67 |
<p><i>comments:</i><br> |
|
darope@248
|
68 |
<blockquote> |
|
darope@249
|
69 |
Added 2005-08-11, no SDK update. (Available in patched SDK as of hlsdk-2.3-p2.) |
|
darope@249
|
70 |
</blockquote> |
|
darope@249
|
71 |
<blockquote> |
|
darope@249
|
72 |
<b>Use of this function is DEPRECATED. It has been obsoleted by the |
|
darope@249
|
73 |
pfnCvarValue2() function. See below.</b> |
|
darope@249
|
74 |
</blockquote> |
|
darope@249
|
75 |
|
|
darope@249
|
76 |
<hr><h3><tt><a name="CvarValue2">CvarValue2</a></tt></h3> |
|
darope@249
|
77 |
<dd><tt>void (*pfnCvarValue2)( const edict_t *pEnt, int requestID, const char *cvarName, const char *value );</tt><p> |
|
darope@249
|
78 |
<i>from [email protected], via HLCoders:</i><br> |
|
darope@249
|
79 |
<blockquote><tt> |
|
darope@249
|
80 |
When the pfnQueryClientCvarValue2() completes it will call |
|
darope@249
|
81 |
pfnCvarValue2() with the request ID you supplied earlier, the name |
|
darope@249
|
82 |
of the cvar you requested and the value of that cvar. On failure (i.e |
|
darope@249
|
83 |
that user is not connected or the cvar does not exist) the value of the |
|
darope@249
|
84 |
returned cvar will be "Bad CVAR request". If you specify an invalid |
|
darope@249
|
85 |
player edict you will get "Bad Player" as the value response.<br> |
|
darope@249
|
86 |
If a client has a cvar value set to "Bad CVAR request" it cannot be |
|
darope@249
|
87 |
differentiated from a bad request for a cvar. This is considered |
|
darope@249
|
88 |
okay because that value is not considered to be useful as a valid |
|
darope@249
|
89 |
cvar value. |
|
darope@249
|
90 |
</tt></blockquote> |
|
darope@249
|
91 |
<p><i>comments:</i><br> |
|
darope@249
|
92 |
<blockquote> |
|
darope@249
|
93 |
Added 2005-11-22, no SDK update. (Available in patched SDK as of hlsdk-2.3-p3.) |
|
darope@248
|
94 |
</blockquote> |
|
darope@248
|
95 |
|
|
darope@0
|
96 |
<p> |
|
darope@0
|
97 |
<hr> |
|
darope@0
|
98 |
|
|
darope@0
|
99 |
</body> |
|
darope@0
|
100 |
</HTML> |