.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Half-Life 2 SDK (http://forums.bots-united.com/forumdisplay.php?f=62)
-   -   Let the revolution begin!!! (http://forums.bots-united.com/showthread.php?t=3301)

botman 31-12-2004 03:47

Let the revolution begin!!!
 
Check this out...

www.botman2.com/videos/HPB_bot2_alpha.avi

I got bots working in Counter-Strike: Source!!!

P.S. That video isn't going to stay there long. Somebody might want to mirror it before this time tomorrow. :|

(source code coming soon)

EDIT: Viva la revolution!

botman

Cpl. Shrike 31-12-2004 03:51

Re: Let the revolution begin!!!
 
One word. (or two)

Botman you rule

===============
EDIT: Viva la revolution!

===============
EDIT: mirror here

Botmans HPB bot2 alpha movie

Botmans HPB_bot2_Alpha_Source.zip

Cheeseh 31-12-2004 03:54

Re: Let the revolution begin!!!
 
can always count on the bot-man 8D

botman 31-12-2004 04:51

Re: Let the revolution begin!!!
 
As promised, here is the server plugin source code...

www.botman2.com/downloads/HPB_bot2_Alpha_1.zip

You will need to have created a Mod first (using Steam "Play Games" and double-clicking on "Source SDK", then double-clicking on "Create a Mod", and choosing "Start a mod from scratch").

Unzip the .zip file into your "MyMod/src/utils" folder and read the ReadMe.txt file found in the "MyMod/src/utils/HPB_bot2" folder.

Have fun!!!

botman

cannonfodder 31-12-2004 05:11

Re: Let the revolution begin!!!
 
hmmm... I wonder who suggested this ...

gameclients->ProcessUsercmds(pBot->edict, &read_buf, 1, 1, 0, false, false);

I'm still going to one-up you by figuring out how to get at the baseclass though.
If the client can do it I still think the plugin can.

botman 31-12-2004 05:30

Re: Let the revolution begin!!!
 
GO FOR IT! I'd love to see somebody get that working reliably inside a plugin. I still think it's impossible (at least to maintain it over various upgrades to the engine and game DLL files) since you assume that you know what is contained in the CBaseEntity and CBasePlayer classes based on what's in the SDK. There is nothing that forces MOD authors to use either of these classes as they exist in the SDK (MODs can add or remove stuff from them without your knowledge and this will break things because function pointers and member variables won't match up anymore).

BUT HEY! Give it a shot and see what you can do! :)

botman

cannonfodder 31-12-2004 05:48

Re: Let the revolution begin!!!
 
I don't believe you can change cbaseentity without crashing the engine. Since there are engine funcs to get to this (which I thought I could use, but I can't :( ).

If they change cbaseentity & engine then you'll have to recompile anyway.

cbaseplayer can obviously change and I would expect it to.

cannonfodder 31-12-2004 08:53

Re: Let the revolution begin!!!
 
So it appears that
CSDKPlayer* pPlayer = ((CSDKPlayer *)CBaseEntity::Instance( g_pEdict ));

actually returns a REAL pointer to cbaseentity. Even when called in a plugin. I was able to create a bot and get him to move by calling

pPlayer->PlayerRunCommand( &cmd, MoveHelperServer() );

This calls back into server.dll, since the function pointers were set up there !

I had to stub out MoveHelperServer since I don't have one in the plugin, but everything else appears to work. I was able to kill the bot, and it would respawn
right away.


Rifleman 31-12-2004 10:06

Re: Let the revolution begin!!!
 
Ah and yes botman , is the plugin can only be compiled with Microsoft Visual Studio .NET ? I only have MSVC 6

@$3.1415rin 31-12-2004 10:53

Re: Let the revolution begin!!!
 
nice work botman ! ( who expected anything else but this development ?! )

about MSVC: http://wiki.bots-united.com/index.ph...Life%202%20SDK


All times are GMT +2. The time now is 13:24.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.