--
[ Picked text/plain from multipart/alternative ]
The HOOK_COMMAND macro is a fancy way of creating a ConCommand. First,
DECLARE_HUD_COMMAND_NAME must be called, which will create the hook for the
function (create and link a function named there ie Close, to the function
in the class, UserCmd_Close). Then HOOK_COMMAND will create the ConCommand
to call the external Close function (thereby calling UserCmd_Close).

There are plenty of examples at the top of weaponselection.cpp.

On 11/5/06, Zach Brockway <[EMAIL PROTECTED]> wrote:
>
> --
> [ Picked text/plain from multipart/alternative ]
> I don't know if this helps you, since you said "for example," but in the
> case you gave, but isn't that HOOK_COMMAND macro (weapon_selection.cpp:55)
> plugging the "cancelselect" command into a function called Close? (I don't
> have the code in front of me, so be gentle.)
>
> On 11/4/06, rj m <[EMAIL PROTECTED]> wrote:
> >
> > well, I can see it being called, but I don't see the concommand is
> > what I'm saying: for example this is the findings:
> > Find all "cancelselect", Subfolders, Find Results 1, Entire Solution,
> > "*.*"
> > C:\source\mp\src\cl_dll\perfvisualbenchmark.cpp(222):
> > engine->ClientCmd("cancelselect");                              //
> > exit menu and console
> > C:\source\mp\src\cl_dll\weapon_selection.cpp(55):HOOK_COMMAND(
> > cancelselect, Close );
> >
> >
> C:\source\mp\src\cl_dll\weapon_selection.cpp(170):                      
> engine->ClientCmd(
> > "cancelselect\n" );
> > C:\source\mp\src\cl_dll\weapon_selection.cpp(238):      if
> > (IsInSelectionMode() && pszCurrentBinding &&
> > !stricmp(pszCurrentBinding, "cancelselect"))
> >
> >
> C:\source\mp\src\cl_dll\weapon_selection.cpp(509):              
> engine->ClientCmd(
> > "cancelselect\n" );
> >
> >
> C:\source\mp\src\cl_dll\weapon_selection.cpp(528):              
> engine->ClientCmd(
> > "cancelselect\n" );
> >
> >
> C:\source\mp\src\dlls\client.cpp(855):                  engine->ClientCommand(
> > UTIL_GetCommandClient()->edict(), "cancelselect" );
> >
> >
> C:\source\mp\src\dlls\client.cpp(886):                  engine->ClientCommand(
> > UTIL_GetCommandClient()->edict(), "cancelselect" );
> > Total found: 8    Matching files: 3    Total files searched: 2100
> >
> > On 11/4/06, Jeremy Swigart <[EMAIL PROTECTED]> wrote:
> > > --
> > > [ Picked text/plain from multipart/alternative ]
> > > Looks to me like cancelselect is in the client dll.
> > >
> > > On 11/4/06, rj m <[EMAIL PROTECTED]> wrote:
> > > >
> > > > I'm wondering what concommands are editable, and not editable.  For
> > > > example "cancelselect" doesn't seem to be anywhere in the Source
> code.
> > > > Is this command and others already embedded into hl2.exe or
> > > > something?
> > > >
> > > > _______________________________________________
> > > > To unsubscribe, edit your list preferences, or view the list
> archives,
> > > > please visit:
> > > > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> > > >
> > > >
> > > --
> > >
> > > _______________________________________________
> > > To unsubscribe, edit your list preferences, or view the list archives,
> > please visit:
> > > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> > >
> > >
> >
> > _______________________________________________
> > To unsubscribe, edit your list preferences, or view the list archives,
> > please visit:
> > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >
> >
>
>
> --
> "I am at the point where coffee just makes my teeth vibrate." - Tycho,
> Penny-Arcade.com
> --
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>


--
Lead Programmer for Resistance and Liberation
www.resistanceandliberation.com
--

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to