View Single Post
Re: Lets get this stuff rolling!
Old
  (#14)
@$3.1415rin
Council Member, Author of JoeBOT
 
@$3.1415rin's Avatar
 
Status: Offline
Posts: 1,381
Join Date: Nov 2003
Location: Germany
Default Re: Lets get this stuff rolling! - 14-12-2004

just taking time for browsing the SDK, ignoring the fact that I'm writing an exam tomorrow ...

nothing really useful found, but some stuff which looks promising

//-----------------------------------------------------------------------------

// Purpose: Interface to get at server entities

//-----------------------------------------------------------------------------

class IServerGameEnts{ ...

sounds nice, especially there is a function to get a BaseEntity pointer of an edict_t *. the BaseEntity class in the HL2 dll itself looks that it's rather basic for other stuff, and won't be hopefully changed by a mod ( otherwise this won't be much of object orientation ) ...

virtual CBaseEntity* EdictToBaseEntity( edict_t *pEdict ) = 0;

unfortunately I havnt yet figured out how to load that interface. with that CBaseENtity, we'd get origin and stuff.



Edit : I think I got how to load that interface ... please stand by


another edit :

in the serverplugin_bot.cpp, I added

IServerGameEnts *servergameents = NULL;
// for accessing the server game entities

then I loaded the library by putting

servergameents = (IServerGameEnts*)interfaceFactory(INTERFACEVERSIO N_SERVERGAMEENTS, NULL)

into the load function of the plugin ... and now I gotta see if I can load that plugin at all by HL2



Last edited by @$3.1415rin; 14-12-2004 at 17:58..
  
Reply With Quote