.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Developer's Farm > SDK Programming discussions > Half-Life 2 SDK
Half-Life 2 SDK For developments focused around the Half-Life 2 engine Half-Life 2

Reply
 
Thread Tools
Re: Lets get this stuff rolling!
Old
  (#11)
@$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! - 13-12-2004

I guess this CBasePlayer shouldnt then be a big problem, since you have to have some pointer to a data structure describing the entity of your bot. and if everything is fine, this should be a CBasePlayer, at least when thinking about inheritance .. but well, that's only theory

OT: I really gotta have more time


  
Reply With Quote
Re: Lets get this stuff rolling!
Old
  (#12)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: Lets get this stuff rolling! - 13-12-2004

the problem is , we don't...

the player class has a pointer to any edict, so cBaseEntity has a edict_t, logically ... could be used for bots and all, but we just can't access cBaseEntity (yet?). Its not that odd though, because cBaseEntity is very mod specific. And we don't (should not) need that.


Author of RealBot, "Arrakis" and "Dune 2 - The Maker" | co-Founder of Bots-United | Fundynamic | Blog | E-Mail me
  
Reply With Quote
Re: Lets get this stuff rolling!
Old
  (#13)
sfx1999
Member
 
sfx1999's Avatar
 
Status: Offline
Posts: 534
Join Date: Jan 2004
Location: Pittsburgh, PA, USA
Default Re: Lets get this stuff rolling! - 13-12-2004

Try taking a peek at the monster class.


sfx1999.postcount++
  
Reply With Quote
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
Re: Lets get this stuff rolling!
Old
  (#15)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: Lets get this stuff rolling! - 14-12-2004

interesting indeed. I thought there was already a game events manager though?

Edit:
oops. My bad, did not read wel. ServerEntities, pretty neat stuff asp!


Author of RealBot, "Arrakis" and "Dune 2 - The Maker" | co-Founder of Bots-United | Fundynamic | Blog | E-Mail me
  
Reply With Quote
Re: Lets get this stuff rolling!
Old
  (#16)
Jerry
Member
 
Jerry's Avatar
 
Status: Offline
Posts: 10
Join Date: Dec 2004
Location: Woerden, The Netherlands
Default Re: Lets get this stuff rolling! - 14-12-2004

Wow, nice find Aspirin .
Gotta check this out!


Imagination is more important than knowledge. Knowledge is limited - Albert Einstein
  
Reply With Quote
Re: Lets get this stuff rolling!
Old
  (#17)
@$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

looks like the idea was good, but it doesnt work. you somehow can't load this interface.

at least we know now how to load those interfaces in general



Last edited by @$3.1415rin; 14-12-2004 at 23:35..
  
Reply With Quote
Re: Lets get this stuff rolling!
Old
  (#18)
botman
Super Moderator
 
Status: Offline
Posts: 280
Join Date: Jan 2004
Location: Plano, TX
Default Re: Lets get this stuff rolling! - 15-12-2004

Use the gameServerFactory to load IServerGameEnts...

Code:
	gameents = (IServerGameEnts*)gameServerFactory(INTERFACEVERSION_SERVERGAMEENTS, NULL);
  	if ( !gameents )
  		Msg("PLUGIN: Unable to load gameents, ignoring\n");
  	else
  		Msg("PLUGIN: Loaded gameents\n");
botman
  
Reply With Quote
Re: Lets get this stuff rolling!
Old
  (#19)
botman
Super Moderator
 
Status: Offline
Posts: 280
Join Date: Jan 2004
Location: Plano, TX
Default Re: Lets get this stuff rolling! - 15-12-2004

Here's a bunch of them (the one's commented out don't work)...

Code:
 	enginetrace = (IEngineTrace*)interfaceFactory(INTERFACEVERSION_ENGINETRACE_SERVER, NULL);
 	if ( !enginetrace )
 		Msg("PLUGIN: Unable to load enginetrace, ignoring\n");
 	else
 		Msg("PLUGIN: Loaded enginetrace\n");
 
 	gamedll = (IServerGameDLL*)gameServerFactory(INTERFACEVERSION_SERVERGAMEDLL, NULL);
 	if ( !gamedll )
 		Msg("PLUGIN: Unable to load gamedll, ignoring\n");
 	else
 		Msg("PLUGIN: Loaded gamedll\n");
 
 	gameents = (IServerGameEnts*)gameServerFactory(INTERFACEVERSION_SERVERGAMEENTS, NULL);
 	if ( !gameents )
 		Msg("PLUGIN: Unable to load gameents, ignoring\n");
 	else
 		Msg("PLUGIN: Loaded gameents\n");
 
 	gameclients = (IServerGameClients*)gameServerFactory(INTERFACEVERSION_SERVERGAMECLIENTS, NULL);
 	if ( !gameclients )
 		Msg("PLUGIN: Unable to load gameclients, ignoring\n");
 	else
 		Msg("PLUGIN: Loaded gameclients\n");
 
 	spatialpartition = (ISpatialPartition*)interfaceFactory(INTERFACEVERSION_SPATIALPARTITION, NULL);
 	if ( !spatialpartition )
 		Msg("PLUGIN: Unable to load spatialpartition, ignoring\n");
 	else
 		Msg("PLUGIN: Loaded spatialpartition\n");
 
 	voiceserver = (IVoiceServer*)interfaceFactory(INTERFACEVERSION_VOICESERVER, NULL);
 	if ( !voiceserver )
 		Msg("PLUGIN: Unable to load voiceserver, ignoring\n");
 	else
 		Msg("PLUGIN: Loaded voiceserver\n");
 
 	staticprops = (IStaticPropMgr*)interfaceFactory(INTERFACEVERSION_STATICPROPMGR_SERVER, NULL);
 	if ( !staticprops )
 		Msg("PLUGIN: Unable to load staticprops, ignoring\n");
 	else
 		Msg("PLUGIN: Loaded staticprops\n");
 
 //	mapdata = (IMapData*)gameServerFactory(INTERFACEVERSION_MAPDATA, NULL);
 //	if ( !mapdata )
 //		Msg("PLUGIN: Unable to load mapdata, ignoring\n");
 //	else
 //		Msg("PLUGIN: Loaded mapdata\n");
 
 //	physics = (IPhysics*)gameServerFactory(VPHYSICS_INTERFACE_VERSION, NULL);
 //	if ( !physics )
 //		Msg("PLUGIN: Unable to load physics, ignoring\n");
 //	else
 //		Msg("PLUGIN: Loaded physics\n");
 
 //	physicscol = (IPhysicsCollision*)gameServerFactory(VPHYSICS_COLLISION_INTERFACE_VERSION, NULL);
 //	if ( !physicscol )
 //		Msg("PLUGIN: Unable to load physicscol, ignoring\n");
 //	else
 //		Msg("PLUGIN: Loaded physicscol\n");
 
 //	physicssurfprop = (IPhysicsSurfaceProps*)gameServerFactory(VPHYSICS_SURFACEPROPS_INTERFACE_VERSION, NULL);
 //	if ( !physicssurfprop )
 //		Msg("PLUGIN: Unable to load physicssurfprop, ignoring\n");
 //	else
 //		Msg("PLUGIN: Loaded physicssurfprop\n");
 
 	enginesound = (IEngineSound*)interfaceFactory(IENGINESOUND_SERVER_INTERFACE_VERSION, NULL);
 	if ( !enginesound )
 		Msg("PLUGIN: Unable to load enginesound, ignoring\n");
 	else
 		Msg("PLUGIN: Loaded enginesound\n");
 
 	enginecache = (IVEngineCache*)interfaceFactory(VENGINE_CACHE_INTERFACE_VERSION, NULL);
 	if ( !enginecache )
 		Msg("PLUGIN: Unable to load enginecache, ignoring\n");
 	else
 		Msg("PLUGIN: Loaded enginecache\n");
 
 	modelinfo = (IVModelInfo*)interfaceFactory(VMODELINFO_SERVER_INTERFACE_VERSION, NULL);
 	if ( !modelinfo )
 		Msg("PLUGIN: Unable to load modelinfo, ignoring\n");
 	else
 		Msg("PLUGIN: Loaded modelinfo\n");
botman
  
Reply With Quote
Re: Lets get this stuff rolling!
Old
  (#20)
sfx1999
Member
 
sfx1999's Avatar
 
Status: Offline
Posts: 534
Join Date: Jan 2004
Location: Pittsburgh, PA, USA
Default Re: Lets get this stuff rolling! - 15-12-2004

Hey what if you tried to rip the exports out of the DLL?

Is that legal?


sfx1999.postcount++
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com