"Is he meaning that they took the equivalents of CreateFakeClient and RunPlayerMove out of the "enginefuncs" or whatever it is called now ?"
CreateFakeClient() is still an engine function pfnRunPlayerMove() became PlayerRunCommand() and is now part of the player.cpp file. Player movement is handled by something called MoveHelperServer() whos code is now part of the game DLL (not part of the engine). It looks like all of the engine functions that handled player movement are now handled in the game DLL. I believe that all collision checking is still handled in the engine (but I haven't researched this yet).
"If we were to realize a hook DLL, first HPB_bot style, WHAT would we get ? Is it possible, first ?"
No, it's not. Here's why. Under Half-Life1, you renamed the game DLL (mp.dll or hl.dll), you copied your hook DLL into the 'dlls' folder and your hook DLL loaded the game DLL. Remember everytime you upgraded a MOD, you had to go through this step all over again? With Steam, the server.dll (which replaced mp.dll or hl.dll) is updated almost once a week (there have been updates constantly since Half-Life2 was released). The frequency of the updates to server.dll will decrease over time, but each time the server.dll is updated, it will overwrite your hook server.dll and the player will have to re-install things.
The game DLL to engine interface is COMPLETELY different for Half-Life2. In Half-Life2, you have ONE function exported from the game DLL (called CreateInterface). Here's the output from 'dumpbin' on server.dll
Code:
Dump of file server.dll
File Type: DLL
Section contains the following exports for server.dll
00000000 characteristics
41AD220F time date stamp Tue Nov 30 19:44:47 2004
0.00 version
1 ordinal base
1 number of functions
1 number of names
ordinal hint RVA name
1 0 0016A490 CreateInterface
Summary
9F000 .data
98000 .rdata
53000 .reloc
2B4000 .text
The CreateInterface function is used by the engine to pass in an "interface factory" function pointer. This "interface factory" is used to obtain function pointers to engine interfaces. You basically pass in a ID number of the type of interface you want and the engine returns you a pointer to the interface that matches what you asked for. For example, if you want an engine interface called "IGameEventManager" (which notifies you of game events like, player deaths, flag captures, etc), you might pass in 0x507 as the ID for the Game Event Manager (this ID is defined in the SDK header files). You get back a pointer to this interface so that you can call functions on that interface. Now let's say Valve decides to add a new function to this interface but doesn't want to break any existing MODs. They create interface 0x508 which has a different set of functions that 0x507 did. MODs that ask for interface 0x507 get that. Newer MODs that ask for interface 0x508 get it and can use the new functions. This allows the engine to be easily upgraded without breaking ANY existing MODs.
So you no longer have a 1-to-1 interface between the game DLL and the engine code. You have an N-to-N interface since your hook has to support all the latest and greatest engine interfaces in order to not break newer MODs (and this problem existed previously with bots in Half-Life1, but the engine interface RARELY changed, with Steam, the engine interface could be changing on a weekly basis).
Like I said on VERC, I believe that a server plugin type bot DLL would be possible, but it will be EXTREMELY difficult to get at the information that bots will need (it's difficult right now just to get at the other player's origin and angles).
botman