.:: 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: Hooking into HL2 DLL ?
Old
  (#31)
botman
Super Moderator
 
Status: Offline
Posts: 280
Join Date: Jan 2004
Location: Plano, TX
Default Re: Hooking into HL2 DLL ? - 19-01-2005

"PS. Botmans way will always work, because it is based on building a network message. (until they re-write the netcode)"

Heh-heh!

botman
  
Reply With Quote
Re: Hooking into HL2 DLL ?
Old
  (#32)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: Hooking into HL2 DLL ? - 19-01-2005

Just tossing this...
Maybe the hooking method isn't impossible, what about implementing the functionality of the interface factory in the hook DLL ? We would "just" need to know about a particular version of the interface and stick to it (which involves of course the need to know where to read and write for this particular version). It sounds like it would work OK for one side of the interface, but I'm wondering about the other...



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: Hooking into HL2 DLL ?
Old
  (#33)
sfx1999
Member
 
sfx1999's Avatar
 
Status: Offline
Posts: 534
Join Date: Jan 2004
Location: Pittsburgh, PA, USA
Default Re: Hooking into HL2 DLL ? - 19-01-2005

You know it might work if the netcode was hooked, but that would probably be more evil than hooking the interfaces.


sfx1999.postcount++
  
Reply With Quote
Re: Hooking into HL2 DLL ?
Old
  (#34)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: Hooking into HL2 DLL ? - 19-01-2005

huh ? I don't get it again. I wasn't talking about netcode, but about the virtual function tables... ???



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: Hooking into HL2 DLL ?
Old
  (#35)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: Hooking into HL2 DLL ? - 19-01-2005

Quote:
Originally Posted by SteveC
The CBasePlayer->ProcessUserCommands() trick (which I started) doesn't work anymore as has been said, but the CBasePlayer->PlayerRunCommand() doesn't work either, even if you do pass the correct movehelper pointer. The debug error is that the function isn't returning as it expected so it sounds like Valve changed the CBasePlayer class, and therefore changed the virtual function table. However the SDK hasn't been updated (?), so currently we can't use the CBasePlayer class.
I don't know if Valve changed the CBasePlayer to stop us using it or if it was to fix some bugs. I think it's just something they had to do to get the bots working.

PS. Botmans way will always work, because it is based on building a network message. (until they re-write the netcode)
rofl well i only converted code that i considered nescesary to do it directly through cBasePlayer, so in my case my bots should still work fine


Author of RealBot, "Arrakis" and "Dune 2 - The Maker" | co-Founder of Bots-United | Fundynamic | Blog | E-Mail me
  
Reply With Quote
Re: Hooking into HL2 DLL ?
Old
  (#36)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: Hooking into HL2 DLL ? - 19-01-2005

Also, if any SDK release comes soon, we can hope for a fully basic bot plugin from Valve, which i find very neat from them!


Author of RealBot, "Arrakis" and "Dune 2 - The Maker" | co-Founder of Bots-United | Fundynamic | Blog | E-Mail me
  
Reply With Quote
Re: Hooking into HL2 DLL ?
Old
  (#37)
Cheeseh
[rcbot]
 
Cheeseh's Avatar
 
Status: Offline
Posts: 361
Join Date: Dec 2003
Location: China
Default Re: Hooking into HL2 DLL ? - 19-01-2005

Quote:
Originally Posted by SteveC
Yeah I had my own bot in HL2: DM. I hadn't converted my movement code so it didn't do anything, just floated there. But it was in the game, in a team, and alive. It died too with a high speed barrel !

I haven't done anything special, just refreshed the SDK content which might have changed stuff.
I have no joy here, I've refreshed game content, still no dice ! same thing happens (engine->createFakeclient() crashes.)
  
Reply With Quote
Re: Hooking into HL2 DLL ?
Old
  (#38)
SteveC
Member
 
Status: Offline
Posts: 37
Join Date: Jan 2005
Location: UK
Default Re: Hooking into HL2 DLL ? - 19-01-2005

Quote:
Originally Posted by stefanhendriks
rofl well i only converted code that i considered nescesary to do it directly through cBasePlayer, so in my case my bots should still work fine
Yeah, I dived in a bit quick with using lots of useful stuff within the CBasePlayer, like choosing and changing weapons, detecting damage etc. So I'm gonna wait a week until I start undoing it all.
  
Reply With Quote
Re: Hooking into HL2 DLL ?
Old
  (#39)
dub
Member
 
dub's Avatar
 
Status: Offline
Posts: 89
Join Date: Aug 2004
Location: UK
Default Re: Hooking into HL2 DLL ? - 19-01-2005

My stupidity getting mixed up with CBasePlayer & IServerGameClients Processusercmds (i was messing with the ubframe and not steve`s template) and wasn`t using my brain .


Dubb`s Coding Cave WiP - YeGods - Free Image hosting
4u-servers.co.uk : YeGods Gin Palace II - Refloated - 195.20.108.30:27025
  
Reply With Quote
Re: Hooking into HL2 DLL ?
Old
  (#40)
sfx1999
Member
 
sfx1999's Avatar
 
Status: Offline
Posts: 534
Join Date: Jan 2004
Location: Pittsburgh, PA, USA
Default Re: Hooking into HL2 DLL ? - 20-01-2005

Quote:
Originally Posted by Pierre-Marie Baty
huh ? I don't get it again. I wasn't talking about netcode, but about the virtual function tables... ???
I am saying there is always the brute force method of simulating an actual client connecting. You could pass the server data to the bots through a plugin.


sfx1999.postcount++
  
Reply With Quote
Reply


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

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